No plugins. Standard Vim only.
Optimized for plain text, notes, drafts, and long-form prose.
Navigation
h j k l ←→ move
0 / ^ / $ — line start / first char / end
w / e / b — word forward / end / backward
gg / G — file start / end
{ / } — prev / next paragraph
Ctrl-d / Ctrl-u — half-page
H / M / L — top / middle / bottom of screen
Editing
o / O — new line
dd / D — delete line / to end
yy / p / P — yank / paste
J — join lines
>> / << — indent
u / Ctrl-r — undo / redo
. — repeat last edit
Searching & Replacing
/pattern / ?pattern — search
n / N — repeat search
* / # — search word under cursor
:%s/old/new/g — replace all
:%s/old/new/gc — replace with confirm
Paragraph & Formatting
gq} / gwip — format paragraph
vip — select paragraph
:set textwidth=72 — preferred line width
:set linebreak — wrap at word
Lines & Sorting
:sort — sort lines
:g/^$/d — delete empty lines
:v/^$/d — delete non-empty lines
J — join lines for prose
Marks & Jumps
ma — set mark
- `
a` / 'a` — jump to mark / line
'' — previous mark
Ctrl-o / Ctrl-i — jump back / forward
Visual Mode
v / V / Ctrl-v — char / line / block
> / < — indent selection
y / d — yank / delete
~ — toggle case
Other Essentials
:set wrap / :set nowrap
:set number / :set nonumber
:set spell / ]s / [s — spelling
:r filename — insert file
:w !sudo tee % — write with sudo
:set paste / :set nopaste — paste mode
Vim Prose Commands with Examples
| Command |
Purpose |
Example / Notes |
0 |
Beginning of line |
0 |
^ |
First non-blank character |
^ |
$ |
End of line |
$ |
w |
Next word |
w |
e |
End of word |
e |
b |
Previous word |
b |
gg |
Top of file |
gg |
G |
End of file |
G |
dd |
Delete line |
dd |
D |
Delete to end of line |
D |
yy |
Yank (copy) line |
yy |
p |
Paste after cursor |
p |
P |
Paste before cursor |
P |
J |
Join with next line |
J |
>> / << |
Indent / un-indent line |
>> |
u |
Undo |
u |
Ctrl-r |
Redo |
Ctrl-r |
. |
Repeat last change |
. |
/pattern |
Search forward |
/hello |
?pattern |
Search backward |
?world |
n / N |
Repeat search forward/back |
n |
* / # |
Search word under cursor |
* |
:%s/old/new/g |
Replace all occurrences |
:%s/foo/bar/g |
:%s/old/new/gc |
Replace with confirmation |
:%s/foo/bar/gc |
gq} |
Format paragraph |
gq} |
gwip |
Reformat paragraph visually |
gwip |
vip |
Select paragraph |
vip |
:set textwidth=72 |
Set preferred line width |
:set textwidth=72 |
:set linebreak |
Wrap at word boundaries |
:set linebreak |
ma |
Set mark at cursor |
ma |
` a`` |
Jump to mark |
` a`` |
'a |
Jump to mark line start |
'a |
'' |
Jump to previous mark |
'' |
Ctrl-o / Ctrl-i |
Jump backward / forward |
Ctrl-o |
v / V / Ctrl-v |
Visual char / line / block |
v |
> / < |
Indent / un-indent selection |
> |
~ |
Toggle case in selection |
~ |
:set wrap / :set nowrap |
Toggle line wrapping |
:set wrap |
:set number / :set nonumber |
Toggle line numbers |
:set number |
:set spell |
Spell check |
:set spell |
]s / [s |
Next / previous spelling error |
]s |
:set paste / :set nopaste |
Paste mode |
:set paste |
:r filename |
Insert file at cursor |
:r notes.txt |
Vim Prose Visual Cheat Sheet
| Navigation |
Editing / Undo / Repeat |
h j k l — move |
dd — delete line |
0 / ^ / $ — line beg / first char / end |
D — delete to end of line |
w / e / b — word fwd / end / back |
yy — yank line |
gg / G — file top / end |
p / P — paste after / before |
{ / } — paragraph prev / next |
J — join next line |
Ctrl-d / Ctrl-u — half-page |
>> / << — indent / un-indent |
H / M / L — screen top / mid / bottom |
u / Ctrl-r — undo / redo |
. — repeat last edit |
:set paste / :set nopaste — paste mode |
| Search & Replace |
Paragraph / Formatting |
/pattern / ?pattern — forward / backward |
gq} — format paragraph |
n / N — repeat search |
gwip — reformat paragraph visually |
* / # — word under cursor |
vip — select paragraph |
:%s/old/new/g — replace all |
:set textwidth=72 — preferred line width |
:%s/old/new/gc — confirm |
:set linebreak — wrap at word boundaries |
| Marks & Jumps |
Visual / Selection |
ma — set mark |
v — char-wise select |
` a`` — jump to mark |
V — line-wise select |
'a — jump to mark line |
Ctrl-v — block / column select |
'' — previous mark |
> / < — indent / un-indent selection |
Ctrl-o / Ctrl-i — jump back / forward |
y / d — yank / delete selection |
|
~ — toggle case in selection |
| Other Essentials |
Files / Display |
:r filename — insert file |
:set wrap / :set nowrap — toggle wrap |
:set number / :set nonumber — line numbers |
:set spell — spell check |
]s / [s — next / prev spelling error |
:w !sudo tee % — write with sudo (OpenBSD Vim only) |
✅ Notes for OpenBSD:
- Use full Vim (
pkg_add vim) for block select, gwip, paste mode, etc.
- Base
vi supports most navigation/editing but may lack advanced prose features.
:w !sudo tee % works the same as on Linux.