- Emacs uses special keys for shortcuts, often written in a notation like
C-x C-forM-f.
C-stands for **Control**.C-xmeans **press and holdControl(Ctrl) and then press =x=**.- Example:
C-x C-fmeans:- Hold
Ctrl - Press
x - Then press
fwhile still holdingCtrl
- Hold
M-stands for **Meta**, which was an old key on Lisp machines.- Today, Meta is usually the =Alt= key (on most keyboards).
- Example:
M-fmeans:- Hold
Alt - Press
f
- Hold
C-s→ Start a searchM-f→ Move forward one word
emacs→ Start EmacsC-x C-c→ Exit Emacs
C-x C-f→ Open or create a fileC-x C-s→ Save the current file
C-f→ Move forward one characterC-b→ Move backward one characterC-n→ Move to the next lineC-p→ Move to the previous lineM-f→ Move forward one wordM-b→ Move backward one wordC-a→ Move to the beginning of the lineC-e→ Move to the end of the lineM-<→ Move to the beginning of the fileM->→ Move to the end of the file
C-d→ Delete forwardM-d→ Delete forward wordC-k→ Kill (cut) to end of lineM-w→ copyC-y→ Yank (paste)M-y→ Cycle through previous yanksC-/orC-x u→ Undo
to undo press C-/
- to Redo, simply do something unrelated like such as
C-eorC-nwhat ever as long its notC-/and pressC-/to redo- Simply the undo and redo is the same key if you
want to undo press
C-/to redo do somthing likeC-eorC-nand pressC-/
- Simply the undo and redo is the same key if you
want to undo press
C-x b→ Switch bufferC-x C-b→ List buffersC-x k→ Kill (close) buffer
C-x 0→ Close current windowC-x o→ Switch to another windowC-x 2→ Split window horizontallyC-x 3→ Split window verticallyC-x 1→ Close other windows
C-s→ Forward searchC-r→ Reverse search
C-h t→ Open tutorialC-h k→ Describe a keybindingC-h f→ Describe a functionC-h v→ Describe a variable
emacs→ Start EmacsC-x C-c→ Exit Emacs
(menu-bar-mode -1)
(tool-bar-mode -1)
(scroll-bar-mode -1)
(global-display-line-numbers-mode 1)
(setq custom-file (locate-user-emacs-file "custom.el"))
(load custom-file t)
(add-to-list 'default-frame-alist '(font . "fontname-size")) ;;ex Monospace-20 or JetBrainsMono Nerd Font-20
(setq inhibit-splash-screen t)