Skip to content

Instantly share code, notes, and snippets.

@victorcreed
Created April 15, 2013 09:00
Show Gist options
  • Save victorcreed/5386850 to your computer and use it in GitHub Desktop.
Save victorcreed/5386850 to your computer and use it in GitHub Desktop.
my optimization for vim...
VICTOR_VI_COMMAND=("vthis" "vmo" "vco" "view" "vconf" "vasset")
VICTOR_VI_PATH=("." "app/models/" "app/controllers/" "app/views/" "config/" "app/assets/")
tLen=${#VICTOR_VI_COMMAND[@]}
tfunc="$HOME/.tmp/t1"
function vi_init(){
for ((i=0; i < ${tLen}; i++));
do
(
echo "function \$VICTOR_VI_COMMAND[\$i]"
echo "{"
echo "vi \$VICTOR_VI_PATH[$i]\$1.rb"
echo "}"
) > $tfunc
. $tfunc
done
}
vi_init
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment