command keys for Emacs
The main use of the command button in Emacs is as follows.
C Key: represents the meaning of contorl, the user to control language-independent units (characters, lines). The CTRL key is on the keyboard.
m Key: represents meta meaning, used to control units with language definitions (such as words, sentences, paragraphs). The ALT key is generally on the keyboard.
ESC: Click once equals m –.
-: in Emacs commands, you will often see-this symbol, which represents holding down the previous character, for example c–x means holding down CTRL and then pressing X.
cancellation of the command: C–g, or press ESC 2 times.
operation of Emacs files
This includes opening, storing, and exiting the file.
Open the file: C-x c-f, opens a file buffer in the current window.
Save the file: C-x C-s, save the current file. C-x s saves multiple buffers.
Save the file as: C-x c-w.
Open a new farme: C-x 5 2.
To exit Emacs: C-x c-c.
emacs Buffers (buffer)
The previous mention of the buffer this thing, in fact, can be understood as Emacs for each of your files open up another space, in this space, you can edit the file as you want, without worrying about affecting the original file. Emacs will periodically give your buffer file auto save and name a #文件名 # file in the same file directory (automatically disappear after saving), so you don't have to worry about what you're editing will be lost.
Show All buffers: C-x C-b.
Select a name buffer: C-x B, enter the file name in the buffer, which defaults to the previous buffer.
Previous buffer: C-x left.
Next buffer: C-x right.
the movement of the cursor
The control of the cursor when editing text.
on: C-p (previous).
below: C-n (Next).
Left: C-b (back).
Right: C-f (Forward).
move to the beginning of the file: M-<.
move to the end of the file: M->.
move to the beginning of the line: C-a.
move to the end of the line: C-E (end).
move forward one word: M-f.
To move one word backwards: M-b.
To move a sentence forward: M-a.
To move one sentence backwards: M-e.
Scroll down one screen: C-v (view).
Scroll up one screen: M-v.
Place the current line in the middle of the screen: c-l. 2 times C-l is placed at the top of the screen and 3 times c-l at the end of the screen.
Editing of files
Delete, copy, paste, etc. of text.
Delete cursor before character:backspace (enter the above).
Delete the current character: c-d (delete).
Delete a word before the cursor: M-backspace.
Delete A word after the cursor: M-d.
Delete the character at the end of the line at the cursor: C-k (Kill).
Delete the characters at the end of the cursor: M-k.
Revocation: C-x u (undo). or c-/or c-_. The first type is recommended for convenience.
Remove tag mark set: [email protected], which marks the character that starts at the cursor. C-spa can also
To Remove: C-w, remove the character at the current cursor from the mark set.
recall last Remove text: C-y (Yank).
Summon previously removed text: M-y. Note that use after c-y is used. m-y don't know how to use it?
Copy: M-w the character at the cursor from the last mark set. Paste using C-y.
Select all: C-x H.
Search for Text
Emacs can forward, backward search string, search command is progressive (incremental), is the search and input synchronization, without entering a character, Emacs has started to search.
Search forward: C-r.
Search backwards: C-s.
Note: When searching, you can press C-S/R to view the next/previous place, c-g cancel the search, go back to the initial search cursor, <Enter> end the search, the cursor remains on the search results.
Multi-Window
Emacs is a fascinating place to display multiple files on one screen at a time.
To Add a window: C-x 2. The newly added window is the current file.
Close the window that is currently out of Windows: C-x 1.
Scroll below window (down): C-m-v
Scroll below window (UP): C-m-shift-v.
To traverse a window: C-x O.
to open a file in a new window: C-x 4 c-f.
more assistance (more help)
Emacs offers a lot of functionality, and more content can be viewed in the help documentation.
The basic usage is c-h.
Help documentation Information: H?.
Brief description of the command: C-h c. Add the command you want to query later. such as C-h C <enter>c-p <enter>.
more instructions for the command: C-h K.
explain a function: C-h F.
To display the Emacs variable document: C-h v.
related command search: C-h A. Enter a keyword later. Emacs Displays all the commands associated with it.
Additional Instructions
repetition of the command: C-u Digital Command. Repeat the command in the number of times given. M-Number
written in the last
Emacs is a sharp weapon, and it contains functions that greatly optimize our editing, which can bring us very high efficiency, not to be intimidated by its commands.
Remember, there's nothing you can't do without Emacs. O (∩_∩) o~
Emacs Basic operation and the most full shortcut keys