posted
8/20/2006

vim 7.0 tabs and spellcheck

Using tabs to work on multiple files simultaneously

To open several files at once and put each in a separate tab, use the -p option and all the file names on the command line while launching . Consider aliasing vim to vim -p.

Check out the full vim documentation on tabs. The essential commands are the following:

:tabnew
:tabe[dit]
:tabnew {file}
:tabe[dit] {file}

:tabc[lose][!]
:tabc[lose][!] {count}
:tabo[nly][!]

:tabn[ext]
:tabp[revious]
:tabn[ext] {count}
{count}gt
:tabfir[st]
:tabl[ast]

:tabm[ove] [N]

:tabs

The new integrated spellcheck feature in vim 7.0

To turn it on and off:

:set spell
:set nospell

To turn it on automatically for certain types of files, add this to the .vimrc file:

autocmd BufNewFile,BufRead *.txt,*.tex,README set spell

Then create a directory ~/.vim/spell for vim to hold personal word lists.

Once turned on, use ]s and [s to move to the next and previous misspelled words. Here is the vim documentation for spell checking.