Klimi's new dotfiles with stow.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

138 line
4.8 KiB

4 年之前
  1. * Ivy Generic Help
  2. =ivy= is an Emacs incremental completion framework.
  3. - Narrow the list by typing some pattern,
  4. - Multiple patterns are allowed by separating with a space,
  5. - Select with ~C-n~ and ~C-p~, choose with ~RET~.
  6. ** Help
  7. - ~C-h m~ :: Pop to this generic help buffer.
  8. ** Basic Operations
  9. *** Key bindings for navigation
  10. - ~C-n~ (=ivy-next-line=) :: next candidate.
  11. - ~C-p~ (=ivy-previous-line=) :: previous candidate.
  12. - ~C-v~ (=ivy-scroll-up-command=) :: next page.
  13. - ~M-v~ (=ivy-scroll-down-command=) :: previous page.
  14. - ~M-<~ (=ivy-beginning-of-buffer=) :: first candidate.
  15. - ~M->~ (=ivy-end-of-buffer=) :: last candidate.
  16. *** Key bindings for single selection
  17. When selecting a candidate, an action is called on it. You can think
  18. of an action as a function that takes the selected candidate as an
  19. argument and does something with it.
  20. Ivy can offer several actions from which to choose. This can be
  21. independently composed with whether you want to end completion when
  22. the action is called. Depending on this, the short term is either
  23. "calling an action" or "exiting with action".
  24. ~C-m~ or ~RET~ (=ivy-done=) - exit with the current action.
  25. ~M-o~ (=ivy-dispatching-done=) - select an action and exit with it.
  26. ~C-j~ (=ivy-alt-done=) - when the candidate is a directory, enter
  27. it. Otherwise, exit with the current action.
  28. ~TAB~ (=ivy-partial-or-done=) - attempt partial completion, extending
  29. the current input as much as possible. ~TAB TAB~ is the same as ~C-j~.
  30. ~C-M-j~ (=ivy-immediate-done=) - exit with the current action, calling
  31. it on the /current input/ instead of the current candidate. This is
  32. useful especially when creating new files or directories - often the
  33. input will match an existing file, which you don't want to select.
  34. ~C-'~ (=ivy-avy=) - select a candidate from the current page with avy
  35. and exit with the current action.
  36. ** Advanced Operations
  37. *** Key bindings for multiple selection
  38. For repeatedly applying multiple actions or acting on multiple
  39. candidates, Ivy does not close the minibuffer between commands. It
  40. keeps the minibuffer open for applying subsequent actions.
  41. Adding an extra meta key to the normal key chord invokes the special
  42. version of the regular commands that enables applying multiple
  43. actions.
  44. ~C-M-m~ (=ivy-call=) is the non-exiting version of ~C-m~ (=ivy-done=).
  45. ~C-M-n~ (=ivy-next-line-and-call=) combines ~C-n~ and ~C-M-m~.
  46. ~C-M-p~ (=ivy-previous-line-and-call=) combines ~C-p~ and ~C-M-m~.
  47. ~C-M-o~ (=ivy-dispatching-call=) is a non-exiting version of ~M-o~
  48. (=ivy-dispatching-done=).
  49. *** Key bindings that alter the minibuffer input
  50. ~M-n~ (=ivy-next-history-element=) select the next history element or
  51. symbol/URL at point.
  52. ~M-p~ (=ivy-previous-history-element=) select the previous history
  53. element.
  54. ~C-r~ (=ivy-reverse-i-search=) start a recursive completion session to
  55. select a history element.
  56. ~M-i~ (=ivy-insert-current=) insert the current candidate into the
  57. minibuffer. Useful for copying and renaming files, for example: ~M-i~
  58. to insert the original file name string, edit it, and then ~C-m~ to
  59. complete the renaming.
  60. ~M-j~ (=ivy-yank-word=) insert the sub-word at point into the
  61. minibuffer.
  62. ~S-SPC~ (=ivy-restrict-to-matches=) deletes the current input, and
  63. resets the candidates list to the currently restricted matches. This
  64. is how Ivy provides narrowing in successive tiers.
  65. *** Other key bindings
  66. ~M-w~ (=ivy-kill-ring-save=) copies the selected candidates to the
  67. kill ring; when the region is active, copies the active region.
  68. *** Saving the current completion session to a buffer
  69. ~C-c C-o~ (=ivy-occur=) saves the current candidates to a new buffer;
  70. the list is active in the new buffer.
  71. ~RET~ or ~mouse-1~ in the new buffer calls the appropriate action on
  72. the selected candidate.
  73. Ivy has no limit on the number of active buffers like these.
  74. Ivy takes care of making these buffer names unique. It applies
  75. descriptive names, for example: =*ivy-occur counsel-describe-variable
  76. "function$*=.
  77. *** Global key bindings
  78. =ivy-resume= recalls the state of the completion session just before
  79. its last exit. Useful after an accidental ~C-m~ (=ivy-done=).
  80. Recommended global binding: ~C-c C-r~.
  81. *** Hydra in the minibuffer
  82. ~C-o~ (=hydra-ivy/body=) invokes Hydra menus with key shortcuts.
  83. When in Hydra, ~C-o~ or ~i~ resumes editing.
  84. Hydra reduces key strokes, for example: ~C-n C-n C-n C-n~ is ~C-o
  85. jjjj~ in Hydra. Besides certain shorter keys, Hydra shows useful info
  86. such as case folding and the current action.
  87. Additionally, here are the keys that are otherwise not bound:
  88. - ~<~ and ~>~ adjust the height of the minibuffer.
  89. - ~c~ (=ivy-toggle-calling=) - toggle calling the current action each
  90. time a different candidate is selected.
  91. - ~M~ (=ivy-rotate-preferred-builders=) - rotate regex matcher.
  92. - ~w~ and ~s~ scroll the actions list.
  93. Minibuffer editing is disabled when Hydra is active.