(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. '(custom-safe-themes (quote ("26614652a4b3515b4bbbb9828d71e206cc249b67c9142c06239ed3418eff95e2" default))) '(scroll-bar-mode nil) '(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. )
;;;; < --------------- 更新包后,自动更新加载路径 --------------- > (defun package-update-load-path () "Update the load path for newly installed packages." (interactive) (let((package-dir(expand-file-name package-user-dir))) (mapc(lambda(pkg) (let((stem(symbol-name(car pkg))) (version"") (firstt) path) (mapc(lambda(num) (if first (setq first nil) (setq version (format"%s." version))) (setq version (format"%s%s" version num))) (aref(cdr pkg)0)) (setq path (format"%s/%s-%s" package-dir stem version)) (add-to-list'load-path path))) package-alist)))
;;;; < ==================== auto installed package ==================== >
;;;; << evil >>----------------------------------------------+ ;;;; Evil is an extensible vi layer for Emacs. | ;;;; It emulates the main features of Vim, | ;;;; and provides facilities for writing custom extensions. | ;;;; --------------------------------------------------------+
;;;; << autopair >>------------------------------------------+ ;;;; It can be useful to insert parentheses, braces, quotes | ;;;; and the like in matching pairs - e.g., | ;;;; pressing "(" inserts '()', with the cursor in between. | ;;;; --------------------------------------------------------+
;;;; << pangu-spacing >>-------------------------------------+ ;;;; pangu-spacing-mode is an minor-mode to auto add space | ;;;; between Chinese and English characters. | ;;;; --------------------------------------------------------+
;;;; << jedi >>----------------------------------------------+ ;;;; Jedi.el is a Python auto-completion package for Emacs. | ;;;; It aims at helping your Python coding in a non-destruc- | ;;;; tive way. It also helps you to find information about | ;;;; Python objects, such as docstring, function arguments | ;;;; and code location. | ;;;; --------------------------------------------------------+
;;;; << neotree >>-------------------------------------------+ ;;;; A Emacs tree plugin like NerdTree for Vim. | ;;;; --------------------------------------------------------+
;;;; << color-theme >>---------------------------------------+ ;;;; EmacsLisp library color-theme.el provides many prede- | ;;;; fined color themes for your use, and you can easily | ;;;; define additional themes. | ;;;; --------------------------------------------------------+
;;;; << auto-complete >>-------------------------------------+ ;;;; This extension provides a way to complete with popup | ;;;; menu like: | ;;;; | ;;;; def-!- | ;;;; +-----------------+ | ;;;; |defun::::::::::::| | ;;;; |defvar | | ;;;; |defmacro | | ;;;; | ... | | ;;;; +-----------------+ | ;;;; --------------------------------------------------------+
;;;; << yasnippet >>-----------------------------------------+ ;;;; YASnippet is a template system for Emacs. It allows you | ;;;; to type an abbreviation and automatically expand it in- | ;;;; to function templates. | ;;;; --------------------------------------------------------+
;;;; << markdown-mode >>-------------------------------------+ ;;;; markdown-mode is a major mode for GNU Emacs which pro- | ;;;; vides syntax highlighting and supporting commands for | ;;;; editing Markdown files. | ;;;; --------------------------------------------------------+
;;;; << flycheck >>------------------------------------------+ ;;;; Flycheck is a modern on-the-fly syntax checking exten- | ;;;; sion for GNU Emacs 24, intended as replacement for the | ;;;; older Flymake extension which is part of GNU Emacs. | ;;;; Before use flycheck, Must install pylint like: | ;;;; | ;;;; > sudo pip install pylint | ;;;; | ;;;; --------------------------------------------------------+
;;;; << switch-window >>-------------------------------------+ ;;;; Just switch window! 'C-x o', and press the number. | ;;;; --------------------------------------------------------+
;;;; Setting English Font(设置英文字体) (set-face-attribute 'defaultnil:font"Yahei Consolas Hybrid 14") ;; Chinese Font(设置中文字体) (dolist(charset'(kana han symbol cjk-misc bopomofo)) (set-fontset-font(frame-parameternil'font) charset (font-spec:family"微软雅黑":size14)))
;;;; 全局显示行号 (global-linum-mode1)
;;;; 设置标题栏显示文件完整路径名 (setq frame-title-format '("< GNU Emacs > SWBeta is modifying... %S" (buffer-file-name "%f" (dired-directory dired-directory "%b"))))
;;;; 启动 Emacs 后,指定窗口(frame)大小 ;;;; arrange-frame (w h x y) 函数的w h x y分别是frame的宽、高、左上角x坐标 (defun arrange-frame (w h x y) "Set the width, height, and x/y position of the current frame" (let((frame(selected-frame))) (delete-other-windows) (set-frame-position frame x y) (set-frame-size frame w h))) (arrange-frame1203010050)
;;;; 设置函数,Ctr+x Ctr+a 最大化窗口,Ctr+x a 最小化窗口 (defun emacs-maximize () "Maximize emacs window in windows os" (interactive) (w32-send-sys-command61488)); WM_SYSCOMMAND #xf030 maximize (defun emacs-minimize () "Minimize emacs window in windows os" (interactive) (w32-send-sys-command#xf020)); #xf020 minimize (defun emacs-normal () "Normal emacs window in windows os" (interactive) (w32-send-sys-command#xf120)); #xf120 normalimize ;; (emacs-maximize) (global-set-key(kbd"C-x C-a")'emacs-maximize) (global-set-key(kbd"C-x a")'emacs-minimize)