Simple settings for Emacs

Source: Internet
Author: User

I think the settings here are easier for me than the default settings.

(setq visible-bell t)

Turn off the sound of annoying errors.

(setq inhibit-startup-message t)

Turn off the "splash screen" when you start.

Displays the column number.

(setq mouse-yank-at-point t)

Do not insert the contents of the Clipboard in the same place as the mouse click. I don't like that, I often mess up my documents. I think it is better to use the cursor to locate and then click the middle mouse button. Whether your cursor is in that position in the document, or in Minibuffer, the mouse button is clicked, and the contents of the X selection are inserted into that position.

(setq kill-ring-max 200)

With a very large kill ring. This prevents me from accidentally deleting important things. I'm so reckless, you know:P

(setq default-fill-column 60)

Set the Fill-column to 60. Such text is better read.

(setq-default indent-tabs-mode nil)(setq default-tab-width 8)(setq tab-stop-list ())(loop for x downfrom 40 to 1 do      (setq tab-stop-list (cons (* x 4) tab-stop-list)))

Don't use the TAB character to indent, which can cause a lot of strange mistakes. Do not worry when editing Makefile, because Makefile-mode will set the TAB key to the Real tab character, and highlight the display.

(setq sentence-end "\\([。!?]\|……\|[.?!][]\"‘)}]*\\($\|[ \t]\\)\\)[ \t\n]*")(setq sentence-end-double-space nil)

Set Sentence-end to recognize Chinese punctuation. You do not have to insert two spaces after a period at fill.

(setq enable-recursive-minibuffers t)

The Minibuffer can be used recursively. I often need to do this.

(setq scroll-margin 3      scroll-conservatively 10000)

Prevents the page from jumping when scrolling, Scroll-margin 3 can start scrolling near the edge of the screen 3 lines, so you can see the context well.

(setq default-major-mode ‘text-mode)

Set the default major mode to Text-mode, not almost any function or Fundamental-mode.

(show-paren-mode t)(setq show-paren-style ‘parentheses)

Brackets match when the brackets on the other side are displayed instead of annoying jumping to another bracket.

(mouse-avoidance-mode ‘animate)

When the cursor is near the mouse pointer, let the mouse pointer out of the way, not blocking the line of sight.

(setq frame-title-format "[email protected]%b")

Displays the name of buffer in the title bar instead of the useless hint [email protected].

(auto-image-file-mode)

Allows Emacs to open and display pictures directly.

(global-font-lock-mode t)

The syntax is highlighted.

(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-environment ‘disabled nil)

Turn on these default disabled features.

(setq version-control t)(setq kept-new-versions 3)(setq delete-old-versions t)(setq kept-old-versions 2)(setq dired-kept-versions 1)

It is more secure to set up version control at the time of backup.

(mapcar (function (lambda (setting)         (setq auto-mode-alist           (cons setting auto-mode-alist)))) ‘(("\\.xml$".  sgml-mode)   ("\\\.bash" . sh-mode)   ("\\.rdf$".  sgml-mode)   ("\\.session" . emacs-lisp-mode)   ("\\.l$" . c-mode)   ("\\.css$" . css-mode)   ("\\.cfm$" . html-mode)   ("gnus" . emacs-lisp-mode)   ("\\.idl$" . idl-mode)))

A simple way to set auto-mode-alist, lest write many add-to-list.

(setq user-full-name "Wang Yin")(setq user-mail-address "[email protected]")

Set up useful personal information. This is useful in many places.

(setq dired-recursive-copies ‘top)(setq dired-recursive-deletes ‘top)

Allows dired to copy and delete directories recursively.

Simple settings for Emacs

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.