; 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.
)
阅读(1236) | 评论(0) | 转发(0) |