Live data from Hacker News

Vim: Takeaways from One Year of Typing

sankho.github.io

61–70 of 98 posts

Re: Vim: Takeaways from One Year of Typing

#61

Earlier quoted context omitted.

I've switched from vim to kakoune some time ago. vim does have the advantage of a bigger ecosystem, but I do believe it is possible to have an editor better than it.

I've taken a look at kakoune. It's very similar to vim, isn't it? When I say vim, I also mean neovim, which currently is already superior to vim in a lot of ways.

The author of kakoune initially intended to rewrite vim from scratch, so there is definitely a similarity. A big difference is that kakoune operates in terms of selections rather than motions, with built-in support for things like multiple cursors as well. I find it more intuitive to use than vim, and just as powerful.

Re: Vim: Takeaways from One Year of Typing

#62

Here's the thing: when you're coding, how much time is spent on reading vs writing? For me it's probably 90/10. 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 t…

>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.

Re: Vim: Takeaways from One Year of Typing

#63
I use vim on a daily basis and think it's a great editor, but it's definitely overhyped. Plugins in particularly are pretty disappointing if you're coming from an editor like sublime. Off the top of my head, syntax checking, fuzzy searching and multicursor options are all perfectly usable but very limited compared to sublime's offerings.

Re: Vim: Takeaways from One Year of Typing

#64
post #10

> Relax! No other text editor has as many developers working on plugins than VIM. What about emacs?

>What about emacs?

From this, and I think HN is a good place for such a poll, it looks half as many people use Emacs compared to Vim.

https://news.ycombinator.com/item?id=8678339

And it actually should be even less, judging from people in my university and in every workplace I've been.

Re: Vim: Takeaways from One Year of Typing

#65

Here's the thing: when you're coding, how much time is spent on reading vs writing? For me it's probably 90/10. 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 t…

I think your example is somewhat badly chosen.

If I had to delete four lines, I'd most likely mash dd until done, or maybe Vjjjd. It would be completely automatic and not require reaching for numbers or the arrow keys, making it significantly faster and more comfortable as well.

I find that vim is extremely good for reading code, since navigating around a file is very easy (and I am in no danger of accidentally editing code while not in insert mode.).

Not having to reach for the arrow keys while navigating is a huge plus as well, since it keeps my fingers on the same position whether I am typing or navigating.

EDIT: Vjjjd, not Vjjjjd. Drives home the point that it's automatic, since I can't get it right if I think about it...

Re: Vim: Takeaways from One Year of Typing

#66

Here's the thing: when you're coding, how much time is spent on reading vs writing? For me it's probably 90/10. 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 t…

After using vim for a while, you don't think about text operations consciously, it's all subconscious / muscle memory. It's possible to do something like "shift+press the down arrow 4 times, backspace" in Vim by the way: "Vjjjd" or "dd...". In fact, as I was typing this comment I couldn't even remember what the right key strokes were and had to open Vim, delete 4 lines and try to consciously pay attention to which keys my fingers were hitting! So even if you have to think consciously about text operations in the beginning, don't let that scare you off as it will almost certainly become muscle memory after some practice.

Re: Vim: Takeaways from One Year of Typing

#67

Earlier quoted context omitted.

I've taken a look at kakoune. It's very similar to vim, isn't it? When I say vim, I also mean neovim, which currently is already superior to vim in a lot of ways.

The author of kakoune initially intended to rewrite vim from scratch, so there is definitely a similarity. A big difference is that kakoune operates in terms of selections rather than motions, with built-in support for things like multiple cursors as well. I find it more intuitive to use than vim, and just as powerful.

Interesting. I've already given it a short try and I can see some differences. Do you use it as your main editor when you need to use an editor?

Re: Vim: Takeaways from One Year of Typing

#68
post #10

> Relax! No other text editor has as many developers working on plugins than VIM. What about emacs?

I thought this too when I read the article. Then it occurred to me that I don't have any idea how many developers work on plugins for either. Looking naively at github files by type is unreliable, since so many people do things like keep their .vimrc and .vim files on github which artificially inflates the number of .vimL repositories. What I do know is that if there's something I want done, I suspect there is a plug…

> What I do know is that if there's something I want done, I suspect there is a plugin that does it.

Maybe it's just my anecdotal evidence, but I've looked for alternatives to certain emacs plugins used by my co-workers (such as org-mode and ensime) and couldn't find a suitable replacement (I know there are some alternatives for vim, but they pale in comparison to their emacs counterparts).

Re: Vim: Takeaways from One Year of Typing

#69
post #10

> Relax! No other text editor has as many developers working on plugins than VIM. What about emacs?

We're talking about text editors, not operating systems. (Sorry. I had to. Don't hate me!)

I know it's the old cliche, but I love emacs largely for that reason. When I'm ssh'ed into one of my boxen, I can do a simple scp and have all my configs for IRC, eww, org-mode, EmacsWget, my custom scripts, etc, everything in one place and managed under one system ecosystem, and from a terminal without having to touch/forward X. The longer I spend in it the less convoluted simple text editing becomes, I just think there is a high barrier to entry that is daunting even for command line jockeys.

I still vi/vim everyday too though, mostly because some things, like embedded stuff I work on, emacs would be too much, so it's very much situational.

Re: Vim: Takeaways from One Year of Typing

#70

Here's the thing: when you're coding, how much time is spent on reading vs writing? For me it's probably 90/10. 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 t…

I think your example is somewhat badly chosen. If I had to delete four lines, I'd most likely mash dd until done, or maybe Vjjjd. It would be completely automatic and not require reaching for numbers or the arrow keys, making it significantly faster and more comfortable as well. I find that vim is extremely good for reading code, since navigating around a file is very easy (and I am in no danger of accidentally editi…

Great point about reading the file. I feel paranoid when using a text editor like sublime now just arrow key-ing or scrolling around a file since hitting practically any key will insert or delete a character!
Post reply on HN