]> code.delx.au - dotemacs/blobdiff - README_KEYBINDINGS.md
ansi-color-map
[dotemacs] / README_KEYBINDINGS.md
index fbf053d7df3eedee1a837014ad2e452a40931e0d..c1b590e494951f5ac47a2352e303f0140a1b02fc 100644 (file)
@@ -36,10 +36,12 @@ C-s                                             Search forward (ivy/swiper mode)
 C-r                                             Resume ivy search
 C-7                                             Start a cursor for each result (while searching)
 C-'                                             Switch to avy jump mode
+M-i                                             Insert selected item (while searching)
 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)
+C-c C-p                                         Switch to wgrep mode
 M-.                                             Find thing at point
 M-,                                             Pop tag mark
 ```
@@ -53,6 +55,7 @@ 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-q                                             Replace in git repository (while in git grep)
 M-x find-file-at-point                          Find (open) filename at point
 M-x browse-url-at-point                         Browse URL at point
 C-x k                                           Kill buffer
@@ -61,6 +64,7 @@ C-x b                                           Select named buffer
 C-x C-b                                         Show all buffers
 C-x C-r                                         Show recent files
 M-x scratch-buffer                              Create new scratch buffer
+//,~                                            Go to {root,home} directory in find-file
 ```
 
 # Windows/frames
@@ -83,7 +87,7 @@ C-x 5 2                                         New frame (X11 window)
 M-m                                             Jump back to start of indentation
 M-r                                             Jump to window top/bottom/middle
 M-g Tab                                         Jump to column
-M-g f                                           Jump to charactor on current line
+M-g f                                           Jump to charactor, ;/, to go forward/back
 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
@@ -114,7 +118,8 @@ C-M-u                                           Move up one level of parentheses
 ```
 Tab                                             Indent current line correctly
 C-x Tab                                         Indent region with left/right
-M-/                                             Auto-complete
+M-/                                             Expand at point
+M-Tab                                           Auto-complete at point
 M-;                                             Comment line or region
 M-i                                             Change inner region
 M-q                                             Reformat paragraph
@@ -139,14 +144,24 @@ M-x comment-box                                 Wrap region in comment box
 ```
 C-Space                                         Set mark (start selection)
 C-Space C-Space                                 Set mark to point
-C-u C-space                                     Return to mark
+C-u C-space                                     Pop mark
+C-x C-space                                     Pop global mark
 C-x C-x                                         Exchange point and mark
 C-M-h                                           Highlight expression
 M-@                                             Set mark at end of next word
 C-=                                             Expand region
-C-c l                                           Insert extra cursor on all lines in region
-C-c m                                           Ask to insert extra cursor at locations matching selected region
 M-=                                             Display info about region
+C-.                                             Go to last edit
+C-,                                             Go to last edit reverse
+```
+
+# Multiple cursors
+```
+C-c m a                                         Insert cursor at all matching points
+C-c m l                                         Insert extra cursor on all lines in region
+C-c m m                                         Ask to insert extra cursor at locations matching selected region
+C-c m p                                         Add cursor at previous text like region
+C-c m n                                         Add cursor at next text like region
 ```
 
 # Highlighting
@@ -197,12 +212,30 @@ C-x r t                                         Replace rectangle with string
 F3 , F4                                         Start recording macro, finish recording macro
 C-u F3                                          Play last macro then append keys
 F4                                              Play back macro
+C-x C-k b                                       Bind macro to key (0-9, A-Z)
+C-x C-k C-e                                     Edit last macro
+C-x C-k l                                       Edit recent keys as macro
+C-x C-k r                                       Apply macro to region lines
+```
+
+# Registers
+```
+C-x r s <?>                                     Copy region into register
+C-x r i <?>                                     Insert text from register
+C-x r Space <?>                                 Save point position to register
+C-x r j <?>                                     Jump to point position at register
+```
+
+# Mouse secondary selection
 ```
+Meta-Drag                                       Set selection
+Meta-Right-Click                                Yank secondary
+```
+
 
 # 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
@@ -211,7 +244,7 @@ M-x multi-occur                                 Search in buffers and display re
 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 overwrite-mode                              Switch to overwrite mode
 M-x shell                                       Run bash shell
 M-x slime                                       Run Common Lisp REPL
 M-x smerge-ediff                                Resolve merge conflicts in multi-window mode
@@ -258,6 +291,15 @@ C-c C-c                                         Compile and load the top-level f
 C-c M-k                                         Compile (but not load) the current buffer's file
 ```
 
+
+# Javascript
+```
+C-c C-r                                         Rename variable
+C-c C-c                                         Find type
+C-c C-d                                         Find docs
+```
+
+
 # Shell
 ```
 M-!                                             Execute command