wiki.hjertnes.website

Emacs Notes

Various stuff I have noted while reading Emacs books and docs

  • C-M-o split line
  • M- ident
  • C-M- ident region
  • M-g g: goto line
  • C-a C-k Delete line
  • C-k implicity kill until the end of the current line.
  • C-x g magit
  • C-g Abort a command in progress (useful if you mistype)
  • C-x o Switch to other window, if there is another open
  • C-x C-s Save (or "Save buffer")
  • C-x C-c Close (if you have made changes, it will as if you want to save, and you can type y or n or a few other options, and if you hit n, it will ask you to confirm with yes or no)
  • C-a Move cursor to beginning of line
  • C-e Move cursor to end of line
  • C-p Move cursor to previous line
  • C-n Move cursor to next line
  • M-f Move cursor forward one word
  • M-b Move cursor backward one word
  • M-d Delete word (starting at cursor)
  • C-k Delete line/Kill line (uses kill-buffer) (starting at cursor point)
  • C-s Search forward (prompts for search string)
  • C-r Search backwards (prompts for search string)
  • M-% Replace (prompts for a search string and a string with which to replace it)
  • C-_ Undo (this is the minus key, but written as underscore)
  • C-x u Also undo
  • C-@ Set mark
  • C-w Cut (from kill-buffer)
  • M-w Copy (from kill-buffer)
  • C-y Paste/Yank (from kill-buffer)"
  • "C-h C-h : help
  • C-g : quit
  • C-x b : switch buffers
  • C-x right : right-cycle through buffers
  • C-x left : left-cycle through buffers
  • C-x k : kill buffer
  • C-x 0 : close the active window
  • C-x 1 : close all windows except the active window
  • C-x 2 : split the active window vertically into two horizontal windows
  • C-x 3 : split the active window horizontally into two vertical windows
  • C-x o : change active window to next window
  • C-x C-f : open file
  • C-x C-s : save file
  • C-x C-w : save file as
  • C-space : set region mark
  • C-w : kill region
  • C-k : kill region between point and end of current line
  • M-w : kill region without deleting
  • C-y : yank region from kill ring
  • M-y : move to previous item in the kill ring
  • M-Y : move to next item in the kill ring
  • C-_ : undo
  • C-s : search forwards
  • C-r : search backwards
  • M-% : query replace ('space' to replace, 'n' to skip, '!' to replace all)
  • M-q : wrap text
  • C-left : move one word left
  • C-right : move one word right
  • C-up : move one paragraph up
  • C-down : move one paragraph down
  • home : move to the beginning of the line
  • end : move to the end of the line
  • page up : move up a page
  • page down : move down a page
  • M : move to end of buffer"
  • "C-c SPC" ==> ace-jump-word-mode
  • enter first character of a word, select the highlighted key to move to it.
  • "C-u C-c SPC" ==> ace-jump-char-mode
  • enter a character for query, select the highlighted key to move to it.
  • "C-u C-u C-c SPC" ==> ace-jump-line-mode
  • dd Ca Ck Ck
  • C-o blank line fater
  • C-SPC / start mark
  • Cu Cx s Save all
  • "Key BindingPurpose
  • C-M-nMove forward to the next list
  • C-M-pMove backward to the previous list"
  • "C-M-dMove down into a list
  • C-M-uMove up out of a list"
  • "C-M-fMove forward by s-expression
  • C-M-bMove backward by s-expression"
  • "M-mMoves point to the first non-whitespace
  • M-^ jank line to the one above it
  • C-M-h mark defun
  • C-x C-x
  • set mark at point and move to previous point
  • C-M @ mark sexp
  • C-x z : repeat
  • CMk kill sexp
  • C x tab
  • Indent region
  • C-x z repeat
  • M-5 C-u 0
  • 00000
  • M-d kill to end of word