Mac下使用Emacs

* Mac下使用Emacs

** 终端打开
在`~/.zshrc`配置文件中增加如下脚本
```shell
#!/bin/bash    
# -----------------------------------------------------------------    
# FileName: sh-mac-emacs.sh    
# Date: 2020-05-16    
# Author: jiftle    
# Description: MacOS下启动Emacst,服务模式    
# -----------------------------------------------------------------    
EMACSPATH="/Applications/Emacs.app/Contents/MacOS"

alias emacs='${EMACSPATH}/Emacs "$@"'
alias ec='${EMACSPATH}/bin/emacsclient --c'
```
执行脚本,让配置生效
`source ~/.zshrc`

** 让Emacs以后台服务方式运行(加快启动速度)
```shell
emacs --daemon
```
** 客户端方式启动
```
ec tmp.md
```

posted @ 2020-05-16 17:32  jiftle  阅读(838)  评论(0编辑  收藏  举报