[Emacs] Getting Started

Source: Internet
Author: User
1. Download and install

Http://www.gnu.org/software/emacs/

Connection: http://mirrors.ustc.edu.cn/gnu/emacs/

After the download is complete, directly decompress the package and run addpm.exeunder the bindirectory. After the download is complete, run the runemacs.exe Startup File.

Ii. Basic operations

At the beginning, I learned how to use Emacs. Based on my learning experience, I recommend that you read the learn-by-doing document first. This document basically covers the basic operations for using Emacs. How can I open this document? You can use the shortcut key c-h t to directly go to this document, or you can find the link to Emacs tutorial in the default display page of Emacs startup, and click "read.

Some basic operations in the learn-by-doing document are listed below:

C = Ctrl, M = meta = alt | ESC, del = backspace

For example, C-F means to press Ctrl and then F. C-h f means to press Ctrl and then h. After C-h f is released, press F.

       
C-V Move one screen forward C-x C-F Open/create a file in the buffer
M-V Move one screen down C-x C-S Save the Current Buffer File
C-l Repaint the screen and place the cursor in the middle of the screen. repeating this command consecutively indicates switching back and forth between the center, the top, and the bottom. C-x C-W Save the Current Buffer file
C-P Move to the previous line C-x C-V Close the current buffer and open a new file
C-n Move to the next row C-x I Insert a file at the current cursor
C-B Move one character to the left C-x B New/switch Current Buffer
C-F Move one character to the right C-x C-B Display the list of currently opened Buffers
M-B Move a word to the left C-x K Disable the currently opened Buffer
M-F Move a word to the right C-z Suspend Emacs
C- Move to the beginning of a row C-x C-z Disable Emacs
C-e Move to end of line C-X S Save multiple cache zones
M- Move to the beginning of a sentence    
M-e Move to end of sentence    
M-< Move to the beginning of the buffer    
M-> Move to the end of the cache area    
       
<Del> | <backspace> Delete A character before the cursor C-G Cancel the currently entered command
C-d Delete a character after the cursor M-x <command> Execute Command
M-(<del >|< backspace>) Remove a word before the cursor (the difference between removing and deleting is that the removed content can be recalled, but not deleted) C-S Search forward in Current Buffer
M-d Remove a word after the cursor C-r Search within the current buffer zone
C-k Remove the character from the cursor to the end of the line C-G In search mode, return to the position before the start
M-K Remove the character from the cursor to the end of a sentence C-x 2 Split the buffer horizontally into two upper and lower windows
C-@ | C-spec Set start ID C-x 3 Vertically split the buffer into two windows: left and right.
C-W Remove content from the ID area C-x O (letter) Switch to another window
M-W Copy the content of the ID area C-x 0 (number) Close the current cursor window
C-y Recall content C-X 1 Close other Windows except the current window
C-x u Undo C-x ^ Change window height
C-T Swap two character positions 'C-X {'| 'C-x }' Change window width
M-T Exchange the positions of two words C-X- Scale down the current window to its minimum size
C-X c-t Switch the location of two rows C-x + Balance the size of all windows
       

 

3. Help Menu

In addition to the above basic operations, the Help menu is also very important for beginners. Through this help menu, we can find the information we need more conveniently and quickly.

Go to the Help menu and choose C -?

After the preceding operations are entered, emacs will list all the help operations in a new buffer: (common operations are marked in red)

Command (c-h)

Parameters Description
A Pattern Display All commands whose names match pattern (list of words or regular expressions. You can also run the 'apropos' command.
B   All key bindings are displayed.
C Keys Displays the command name of the specified key sequence.
C Coding Description of the given encoding system. Press ENTER <RET> to indicate the current default encoding system.
D Pattern Displays all functions, variables, and other items that match the regular expression pattern.
E   Enter the * message * buffer, which records all log information in the echo area.
F Function The document description of the given function is displayed.
F Command The online command guide section is displayed.
G   Displays information about the GNU project.
H   Displays the welcome files for various scripts.
I   Manually read the content in the info file online.
I Method Describes a given input method. Press enter to indicate that the current method is used by default.
K Keys Displays all the instructions for the given key sequence.
K Keys Displays the Online Guide section for a given sequence of keys.
L   Displays the buttons of the last 300 inputs.
L LANG-ENV Describes a given language environment. Press enter to indicate that the current language is used by default.
M   Displays instructions for the current secondary or primary mode, including their specific commands.
N   Displays the latest update news of Emacs.
P Topic Find the package that matches the keyword of the current topic.
R   Shows the guide for Emacs in info mode.
S   Displays the content of the current syntax table for enhanced interpretation.
S Symbol Shows the Online Guide for given symbols in the programming language used in the current buffer.
T   Start with the learn-by-doing tutorial of Emacs.
V Variable Displays the document and value of the given variable.
W Command Displays the keys bound to the given command.
.   Displays all local help points in the echo area.
     
C-   Emacs information.
C-C   Copyright information of Emacs.
C-d   The debugging command of GNU Emacs.
C-e   Emacs extension package and information.
C-F   Emacs FAQ (FAQs ).
C-m   How to print and organize the Emacs guide.
C-n   The latest information updated by Emacs.
C-o   Emacs sorting and distribution information.
C-P   Information about known Emacs problems.
C-T   The todo list of Emacs.
C-W   The Security Information missing from Emacs.

 

Iv. Experience Sharing

The blogger has just started to use Emacs. It takes more than three months to use Emacs. He has been studying for more than two months and has been away from new users for a month. There is nothing to share here, that is, the most important thing in practice. The best way to learn a tool is to use it. One of the advantages of using Emacs is that the number of times the keyboard is removed by the hand is significantly reduced, and the efficiency is naturally improved.

 

Author: xanthondont

Source: http://www.cnblogs.com/hbq-fczzw/archive/2013/01/29/2880868.html

The copyright of this article is shared by the author and the blog Park. You are welcome to repost this article. However, you must retain this statement without the author's consent and provide a clear link to the original article on the article page. Otherwise, you will be held legally liable.

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.