Using Regular Expressions in Vim


On OpenBSD and Debian, Vim’s built-in regex support allows simple but powerful text manipulation for notes, drafts, and prose.

Search

Replace

Anchors and Characters

Examples for Daily Prose

:%s/\s\+$//e
:%s/\.  \./. ./g
:g/^\s*\w/\norm! gUiw
:/TODO

Notes on OpenBSD / Debian