Personal Emacs Configuration File

Source: Internet
Author: User

My Emacs version: GNU Emacs 23.1.1 (X86_64-redhat-linux-gnu, GTK + version 2.18.9)

1: Download http://ftp.twaren.net/Unix/NonGNU/color-theme/color-theme-6.6.0.tar.gz and unzip yourself

2: Copy the color-theme-6.6.0.tar.gz extracted Color-theme.el and Theme folder to the ~/.EMACS.D folder (if the ~/.EMACS.D folder does not exist, please establish first).

3: Create configuration file. Emacs. The directory is in your home directory, under the user directory.

The configuration file is:

;; Add ~/.emacs.d/to the load path (add-to-list ' Load-path "~/.emacs.d/") (Require ' Color-theme) (color-theme-initialize);; This is the subject of your choice, the calm forest is its name, note that lowercase is used. (color-theme-calm-forest);; Vertical bar cursor (setq-default cursor-type ' bar);; Auto-wrap indent (Global-set-key (kbd "RET") ' newline-and-indent ');;; # # # Indent;;; ---indent settings (setq-default indent-tabs-mode t), default to no spaces instead of tab (SETQ default-tab-width 4), set tab default width (dolist (ho               OK (list; set the mode ' Emacs-lisp-mode-hook ' lisp-mode-hook with spaces instead of tab               ' Lisp-interaction-mode-hook ' scheme-mode-hook ' C-mode-hook ' C++-mode-hook ' Java-mode-hook ' haskell-mode-hook ' Asm-mode-hook ' emms-tag-editor-mod E-hook ' Sh-mode-hook)) (Add-hook Hook ' (Lambda () (setq indent-tabs-mode Nil))); Set the alignment style of the program;(C-set-style "K&r");; Undo (Global-set-key (kbd "C-z") ' undo ');; Select All (Global-set-key (kbd "C-a")' Mark-whole-buffer);; Save (Global-set-key (kbd "c-s") ' save-buffer ');; Support Emacs and external program paste (setq x-select-enable-clipboard t); display matching brackets (Show-paren-mode t) (setq show-paren-style ' parentheses);; Set the cursor to blink or not to flash;;( Blink-cursor-mode l);; Set tab width to 4 (setq-default Indent-tabs-mode nil) (setq tab-width 4 c-basic-offset 4) (setq tab-width 4 indent-tabs-mode N IL);; Do not generate temporary files (setq-default make-backup-files nil);; Hanghao (Global-linum-mode ' Linum-mode);; Highlight the macro definition in C;;( Load-file "/home/.emacs.d/ctypes.el") (Require ' cTYPES) (Ctypes-auto-parse-mode 1);; buffer management;; Press C-x K to immediately close off the current buffer (Global-set-key (kbd "C-x k") ' Kill-this-buffer '); The text mode is turned on. (setq default-major-mode ' C-mode);; Remove the Welcome interface (SETQ inhibit-startup-message t);; The buffer split mode (Defun toggle-window-split () "Vertical split shows more from each line, horizontal split showsmore lines. This code toggles between them.  It works forframes with exactly windows.  (interactive) (If (= (count-windows) 2) (Let* (This-win-buffer (window-buffer)) (Next-win-buffer (Window-buffer (Next-window))) (This-win-edges (Window-edges (Selected-window) )) (Next-win-edges (Window-edges (Next-window))) (this-win-2nd (Not (and (<=) (Car This-win-edge s) (Car next-win-edges)) (<= (Cadr This-win -edges) (Cadr next-win-edges)))) (Splitter (if (= (Car t                his-win-edges) (Car (window-edges (Next-window))) ' Split-window-horizontally split-window-vertically)) (Delete-other-windows) (Let (First-win (Selected-window))) (Fu           Ncall splitter) (If this-win-2nd (Other-window 1)) (Set-window-buffer (Selected-window) this-win-buffer)          (Set-window-buffer (Next-window) next-win-buffer)          (Select-window First-win) (If this-win-2nd (Other-window 1))))) (GloBal-set-key [(Control C) (|)] ' Toggle-window-split ' (Global-set-key [(F5)] ' Speedbar);; Mouse wheel, default scrolling too fast, here instead of 3 lines (Defun up-slightly () (interactive) (scroll-up 3)) (Defun down-slightly () (interactive) (Scroll-down 3)) (Global-set-key [mouse-4] ' down-slightly) (Global-set-key [mouse-5] ' up-slightly);; Start Emacs automatically set to two windows (one on each);;( split-window-vertically)


Personal Emacs Configuration File

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.