My vi cheat sheet…
vi is – sort of – my editor of choice, but I tend to use it spasmodically, moving over to a graphical editor and then coming back from time to time. As such, by the time I’ve mastered the finer commands, I’ve forgotten them again, so I keep a cheat sheet in the back of my notebook which I occasionally lose. So – I’ll update this as and when…It’s for me, not you, so don’t complain that it’s a bit lacking…
Movement |
|
h, j, k, l | Left, Down, Up, Right |
w, b | Forward, Backwards by word |
0 | Move to Beginning of Line |
e | End of word |
Status Line Commands |
|
/ | Search Forward |
? | Search Backwards |
:[command] | Run shell command |
J | Join Lines |
YY | Yank current line (copy to clipboard) |
P | Put (or paste) before the position or line |
p | Put (or paste) after the position or line |