]> code.delx.au - dotemacs/blobdiff - README.md
elisp-slime-nav
[dotemacs] / README.md
index bac8463b659efe9b7b22a696d11654695099edfd..75a238a8cbb7e2407f1d1a2eda1e189d89ab55c7 100644 (file)
--- a/README.md
+++ b/README.md
@@ -25,17 +25,23 @@ C-h k                                           Help about key binding
 C-h v                                           Describe variable
 C-h f                                           Describe function
 C-h m                                           Documentation on active modes
+<prefix> C-h                                    Show bindings starting with <prefix>
+C-c C-b                                         Back to previous help topic (while in help-mode)
+q                                               Quit window and bury buffer
 ```
 
 # Search
 ```
 C-s                                             Search forward (ivy/swiper mode)
 C-r                                             Resume ivy search
-M-s .                                           Search for symbol around point
-C-s                                             Find next item (while searching)
-Backspace                                       Previous search (while searching)
-M-%                                             Search and replace
-M-x linum-mode                                  Display line numbers
+C-7                                             Start a cursor for each result (while searching)
+C-'                                             Switch to avy jump mode
+M-q                                             Replace searched item (while searching)
+M-p                                             Search for previous item (while searching)
+M-n                                             Search for symbol at point (while searching)
+C-c C-o                                         Dump all results into a buffer (ivy-occur)
+M-.                                             Find thing at point
+M-,                                             Pop tag mark
 ```
 
 # Files/buffers
@@ -44,6 +50,7 @@ C-x C-s                                         Save current buffer
 C-x s                                           Save some buffers
 C-x C-w                                         Write buffer to file
 C-x C-f                                         Find file
+C-x C-v                                         Find file and kill current buffer
 C-x f                                           Find files in git repository
 C-x g                                           Grep in git repository
 M-x find-file-at-point                          Find (open) filename at point
@@ -67,6 +74,8 @@ C-x -                                           Shrink window
 C-x +                                           Make windows the same height
 C-x ^                                           Make window taller
 C-Up / C-Down / C-Left / C-Right                Switch windows
+C-l                                             Recenter display (center, top then bottom)
+C-M-l                                           Reposition window to contain useful text (eg entire defun)
 M-x make-frame                                  New frame (X11 window)
 ```
 
@@ -74,9 +83,11 @@ M-x make-frame                                  New frame (X11 window)
 ```
 M-m                                             Jump back to start of indentation
 M-r                                             Jump to window top/bottom/middle
-M-g M-g                                         Jump to line
 M-g Tab                                         Jump to column
-M-g j                                           Jump to character
+M-g f                                           Jump to charactor on current line
+M-g g                                           Jump to visible line or any line
+M-g j                                           Jump to word by first character
+M-g M-g                                         Jump to visible line or any line
 C-a                                             Beginning of line
 C-e                                             End of line
 C-p                                             Back one line
@@ -112,11 +123,15 @@ M-c                                             Capitalise word
 C-x C-l                                         Lower case region
 C-x C-u                                         Upper case region
 C-o                                             Insert a new line above point
-M-o                                            Insert a new line below point
+M-o                                             Insert a new line below point
 C-j                                             Newline and maybe indent
 M-^                                             Join to previous line
-M-j                                            New line with comment
-C-q                                            Quoted insert
+M-j                                             New line with comment
+C-q                                             Quoted insert
+C-M-\                                           Indent region
+C-c c                                           Copy line
+C-c d                                           Duplicate line
+M-x comment-box                                 Wrap region in comment box
 ```
 
 # Marking
@@ -133,6 +148,15 @@ C-c m                                           Ask to insert extra cursor at lo
 M-=                                             Display info about region
 ```
 
+# Highlighting
+```
+M-s h u                                         Unhighlight regexp
+M-s h .                                         Highlight symbol at point
+M-s h p                                         Highlight phrase
+M-s h r                                         Highlight regexp
+M-s h l                                         Highlight lines matching regexp
+```
+
 # Killing and deleting
 ```
 C-M-k                                           Kill s-expression / symbol
@@ -143,8 +167,8 @@ M-_                                             Select current line
 M-z <char>                                      Kill until <char>
 C-k                                             Kill to end of line
 M-0 C-k                                         Kill to beginning of line
-C-a C-k C-k                                     Kill current line
-C-S-Backspace                                   Kill current line
+C-c k                                           Kill whole line
+C-c s                                           Copy line
 C-d                                             Delete next character
 M-d                                             Delete next word
 M-Backspace                                     Delete previous word
@@ -178,19 +202,54 @@ F4                                              Play back macro
 # Mode switching
 ```
 C-x C-j                                         Open direx at current file
+C-c g s                                         Magit status
 F8                                              Toggle flyspell-mode
 F9                                              Toggle whitespace mode
 F10                                             Toggle word wrap
+M-s o                                           Search in buffer and display results in occur-mode
+M-x multi-occur                                 Search in buffers and display results in occur-mode
 M-x eshell                                      Run eshell
 M-x ielm                                        Run Emacs Lisp REPL
+M-x linum-mode                                  Display line numbers
+M-x restclient                                  Open HTTP client
 M-x shell                                       Run bash shell
 M-x slime                                       Run Common Lisp REPL
 M-x smerge-ediff                                Resolve merge conflicts in multi-window mode
 M-x smerge-mode                                 Resolve merge conflicts by hunks
-M-x restclient                                  Open HTTP client
+M-x term                                        Run terminal
 M-x yas-reload-all                              Reload all snippets
 ```
 
+# Occur
+```
+g                                               Reload
+e                                               Switch to edit mode
+C-c C-c                                         Switch back to occur mode
+M-g M-p                                         Previous occurence
+M-g M-n                                         Next occurence
+```
+
+# Magit / Git gutter
+```
+C-c g d                                         Popup diff
+C-c g p                                         Previous hunk
+C-c g n                                         Next hunk
+C-c g r                                         Revert hunk
+C-c g s                                         Magit status
+C-c g f                                         Magit file specific commands
+C-c g g                                         Magit dispatch popup
+p                                               Previous section
+n                                               Next section
+M-p                                             Previous sibling section
+M-n                                             Next sibling section
+^                                               Up section
+Tab                                             Toggle visibility of section
+C-Tab                                           Cycle visibility of section and its children
+q                                               Kill window and bury buffer
+C-c C-c                                         Perform action
+C-c C-k                                         Cancel action
+```
+
 # Lisp
 ```
 C-M-x                                           Eval top-level form