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


当前回答

在你的问题中,你没有提到你想让它用Lisp编程!但是当你评论你的回答时,我明白你实际上想要一个LISP编程接口。

对于这个精确的任务,忘记Vi吧。Emacs与LISP的集成非常棒!你应该使用SLIME。然后,您将与REPL进行出色的集成,能够将函数、缓冲区或文件直接计算到emacs缓冲区中运行的解释器中,以及更多…

其他回答

我一开始是vim的用户,然后我切换到emacs,然后是vim,现在我又在尝试使用emacs。

两人都是伟大的编辑。 如今,两者都是可扩展的 两者都有很棒的插件和社区

作为开发人员,我们输入很多,最后对我来说,在缓冲区和文件中移动是最大的重复任务,所以我想要一个编辑器,我可以快速移动!

再次尝试emacs的动机是,我发现它的Ctrl键比vim更快,而且更容易推理。

在vim中,你有模式,你有插入模式,可视模式,正常模式,当你按下某个东西时会发生什么取决于你所处的模式,这是一种有状态的编辑方式。移动,进入插入模式,编辑,退出插入模式,然后再次移动。如果我错过了ESC按键或类似的东西,我经常会迷失自我。

在emacs中没有模式,基本上你用你的粉色按下Ctrl并键入按键,比如C-x C-f, C-x C-s, C-x C-c。有一些你需要释放ctrl键的键绑定,我讨厌这些键绑定,总是用按下control键的键绑定来替换它们。

我认为emacs方法更快地思考和输入,但是vim有另一个优点,那就是。它的命令是可组合的,它们通常有一个格式。例如,要删除一行,可以使用dd,删除一个单词dw。插件利用了这种感觉,使用vim-surround插件,你可以用ds”(delete surround)删除引号,删除到下一个/ dt/。删除之前的/:dT/,以此类推。所以只要你学会了移动的东西就会变得很有趣。

综上所述,今天我发现emacs键绑定在宏编辑方面更快,而vim命令在微编辑方面更强大

在过去的五年里,我一直在使用vim,所以我的编辑思想主要是关于单词、线条、周围环境、块等。删除这一行,删除引号,替换引号, 删除字在游标,我试图找到emacs移动为那

最后我想说的是,我更关心fzf而不是emacs或vim,我希望有一个完全基于fzf的编辑器

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

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

Vim不是一个壳。而且它不能很好地与子进程通信。这几乎是设计的,而在Emacs中,这些元素是设计包含的。这意味着有些东西,比如嵌入调试器或解释器(产生某种IDE),在Vim中是很困难的。

此外,Emacs快捷方式主要是通过修饰符访问的,显然Vim接口是出了名的模态接口,可以访问大量的直接键进行操作。

Emacs曾经是这两个编辑器中唯一可编程的编辑器,而Vim的可编程性有很多奇怪的级别,添加了Python和Ruby绑定(还有更多,我忘记了),Vim也可以以您所关心的大多数方式进行可编程。

我使用Vim,而且我对它相当满意。

(以下文字是我的观点,不应被视为事实或侮辱)

With Emacs you are expected to have it open 24/7 and live inside the program, almost everything you do can be done from there. You write your own extensions, use it for note-taking, organization, games, programming, shell access, file access, listening to music, web browsing. It takes weeks and weeks till you will be happy with it and then you will learn new stuff all the time. You will be annoyed when you don't have access to it and constantly change your config. You won't be able to use other peoples emacs versions easily and it won't just be installed. It uses Lisp, which is great. You can make it into anything you want it to be. (anything, at all)

对于Vim,它几乎总是预先安装的。这是太快了。你打开一个文件做一个快速编辑,然后退出。如果您在其他人的机器上,则可以使用基本设置。它的可编辑性不是很好,但它仍然比大多数文本编辑器好得多。它能识别出你大部分时间是在阅读/编辑而不是打字,并使这部分工作更快。你的小指没有emacs症状。这并没有那么令人愤怒。这样更容易学。

即使我每天都在使用Emacs(而且喜欢它),除非你打算在你选择的程序上花费大量时间,否则我会选择vim