Live data from Hacker News

Vim: revisited

mislav.uniqpath.com

1–10 of 117 posts

Re: Vim: revisited

#2
I've been looking forward to the day I have time to allocate to learn vim. This post was the first one I've seen that would allow me to jump in it quicker.

Re: Vim: revisited

#3
Solid advice. I like the idea of minimizing plugins and mastering the fundamentals, because this is true strength of vim.

If I was pinning my productivity on customizations then emacs would be the clear choice.

If I wanted the perfect coding environment for language X, there's a good chance it would be an IDE.

But with vim, I can open any text file on any system and edit the hell out of it amazingly efficiently. It's extensibility is a nice bonus (very nice in some cases! eg: https://github.com/tpope/vim-fugitive), but at its core it's about raw text manipulation.

Re: Vim: revisited

#4
Nicely done. A new or returning vimmer will profit from following his advice.

His best recommendation is at the top: don't configure a lot of settings and plugins at first. Start with a minimal setup, and slowly work up from there when needed. In particular, don't copy someone's huge .vimrc.

In fact, that's good advice for any tool or technology: start minimal, and only add what you need, when you know you need it.

To his minimal initial configuration, I would suggest one addition: set a colorscheme that looks good to you in the terminal/gui environment you normally use, and choose from the default schemes rather than downloading a pack of them. I like elflord (it doesn't use a lot of red, which is hard to read on a black background), YMwillcertainlyV.

To see which scheme you're currently using, open an existing file in your favorite language and then:

    :colorscheme
To cycle through the available schemes:

    :colorscheme
Each tab will show you the next scheme's name; hit enter to try one.

Re: Vim: revisited

#5
Another nice tool to learn (or relearn) vim is vimtutor. I wish I had known about vimtutor when I first started learning vim, as opposed to launching vim and panicking when I accidentally wrote over some files I was editing.

Also, openvim.com has an excellent online tutorial that's convenient.

Re: Vim: revisited

#6
post #2

I've been looking forward to the day I have time to allocate to learn vim. This post was the first one I've seen that would allow me to jump in it quicker.

I found the best way is to force yourself by not using a GUI. I bought my first VPS a couple of years ago and started editing code on there (faster to compile than my laptop too). All dev work happens through SSH and screen to the box under my desk now, and it feels so much more productive.

Re: Vim: revisited

#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 off my arrow 
  keys, disallowing the use of the mouse, and learning the 
  (MORE EFFICIENT!!!) vim ways to do everything, all at once. 
  People just couldn’t stomach the idea of me continuing to 
  use an outmoded practice (like apple-f) when vim had much 
  better tools available just a (huge volume of) memorization 
  away."
Source: http://yehudakatz.com/2010/07/29/everyone-who-tried-to-convi...

Re: Vim: revisited

#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/dotfiles/blob/master/vimrc

I think the advice to stay away from highly customized environments and hacks is really the way to go. A huge strength of vim is that you're going to find it on any server you end up using.

Disclosure: I didn't disable my arrow keys when I started with vim, but after a few months I did end up doing it to really brand the h/j/k/l movements in my mind.

Re: Vim: revisited

#9
I just want to thank the hacker news community. Vim is the kind of tool that requires a lot of persistence and hand holding to learn. I'm slowly learning and understand how I can use it to fundamentally change the way I do work on the computer. So thanks for highlighting and writing these helpful posts. they make a difference.

Re: Vim: revisited

#10
I use and like Vim, but I feel like the articles that make it to HN all say the same thing ("I had a conversion experience," followed by some configuration details, followed by basic keystrokes, etc).

Why does everyone feel the need to re-tell the same story?

Post reply on HN