Clone: https://github.com/re5et/.emacs.d-for-my-friends.git to your home directory
mv ~/.emacs.d ~/.emacs.d.backup
git clone https://github.com/re5et/.emacs.d-for-my-friends.git ~/.emacs.d
you should be presented with this README and you can continue from there.
Ctrl-H v (describe variable) mac-command-modifier RET Use customize to set value as meta
Emacs has a lot of keybindings, many of them useful. We aren’t going to discuss defaults, you should use the tutorial (C-h T) for that.
This will be a list of things that are different or added.
C-x is too clumsy a keybinding for as important as it is in Emacs. Anytime you hit C-j, it will generate a C-x for you.
Anywhere you see C-x, you can use C-j instead.
C-j is originally mapped to `electric-newline-and-maybe-indent` and will usually be bound to RET by the mode you are using.
M-j is a nice prefix key (usually user prefixes are C-c, which is less ideal).
M-j is originally bound to `indent-new-comment-line`, which isn’t that useful.
For our practical purposes, projects are directory structues that have a .git folder at the top level. You can get much fancier with project defenition, see here: https://github.com/re5et/simp
M-j g | magit status buffer |
M-j f | fuzzy find file |
M-j s | search project |
M-j S-s | search entire project |
M-j d | project root dired (directory listing) |
To pick a project from a bookmark and then take a project navigation action, you hold down Meta for the second keystroke
M-j M-g | magit status buffer |
M-j M-f | fuzzy find file |
M-j M-s | search project |
M-j M-d | project root dired (directory listing) |
M-l | next-in-frame-window |
M-L | next-multiframe-window |
M-h | previous-in-frame-window |
M-H | previous-multiframe-window |
C-S-, | Undo window configuration change |
C-S-. | Redo window configuration change |
C-S-\ | Rotate windows |
M-S-\ | Swap split orientation |
C-S-b | move back one in window history |
C-S-f | move forward one in window history |
C-, | indent entire buffer according to mode |
C-S-/ | revert buffer (to last save) |
M-j G | git time machine for buffer file |
C-x C-k | kill focused buffer |
M-z | delete from point up until characater |
M-o | indent-and-open-newline |
C-o | previous-indent-and-open-newline |
M-S-b | backward to word |
M-S-f | forward to word |
M-S-m | expand region |
M-S-n | duplicate current line down |
M-S-p | duplicate current line up |
C-S-m | multiple cursors “mark all like this” |
C-S-n | move current line down |
C-S-p | move current line up |
C-S-y | insert from kill ring search |
C-S-s | search forward for thing at point |
C-S-r | search backward for thing at point |
C-S-space | exchange mark and point |
C-x f | fill region (wrap region) |
C-x C-s | overridden save that forces save each time |
M-j S-m | rename buffer and file |
M-j k | copy line |
M-j M-k | kill whole line |
M-j J | bookmark-jump |
C-x C-b | ibuffer (instead of list buffers) |
C-x C-d | dired-jump (go to directory for file) |
There are more things in my/my-keybindings.el that I didn’t cover, check them out.