A mobile friendly Vim cheat sheet
11–20 of 20 posts
Re: A mobile friendly Vim cheat sheet
#12It's missing my favorite commands - ci", ci{, and ci( - change (replace) inside quotes, brackets, and parens (respectively) pair under the cursor.
Re: A mobile friendly Vim cheat sheet
#13 gg - top of file
G - end of file
5gg - go to line 5 (I find this easier than 5G)
ciw - delete current word and enter insert mode
yiw - copy current word
zz - center cursor (its also nice to remap G to Gzz etc)Re: A mobile friendly Vim cheat sheet
#14I'm a bit confused what the intended use case is, here. Is the idea to have it loaded on your tablet while programming on your laptop or desktop so you don't have to switch screens? Why not just print it out and pin it to the wall?
I made a similar cheat sheet years ago as a PDF. It got some popularity around the developer community. I think it being html/an open source document, you can use it in many different ways (including printing it out and putting it on your wall). The fact that I have already received pull request I think shows it might be a good idea.
Re: A mobile friendly Vim cheat sheet
#15Should also mention: gg - top of file G - end of file 5gg - go to line 5 (I find this easier than 5G) ciw - delete current word and enter insert mode yiw - copy current word zz - center cursor (its also nice to remap G to Gzz etc)
Re: A mobile friendly Vim cheat sheet
#16"c$ - change (replace) to the end of line" I find 'C' simpler for that command.
'c$' OR 'C' = change to end of line
'd$' OR 'D' = cut to end of line
'y$' = yank to end of line
'cc' = change entire line
'dd' = cut entire line
'yy' OR 'Y' = yank entire line
Re: A mobile friendly Vim cheat sheet
#17Also a nice one is :Sex
For splitting windows and navigating the file system.
Re: A mobile friendly Vim cheat sheet
#18Should also mention: gg - top of file G - end of file 5gg - go to line 5 (I find this easier than 5G) ciw - delete current word and enter insert mode yiw - copy current word zz - center cursor (its also nice to remap G to Gzz etc)
one of these can be shortened: cw - deletes the current word & enters insert mode
Re: A mobile friendly Vim cheat sheet
#19It's missing my favorite commands - ci", ci{, and ci( - change (replace) inside quotes, brackets, and parens (respectively) pair under the cursor.
That's actually one command/operator (c) with different motions (in case, they're all text objects).
Re: A mobile friendly Vim cheat sheet
#20Should also mention: gg - top of file G - end of file 5gg - go to line 5 (I find this easier than 5G) ciw - delete current word and enter insert mode yiw - copy current word zz - center cursor (its also nice to remap G to Gzz etc)
one of these can be shortened: cw - deletes the current word & enters insert mode