首页 - 日志 - 维基 - 读书 - 跑步 - 关于

Emacs

安装

我选择通过Homebrew安装

➜ ~ brew install --cocoa emacs
==> Installing dependencies for emacs: xz
==> Installing emacs dependency: xz
==> Downloading https://homebrew.bintray.com/bottles/xz-5.2.1.el_capitan.bottle.tar.gz
######################################################################## 100.0%
==> Pouring xz-5.2.1.el_capitan.bottle.tar.gz
🍺  /usr/local/Cellar/xz/5.2.1: 59 files, 1.6M
Warning: emacs: --cocoa was deprecated; using --with-cocoa instead!
==> Installing emacs
==> Downloading http://ftpmirror.gnu.org/emacs/emacs-24.5.tar.xz
==> Downloading from http://mirror.hust.edu.cn/gnu/emacs/emacs-24.5.tar.xz
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/emacs/24.5 --enable-locallisppath=/usr/local/share/emacs/site-lisp --infodir=/usr/local/Cellar/emacs/24.5/share/inf
==> make
==> make install
==> Caveats
A command line wrapper for the cocoa app was installed to:
  /usr/local/Cellar/emacs/24.5/bin/emacs

To have launchd start emacs at login:
  ln -sfv /usr/local/opt/emacs/*.plist ~/Library/LaunchAgents
Then to load emacs now:
  launchctl load ~/Library/LaunchAgents/homebrew.mxcl.emacs.plist
.app bundles were installed.
Run `brew linkapps emacs` to symlink these to /Applications.

Emacs Lisp files have been installed to:
/usr/local/share/emacs/site-lisp/

Add the following to your init file to have packages installed by
Homebrew added to your load-path:
(let ((default-directory "/usr/local/share/emacs/site-lisp/"))
  (normal-top-level-add-subdirs-to-load-path))
==> Summary
🍺  /usr/local/Cellar/emacs/24.5: 3923 files, 118M, built in 20.1 minutes

更新Emacs

brew upgrade emacs

快捷键

一些说明

  • C = Control
  • M = Meta = Alt | Esc
  • Del = Backspace

基本快捷键(Basic)

  • C-x C-f "find"文件, 即在缓冲区打开/新建一个文件
  • C-x C-s 保存文件
  • C-x C-w 使用其他文件名另存为文件
  • C-x C-v 关闭当前缓冲区文件并打开新文件
  • C-x i 在当前光标处插入文件
  • C-x b 新建/切换缓冲区
  • C-x C-b 显示缓冲区列表
  • C-x k 关闭当前缓冲区
  • C-z 挂起emacs
  • C-x C-c 关闭emacs

本页最后更新时间:2018-06-06 Wed 11:12.
小过的布拉格 - Copyright©2013-2021 - @xiaoguo - Powered by Emacs 29.1 (Org mode 9.6.6)
行路难,行路难, 多歧路,今安在。长风破浪会有时,直挂云帆济沧海。