[Reprinted] common shortcut keys for GNU Emacs

Source: Internet
Author: User
Basic commands

C-x C-C: Exit Emacs

C-x C-F: open a file. If the file does not exist, create a file.

C-G: Cancel unfinished commands

Edit

C-z
(Redefined): Undo; originally, C-Z suspends Emacs (and then calls it out using the FG command); C-x u is the default command; move the cursor, then C-Z can redo

M-D: delete the word after the cursor

Move cursor

C-V: Forward Paging

M-V: Page flip

M-R: move the cursor to the middle of the screen

C-A: Move to the beginning of the line

M-A: Move to the beginning of a sentence. There may be spaces between the beginning of a row and the beginning of a sentence.

C-E: Move to the end of the row

M-E: Move to the end of the sentence

M-{: Move up a segment

M-}: move down a segment

C-Right: Move a word forward

C-left: Move a word backward.

C-up: move forward

C-down: Move backward

M-<: Move to the beginning of the entire text

M->: Move to the end of the entire text

C-u numeric command: execute this command multiple times (number indicates the number of times); "M-numeric command" can also

M-x goto-line: Move to a row

C-l: Re-paint the screen. The result is that the current editing row moves the center of the window.

Buffer-related

C-x K: Disable the current buffer.

C-x B: switch to the buffer of the previous editor.

C-x C-B: list all current buffers.

C-x C-S: Save the Current Buffer

C-x s: To save all unsaved buffers, you will be prompted whether to save

C-x C-W: Save the file

Copy and paste

M-space
(Redefined): Set mark; C-@ to the default command.

C-W
(Redefined): cut a region. If no mark is set, cut a row.

M-W
(Redefined): Copies a region. If no mark is set, copies a row.

C-K: cut from the current position to the end of the row

C-Y: Paste

M-Y: use C-y to pull back the recently removed text and replace it with m-y to pull back the previously removed text. Type M-y multiple times to pull back the text that was removed earlier.

C-x r k: Cut the rectangle area

C-x r y: paste the rectangle area

Window operations

C-x 0: Close the current window

C-x 1: Maximize the current window

C-x 2: Vertical Split Window

C-x 3: Horizontal Split Window

M-o
(Redefined): switch between windows. C-x O is the default command.

C-x 5 1/2/3/0: operations similar to frame

C-x <: Right-volume window content

C-x>: Left volume of window content (these two commands are useful after Vertical Split of Windows)

(C-u) C-x ^: Increase the current window. If c-u exists, four rows are added at a time.

(C-u) C-x}: widening the current window

(C-u) C-X {: press to narrow the current window

Esc c-V: Perform screen scrolling in other windows

Search and replace

C-S: Forward search (incremental search); Continuous C-S, jump to the next search Target

C-s RET: normal search

C-r: Forward search

C-s ret c-W: query by word

M-%: Query replacement, that is, it will ask before replacement

M-x replace-string: normal replacement

Tags

M -! Etags. C
. H: Create a tags File

M-.: Jump to the tag location

M-X list-tags: List tags

Bookmark

C-x r m: bookmark

C-x r B: Jump to bookmark

Help

C-H? : View help information

C-h f: view a function

C-h v: view a variable

C-h k: View A Key Binding (C-h c is also viewing the key binding, but the information is relatively simple)

C-h c-F: it is very useful to view the info of a function.

C-H I: View info

Others

C-M-/: format the selected area in a certain format (such as C program)

C-x H: select all

M -! : Execute external shell commands

M-x shell: Simulate the buffer of the shell

M-x term: Simulate terminal, C-c k to disable Terminal

C-x C-Q: Modify the read-only attribute of the buffer.

 

Article from: http://blog.chinaunix.net/u/13991/showart.php? Id = 151709

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.