emacs.txt 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. C-u C-<Space> goto last mark
  2. M-! execute shell command
  3. C-u M-! insert output of shell command at point
  4. M-& execute shell command async
  5. M-| execute shell command on region
  6. you can type some code (like python or bash), select it, then invoke
  7. C-u M-| (shell-command-on-region) and it will replace with output!!!
  8. C-h w look up key bound to function
  9. C-x z [z z z] repeat, like . in vim
  10. M-x rgrep holy damn!
  11. C-c C-. org insert src block
  12. C-c c [CUST] notate key
  13. M-/ hippie-expand
  14. M-z zap-to-char
  15. ----------------------------------------------------------------
  16. ORG MODE
  17. agenda
  18. C-c C-s schedule org item
  19. S-f follow mode
  20. ----------------------------------------------------------------
  21. FRAMES
  22. C-x 5 2 new frame
  23. C-x 5 o other frame
  24. ----------------------------------------------------------------
  25. ELISP
  26. C-u C-x C-e insert eval results at point
  27. (message "yo")
  28. (buffer-name)
  29. (buffer-file-name)
  30. (switch-to-buffer (other-buffer)) ;; for humans
  31. (set-buffer (other-buffer)) ;; for computer
  32. (buffer-size)
  33. (point) (point-min) (point-max)
  34. (interactive) opts: b"existing buffer", f"existing file",
  35. p"numeric prefix"
  36. (save-restriction
  37. BODY... ) ;; undo any narrowing in BODY
  38. ----------------------------------------------------------------
  39. Plugins
  40. ; workgroups.el
  41. ----------------------------------------------------------------
  42. INFO
  43. [, ] prev, next node
  44. l, r back, forward in history
  45. n, p next, previous node
  46. u up one level
  47. SPC one screen forward
  48. TAB links
  49. m prompt menu item
  50. ----------------------------------------------------------------
  51. HELP
  52. C-h a apropos (try: -word$)
  53. C-h m describe-mode
  54. C-h f describe-function
  55. C-h k describe-key
  56. C-h v describe-variable
  57. C-h c help -- keystrokes
  58. M-. xref-find-definitions
  59. M-x info-apropos
  60. ----------------------------------------------------------------
  61. MOVEMENT
  62. M-r reposition point
  63. C-l adjust window
  64. C-M-l reposition window
  65. M-g M-g goto line
  66. M-g <tab> goto column
  67. ----------------------------------------------------------------
  68. WINDOWS
  69. C-x 4 C-f find file, other window
  70. C-x 4 d dired, other window
  71. C-x 4 b switch buffer, other window, make active
  72. ----------------------------------------------------------------
  73. BOOKMARKS
  74. C-x r m set bookmark
  75. C-x r l list bookmarks
  76. C-x r b jump to bookmark
  77. ----------------------------------------------------------------
  78. REGISTERS
  79. C-x r n store number in register
  80. C-x r s store region in register
  81. C-x r SPC store point in register
  82. C-x r j jump to register
  83. C-x r i insert content in register
  84. ----------------------------------------------------------------
  85. KEYBOARD MACROS
  86. <f3> start recording
  87. <f4> stop recording/play macro
  88. ----------------------------------------------------------------
  89. RECURSIVE EDITING
  90. C-r enter
  91. C-M-c exit
  92. ----------------------------------------------------------------
  93. NARROWING
  94. C-x n n narrow
  95. C-x n w widen