Ask HN: Vim Pro Tips?

11 points by samirahmed ↗ HN
Lots of HN users use Vim, does anybody have an pro-tips for the average Vim user they can share, to help boost everybody's productivity

3 comments

[ 2.8 ms ] story [ 13.5 ms ] thread
I highly recommend installing Janus, it comes with a bunch of useful customization and plugins: https://github.com/carlhuda/janus
I recommend avoiding packages like Janus when you are just getting started.

The key to vim success is really understanding the basics. Packages like Janus obscure some of this and hurt truly learning the fundamentals.

Similarly, I would limit plugins entirely. Maybe limit yourself to 1 or 2 new plugins per week until you really get understand whats going on.

Learn to use text objects¹ – they are what makes Vim much more powerful than Vi. You can even add custom text objects² such as function argument³ or camel case word⁴.

Text objects let you operate on logical units of text. E.g. “change inner word” (ciw), “delete a sentence” (das), change inner double quotes (ci"), ...

[1] http://blog.carbonfive.com/2011/10/17/vim-text-objects-the-d...

[2] http://vim.wikia.com/wiki/Creating_new_text_objects

[3] http://www.vim.org/scripts/script.php?script_id=2699

[4] http://www.vim.org/scripts/script.php?script_id=1905