Vim for JavaScript
On reddit there is interesting movement to create list of all Vim command that are especially useful for JavaScript development.
I do not copy this list, just see it at reddit: http://www.reddit.com/r/vimcommands/top/?sort=top&t=all
Some of them are new to me and I will try to use them like:
gf
- open file whose name is under the cursor:3
- go to line by numberyy, p
-yy
copy current line,p
- pastes it below:vsp
file - open file in vertical new windowCtrl-ww
- switch between windows<Ctrl-v><number>jI#<ESC>
- comments lines (inserts #), number - of lines (arrows doesn't work for me, but you can insert many number of numbers eg.<5><2>
= 7), thenj
nadUPPERCASE i
, last text to insert.<ctrl-v><number>jx
- deletes column - undo commentgg=G
- format entire buffer (gg
- beginning of file,=
- auto indent,G
- end of file)
Want to learn more?
Sign up to get a digest of my articles and interesting links via email every month.