β’0Guhn
Vim Hidden Commands
#vim#neovim#cheatsheet
g series
| Key | Action |
|---|---|
gi |
go to last insert position and enter insert mode |
gv |
reselect previous visual selection |
gJ |
join lines (no space, J adds space) |
gf |
open file path under cursor |
gx |
open URL under cursor in browser |
gu / gU |
lowercase / uppercase (guiw, gUiw) |
g; / g, |
jump through change history back/forward |
Ctrl combinations
| Key | Action |
|---|---|
<C-a> / <C-x> |
increment / decrement number |
<C-o> (insert) |
execute one command and return to insert |
<C-r>" (insert) |
paste register content |
<C-w> (insert) |
delete word |
Search
* " search word under cursor (forward) - no / needed
# " search word under cursor (backward)Command repeat
@: " repeat last ex command:s/foo/bar/g then @: on another line β execute again
Time-based Undo
:earlier 5m " go back 5 minutes
:later 2m " go forward 2 minutesUseful when accidentally deleted too much.
History window
q/ " search history
q: " command historyEdit and reuse previous searches/commands.
Most useful
| Rank | Command | Use |
|---|---|---|
| 1 | * |
instant search cursor word |
| 2 | <C-a> / <C-x> |
increment/decrement |
| 3 | gi |
return to last edit position |
| 4 | g; |
jump through change history |
Log
- β’ 2026-02-03: create