3 ms·
I spent a couple of days trying it out exclusively before giving up. Really nice all-in-all to keep me using it for so long, but eventually I ran into some big
by akkartik 10y ago
I spent a couple of days trying it out exclusively before giving up. Really nice all-in-all to keep me using it for so long, but eventually I ran into some big issues:
A) evil-mode doesn't support :next and :prev for navigating between filenames given on the commandline.
B) Emacs's mindset towards indentation fundamentally seems incompatible with Vi's.
- Emacs
RET - indent current line, then create new one
TAB - indent current line
- Vim
RET - create new line and add indent to it
TAB - insert some characters at point (nowhere else)
I tried to spend some time configuring it, but it's too hard to catch every language minor mode. Hitting tab sometimes moves forward two spaces, sometimes to the next mod-8 column and sometimes indents the current line, refusing to do anything else if it's already correct to Emacs's puny mind. It doesn't look like evil-mode is able to patch all the places this mindset leaks through.
A particularly egregious example is in the lisp minor-mode. Try this on a vanilla Emacs install without any startup files (I used v24.5.1 on OS X):
1. $ emacs x.lisp
2. Type in '; abc'. That's a lisp comment with a single comment leader semi-colon.
3. Hit enter.
The line gets right-justified to column 40 (5 tabs) before the cursor moves to the next line.
Apparently Emacs thinks all full-line comments in lisp should start with ';;'.
Needless to say, this behaves the same way even with evil-mode. I spent some time trying to track it down, but RET is just bound to vanilla newline, not indent-and-insert-newline or something like that. So I'll stop here.
- lispm 10y ago> Apparently Emacs thinks all full-line comments in lisp should start with ';;'. Not exactly. ;; aligns to the current indentation level of the code. It's a usual Lisp indenting convention. The Emacs Lisp manual recommends: https://www.gnu.org/software/emacs/manual/html_node/elisp/Comment-Tips.html https://www.gnu.org/software/emacs/manual/html_node/elisp/Co... Common Lisp uses it also. See the ANSI CL spec. 2.4.4.2.1 Use of Single Semicolon Comments that begin with a single semicolon are all aligned to the same column at the right (sometimes called the “comment column”). The text of such a comment generally applies only to the line on which it appears. Occasionally two or three contain a single sentence together; this is sometimes indicated by indenting all but the first with an additional space (after the semicolon). 2.4.4.2.2 Use of Double Semicolon Comments that begin with a double semicolon are all aligned to the same level of indentation as a form would be at that same position in the code. The text of such a comment usually describes the state of the program at the point where the comment occurs, the code which follows the comment, or both. 2.4.4.2.3 Use of Triple Semicolon Comments that begin with a triple semicolon are all aligned to the left margin. Usually they are used prior to a definition or set of definitions, rather than within a definition. 2.4.4.2.4 Use of Quadruple Semicolon Comments that begin with a quadruple semicolon are all aligned to the left margin, and generally contain only a short piece of text that serve as a title for the code which follows, and might be used in the header or footer of a program that prepares code for presentation as a hardcopy document.
- akkartik 10y agoWow, I can't believe I didn't know this after all this while hacking lisp. Many thanks.