通用设置
;; 缩进 (setq c-default-style "linux" c-basic-offset 4) ;; 不使用tab (setq-default indent-tabs-mode nil) ;; turn on highlighting current line (global-hl-line-mode 1) ;; 显示行号和列号 (global-linum-mode t) ;; (tool-bar-mode -1) (setq-default cursor-type 'bar) ; 设置光标为竖线 ;; (set-default-font "微软雅黑Monaco-10") ;; 通用快捷键,例如split-window ;; (global-set-key [f1] 'speedbar) (global-set-key (kbd "M-g") 'goto-line) (global-set-key (kbd "C-c C-c") 'comment-region) ;; paren mode (show-paren-mode 1) (setq show-paren-delay 0) ;; buffer (global-set-key (kbd "C-x C-b") 'ibuffer) (global-set-key (kbd "M-k") 'kill-this-buffer) (global-set-key (kbd "<C-tab>") 'ido-switch-buffer) ;; 窗口操作快捷键 (global-set-key (kbd "M-a") 'mark-whole-buffer) (global-set-key (kbd "M-o") 'other-window) (global-set-key (kbd "M-0") 'delete-window) (global-set-key (kbd "M-1") 'delete-other-windows) (global-set-key (kbd "M-2") 'split-window-vertically) (global-set-key (kbd "M-3") 'split-window-horizontally) (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. '(tool-bar-mode nil)) (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. '(default ((t (:family "微软雅黑Monaco" :foundry "outline" :slant normal :weight normal :height 98 :width normal))))) ;; 保存桌面 (desktop-save-mode 1) ;; ido-mode (require 'ido) (ido-mode t) ;; To load it automatically on Emacs startup add this (add-to-list 'custom-theme-load-path "D:/Program Files/emacs_elisp") (load-theme 'zenburn t) (add-to-list 'load-path "D:/Program Files/emacs_elisp") ;; erlang mode for windows (setq load-path (cons "D:/Program Files/erl5.9.1/lib/tools-2.6.7/emacs" load-path)) (setq erlang-root-dir "D:/Program Files/erl5.9.1") (setq exec-path (cons "D:/Program Files/erl5.9.1/bin" exec-path)) (require 'erlang-start) ;; Distel 配置所需 (add-to-list 'load-path "D:/PROGRAM FILES/emacs_elisp/distel/elisp") (require 'distel) (distel-setup) ;; yasnippet (require 'yasnippet) ;; eproject (add-to-list 'load-path "D:/Program Files/emacs_elisp/eproject") (require 'eproject) (require 'eproject-extras) ; 默认目录 (setq default-directory "D:/")