Emacs 配置說明html
Emacs配置文件在哪裏?git
Your init file contains personal EmacsLisp code that you want to execute when you start Emacs. For GnuEmacs, it is ~/.emacs or _emacs or ~/.emacs.d/init.el. For XEmacs, it is ~/.xemacs or ~/.xemacs/init.el. For AquamacsEmacs, it is ~/.emacs or ~/Library/Preferences/Aquamacs Emacs/Preferences.el
參考:http://www.javashuo.com/article/p-mfqdqytt-gv.htmlgithub
Emacs 目前支持界面包管理工具:Options -> Manage Emacs Packages 選擇安裝包便可,vim
支持:neotree (目錄樹)bash
company (自動補全)工具
包管理:ui
(require 'package) (add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/")) (package-initialize)
顯示行號:spa
;; 顯示行號 (global-linum-mode 1) (setq linum-format "%d ")
更換主題:插件
;; 選擇主題 https://github.com/hbin/molokai-theme (setq molokai-theme-kit t) (add-to-list 'custom-theme-load-path "your path") (load-theme 'molokai t)
添加目錄樹:code
;; 下載插件至隨意目錄 https://github.com/jaypei/emacs-neotree 而後將目錄配置在下方,F8將顯示目錄
;; https://stackoverflow.com/questions/3538064/is-there-something-similar-for-emacs-like-vimss-nerdtree (add-to-list 'load-path "/some/path/neotree") (require 'neotree) (global-set-key [f8] 'neotree-toggle)
配置文件完整內容:
(require 'package) (add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/")) (package-initialize) ;; NerdTree like v (add-to-list 'load-path "/home/wanghaiyang/.emacs.d/neotree") (require 'neotree) (global-set-key [f8] 'neotree-toggle) ;; Usage: M-x load-theme RET molokai (https://github.com/hbin/molokai-theme) (add-to-list 'custom-theme-load-path "~/.emacs.d/theme/") (setq molokai-theme-kit t) (setq molokai-theme t) (load-theme 'molokai t) ;; Usage: M-x global-linum-mode (global-linum-mode 1) (setq linum-format "%d ") (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 (company)))) (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. )
快捷鍵:
切換窗口:Ctrl + x o
關閉窗口:Ctrl + x 0