emacs 安装 (ubuntu)

2020-02-28  本文已影响0人  ricekent

环境准备

# 系统更新升级
sudo apt-get update && apt-get upgrade
# 安装源码编译需要的包
sudo apt-get install build-essential libncurses-dev

下载源码包

编译安装

cd emacs-xxx
# 安装需要的包及X窗口支持
sudo apt install autoconf make gcc texinfo libgtk-3-dev libxpm-dev libjpeg-dev libgif-dev libtiff5-dev libncurses5-dev libxml2-dev libgnutls28-dev
./autogen.sh
./configure --prefix=/xx/xx/xx

# 编译生成
make -j 2

# 安装
make install

配置 spacemacs

  1. 下载
# 备份原始配置
mv .emacs.d .emacs.d.bak
mv .emacs .emacs.bak

# 克隆 spacemacs,并切换到 develop 分支
git clone https://gitee.com/mirrors/spacemacs.git ~/.emacs.d
cd ~/.emacs.d && git checkout develop
  1. 安装
emacs --insecure

将会进入emacs后要求选择编辑方式(vim或emacs)、标准版还是精简版。建议换为国内源:

(defun dotspacemacs/user-init ()
 "Initialization for user code:
This function is called immediately after `dotspacemacs/init', before layer
configuration.
It is mostly for variables that should be set before packages are loaded.
If you are unsure, try setting them in `dotspacemacs/user-config' first."
    (setq configuration-layer-elpa-archives
       '(("melpa-cn" . "http://mirrors.tuna.tsinghua.edu.cn/elpa/melpa/")
        ("org-cn"   . "http://mirrors.tuna.tsinghua.edu.cn/elpa/org/")
        ("gnu-cn"   . "http://mirrors.tuna.tsinghua.edu.cn/elpa/gnu/")))
  )

原文

  1. Ubuntu 18.04 源码编译安装 Emacs 26.3
  2. Spacemacs安装
上一篇 下一篇

猜你喜欢

热点阅读