title: "Emacs" date: 2023-10-11T14:10:48+07:00
C-v view previous pageM-v view next pageC-l Clear screen and redisplay all the textC-p Prev lineC-n Next lineC-b Backward a characterC-f Forward a characterM-b Backward a wordM-f Forward a wordC-a Beginning of lineC-e End of lineM-a Beginning of sentenceM-e End of sentenceM-< Beginning of the whole textM-> End of the whole textC-u 8 C-n Move to next 8th lines
> C-u 8 C-v Move scrollbar by 8 lines
> C-u 8 * Input ********C-g Stop a command / Cancel a numeric argument
> C-u 100 C-g C-f Move forward only 1 wordC-x 1 One window (kill all other windows)<DEL>(backspace) Delete the character before the cursorC-d Delete the next character after the cursorM-<Del> Kill the word immediately before the cursorM-d Kill the next word after the cursorC-k Kill from the cursor position to the end of lineM-k Kill to the end of the current sentenceC-<Space> Mark setC-w Kill text starting from C-<Space>C-y yank the last killed text backM-y repaces "last killed text" with the previous killC-/ undo
> C-_ the same.
> C-x u the sameC-x C-f Find a file
> Cancel the command with C-gC-x C-s Save the fileC-x C-f Switch between opened filesC-x C-b List buffersC-x b Switch between buffersC-x s Save some buffersC-x Character eXtendM-x Named command eXtendC-x C-c End the emacs sessionC-z Suspends emacs
> fg %emacs to resumeC-x u undoC-x f 20 set marginM-x Execute a command
> M-x replace-string replace string
> M-x recover-this-file recover current file
> M-x fundamental-mode
> M-x text-mode switch major modeM-q re-fill the paragraphC-s forward searchC-r reverse searchC-g quit searchingC-x 2 split the screen into 2 windowsC-M-v scroll the other windowC-x o move cursor to the other windowC-x 5 2 New frameC-x 5 0 Close frameC-h ? All help
> F1 or M-x help insteadC-h m Current major mode document