Emacs-小白入坑之旅

为啥要用Emacs

没有为啥,直接说用了Emacs的感受吧。最开始刚上手确实搞不懂该怎么配置,索性直接要了我老大的配置过来,当然接触Emacs也是受他影响。
使用感受,Emacs让我比较喜欢的点就是基本一把键盘就搞定了所有的功能,当然在这还是要感谢媳妇儿当初破费送了一把500的机械键盘给我。之前source insight、vscode、keil、iar都用过,source insight本身是不支持UTF8(当然可以自己找插件,太懒,所以没弄)。vscode怎么说呢,界面什么的,都用着还行,让我不喜欢的地方是搜索的时候总是得拿这鼠标一个一个点,当然可能有快捷键,只是我没深入研究。keil和iar不用说了,就基本edit功能,但是比较爽的地方是能够按照语法提示补全,这点我认为要优于Emacs。
以上纯属个人观点及感受,不喜勿喷。
写此文的目的呢,主要是记录Emacs的学习过程,也share给有需要的人,算是提供一些帮助吧。

安装

  • 1、Emacs官网下载安装包。
  • 2、选择一个路径,解压,例如D:\soft。
  • 3、右键 此电脑->属性->高级系统设置->高级->环境变量->系统变量,找到path,将路径D:\soft\emacs\bin添加到path中。
    4.win+r,在cmd命令中输入emacs(consol+window)或emacs -nw(consol)或runemacs(window)既可以启动Emacs。
    Emacs主界面

    配置

  • 1、打开C:\Users\user_name\AppData\Roaming文件,如果没有.emacs文件以及.emacs.d文件夹,则创建此文件以及文件夹。
  • 2、打开.emacs文件,我的.emacs文件内容如下:
;;;--------------------------------------------------------
;; load emacs configure

;; Added by Package.el.  This must come before configurations of
;; installed packages.  Don't delete this line.  If you don't want it,
;; just comment it out by adding a semicolon to the start of the line.
;; You may delete these explanatory comments.
(package-initialize)

(require 'package)
(add-to-list 'package-archives
             '("melpa-stable" . "https://stable.melpa.org/packages/"))

(add-to-list 'load-path "~/.emacs.d/site-lisp/")
(load "init.el")

(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(package-selected-packages (quote (auto-yasnippet auctex auto-complete))))
(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 )
(put 'downcase-region 'disabled nil)
(put 'upcase-region 'disabled nil)

其中添加“"https://stable.melpa.org/packages/地址是为了能够获取mepla平台的插件。
"~/.emacs.d/site-lisp/"init.el的路径。

  • 3、打开.emacs.d文件夹,创建文件夹site-lisp,并在文件夹中创建文件init.el
    至此基本安装、配置已经完成。
    下一步就是安装配置插件,让emacs变得更加完美。

猜你喜欢

转载自www.cnblogs.com/zalv/p/11206221.html