emacs 配置.emacs
(require 'package)
(package-initialize)
(add-to-list'package-archives '("melpa" . "http://melpa.milkbox.net/packages/\
") t)
(require 'auto-complete-config)
(ac-config-default)
(setq make-backup-files nil)
(setq auto-save-default nil)
;;不顯示菜單欄
(menu-bar-mode 0)
;;不顯示工具欄
(tool-bar-mode 0)
;;不顯示行號, 顯示列號
(global-linum-mode 0)
(column-number-mode 1)
;;複製一行
(defun simple-copy-line ()
"copy a line"
(interactive)
(let (beg end)
(save-excursion
(beginning-of-line)
(setq beg (point))
(end-of-line)
(setq end (point))
(kill-ring-save beg end)
))
)
;;複製一行,綁定到C-xl
(define-key global-map "\C-xl" 'simple-copy-line)