Vim

Learning resources

Official documentation

Vim's history

Community-built documentation

Solutions to recurring uses in Vim

Regular expressions

:h regex
. : any character except new line
\s: whitespace character

Templating

:h template

Removing newline

In edition mode:


:%s/\n//g

In command mode: with J on each line to add the next line


J

Removing empty lines


g/^$/d

Spell checking


:h spell


:setlocal spell spelllang=en_us


z=


:spellr


]s


[s

Back to top

Index