Emacs和Vim之间有什么实际的、客观的区别?例如,使用一个可以做而另一个不行(或者使用一个比另一个更容易做)?为了选择一门课程,我应该知道些什么?
当前回答
VI总是可用的,并且将在最残缺的、单用户模式、坏的图形、没有键图、慢的链接机器上运行——因此,仅仅为了系统管理任务,了解如何在它中编辑简单的文件是值得的。
Emacs是一个编辑器中的完整用户界面。其思想是在启动机器时启动Emacs,并且永远不要离开它。可能会有数千个会话。
与使用GUI编辑器/IDE和使用python/awk/等来完成额外任务相比,学习Emacs的功能是否值得,取决于你自己。
其他回答
在你的问题中,你没有提到你想让它用Lisp编程!但是当你评论你的回答时,我明白你实际上想要一个LISP编程接口。
对于这个精确的任务,忘记Vi吧。Emacs与LISP的集成非常棒!你应该使用SLIME。然后,您将与REPL进行出色的集成,能够将函数、缓冲区或文件直接计算到emacs缓冲区中运行的解释器中,以及更多…
在日常层面上有巨大的区别——Vim(或任何vi变体)本质上是模态的(你进入命令模式,但你不能编辑),而Emacs(以及大多数其他编辑器)不是。
当然,使用菜单之类的东西,你不需要在Vim中实际进入命令模式——首先。但即使使用Vim的一小部分力量,你也会。这是Vim/Emacs争论的核心。
就我个人而言,我还认为Emacs的可扩展性要强得多。你可以找到很多东西的Elisp包。
不过,我很好奇,为什么您考虑学习其中一种而不是更传统的IDE。你为什么要学这个?
Emacs具有Viper模式,因此在某种意义上,它提供了一个超特性集(除了那些在使用Viper和Vimpulse的Emacs中缺少哪些Vim特性?)
vi(和VIM IIRC)的重量较轻(它可以就地编辑文件),但提供的功能较少(子进程通信、扩展语言)。
对我来说,emacs有更好的开发工具(不仅仅是基于标记的工具)。
Cedet(c/c++) Xrefactory(c/c++/java) 史莱姆(普通口齿) JDEE(java) 欧洲央行(代码浏览器) GDB 支持 NXML(xml)
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
推荐文章
- 我如何使用vimdiff来解决git合并冲突?
- 在Vim中删除当前缓冲区的文件名/路径
- Git在终端提交时打开VIM,但无法返回终端
- 请参阅编辑器中的换行符和回车
- 如何在NERDTree中显示隐藏文件(以句点开始)?
- 如何复制一个选择到OS X剪贴板
- 如何删除(不削减)在Vim?
- Vim:在可视模式下快速选择文本块的方法
- 是否有vim命令来重新定位一个选项卡?
- MacVim和普通Vim有什么区别?
- 如何使Sublime Text成为Git的默认编辑器?
- 有什么方法可以在Vim中查看当前映射的键吗?
- 同一行上有多个命令
- 如何将所有文本转换为小写在Vim
- 使用vimdiff查看所有' git diff '