Emacs basic edit Key List

Source: Internet
Author: User
Tags isearch
The basic edit Key List of Emacs-Debian information for the Linux release. For more information, see the following. Write it in front of 'c-'Control-(Ctrl-), press Ctrl and then press another key
'M-'Meta-(or Alt-), hold down the Alt key, press another key, or press ESC, and then press another key
'C-M-'Control-Alt-, press Ctrl and Alt and then press another key.
Point. A position in the document, usually in the lower left corner of the cursor
Mark. Set by command to define/Save the location information in the document
Region. The part between mark and point is called a region

RET return key
TAB key
ESC key
SPC Space key
Backspace, DEL return key
Delete key
If you do not know how to Exit C-x C-c and disable Emacs

C-z
C-x C-z exits and suspends Emacs

C-x C-f open the file/directory
C-x I insert File Content
Open a file in C-x C-r read-only mode

C-x u Undo (to Redo, move the cursor or press C-g and then Undo :)
C-x C-s save the file
C-x s
Save the C-x C-w file...

C-l refresh the window and move the current row to the center of the window. Given parameters, you can set
The location of the current row, try M-0 C-l or M -- C-l or M-4 C-l

C-g exit the current command. If you don't know what Emacs is doing, press it several times.
C-g will return to normal
Online help C-h t TUTORIAL
C-h I Online Info

C-h c indicates the name of the command bound to the Key sequence (hereinafter referred to as the key ).
C-h w: Key Binding given by command name
Specify the prefix of the parameter C-u for the command.

M-0
...
M-9 parameter 0... 9

M -- negative Parameter
Move the cursor to the beginning of line C-
End of line C-e

C-n next line
Last line of C-p
C-f advances one character
C-B returns one character

M-f forward
M-B returns a word
Search and replace C-s incremental search
C-r incremental search

M-x search-forward
Search
M-x search-backward
Backward Search

C-M-s
M-x isearch-forward-regexp
Incremental search using regular expressions
C-M-r
M-x isearch-backward-regexp
RegEx-based incremental search

M-x search-forward-regexp
Regular Expression search
M-x search-backward-regexp
Regular Expression Backward Search

ESC % ask for replacement
M-x query-replace-regexp
Replace a regular expression

M-x replace-string replacement
M-x replace-regexp Regular Expression replacement
The copy and paste areas of the area are the parts between the Mark and the Point, the Point is the lower left corner of the cursor, And the Mark is set by the command. 'Yanking ring' is a place where text is stored. Here you can copy and delete (kill) text. 'Yanking' indicates to insert the text you just deleted (kill.
C-SPC
C -@
M-x set-mark-command
Set mark
C-x Exchange mark and point

C-w deletes the text of the region and places it in the yanking ring.
Copy the M-w area to the yanking ring.

C-y inserts the last region of the yanking ring into the current buffer zone.

If M-y is followed by C-y and M-y for multiple times, use other regions in the yanking ring to replace
Change the inserted Region

C-o inserts a blank line behind the cursor
C-x C-o removes empty rows near the cursor. When multiple rows exist, only one row is left for the first time and the second row is left.
Delete all times

C-d delete a character (cannot be yank)
M-d deletes a word near the cursor

C-x h sets the entire buffer zone as a region (mark at the end of the buffer zone and point at the beginning)

C-k Delete (kill) from cursor to end of line
Edit C-q to insert the next character. For example, use C-q C-X to insert the character '^ x"

C-t exchanges two characters
M-t exchange
C-x C-t swap two rows

C-x = displays the character information of the cursor.

C-v scroll down window
M-v scroll up window
Convert multi-window and multi-buffer C-x B to another buffer zone
C-x k deletes the buffer

C-x 2 horizontal window
C-x 3 Vertical Split Window
C-x 1 remove other windows
ESC same as above
C-x 0 remove the current window

C-x o cursor to another window

C-M-v: scroll down to another window. If a negative parameter is given, scroll up.
Macro C-x (start the definition of a macro
C-x) End the definition of a macro.

C-x e execution macro

M-x name-last-kbd-macro
Name the last macro

M-x insert-kbd-macro
Insert a defined and named macro into the current file.
Rectangular area operation * the two ends of the rectangular area are determined by the Mark and Point.

C-x r t fill the rectangular area with strings
C-x r o inserts a blank rectangular area.
C-x r y Insert the deleted rectangle area
C-x r k deletes the rectangular area
C-x r c clears the current rectangle
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.