Other Vim Tricks

This is a reference of handy commands that don’t (yet) warrant their own note.

Remove lines that match a regex

:g/something/d

Remove lines that do not match a regex

:g!/something/d

Sort and remove non-unique lines

:sort u

Notes mentioning this note