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

甚至连方向键都没有。


当前回答

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

其他回答

是的,一定要花时间学习至少一点'vi'和'vim'。它旅行很好。

当你面对一个你没有安装能力的Unix/Linux/Mac系统时,你永远不会被困住。即使在Windows上(如果你有安装功能)“Vim”是免费且易于安装的。(而不是把你的学习曲线完全投入到像UltraEdit这样的东西上,尽管一个优秀的编辑器可能并不总是适合你……)

学习vi可以帮助你学习其他工具,比如sed和regex:一般来说是可迁移的东西。

另外,如果你想成为一个真正的极客,你只需要知道'vi/m',否则你看起来就像一个骗子;-)

不。学习vim比努力更有价值。

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

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

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

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

我认为花时间和精力去学习vim绝对是值得的。对我来说,它使得在文本中输入和导航变得如此高效,很难想象回到emacs或ctrl/shift/alt/meta组合键。

不要被vim所有花哨的特性吓倒。一旦你用得够多了,你就会知道哪些命令用得最多,哪些事情可以忘记。

I too put off learning vi or vim for many years. Matter of fact, I use to make fun of the "vi guys" who always seemed to be doing finger aerobics. Then, as I moved away from Windows and over to Linux as my primary OS, I had to become more familiar with vim. It was a learning curve and it still is. After 9 years of using vim on a daily basis I still find myself learning new and faster ways of doing things. What I use to think of as "finger aerobics" actually turned out to be an extremely efficient way of being productive. I can now do a whole lot more code development in a whole lot less time and effort than I ever did prior to vim. And as I'm sure you know vim runs on about every platform out there so you always have it when you need it. Also, if you like GUI's they have GUI versions for most platforms. Personally, just like the mouse, I don't want to see a menu bar, scroll bars, etc. cluttering up my editing window(s).

如果你决定尝试一下vim,我强烈推荐O'Reilly的《vi Editor Pocket Reference》一书。它很便宜,如果你只是学习vi (vim),它是很棒的。完整的vim书籍也很好,但口袋参考给你所有的基础知识,快速高效。