;去掉工具列和功能表列滾動欄(tool-bar-mode 0)(menu-bar-mode 0)(scroll-bar-mode 0);關閉凡人的出錯提示聲(setq visible-bell t);關閉啟動時的開機畫面(setq inhibit-startup-message t);顯示列號(setq column-number-mode t);用一個大些的kill-ring 防止刪掉重要的東西(setq kill-ring-max 200);fill-column設定為60 這樣的文字更好讀(setq default-fill-column 60);不使用tab字元indent(setq-default indent-tabs-mode nil)(setq default-tab-width 4);遞迴minibuffer(setq enable-recursive-minibuffers t);靠近螢幕3行的時候就開始滾動(setq scroll-margin 3 scroll-conservatively 10000);預設模式text(setq default-major-mode 'text-mode);括弧匹配的時候顯示另一個括弧(show-paren-mode t)(setq show--aren-style 'parentheses);自動移動滑鼠(mouse-avoidance-mode 'animate);標題列顯示buffer的名字(setq frame-title-format "laoguo@%b");文法高亮(global-font-lock-mode t);預設禁用的功能開啟(put 'set-goal-column 'disabled nil)(put 'narrow-to-region 'disabled nil)(put 'upcase-region 'disabled nil)(put 'downcase-region 'disabled nil)(put 'LaTeX-hide-enviroment 'disabled nil);個人資訊(setq user-full-name "laoguo");讓dired可以遞迴的拷貝和刪除目錄 操作要小心(setq dired-recursive-copies 'top)(setq dired-recursive-deletes 'top);yes or no simple(fset 'yes-or-no-p 'y-or-n-p);;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;顯示行號(require 'linum)(global-linum-mode 1);顯示時間(display-time-mode 1)(setq display-time-24hr-format t)(setq display-time-day-and-date t);我喜歡的主題(add-to-list 'load-path "G:\\emac_home\\.emacs.d\\theme6")(require 'color-theme)(color-theme-initialize)(color-theme-dark-blue2);字型設定(set-default-font "Courier New-14") ;設定游標為豎線(setq-default cursor-type 'bar);在首行C-K時候 同時刪除該行(setq-default kill-whole-line t);不產生備份檔案(setq make-backup-files nil);自動儲存模式(setq auto-save-mode nil);不產生臨時檔案(setq-default make-backup-files nil);emacs可以和外部其他程式粘貼(setq x-select-enable-clipboard t);自動在檔案的末尾增加一個新行(setq require-final-newline t);當游標在行尾上下移動的時候始終保持行尾(setq track-eol t);跳到另一個視窗(global-set-key [f4] 'other-window);F3目錄列出(global-set-key [f3] 'dired);撤銷(global-set-key [f10] 'undo);日誌(global-set-key [f11] 'calendar);查看議程(global-set-key [f12] 'list-bookmarks);設定日曆的一些顏色(setq calendar-load-hook'(lambda()(set-face-foreground 'diary-face "skyblue")(set-face-background 'holiday-face "slate blue")(set-face-foreground 'holiday-face "while")))(setq calendar-latitude +39.9)(setq calendar-longitude -116.4)(setq calendar-location-time "Beijing")(setq calendar-remove-frame-by-deleting t)(setq calendar-week-start-day 1);goto line(global-set-key (kbd "M-g") 'goto-line);標記(define-key global-map [C-return] 'set-mark-command);檔案時間戳記(setq time-stamp-active t)(setq time-stamp-warn-inactive t);C語言風格K&R(add-hook 'c-mode-hook'(lambda()(c-set-style "k&r")));C++ stroustrup風格(add-hook 'c++-mode-hook'(lambda()(c-set-style "stroustrup")))(setq compile-command "mingw32-make")