我的.emacs 2012年6月27日updated


(setq delete-auto-save-files t)
;; quit message
(fset 'yes-or-no-p 'y-or-n-p)
;;設置有用的個人信息。這在很多地方有用
(setq user-full-name "liuyao")
(setq user-mail-address "[email protected]")
;;把缺省的 major mode 設置爲 text-mode, 而不是幾乎什麼功能也
;;沒有的 fundamental-mode.
(setq default-major-mode 'text-mode)
(setq initial-major-mode 'text-mode)
;;光標靠近鼠標指針時,讓鼠標指針自動讓開,別擋住視線。
(mouse-avoidance-mode 'animate)
;;顯示列號
(setq column-number-mode t) 
;;防止頁面滾動時跳動, scroll-margin 3 可以在靠近屏幕邊沿3行時就開始滾動,可以很好的看到上下文
(setq scroll-margin 3
      scroll-conservatively 10000)
;;在標題欄顯示buffer的名字
;;(setq frame-title-format "emacs@%b")
(setq frame-title-format "%n%F/%b")
;;不要在鼠標點擊的那個地方插入剪貼板內容。我不喜歡那樣,經常把 我的文檔搞的一團糟。我覺得先用光標定位,然後鼠標中鍵點擊要好 的多。不管你的光標在文檔的那個位置,或是在 minibuffer,鼠標 中鍵一點擊,X selection 的內容就被插入到那個位置。
(setq mouse-yank-at-point t)
(define-key global-map "\C-h" 'backward-delete-char)
;;make ctrl-h work in searches, too
(setq search-delete-char (string-to-char "\C-h"))




;;bring the "help" facility somewhere else (ctrl-?)
;;make alt-h delete the previous word
(define-key global-map "\M-h" 'backward-kill-word)




;;make ctl-x ctrl-u the "undo" command; this is better than ctrl-u
(define-key global-map "\C-x \C-u" 'undo)



;;z在debian/ubuntu到某一行的命令是 ALt-g-g
;;goto-line
;;(define-key global-map "\C-x\C-l" 'goto-line)
;;loadpath
(setq load-path (append load-path '("/home/yao/.emacs.d/")))
;; c-toggle-auto-state
(add-hook 'c-mode-hook
      '(lambda ()
(linum-mode t)
         (c-toggle-auto-state)))
(add-hook 'c++-mode-hook
      '(lambda ()
         (c-toggle-auto-state)))
;;括號匹配時顯示另一端的括號,而不是跳過去
(show-paren-mode t)
(setq show-paren-style 'parentheses)
;;-------------------------語法加亮--------------------------
(global-font-lock-mode t)
;;-------------------------關閉啓動時的`開機畫面'------------
(setq inhibit-startup-message t)
(scroll-bar-mode nil)
(tool-bar-mode nil)
(menu-bar-mode nil)
(set-face-attribute 'default nil :height 120)
;;;auto-complete
;;(add-to-list 'load-path "/home/yao/.emacs.d/")
;;(require 'auto-complete-config)
;;(add-to-list 'ac-dictionary-directories "/home/yao/.emacs.d//ac-dict")
;;(ac-config-default)


;;**************************COlOR THEME*********************


(require 'color-theme)
    (color-theme-initialize)
    (color-theme-hober)


(require 'sr-speedbar)
(global-set-key (kbd "<f5>") 'sr-speedbar-toggle)
(custom-set-variables
 '(speedbar-show-unknown-files t)
)

http://homepages.inf.ed.ac.uk/s0243221/emacs/

http://dotfiles.org/~rretzbach/.emacs

https://sites.google.com/site/steveyegge2/my-dot-emacs-file

發佈了23 篇原創文章 · 獲贊 1 · 訪問量 1萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章