Hacker News new | past | comments | ask | show | jobs | submit login

It's not so much the moving between the files - which vim is terrible at (one of the many things I had to extend in vim in order to get it to work like an IDE). But it's moving and editing within the file itself.

E.g., say you somehow got to a file, and it now has a bunch of functions in it, and you're literally looking at the line you want to edit. To get to that line, there's a bunch of different ways, but you can do this in like 3 key presses. Then, within the line, you can change anything in it really easily.

This sounds weird, so I'll try to give an example. Let's assume you have something like:

Func(self._something, self.something_else).validate, 'Validate exam foundation table')

And let's say you want to change the string that says 'Validate [...]' to say 'Change is good!!'.

To do that, once you've gotten to the line, I'd probably hit two key presses that mean "go to the first open quote in the line", then I'd hit the keys that mean "delete everything inside of the quote character", then I'd type what I want. All in all, I'd be typing these characters before actually writing what I want to write: f'ci' (so, 5 characters).

That probably looks either idiotic or daunting - but the idea of vim is that it's a language - you are literally thinking in your head "go to that quotation mark", then tell vim to do that and it does. Then you're thinking "delete everything inside of these quotations", and it does it. The distance between thinking what you want to do and doing it is almost zero - it's as close as you can get to literally telling someone exactly what to do.

If you're using a non-vim editor, you'd probably have your cursos in the begining of the line, and have to do "cmd+right" several times to skip over words in order to get to the first word of the string, then have to "shift+cmd+right" to get to the end of the string, then write what you want.

There might also be some small annoyances - the last shift+cmd+right might take you over the last quotation mark, and you'd end up selecting the closing paren as well. In vim - that doesn't happen, you're saying exactly what you want to have happen.

Or you might want to undo this change - in vim, it's always hitting "u" once, because in vim, changing the string to something else is an atomic motion. In another editor, you might have to undo a few words at a time, or maybe not - it's not always predictable. And since it's atomic in vim, it's also easy to re-apply the same action to another string - so changing another string to the same thing is a simple matter of hitting "." on it.

And of course, this is just a tiny example. It's easy to dismiss as trivial or unimportant - these are tiny savings of time, after all, and even if you add it up, I doubt the "time saved" in doing things more efficiently is worth much.

But once you know this language for telling an editor exactly what to do, then using an editor that doesn't speak that language just feels super slow - it feels like you are not able to communicate properly, and suddenly, what used to be zero gap between thinking and doing, takes a long time.




> If you're using a non-vim editor, you'd probably

Double-click the word to select it, and start typing right away.

> it's as close as you can get to literally telling someone exactly what to do.

I usually tell someone "Change the word 'validate' to 'something else'". SO i grab my mouse/trackpad, and get there in one click (or double-click).

> It's easy to dismiss as trivial or unimportant - these are tiny savings of time, after all

You should observe most of these "savings" in real life. There's rarely a time when I can't do stuff with code faster than a Vim user. Because by the time the vim user has typed the required sequence of letter, or counted which line/symbol/mark to go to, or wrote a macro correctly, I'll have finished all I needed to do using IDEs built-in capabilities and/or a mouse.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: