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.
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/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.
(require 'package)
The error I get is: File error: "Cannot open load file", "package".
I installed emacs on OS X using: $ brew install emacs
But it looks like version 24.5 on OS X El Capitan doesn't come with something called 'package.el'. Oh well, back to Vim..Edit 10 minutes later: Ok, it's installed now. And I've set this up in my .zshrc:
-alias vi=vim
+alias vi=emacs
Let's see how this goes. alias et='TERM=xterm-256color emacsclient -t'
alias ec='emacsclient -c -a=emacs'
alias ed='emacs --daemon'
alias kill-emacs='emacsclient -e "(kill-emacs)"'
alias e='TERM=xterm-256color f -e "emacsclient -c -a=emacs"'
The reason for these is that emacs is a little slow to start up (in comparison to vim at least). So you can set up a daemon running ( ed command above, for emacs daemon. I don't have ed on my system)You can then open up a new frame (window) of emacs with the ec command, or a new terminal session of emacs with the et command.
My favourite is the e command, which makes use of fasd[0] to find any "frecent" file, tries to open it with emacsclient, but, if emacs daemon is not running will fall back to opening a new emacs (which with spacemacs will start a new daemon running). This way I can open files in completely different directories if need be.
"If the value of [the alternate editor] is the empty string, run `emacs --daemon' to start Emacs in daemon mode, and try to connect to it."
So your aliases would continue to work if you replace -a=emacs with -a=''. And you'd only pay the startup cost the first time you run ec or e.
http://blog.aaronbieber.com/2015/05/24/from-vim-to-emacs-in-... https://www.youtube.com/watch?v=JWD1Fpdd4Pc
One of my vim-using coworkers found it. He, along with another colleague, have since found emacs compelling enough to use as their main text editor.