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#,它们一起使编辑代码比以前更快更容易,但即使如此,我认为我可以享受根本不需要使用鼠标。

甚至连方向键都没有。


当前回答

我学过Vim。这并不费劲。现在我绝对喜欢ci”ci(cw V:s/from/to/g

其他回答

这取决于您想用VIM做什么。仅仅因为许多人离不开它而学习它是没有意义的。

当我经常在UNIX环境中工作时,我不能没有它。即使VIM没有安装在UNIX机器上,我也至少可以使用vi。您总是可以依赖它——即使这台机器不是您的(来自客户的)。

现在我用c#编程,主要在windows环境下工作。我在我的电脑上安装了VIM…我不需要它

评估您是否真的需要VIM,以及它是否支持您的“工作流程”。试试吧。玩它。如果你认为你需要它,就坚持下去……学习曲线非常陡峭。

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

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

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

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.

我和你的情况一样,作为Vim的初学者,我最初发现它有点令人生畏——学习曲线似乎很陡峭。 从我在短短几个小时里学到的东西来看,我已经觉得没有它我就活不下去了。

下面是我找到的一些有用的Vim截屏链接,可以向您展示它的功能。

Bram Moolenaar (Vim的仁慈独裁者)在最后一个链接中给出的一个很好的建议是,试图学习每一个命令和函数是没有效率的,只是弄清楚你正在做的事情不是很好,寻找一种方法使它更有效,然后使它成为一种习惯。

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

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

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