Emacs和Vim之间有什么实际的、客观的区别?例如,使用一个可以做而另一个不行(或者使用一个比另一个更容易做)?为了选择一门课程,我应该知道些什么?
当前回答
Vim was always faster to start up than Emacs. I'm saying that on any machine, out-of-the-box installs of Vim will start up faster than out-of-the-box installs of Emacs. And I tend to think that after a moderate amount of customisation of either one, Vim will still start up faster than Emacs. After that, the other practical difference was Emacs' modes. They make your life tremendously easier when editing XML, C/C++/Java/whatever, LaTeX, and most popular languages you can think of. They make you want to keep the editor open for long sessions and work.
总而言之,我会说Vim让您使用它来完成简短、快速的编辑任务;而Emacs则鼓励您投入长时间的会话。
其他回答
我想引用《UNIX编程的艺术》一书中的一段话:
Many people who regularly use both vi and Emacs tend to use them for different things, and find it valuable to know both. In general, vi is best for small jobs – quick replies to mail, simple tweaks to system configuration, and the like. It is especially useful when you’re using a new system (or a remote one over a network) and don’t have your Emacs customization files handy. Emacs comes into its own for extended editing sessions in which you have to handle complex tasks, modify multiple files, and use results from other programs during the session. For programmers using X on their console (which is typical on modern Unixes), it’s normal to start up Emacs shortly after login time in a large window and leave it running forever, possibly visiting dozens of files and even running programs in multiple Emacs subwindows.
我在这里真正想强调的是:“许多人发现两者都知道是有价值的。
首先,Vi(原始实现)今天不使用。你说的是一些Vim推导。
要扩展Vim功能,必须重新编译Vim, Emacs则不必。
Emacs在self中有Vim (viper模式)。
Emacs通常需要手动安装,Vim通常预安装在所有Unix之类的操作系统上(但如果你有ssh访问主机的tramp模式win Vim:)。
如果你尝试Vim,那么你讨厌Emacs,所以先从Emacs开始。
也请阅读http://www.dina.dk/~abraham/religion/vi-tutorial.html(链接下拉,所以使用这个)
hxxp中的答案搜索://en.wikipedia.org/wiki/Editor_war
我是一个不折不扣的Emacs迷,但我早在认识Emacs之前就认识VI了。也就是说,我让我所有的人学习VI,因为它总是可用的,在任何地方。选哪一个都不会错。
偏颇的观点:
Vi(不是vim)是一种专业需要。你总是有某种形式的 Vi容易获得,无论什么环境。你可以在vi中 在emacs中,您可以在vi中在unix-land中构建bash命令。
甚至Microsquish也必须支持vi(尽管他们做得很好 隐藏它),因为政府和公司遵守公布 标准。
在我看来,如果你在一个繁忙的环境中从事一份亲力亲为的工作——不 温室里的一朵花,被限制在一个开发项目的一个花哨的钻机上 环境,或者在学术界——了解一个高级编辑是一项工作 障碍。不要学习vim或emacs中的所有花哨技巧,不要 开发一堆宏,使编辑环境屈从于你的意愿。 这是一个巨大的时间消耗,当你注意的时候 不同的机器,你可能不能证明在工厂 环境。
读读比尔·乔伊的论文,他写得很好,甚至可以说 非常漂亮,编辑纯文本的工程练习 快。帕里托法则适用于此:80%的水果都在20%里 篮子的。编辑纯文本非常非常快是关键 编辑能力——其他都是可选的——有时是有害的。
Seems an answer has been selected already, but the big difference to me has always been the modal vs. non-modal. Vim is modal, which means that it makes optimizations based on a specific set of usage modes. At least that's how I've always looked at it. This makes using Vim a different experience because instead of having a work area that you type code in, you really are telling an environment to act on the text. This is why people say things like with Vim you really are learning a language. The :wq and :s/foo/bar is all part of a shell like environment that edits and reads text.
Emacs on the other hand is much closer to most editors/word processors/etc. you see today. You have a workspace that has a highly programmable interface. That is why you see things like email, irc, shells, etc. As a programmer it is easy to think in terms of saying "take the line number I'm on and do something with the information". The desire to leave the editor becomes less because instead of having to quit, open some other app/language and do things on some text, you have Emacs where you can do these things within the scope of your editor.
这两种观点并不一定是对立的,只是它们揭示了两个不同的焦点。就我个人而言,我使用Emacs,但我见过非常了解Vim的人,他们可以诚实地说,选择哪种并不重要。我首先尝试了Vim,但Emacs最终支持了我。的确,无论您选择什么,您都应该至少在一定程度上精通Vim,因为它总是可用的。
推荐文章
- 是否有Eclipse行宽标记?
- 在Vim/Vi中,如何将光标移动到前一个单词的末尾?
- 如何在vim中自动删除尾随空格
- 为什么Vim使用~扩展名保存文件?
- 如何在Vim或Linux中将空格转换为制表符?
- 如何在编辑器(Atom, notepad++, Kate, VIM, Sublime, Textpad等)和ide (NetBeans, IntelliJ IDEA, Eclipse, Visual Studio等)中选择列
- 使用Emacs递归地查找和替换尚未打开的文本文件
- 我如何使用vimdiff来解决git合并冲突?
- 在Vim中删除当前缓冲区的文件名/路径
- Git在终端提交时打开VIM,但无法返回终端
- 请参阅编辑器中的换行符和回车
- 如何在NERDTree中显示隐藏文件(以句点开始)?
- 如何复制一个选择到OS X剪贴板
- 如何删除(不削减)在Vim?
- Vim:在可视模式下快速选择文本块的方法