Hacker News new | ask | show | jobs
by gbersac 3749 days ago
I really tried vim for months. I found it uselessly verbose while sublime has straightforward key shortcut that help a lot.

How could you be more efficient using vim ? That's something I don't understand. I always suspect vim and emacs user saying it because it makes them feel like super programmer.

1 comments

It can take awhile for things to "click" with Vim before you really understand it.

Start by reading this StackOverflow answer[0] titled, "Your problem with Vim is that you don't grok vi."

Like that poster states, when you are using Vim correctly you are speaking a language as you are editing. You provide it an action and then you tell Vim what to apply the action to. This is usually either a motion command, or a text object. Combining these concepts allows you to have a level of expressiveness that non-modal editors cant easily replicate.

If you are just using Vim as you would use a non-modal editor you aren't going to see any gains. But if you embrace the "language" idea of Vim, learn to spend most of your time in command mode, and start combining actions + motions/text objects, you will start to see the real power of Vim.

[0] http://stackoverflow.com/a/1220118/2635

A bit of history helps to understand why vi(m) operates in this fashion. Vi was first released in 1976 as the visual editor to the ex line editor. The networks were very fast in that time period, so it helped to "load up" on commands before you submitted them to gain as much productivity as you could:

"Joy explained that the terse, single character commands and the ability to type ahead of the display were a result of the slow 300 baud modem he used when developing the software and that he wanted to be productive when the screen was painting slower than he could think."

Taken from: https://en.wikipedia.org/wiki/Vi

An example to me, of how something pragmatic (wanted to avoid round trips) took on a life of its own.