Emacs Novice Note (iii)--a little simple customization for Emacs

Source: Internet
Author: User

Ilocker: Focus on Android Security (new entry, 0 Basics) qq:2597294287

在 emacs 启动时,会加载 ~/.emacs 文件。在该文件中编辑一些 lisp 代码,是一种最为简单的定制 emacs 的方式。

下面的 lisp 代码主要实现几个按键绑定和窗口最大化等简单的配置:

1 ;; window maximization2(Defun my-maximized ()3 (Interactive)4(x-send-client-message5Nil 0 Nil "_net_wm_state" 326' (2 "_net_wm_state_maximized_horz" 0))7(x-send-client-message8Nil 0 Nil "_net_wm_state" 329' (2 "_net_wm_state_maximized_vert" 0))Ten ) One  A ;; When you start Emacs, maximize the window -(my-maximized) -  the ; automatically adds a new line at the end of the file -(Setq require-final-newline T) -  - ;; Set tab to 4 spaces +(Setq tab-width 4 -indent-tabs-Mode T +C-basic-offset 4) A  at ;; carriage return indent -(Global-set-key "\c-m" ' newline-and-indent) -(Global-set-key (kbd "c-<return>") ' newline) -  - ;; F1: Open Help document -(Global-set-key [F1] ' info) in  - ;; F2: Redo Last Action to(Global-set-key [F2] ' undo) +  - ;; F3: Close Current buffer the(Global-set-key [F3] ' Kill-this-buffer)

Emacs Novice Note (iii)--a little simple customization 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.