Emacs 常用到的配置项和简单说明
;; Default Elisp path
(setq load-path (cons "~/.emacs.d/Elisp" load-path))
;; Setting the background and the foreground
(set-foreground-color "black")
(set-background-color "white")
;; Rmoeve the tools
(tool-bar-mode 0)
;; Remind the slidebar
(scroll-bar-mode 1)
;; Setting the backup file path
(setq backup-directory-alist '(("." . "~/.emacs.tmp")))
;; Setting the backup operation
(setq backup-by-copying t)
;; Auto complete
(global-set-key [(meta ?/)] 'hippie-expand)
(setq hippie-expand-try-functions-list
'(try-expand-line
try-expand-line-all-buffers
try-expand-list
try-expand-list-all-buffers
try-expand-dabbrev
try-expand-dabbrev-visible
try-expand-dabbrev-all-buffers
try-expand-dabbrev-from-kill
try-complete-file-name
try-complete-file-name-partially
try-complete-lisp-symbol
try-complete-lisp-symbol-partially
try-expand-whole-kill))
;; Display time
(display-time-mode 1)
;; Using 24H mode
(setq display-time-24hr-format t)
;; Using the y and n replace the yes and no
(fset 'yes-or-no-p 'y-or-n-p)
;; Display the column number
(column-number-mode t)
;; Setting the brace matching
(show-paren-mode 1)
;; Remove the bell sound
;;(setq visible-bell 0)
(setq ring-bell-function 'ignore)
;; Romove the help page
(setq inhibit-startup-message t)
(setq gnus-inhibit-startup-message t)
;; Using the Ctrl+K remove words to end
(setq-default kill-whole-line t)
;; Setting the max delete recording
(setq kill-ring-max 200)
;; Setting the menu bar information
(setq frame-title-format "%b@MATRIX")
;; Paste from external
(setq x-select-enable-clipboard t)
;; Setting the font
(set-default-font "mele-14")
;; Setting the emacs open windows
(defun arrange-frame (w h x y)
"Set the width, height, and x/y position of the current frame"
(let ((frame (selected-frame)))
(delete-other-windows)
(set-frame-position frame x y)
(set-frame-size frame w h)
)
)
(arrange-frame 80 30 400 50)