Emacs 安装与体验

下载与安装

  1. 首先是下载最新的x64版本的Emacs。

  2. 将下载下来的文件解压到你喜欢的磁盘目录下,我选择的是C:\Program Files。放在D盘可能是更好的选择,因为待会的配置文件因此可以更方便的同安装文件一起保存到D盘,而不是C盘。

  3. 进入C:\Program Files\emacs\bin目录下,运行addpm.exe

  4. 启动Emacs,点击Options下的Highlight Matching Parenheses,随后点击Save Options。我们此举的目的是因为我们是第一次使用Emacs,以此来触发Emacs生成配置文件目录。可以发现在c:/Users/<username>/AppData/Roaming/下生成了.emacs文件以及.emacs.d文件夹。

  5. 下面我们要动一些手脚,因为将配置文件放在C盘是不理想的,比如重装系统等,容易丢失配置信息。我们打开刚刚生成的.emacs文件,按如下修改

    1.(custom-set-variables
    2.;; custom-set-variables was added by Custom.
    3.;; If you edit it by hand, you could mess it up, so be careful.
    4.;; Your init file should contain only one such instance.
    5.;; If there is more than one, they won't work right.
    6.'(show-paren-mode t))
    7.(custom-set-faces
    8.;; custom-set-faces was added by Custom.
    9.;; If you edit it by hand, you could mess it up, so be careful.
    10.;; Your init file should contain only one such instance.
    11.;; If there is more than one, they won't work right.
    12.)
    13.(load-file "C:/Program Files/emacs/.emacs")

    这是什么意思呢?就是说,Emacs在启动的时候会加载c:/Users/<username>/AppData/Roaming/.emacs,我们修改这个文件,使得其又加载了C:\Program Files\emacs\.emacs文件。这样就实现了配置的转移。

  6. 等等,我们的C:\Program Files\emacs下似乎并没有.emacs文件,好吧,我们现在创建一个吧,只能用命令行创建,先随便创建一个什么文件,然后用命令行进行改名,比方说,我们创建了一个emacs.txt文件,然后使用rename emacs.txt .emacs命令,间接的创建了一个Emasc配置文件。

  7. 修改刚刚创建的.emacs文件内容如下:

    1.;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    2.;; emacs in windows
    3.;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    4.(setenv "HOME" "C:/Program Files/emacs")
    5.(setenv "PATH" "C:/Program Files/emacs")
    6.;; set the default file path
    7.(setq default-directory "~/")

 
 

最新文章

  1. UI自动化,你值得拥有
  2. jQuery基础1
  3. SPOJ:ABCDEF
  4. CSS的4种引入方式及优先级
  5. spring配置定时器的时间设置
  6. jQuery.loadTemplate客户端模板
  7. 【收藏】win7打开word每次提示配置解决办法
  8. 判断直线与线段相交 POJ 3304 Segments
  9. [Windows Phone] 地图控制项的经纬度
  10. C#的扩展方法简介
  11. 基于Orangpi Zero和Linux ALSA实现WIFI无线音箱(二)
  12. yarn安装
  13. java8新特性:interface中的static方法和default方法
  14. k-mean 拐点
  15. Python 语言之 map/reduce
  16. Bzoj4480: [Jsoi2013]快乐的jyy 广义后缀自动机 倍增 哈希 manacher
  17. 跟着ZooKeeper学Java——CountDownLatch和Join的使用
  18. rpm: /root/anaconda3/lib/liblzma.so.5: version `XZ_5.1.2alpha&#39; not found (required by /lib64/librpmio.so.3)
  19. ALGO-143_蓝桥杯_算法训练_字符串变换
  20. 如何使用navicat远程连接服务器上的oracle数据库

热门文章

  1. Android 使用NestedScrollView+ViewPager+RecyclerView+SmartRefreshLayout打造酷炫下拉视差效果并解决各种滑动冲突
  2. 如何用Windows PowerShell替换命令提示符
  3. Autoit3脚本编写举例
  4. mysql-练级查询
  5. MovieReview—Coco(寻梦环游记)
  6. 【UML】部署图Deployment diagram(实现图)(转)
  7. HDU 5459 Jesus Is Here (递推,组合数学)
  8. 2018.2.12 PHP 如何读取一亿行的大文件
  9. java基础—static关键字
  10. sencha touch 入门学习资料大全