Emacs Key Bindings
Some of my Emacs key bindings, some are standard, others custom.
C-M-k -> [ -> C-y => Kill (cut) the preceding expression, write a [ to get [] and then paste the expression into it.
M-UP => (let |(some expression)) ->(some expression)
C-M-@ => Mark the preceding expression.
C-M-q => Re-indent preceding expression.
C-M-\ => Re-indent selection, great in combination with C-M-@
C-SPC to start marking, C-g to stop.
C-_ to undo.
C-x C-f => Opens up the find file buffer.
C-h k -> key-combo to see what function key-combo is mapped to.
C-x o to switch between frames.
C-x 1 to close all but the current frame.
Start recording macro with f3 and stop with f4. Repeat the just saved macro 9 times with M-9 C-x e.
C-x C-k n => Give a command name to the latest recorded macro.
M-w => Copy selected text. C-w will cut. And paste with C-y.
C-x C-b to see the buffer switcher and C-x k to kill a buffer.
C-x C-s to save current buffer to file.
C-M-d and C-M-u, to move down one sexpr and up one sexpr.
C-M-t will transpose a sexpr.
C-x 0 will close the current window/frame.
C-u C-l center text vertically.
C-a move to beginning of line.
C-k yank current line.
C-x h select the whole buffer.
C-M b and C-M f to move to the beginning and end of the s-expr.
M-x comment-region (I’ve set it to C-c c) comments the selected region and M-x uncomment-region (I’ve set it to C-c C-u c) uncomments the selected region (perfect for languages like PicoLisp, Clojure and Ruby).
C-right arrow and C-left arrow to slurp/barf the next s-expr.
C-q ; to for instance insert a semi-colon without also triggering the automatic generation of a newline.
M-% to search and replace in current file.
C-c p f search for files.
C-c p g grep project.
M-r cycle top, bottom and middle of current screen.
M-g M-g to go line.
M-n move buffer down one line
M-p move buffer up one line
M-m move back to the first non-white space on current line
M-^ merge the previous and current line
C-x C-t to transpose lines
s-i etags complete
M-down show completion menu
C-x C-v reload buffer (if same file is chosen)
s-v show all functions.
C-x C-/ session jump to last change.
s-r revert buffer no confirm.
C-= expand region.
C– contract region.