Posts tagged ‘vim’
Vim Cheatsheet
Text
:set textwidth=79- to automatically insert lines breaks after 79 characters
gq- to wrap the text on the current line (or selected text)
:set wrap linebreak nolist- to display long lines as multiple screen lines
Spelling
:setlocal spell- turn on spell-checking
:set nospell- turn off spell-checking
:setlocal spell spelllang=en_gb- specify language
]s- move to next spelling mistake
zg- add the highlighted word to the dictionary
z=- suggest words for word under cursor
New files
:e filename- start editing a new file
or, in NERDTree, press m, and a from the context menu