Live data from Hacker News

Vim: revisited

mislav.uniqpath.com

21–30 of 117 posts

Re: Vim: revisited

#21
post #7

I remember reading the web page I linked to below some time late last year, and remembered thinking at the time I wished someone told me this when I first started learning vim some 18 years ago. To those who would say “that’s obvious; of course you learn vim incrementally”, I would simply say that having spoken to a number of vim users in the past, I never got that advice. Instead, I got a lot of advice about turning…

I guess all of those actual vim users had a reason to encourage you to take the "extreme route" instead of the incremental one. Maybe they have never seen anyone actually succeed in getting fluent in vim by incremental learning? I know I have yet to witness such.

But I'm glad to learn from your link that it's possible. I'll show it to aspiring vim users as an alternative take to learning vim.

Re: Vim: revisited

#22
post #8

I've used Pathogen previously and I have to say I much prefer Vundle. It's the only plugin I have to manage in my .vim directory. All the plugins I use are listed right in my vimrc, and running :BundleInstall does a git pull from each plugin's repository which gives me the latest updates. I use terminal-based vim for all of my coding and text editing all day, and my vimrc is only 91 sloc. https://github.com/tomhsx/do…

I would second this. Managing with pathogen is really finicky and a huge timesink if you screw things up.

The newer versions of Vundle are fantastic, and give you features like lists of your current plugins and searching of the plugins repository.

Re: Vim: revisited

#23
Why people always emphasis h/j/k/l when we already have arrow keys? Do you really waste a lot of time moving your fingers between them? Also, arrow keys work in insert mode.

Re: Vim: revisited

#25

Why people always emphasis h/j/k/l when we already have arrow keys? Do you really waste a lot of time moving your fingers between them? Also, arrow keys work in insert mode.

If you touch-type, keeping fingers on the home row is essential. So, yes, it's a huge waste.

Re: Vim: revisited

#26
post #14
post #7

I remember reading the web page I linked to below some time late last year, and remembered thinking at the time I wished someone told me this when I first started learning vim some 18 years ago. To those who would say “that’s obvious; of course you learn vim incrementally”, I would simply say that having spoken to a number of vim users in the past, I never got that advice. Instead, I got a lot of advice about turning…

The reason so many experienced people suggest learning the basics of Vim (or, in my case, Emacs) in one go is because it works quickly and efficiently--certainly more quickly and more efficiently than an incremental approach. Additionally, just giving up on arrow keys and the like does not necessarily entail a "huge volume" of memorization. I am an inherently lazy person; I cannot just sit down and memorize stuff (on…

The thing about vi vs emacs is that at the very beginning the learning curve for vi is already very steep. Simple things like keyboard navigation and even editing are non-trivial tasks.

This puts off a lot of people, especially if they're working full time as a couple of days fumbling with a text editor equates to real dollars lost in productivity. (In my experience though, it'll take at least a few weeks to be even mildly proficient).

If you're a student (I was 13 when I first picked up vi) this is no problem, as I had infinite time on my hands, but when you're working full time, the amount of time you have to experiment drastically reduces.

Re: Vim: revisited

#27
post #26
post #14

Earlier quoted context omitted.

The reason so many experienced people suggest learning the basics of Vim (or, in my case, Emacs) in one go is because it works quickly and efficiently--certainly more quickly and more efficiently than an incremental approach. Additionally, just giving up on arrow keys and the like does not necessarily entail a "huge volume" of memorization. I am an inherently lazy person; I cannot just sit down and memorize stuff (on…

The thing about vi vs emacs is that at the very beginning the learning curve for vi is already very steep. Simple things like keyboard navigation and even editing are non-trivial tasks. This puts off a lot of people, especially if they're working full time as a couple of days fumbling with a text editor equates to real dollars lost in productivity. (In my experience though, it'll take at least a few weeks to be even…

I don't think the initial difficulty of Vi is that much greater than that of Emacs. The real difficulty is in the fact that everything is completely different from what you are used to; perhaps this is more true in Vi, but the difference between Emacs and Vi in this regard pales in comparison to the difference between using a mouse and arrow keys and either of the text editors.

Also, while my approach will certainly cause a small amount of difficulty at the very beginning, I think you will actually win out in the long run. That is, let's say you normally code at 1 productivity unit (whatever that may be). My way, you may spend a some time at 0.1, then a bit of time at 0.5, but, in a couple weeks at most, you will start working at 1.5 or 2 or more. On the other hand, while still using arrow keys, you may first be at 0.8 for a bit, then back at 1 then maybe at 1.2. But you will not see any drastic improvement for a while, and so will actually be less efficient in the long run.

Re: Vim: revisited

#28
I'm puzzled by why syntastic was so counterproductive for him. It's helped me more times than it's hurt. Does he have autowrite on?

Some additional tips:

* As your # of plugins grow it helps to isolate plugin-specific config to separate files. Example: https://github.com/cldwalker/vimfiles/tree/master/after/plug... .

* If you want to stop seeing vim as a series of unforeseen tricks, take the time to learn the 300-400 keybindings you find useful. I'd recommend a free flashcard program like anki which also has a vim flashcard set, https://github.com/amikula/vim_flashcards

* One helpful pattern I've noticed in memorizing keybindings: uppercase, left characters i.e. P, ( map to above and reverse; lowercase and reverse characters i.e. p, ) map to below and forward

* If you're looking for a more powerful to search your vim docs, check out my vimdb project, http://github.com/cldwalker/vimdb

Re: Vim: revisited

#29

Why people always emphasis h/j/k/l when we already have arrow keys? Do you really waste a lot of time moving your fingers between them? Also, arrow keys work in insert mode.

This is a perfect place to post a Vim tip that I think helped me the most in starting out.

Disable arrow keys.

It's extremely painful for the first 5 days but I promise that's all it takes to get use to it. And it makes huge difference in your productivity. All that time does add up.

Add the following to your .vimrc

    map  
    map  
    map  
    map  
    imap  
    imap  
    imap  
    imap  
The reason you want arrow keys disabled in insert mode is that arrow keys breaks the modal paradigm. Again, I promise that once you get comfortable, it becomes more efficient to go into editing mode and make the change rather than navigate via the arrow keys in insert mode.

Re: Vim: revisited

#30

Why people always emphasis h/j/k/l when we already have arrow keys? Do you really waste a lot of time moving your fingers between them? Also, arrow keys work in insert mode.

Yes, absolutely. This hjkl navigation (combined with other vim code motions) you can really fly are files.
Post reply on HN