相关使用笔记请访问Emacs使用笔记。部分操作需结合本文所提供插件及配置文件使用。下载链接见页尾。
我的配置文件:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
;; 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) (add-to-list 'load-path "~/EmacsPlugin/NeoTree/neotree") (require 'neotree) (global-set-key [f8] 'neotree-toggle) ;;(global-set-key (kbd "C-<f8>") 'neotree-toggle) (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. '(ansi-color-faces-vector [default default default italic underline success warning error]) '(ansi-color-names-vector ["#242424" "#e5786d" "#95e454" "#cae682" "#8ac6f2" "#333366" "#ccaa8f" "#f6f3e8"]) '(custom-enabled-themes nil) '(menu-bar-mode nil) '(package-selected-packages (quote (jdee magit dash))) '(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. ) ;;open up with full screen ;;(setq initial-frame-alist (quote ((fullscreen . maximized)))) ;;cancel welcome page (setq inhibit-splash-screen t) ;;custom welcome (setq initial-scratch-message "") ;;modify the cursor (setq-default cursor-type 'bar) ;;hide the scroll bar (set-scroll-bar-mode nil) ;; set open multi shell (defun wcy-shell-mode-auto-rename-buffer (text) (if (eq major-mode 'shell-mode) (rename-buffer (concat "shell:" default-directory) t))) (add-hook 'comint-output-filter-functions'wcy-shell-mode-auto-rename-buffer) ;;set windows numbering (add-to-list 'load-path "~/EmacsPlugin/Window-Numbering") (require 'window-numbering) (window-numbering-mode 1) ;;set transparent effect (global-set-key (kbd "C-<f11>") 'loop-alpha) (setq alpha-list '((100 100) (95 65) (85 55) (75 45) (65 35))) (defun loop-alpha () (interactive) (let ((h (car alpha-list))) ;; head value will set to ((lambda (a ab) (set-frame-parameter (selected-frame) 'alpha (list a ab)) (add-to-list 'default-frame-alist (cons 'alpha (list a ab))) ) (car h) (car (cdr h))) (setq alpha-list (cdr (append alpha-list (list h)))) ) ) (defun qiang-comment-dwim-line (&optional arg) "Replacement for the comment-dwim command. If no region is selected and current line is not blank and we are not at the end of the line, then comment current line. Replaces default behaviour of comment-dwim, when it inserts comment at the end of the line." (interactive "*P") (comment-normalize-vars) (if (and (not (region-active-p)) (not (looking-at "[ \t]*$"))) (comment-or-uncomment-region (line-beginning-position) (line-end-position)) (comment-dwim arg))) (global-set-key "\M-;" 'qiang-comment-dwim-line) ;;color theme (add-to-list 'load-path "~/EmacsPlugin/Color-Theme") (require 'color-theme) ;;delete smarter (defadvice kill-ring-save (before slickcopy activate compile) (interactive (if mark-active (list (region-beginning) (region-end)) (list (line-beginning-position) (line-beginning-position 2))))) (defadvice kill-region (before slickcut activate compile) (interactive (if mark-active (list (region-beginning) (region-end)) (list (line-beginning-position) (line-beginning-position 2))))) ;;jump to middle (defun middle-of-line () "Put cursor at the middle point of the line." (interactive) (goto-char (/ (+ (point-at-bol) (point-at-eol)) 2))) (global-set-key (kbd "C-z") 'middle-of-line) ;;set windows undo and redo (when (fboundp 'winner-mode) (winner-mode 1) (global-set-key (kbd "C-x 4 u") 'winner-undo) (global-set-key (kbd "C-x 4 r") 'winner-redo) ) ;;set line skip (global-set-key (kbd "M-n") (lambda () (interactive) (next-line 5))) (global-set-key (kbd "M-p") (lambda () (interactive) (previous-line 5))) ;;w3m (autoload 'w3m "w3m" "interface for w3m on emacs" t) (autoload 'w3m-browse-url "w3m" "Ask a WWW browser to show a URL." t) (autoload 'w3m-search "w3m-search" "Search words using emacs-w3m." t) ;;settings (setq browse-url-browser-function 'w3m-browse-url) (setq w3m-command-arguments '("-cookie" "-F")) (setq w3m-use-cookies t) ;;(setq w3m-home-page "http://www.nextlegend.cn") (setq w3m-home-page "http://www.bing.com") ;;(require 'mime-w3m) ;;(setq w3m-default-display-inline-images t) ;;(setq w3m-default-toggle-inline-images t) ;;(setq w3m-show-graphic-icons-in-header-line t) ;;(setq w3m-show-graphic-icons-in-mode-line t) ;;optional keyboard short-cut ;;(global-set-key "\C-xm" 'browse-url-at-point) ;;To use Melpa (require 'package) (add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/") t) ;;modify windows (global-set-key (kbd "C-<f1>") 'enlarge-window) (global-set-key (kbd "C-<f2>") 'shrink-window-horizontally) (global-set-key (kbd "C-<f3>") 'enlarge-window-horizontally) ;;background/foreground color (set-background-color "black") (set-foreground-color "white") (set-face-foreground 'region "green") (set-face-background 'region "blue") |
点击链接下载我的Emacs插件: 【文件】Emacs插件 (下载1000)
点击链接下载我的Emacs配置文件: 【配置】Emacs配置文件 (下载985)
说点什么