emacs server开启 及 每次打开文件在同一个窗口(打开文件和vim速度差不多)
发表于 : 2012-06-16 7:21
emacs server开启 及 每次打开文件在同一个窗口, 右键用emacsclient打开新文件,新文件在同一个窗口,而不是再打开一个emacs。
.emacs添加如下文件:
;;****************************************************************************
;;emacs server
;;****************************************************************************
(require 'server)
(unless (server-running-p)
(server-start))
~.bashrc
# 这个是自动检测是否有daemon, 有的话, 不再运行.
ps -el |command grep emacs &>/dev/null
if [ "$?" == "1" ]; then
command emacs --daemon=zw963
fi
# 创建一个别名: 方便启动emacsclient.
alias e="emacsclient -c"
alias et="emacsclient -t"
重启。
.emacs添加如下文件:
;;****************************************************************************
;;emacs server
;;****************************************************************************
(require 'server)
(unless (server-running-p)
(server-start))
~.bashrc
# 这个是自动检测是否有daemon, 有的话, 不再运行.
ps -el |command grep emacs &>/dev/null
if [ "$?" == "1" ]; then
command emacs --daemon=zw963
fi
# 创建一个别名: 方便启动emacsclient.
alias e="emacsclient -c"
alias et="emacsclient -t"
重启。