Emacs shortcuts


External resources

Handy shortcuts

S-<arrow>: fast window switch (windmove mode)
M-: (buffer-file-name): Echo current buffer file (can be retrieved from *Messages*)
C-u M-: (buffer-file-name): Write current buffer file name to current buffer
C-c <left-arrow>: Go back to previous window layout (winner mode)
M-g g: Go to line number
C-/: Undo
C-<shift>-/: Redo

M-h ?: Help menu
M-h t: Emacs tutorial
M-h k: Describe which function a specific shortcut will evoke
M-h f:Show docstring for a given function

ESC->: Move to the end of the buffer
ESC-<: Move to the beginning of the buffer
C-v: Page forward
M-v: Page back
M-<: Go to buffer start
M->: Go to buffer end

M-/: Comment or uncomment region
M-<space>: Delete all whitespace between last and next words except for one space
M-\: Delete all whitespace between last and next words
C-t: Swap adjacent characters
M-u: Make following word ALL-CAPS
M-c: Make the following word Capitalized

C-c >: Shift selection right. e.g. C-u 8 C->: indents selection 8 spaces. 
C-c <: Shift selection left

NeoTree:

spc or ret or tab: Open current item if it is a file. Fold/Unfold current item if it is a directory.
g: Refresh
A: Maximize/Minimize
H: Toggle display hidden files
C-c C-n: Create a file or create a directory if filename ends with a ‘/’
C-c C-d: Delete a file or a directory.
C-c C-r: Rename a file or a directory.
C-c C-c: Change the root directory.
C-c C-p: Copy a file or a directory.



Custom configs

(On top of Emacs Live)

In ~/.live-packs/my-pack/init.el

(live-load-config-file "bindings.el")
(live-load-config-file "protobuf-mode.el")
;; Saved-desktop heaven
(desktop-save-mode)
;; Fast window switching: g'bye C-x,o...

(windmove-default-keybindings)

Font

Customize global font: M-x customize-face. Update the default face, on which all other faces are based on
M-x menu-set-font: open GUI font picker


No comments: