Chinaunix首页 | 论坛 | 博客
  • 博客访问: 87968
  • 博文数量: 19
  • 博客积分: 1863
  • 博客等级: 上尉
  • 技术积分: 205
  • 用 户 组: 普通用户
  • 注册时间: 2009-07-20 13:58
文章分类
文章存档

2013年(2)

2012年(3)

2011年(12)

2010年(2)

我的朋友

分类: Python/Ruby

2011-11-09 23:51:43

; hide toolbar
(tool-bar-mode nil)

; hide menubar
(menu-bar-mode nil)

; hide scrollbar
(scroll-bar-mode nil)

; can use external clipboard
(setq x-select-enable-clipboard t)

; set tab width
(setq default-tab-width 8)

; set backup
(setq version-control t)
; backup the oldest version twice, once before first edit, another before second edit
(setq kept-old-versions 2)
; backup the newest version twice, same as above
(setq kept-new-versions 2)
; delete the backup file besides the versions above
(setq delete-old-versions t)
; set backup method, use copy directly
(setq backup-by-copying t)
; set backup dir
(setq backup-directory-alist '(("."."~/.emacs.d/backup")))

; show column number
(setq column-number-mode t)

; show line number
(global-linum-mode t)

; change background color and foreground color
(setq default-frame-alist
  '(
     (foreground-color . "Wheat")
     (background-color . "Black")
     (cursor-color . "green1")
   )
)

; set initial size of the window
; (setq initial-frame-alist '((top . 0) (left . 0) (width . 168) (height . 41)))

; full screen
(defun my-fullscreen ()
  (interactive)
  (x-send-client-message
   nil 0 nil "_NET_WM_STATE" 32
   '(2 "_NET_WM_STATE_FULLSCREEN" 0)))
 
; maximum screen
(defun my-maximized-horz ()
  (interactive)
  (x-send-client-message
   nil 0 nil "_NET_WM_STATE" 32
   '(1 "_NET_WM_STATE_MAXIMIZED_HORZ" 0)))
(defun my-maximized-vert ()
  (interactive)
  (x-send-client-message
   nil 0 nil "_NET_WM_STATE" 32
   '(1 "_NET_WM_STATE_MAXIMIZED_VERT" 0)))
(defun my-maximized ()
  (interactive)
  (x-send-client-message
   nil 0 nil "_NET_WM_STATE" 32
   '(1 "_NET_WM_STATE_MAXIMIZED_HORZ" 0))
  (interactive)
  (x-send-client-message
   nil 0 nil "_NET_WM_STATE" 32
   '(1 "_NET_WM_STATE_MAXIMIZED_VERT" 0)))

; maximum when start
(my-maximized)


(put 'upcase-region 'disabled nil)
(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.
 '(inhibit-startup-screen t)
 '(jde-complete-function (quote jde-complete-in-line))
 '(jde-help-browser-function "w3m-browse-url")
 '(jde-jdk-doc-url "/home/sunting/mydocuments/document/doc/javase-doc"))
(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.
 )

阅读(1241) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~