Common Emacs commands (Lite version)

Source: Internet
Author: User

From Emacs tutorial Chinese edition

C-v flip the whole screen forward

M-v
Flip the screen backwards

C-l (L)
Clear the screen and display all the text again. move the cursor to the center of the screen as the first type, and move the light ratio to the top of the screen as the second type.

========================================================== ========================================================== =

C-f
Move one character forward

C-B
Move one character backward

M-f
Move a word forward

M-B
Move one word backward

C-
Move to the beginning of a row

C-e
Move to end of line

M-
Move to the beginning of a sentence

M-e
Move to end of sentence

C-n
Move to the next row

C-p
Move to the previous row

M-<
Move to text

M->
Move to end of Text

========================================================== ========================================================== =

C-u numeric command
Repeat the command for a specified number of times. For example, C-u 8 C-f moves forward 8 characters, C-u 5 p inserts 5 p characters

C-g
Cancel or terminate the current command

========================================================== ========================================================== =

<Delete>
Delete the character before the cursor

C-d
Delete characters after the cursor

M-<delete>
Delete the word before the cursor

M-d
Delete words behind the cursor

C-k
Removes the content from the cursor position to the end of the row.

M-k
Remove to the end of the current sentence

C-y
Retrieve the last deleted text at the cursor

M-x replace-string to replace string

C-x u/C -_
Undo

========================================================== ========================================================== =

C-x C-s save the file

C-x C-f: Find the file. Emacs will prompt you to enter the file name.

C-x C-B list file Buffering

C-x s storage buffer

M-x recover file <Return> restores automatically stored data, which is used for data loss after the system or program crashes.

========================================================== ========================================================== =

C-s search for strings backward

C-r: Forward string SEARCH

Type C-s and an I-search string will appear in the echo area. This is the string to be searched, and Emacs will automatically search. To the position where the string appears, you only need to press C-s once. <RET> end query, and C-g terminate query. The search command of Emacs is incremental, which means that the search starts when you type a string.

========================================================== ========================================================== =

C-x 1: the window where the cursor stays

C-x 2 splits the current window horizontally

C-x 3 vertically splits the current window

C-M-v scroll the content of another window outside the cursor

C-x o switch cursor stay window

After opening the file with C-x C-f, you will see that the file is opened in the window where the cursor is located, and the content of the other window is not changed. This is a way to display different content in two windows.

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.