What are the benefits of learning Vim?


I've been using vi and vim also for some 20 years, and I'm still learning new things.

David Rayner's Best of Vim Tips site is an excellent list, though it's probably more useful once you have some familiarity with vim.

I also want to mention the ViEmu site which has some great info on vi/vim tips and especially the article Why, oh WHY, do those nutheads use vi? (archived version)


Could I live without it? Easily.

Is it useful? Yes.

Reasons for Learning

  • vi is guaranteed to exist on all Unix systems and exists on most Linux ones as well. That kind of broad coverage makes learning it worth it.

  • It's much quicker to use vi for a sudo edit:

    $ sudo vi

  • Also, GMail uses vi-ish commands for selecting & moving emails around!

  • You don't have to be a master.

    Just learn

    The basics:

  • How to switch from command mode to insert mode i
  • How to switch from insert mode to command mode Esc
  • How to navigate up a line in command mode k
  • How to navigate down a line in command mode j
  • How to navigate left a character in command mode h
  • How to navigate right a character l
  • How to save a file :w Enter (write)
  • How to exit without saving (in command mode) :q! Enter
  • How to Undo u
  • How to Redo Ctrl+r
  • You can combine writing and quitting (in command mode): :wq Enter
  • From there the rest will just make you faster.


    Running through vimtutor only took me 30 minutes, which was enough to get familiar with vim. It was worth every second of it.

    链接地址: http://www.djcxy.com/p/23434.html

    上一篇: 用Git改变项目的第一次提交?

    下一篇: 学习Vim有什么好处?