As a vi user for a long, long time, I've got used to only using the basic features - since many unix systems have a basic vi installed.
Recently most of the systems I manage have moved from Solaris to Ubuntu so the nicer features in VIM can be taken advantage of. This page is a brief summary where I'll keep track of interesting settings. Some Ubuntu versions only have a basic vi, so do a "apt-get install vim" first.
Features to enable in standard Ubuntu /etc/vim/vimrc
syntax on set background=dark (if reverse video is used to access that server) if has("autocmd") au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") \| exe "normal g'\"" | endif endif if has("autocmd") filetype indent on endif set showcmd " Show (partial) command in status line. set showmatch " Show matching brackets.
More sugar, especially for PHP editing.
The following are features that don't use, but note them because they are interested and need to start on them.
* To open multiple files in tabs from the command line.
vim -p filename1 filename2
* To open and jump to the end of a file
* :tabnew to open a new tab.
* gt to switch to the next tab.
* gT to switch to the previous tab.
* :tabc to close a tab.
* :split or Ctrl-w s will split the Vim view into two viewports, horizontally.
* :vsplit or Ctrl-w v will split the Vim view into two viewports, vertically.
* :split filename will split the Vim view into two viewports, horizontally, and open filename in the new viewport.
* :vsplit filename will split the Vim view into two viewports, vertically, and open filename in the new viewport.
* Ctrl-w r moves viewports clockwise.
* Ctrl-w R moves viewports counter-clockwise.
Scratching the surface
There is so much more to learn about vi..