Emacs和Vim之间有什么实际的、客观的区别?例如,使用一个可以做而另一个不行(或者使用一个比另一个更容易做)?为了选择一门课程,我应该知道些什么?


当前回答

Vim:

作为一个简单的编辑器更好(简单任务所需的键更少) 更活跃的脚本社区-内部语言:vimscript 一个集中的脚本、插件、配色方案…… 在python、ruby中也可扩展 可移植(emacs在这方面存在一些问题)

Emacs:

non modal by default (most of today's editors have taken this approach). Though there is evil-mode which emulates vim behavior. more powerful language for extending it (elisp is a full blown language, and in emacs you can practically redefine everything; while in vim you cannot redefine build in functions of the editor. On the downside, vimscript is relatively similar to today's dynamic languages while elisp doesn't resemble pretty much anything) more extendible excellent support for GNU tools (the bunch of them)

就我个人而言,我更喜欢vim——它很小,做了它应该做的事情,当我想要一个完整的IDE时,我打开它VS. Emacs的方法是一个编辑器,它想成为一个IDE(或者我应该说,一个操作系统),但并不完全,在我看来,过时了。以前有电子邮件客户端、ftp客户端、俄罗斯方块……一个包(emacs)中的东西是有意义的……如今,它不再是了。

然而,这两者都是程序员和超级用户社区用户之间的宗教讨论话题,在这方面,如果接触(在同一句话/问题中),两者都很适合开始激烈的战争。

其他回答

Emacs的好处

Emacs has both non-modal interface (by default) and modal one (e.g. it can emulate vim and vi through Evil, Viper, or Vimpulse). One of the most ported computer programs. It runs in text mode and under graphical user interfaces on a wide variety of operating systems, including most Unix-like systems (Linux, the various BSDs, Solaris, AIX, IRIX, macOSetc.), MS-DOS, Microsoft Windows, AmigaOS, and OpenVMS. Unix systems, both free and proprietary, frequently provide Emacs bundled with the operating system. Emacs server architecture allows multiple clients to attach to the same Emacs instance and share the buffer list, kill ring, undo history and other state. Pervasive online help system with keybindings, functions and commands documented on the fly. Extensible and customizable Lisp programming language variant (Emacs Lisp), with features that include: A powerful and extensible file manager (dired), integrated debugger, and a large set of development and other tools. Having every command be an Emacs Lisp function enables commands to DWIM (Do What I Mean) by programmatically responding to past actions and document state. For example, a switch-or-split-window command could switch to another window if one exists, or create one if needed. This cuts down on the number of keystrokes and commands a user must remember. "An OS inside an OS". Emacs Lisp enables Emacs to be programmed far beyond editing features. Even a base install contains several dozen applications, including two web browsers, news readers, several mail agents, four IRC clients, a version of ELIZA, and a variety of games. All of these applications are available anywhere Emacs runs, with the same user interface and functionality. Starting with version 24, Emacs includes a package manager, making it easy to install additional applications including alternate web browsers, EMMS (Emacs Multimedia System), and more. Also available are numerous packages for programming, including some targeted at specific language/library combinations or coding styles.

vi类编辑器的好处

Edit commands are composable Vi has a modal interface (which Emacs can emulate) Historically, vi loads faster than Emacs. While deeply associated with UNIX tradition, it runs on all systems that can implement the standard C library, including UNIX, Linux, AmigaOS, DOS, Windows, Mac, BeOS, OpenVMS, IRIX, AIX, HP-UX, BSD and POSIX-compliant systems. Extensible and customizable through Vim script or APIs for interpreted languages such as Python, Ruby, Perl, and Lua Ubiquitous. Essentially all Unix and Unix-like systems come with vi (or a variant) built-in. Vi (and ex, but not vim) is specified in the POSIX standard. System rescue environments, embedded systems (notably those with busybox) and other constrained environments often include vi, but not emacs.

来源:https://en.wikipedia.org/wiki/Editor_war

对我来说,emacs有更好的开发工具(不仅仅是基于标记的工具)。

Cedet(c/c++) Xrefactory(c/c++/java) 史莱姆(普通口齿) JDEE(java) 欧洲央行(代码浏览器) GDB 支持 NXML(xml)

首先,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

现在你甚至不需要考虑这两者之间的区别,因为Spacemacs。它是一个社区驱动的Emacs发行版。

正如它所说,

最好的编辑器既不是Emacs也不是vim,而是Emacs和vim。

Spacemacs结合了Emacs和Vim的优点,使您的生活和工作更加轻松。

请看下面的截图,

(来源:spacemacs.org)

Emacs实际上更像是一个无所不能的程序,而vi(m)实际上只是一个编辑器。如果您正在编辑文本,它们都很好,但我更喜欢emacs,因为我必须将一个移出主行才能移动,并在命令模式中不断键入错误的内容。如果您没有这个问题,vi(m)可能是您的编辑器。