When you start using emacs for the first time, your habits fight you every inch of the way. Your fingers long for the good old familiar keybindings. Here's an overview of the most commonly used shortcuts to get you through this pain:
C
Shorthand for the ctrl-keyM
Shorthand for the meta-key (bound to cmd on my mac settings)S
Shorthand for the shift-key
C-x C-f
Open a file. Starts in the current directoryC-x f
Open a recently visited fileC-x o
Open a file in the current project (based on .git ++)C-x C-s
Save this fileC-x C-w
Save as ...C-x C-j
Jump to this files' current directoryC-x b
Switch to another open file (buffer)C-x C-b
List all open files (buffers)
C-space
Start marking stuff. C-g to cancel.C-w
Cut (aka kill)C-k
Cut till end of lineM-w
CopyC-y
Paste (aka yank)M-y
Cycle last paste through previous killsC-x C-y
Choose what to paste from previous killsC-@
Mark stuff quickly. Press multiple times
C-g
Quit out of whatever mess you've gotten yourself intoM-x
Run a command by nameC-.
AutocompleteC-_
UndoM-_
RedoC-x u
Show the undo-treeC-x m
Open magit. It's a magical git interface for emacs
C-x r k
Kill the text of the region-rectangle, saving its contents as the “last killed rectangle” (kill-rectangle).C-x r d
Delete the text of the region-rectangle (delete-rectangle).C-x r y
Yank the last killed rectangle with its upper left corner at point (yank-rectangle).C-x r o
Insert blank space to fill the space of the region-rectangle (open-rectangle). This pushes the previous contents of the region-rectangle to the right.C-x r N
Insert line numbers along the left edge of the region-rectangle (rectangle-number-lines). This pushes the previous contents of the region-rectangle to the right.C-x r c
Clear the region-rectangle by replacing all of its contents with spaces (clear-rectangle).M-x delete-whitespace-rectangle
Delete whitespace in each of the lines on the specified rectangle, starting from the left edge column of the rectangle.C-x r t
string<RET>
Replace rectangle contents with string on each line (string-rectangle).M-x
string-insert-rectangle<RET>
string<RET>
Insert string on each line of the rectangle.
C-arrow
Move past words/paragraphsC-a
Go to indentation, then start of lineC-e
Go to end of lineM-g M-g
Go to line numberC-x C-i
Go to symbolC-s
Search forward. PressC-s
again to go further.C-r
Search backward. PressC-r
again to go further.
1
Open file under cursor in 1st other window.2
Open file under cursor in 2nd other window.c
Copy file or directory under cursor.d
Delete file or directory under cursor (asks to confirm first).e
Edit current directory in dired.f
Recursively find files whose names or contents match some regexp.g
Recursively grep for some regexp.j
Jump to another directory.m
Move or rename file or directory.n
Make new directory.p
Pop directory stack to go back to the directory where you just were.q
Quit nav.r
Refresh.s
Start a shell in an emacs window in the current directory.t
Start a terminal in an emacs window in the current directory. This allows programs like vi and less to run. Exit with C-d C-d.u
Go up to parent directory.!
Run shell command.[
Rotate non-nav windows counter clockwise.]
Rotate non-nav windows clockwise.
C-x 0
Close this windowC-x 1
Close other windowsC-x 2
Split window horizontallyC-x 3
Split window verticallyM-arrow
Jump to window to the left/right/up/down
F1 t
Basic tutorialF1 k
Help for a keybindingF1 r
Emacs' extensive documentation