My Emacs 的配置文件--有待续写

每次重装emacs,都要重写其”.emacs“,还有一大堆东西,总忘,索性,写下来:

Date:2012.04.06

我的emacs配置文件为:(这是win7的,所以,在linux下要适当的改一下)

----------------------------------------------------------------------------------------------------------------

(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.
 '(menu-bar-mode nil)
 '(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.
 '(default ((t (:inherit nil :stipple nil :background "SystemWindow" :foreground "SystemWindowText" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight bold :height 120 :width normal :foundry "outline" :family "Courier New")))))


;;;;Text mode and Auto Fill mode
;The date is 2011.12.16
;This function is for writer who wants start writing prose rather than code
;but when emacs recongise the type of the file will start for that type
(setq default-major-mode 'text-mode)
(add-hook 'text-mode-hook 'turn-on-auto-fill)



;;;;Rebind 'C-x C-b'for 'buffer-menu'
;The date is 2011.12.16
;Before my changing it ,this key is for 'list-buffer'
(global-set-key "\C-x\C-b" 'buffer-menu)



;;;;Emacs Load Path
;The date is 2011.12.16
;I don't know wheter this path setting is right in windows 7
(setq load-path (cons "E:/emacs" load-path))


;;;;Compare windows
;The date is 2011.12.16
;This function can compare two windows to find the same line
(global-set-key "\C-cw" 'compare-windows)



;;;;Php-mode
;The date is 2011.12.16
;add the extend dir into load-path
(add-to-list 'load-path "E:/emacs/emacsextend/php-mode-1.5.0")
;open php-mode
(require 'php-mode)
(add-hook 'php-mode-user-hook 'turn-on-font-lock)



;;;;Line number
;The date is 2011.12.16
(global-linum-mode t)


;;;;Full screen
;The date is 2011.12.16
;F11 to open full screen mode
;(defun fullscreen()(interactive)(set-frame-parameter nil'fullscreen(if(frame-parameter nil 'fullscreen)nil 'fullboth)))


;;;;Nxhtml mode
;The date is 2012.01.04
;this mode can mix the html ,php,javascript,css and so on
(load "e:/emacs/emacsextend/nxhtml/autostart.el")


;;;;Color-theme-6.6.0
;The date is 2012.01.04
;this is a color theme library
(add-to-list'load-path "e:/emacs/emacsextend/color-theme-6.6.0")
(require 'color-theme)
(color-theme-initialize)
(color-theme-comidia)


当然了,这些是最基础的,更深的有待学习,所以此Blog有待续写..........................................

--------------------------------------------------------------------------------------------------------------------------

The date is 2012.08.01

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.
 '(menu-bar-mode nil)
 '(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.
 '(default ((t (:inherit nil :stipple nil :background "SystemWindow" :foreground "SystemWindowText" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight bold :height 120 :width normal :foundry "outline" :family "Courier New")))))



;;;;MyEmacs
;This is Peter's Emacs
;The date is 2012.07.04


;;;;Text mode and Auto Fill mode
;The date is 2011.12.16
;This function is for writer who wants start writing prose rather than code
;but when emacs recongise the type of the file will start for that type
(setq default-major-mode 'text-mode)
(add-hook 'text-mode-hook 'turn-on-auto-fill)



;;;;Rebind 'C-x C-b'for 'buffer-menu'
;The date is 2011.12.16
;Before my changing it ,this key is for 'list-buffer'
(global-set-key "\C-x\C-b" 'buffer-menu)


;;;;Emacs Load Path
;The date is 2011.12.16
;I don't know wheter this path setting is right in windows 7
(setq load-path (cons "D:/MySoftware/Software-Two/Emacs/emacs-23.3" load-path))



;;;;Compare windows
;The date is 2011.12.16
;This function can compare two windows to find the same line
(global-set-key "\C-cw" 'compare-windows)



;;;;Line number
;The date is 2011.12.16
(global-linum-mode t)



;;;;Full screen
;The date is 2011.12.16
;F11 to open full screen mode
;(defun fullscreen()(interactive)(set-frame-parameter nil'fullscreen(if(frame-parameter nil 'fullscreen)nil 'fullboth)))



;;;;Color-theme-6.6.0
;The date is 2012.01.04
;this is a color theme library
(add-to-list'load-path "D:/MySoftware/Software-Two/Emacs/emacsextend/color-theme-6.6.0")
(require 'color-theme)
(color-theme-initialize)
(color-theme-comidia)


;;;;Match parentheses
;;date is 2012.07.04
;; enable skeleton-pair insert globally
(setq skeleton-pair t)
(global-set-key (kbd "(") 'skeleton-pair-insert-maybe)
(global-set-key (kbd "[") 'skeleton-pair-insert-maybe)
(global-set-key (kbd "{") 'skeleton-pair-insert-maybe)
(global-set-key (kbd "\"") 'skeleton-pair-insert-maybe)


;;;;Highlight parentheses
;;date is 2012.07.04
;;This setting is for highlighting the parentheses
(show-paren-mode 't)


;;;;Auto-TAB
;;date is 2010.07.05
;;This setting is for auto-tab
(global-set-key (kbd "RET") 'newline-and-indent)



;;;;Indent line
;;date is 2012.07.10
;;This setting is for indent line
(add-to-list 'load-path "D:/MySoftware/Software-Two/Emacs/emacsextend/indent-line")
(require 'aux-line)



;;;;Bind the '-' to <C-tab>
;;The date is 2012.07.30
;;Aftering binding the '-' to <C-tab>, it is convenient to type '-'
(fset 'subtraction-sign "-")
(global-set-key (kbd "<C-tab>") 'subtraction-sign)


;;;;Set "-" to J+Space
;;The date is 2012.08.01
;;If press J+Space, it generates the "-"
(add-to-list 'load-path "D:/MySoftware/Software-Two/Emacs/emacsextend/key-chord")
(require 'key-chord)
(key-chord-mode 1)
(key-chord-define-global "j " (lambda() (interactive) (insert "-")))

--------------------------------------------------------------------------------------------------------------------------



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值