Hacker News new | ask | show | jobs
by savanaly 3979 days ago
>Since most my time is spent concentrating on understanding code, the last thing I want is an editor that forces me to consciously think about text operations. "d[downkey]4" might be theoretically more efficient, but I spend way less cognitive energy holding down the shift key and pressing the down arrow 4 times.

The point is well taken, but don't forget that for most people that downside of increased cognitive pressure goes away after a few days or weeks of regular vim usage. I've been using it for about a year and all the combos I normally use are second nature to me (and have been for months). Don't underestimate the human brain's ability to grow and adapt and for incredibly complicated things to quickly turn into routine.

For the record, I almost never use vim's much touted hit a number key then an action to do it n times feature. I have modified it so j and k do the normal down/up one line and J K go down/up seven lines or so for scrolling. [1] If I'm doing something like deleting a line and have to delete a bunch (common case), then I'll "dd" to delete line and then hit "." (which repeats the last action) three or four times until satisfied. Way easier than counting the number of lines to delete then typing "4dd" imo.

[1] Note for anyone who wants to duplicate this: it was still unbearably slow to just hold down J or K to scroll because the default delay between depressing a key and when OSX decides you are actually holding it down and not just pressing it once is too long. Decrease it in the native settings of your OS for a smoother experience.

2 comments

I used it as my primary editor for two months, which IMO is more than enough time to give to a project like that. I was efficient in it, but none of the supposed productivity gains came about. On the other hand, in my IDE I can control-click on a method name to jump to it, or hit ctrl-r to rename something across the entire project, or hit alt-enter to automatically import a symbol when I know the name of a class I want but I can't quite remember the namespace it's in. Those things really do save me a lot of time; but the efficiency comes from the development environment being able to understand the code structure, not from being able to stack key commands.

If someone wants to use vim I'm not saying they shouldn't, I just think it's vastly overhyped.

I found I had to go a bit beyond the settings that OSX's native manager allow for to get the key repeat that I was after. Karabiner has a setting for adjusting it properly in ms (so you ~ match other machines). would recommend.

https://pqrs.org/osx/karabiner/