As a programmer I spend a lot of hours at the keyboard and I've been doing it for the last 12 years, more or less. If there's something I've never gotten used to during all this time, it's these annoying and almost unconscious constant micro-interruptions I experience while coding, due to some of the most common code editing tasks. Things like a simple copy & paste from a different line (or even the same line), or moving 1 or 2 lines up or down from the current position require too much typing or involve the use of the arrow keys ...and it gets worse when I want to move further - I end up using the mouse. Now imagine this same scenario but on a laptop.

我一直在考虑学习VIM,但掌握它所需的时间总是让我想后退一步。

我想听听那些学会了它的人的意见,如果它最终成为你生活中不可或缺的东西之一。

在工作中,我使用VS2008, c#和r#,它们一起使编辑代码比以前更快更容易,但即使如此,我认为我可以享受根本不需要使用鼠标。

甚至连方向键都没有。


当前回答

I'd say vim is definitely worth learning. I picked it up last summer, and it is now my editor of choice for just about everything (java is a stretch, but doable when I don't need extensive analysis support). As everyone has already affirmed, it is a wonderfully efficient tool. For what it's worth, I only learned a fairly small subset of vim's features (which took a day or two) from a graphical tutorial, and a few odds and ends from here (long read), and the search and replace functionality, and I was hooked. I've learned things since then, but at my leisure. I'd say the learning curve flattens out at this point, but then, I was using it pretty heavily and was surrounded by others who were, too.

其他回答

我已经使用vi/vim超过25年了。如果你已经知道一些命令行编辑器,那么你可能不需要学习vi/vim。但是如果您不太了解其他命令行编辑器,那么学习它是值得的。在vi/vim中很容易轻松地提高效率。

恕我直言,学习新东西总是值得努力的。我建议你打印一张小抄单,强迫自己日复一日地使用它。

我在远程计算机上维护一个非常大的linux项目。不能选择使用Eclipse或类似的基于GTK的IDE。我在那里工作三年了。 我为这个项目设置了vim。还在调整。

现在我可以在Vim中做任何事情:源代码控制、sql、调试、编译、浏览——非常快速地浏览超过1Gb的源代码。

Visual Studio或Eclipse无法处理所有这些。如果我有选择,我不会把Vim换成其他编辑器或IDE。

我使用vi和vim也有20年了,我还在学习新的东西。

David Rayner的Best of Vim Tips网站是一个很好的列表,不过如果您对Vim比较熟悉,它可能会更有用。

我还想提一下ViEmu网站,那里有一些关于vi/vim技巧的很棒的信息,特别是文章Why, oh, Why, do those nuhead with vi?(存档版本)

我的工作迫使我学习vim,这很快就成为了我的第二天性。现在我抱怨的是没有vim仿真或插件的IDE。我注意到esc键已经成为我在vim之外的敌人。

我确实在Visual Studio中找到了几个vi模拟器:

http://code.google.com/p/vim-visual-studio/