2 ms·
emacs --daemon (or after you start emacs, M-x server-start). This starts up the emacs server, so that it preserves your open files, and you can start new emacs
by ludwigvan 15y ago
emacs --daemon
(or after you start emacs, M-x server-start). This starts up the emacs server, so that it preserves your open files, and you can start new emacs instances immediately with emacsclient. (I actually symlink emacsclient to vi since it loads as fast as vi, which was one of the weakest points of emacs for me.)
Very useful if you are using a remote box (like a vps) as your dev environment.
- pja 15y agoIn my .bashrc I have: export ALTERNATE_EDITOR='' alias e='emacsclient -t' Now $ e file.txt will fire up emacsclient to connect to a running emacs daemon. If there is no emacs daemon running it will start one for you and then connect to it. You can export VISUAL="emacsclient -t" export EDITOR='emacsclient -t' for good measure if you like.
- super_mario 15y agoAnd if you are VIM user, you can do the same :D: $ vim -h | grep -i server --remote <files> Edit <files> in a Vim server if possible --remote-silent <files> Same, don't complain if there is no server --remote-wait-silent <files> Same, don't complain if there is no server --remote-send <keys> Send <keys> to a Vim server and exit --remote-expr <expr> Evaluate <expr> in a Vim server and print result --serverlist List available Vim server names and exit --servername <name> Send to/become the Vim server <name> $