Vim

Replace string

Replce the first occurrence of the string

:s/foo/bar/

Replace all occurrences of the search pattern in the current line

:s/foo/bar/g

Replace the pattern in the entire file

:%s/foo/bar/g

bar can be empty to remove the string

move line

:m-2 // one line to top
:m+ // one line to button

see forum for set key binding

Highlight similar words

Use #

Go to end of line

Use $

Move between word

Use b to move back one word.

Use w to move forward one word.

Source

Last updated