Published January 19th, 2005 by Jim O'Halloran
Random vim hackery
Been playing with vim a bit and felt to need to record some of the things I’ve figured out before I forget. If this is useful to anyone, great, but its really here to jog my memory.
Setting tab widths
:set ts=2 sp=2
Turning suntax highlighting on/off
:syntax on
:syntax off
Files defining syntax highlighting stuff live in or near:
/usr/share/vim/vim62/syntax/
e.g. /usr/share/vim/vim62/syntax/php.vim
To load a vim macro file into vim
:source
All of these commands are active only for the current session. To make them run every time vim starts, add them to ~/.vimrc. My current .vimrc:
set ts=2 sp=2
syntax on