记录下emacs tutorial上的知识点,方便以后复习,emacs的配置可以参考github
- view screenfuls
C-v Move forward one screenful
M-v Move backward one screenful
C-l Clear screen and redisplay all the text,moving the text around the cursor to the center of the screen
- summary of simple cursor-moving operations
C-f Move forward a character
C-b Move backward a character
M-f Move forward a word
M-b Move backward a word
C-n Move to next line
C-p Move to previous line
C-a Move to beginning of line
C-e Move to end of line
M-a Move back to beginning of sentence
M-e Move forward to end of sentence
M-< Move to the beginning of the whole text
M-> Move to the end of the whole text
C-u 8 C-f Move forward eight characters
C-u 8 C-v Scroll the text up by 8 lines
C-g Stop a command which is taking too long to execute
C-x 1 Delete all but One window(kill all other windows)
- Inserting and Deleting
C-u 8 * Insert ********
<DEL> Delete the character just before the cursor
C-d Delete the next character after the cursor
M-<DEL> Kill the word immediately before the cursor
M-d Kill the next word after the cursor
C-k Kill from the cursor position to end of line, a single C-k kills the contents of the line, and a senond C-k kills the line itself
M-k Kill to the end of the current sentence
C-<spc> C-w Kill a segment of text
C-u 2 C-k Kills two lines and their newlines
C-y reinsert the last killed text
M-y Get back the previous text
- UNDO
C-/ undo
C-x u undo, but is a little less convenient to type, a numeric argument to C-/, C-_,C-x u acts as a repeat count
- Files
C-x C-f Find a file
C-x C-s Save a file
- Buffers
C-x C-b List buffers
C-x b Switch to buffer
C-x s Save some buffers
- Extending the command set
C-x C-c Quit Emacs, offers to save each changed file before it kill emacs
C-x Character extend. Followed by one character
M-x Named command extend. Followed by a long name
- Auto save
M-x recover-file <Return> Recover the auto-save data
- Mode line
C-l C-l Bring this line to the top of the screen
C-h m View documentation on current major mode
M-x fundamental-mode
M-x text-mode
M-x auto-fill-mode- Searching
C-s Forward search
C-r Reverse search