Update documentation to remove explicit mentions to helm
Move some helm explicit sections the helm layer README.
This commit is contained in:
parent
489f391fb5
commit
a4be86cb5d
|
@ -95,15 +95,11 @@
|
|||
- [[#additional-text-objects][Additional text objects]]
|
||||
- [[#reserved-prefix-command-for-user][Reserved prefix command for user]]
|
||||
- [[#completion][Completion]]
|
||||
- [[#helm][Helm]]
|
||||
- [[#c-z-and-tab-switch][C-z and Tab switch]]
|
||||
- [[#helm-focus][Helm focus]]
|
||||
- [[#helm-transient-state][Helm transient state]]
|
||||
- [[#ivy][Ivy]]
|
||||
- [[#discovering][Discovering]]
|
||||
- [[#key-bindings][Key bindings]]
|
||||
- [[#which-key][Which-key]]
|
||||
- [[#helm-describe-key-bindings][Helm describe key bindings]]
|
||||
- [[#describe-key-bindings][Describe key bindings]]
|
||||
- [[#getting-help][Getting help]]
|
||||
- [[#available-layers][Available layers]]
|
||||
- [[#available-packages-in-spacemacs][Available packages in Spacemacs]]
|
||||
|
@ -128,7 +124,7 @@
|
|||
- [[#special-buffers][Special Buffers]]
|
||||
- [[#files-manipulations-key-bindings][Files manipulations key bindings]]
|
||||
- [[#emacs-and-spacemacs-files][Emacs and Spacemacs files]]
|
||||
- [[#browsing-files-with-helm][Browsing files with Helm]]
|
||||
- [[#browsing-files-in-completion-buffer][Browsing files in completion buffer]]
|
||||
- [[#ido][Ido]]
|
||||
- [[#ido-transient-state][Ido transient state]]
|
||||
- [[#neotree-file-tree][NeoTree file tree]]
|
||||
|
@ -156,7 +152,6 @@
|
|||
- [[#highlight-current-symbol][Highlight current symbol]]
|
||||
- [[#visual-star][Visual Star]]
|
||||
- [[#listing-symbols-by-semantic][Listing symbols by semantic]]
|
||||
- [[#helm-swoop][Helm-swoop]]
|
||||
- [[#editing][Editing]]
|
||||
- [[#paste-text][Paste text]]
|
||||
- [[#paste-transient-state][Paste Transient-state]]
|
||||
|
@ -865,7 +860,7 @@ are in =normal= mode by pressing the ~SPC~ leader key, here are a few examples:
|
|||
|
||||
- Save a buffer: ~SPC f s~
|
||||
- Save all opened buffers: ~SPC f S~
|
||||
- Open (switch) to a buffer with =helm=: ~SPC b b~
|
||||
- Open (switch) to a buffer: ~SPC b b~
|
||||
|
||||
** Universal argument
|
||||
The universal argument ~C-u~ is an important command in Emacs but it is also a
|
||||
|
@ -874,10 +869,6 @@ very handy Vim key binding to scroll up.
|
|||
Spacemacs binds ~C-u~ to =scroll-up= and changes the universal argument binding
|
||||
to ~SPC u~.
|
||||
|
||||
*Note*: ~SPC u~ is not working before =helm-M-x= (~SPC SPC~). Instead, call
|
||||
=helm-M-x= first, select the command you want to run, and press ~C-u~ before
|
||||
pressing ~RETURN~. For instance: ~SPC SPC org-reload C-u RET~
|
||||
|
||||
** Transient-states
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: transient-states
|
||||
|
@ -1049,7 +1040,7 @@ You can cycle between the themes declared in =dotspacemacs-themes= with
|
|||
| Key Binding | Description |
|
||||
|-------------+-------------------------------------------------------|
|
||||
| ~SPC T n~ | switch to next theme listed in =dotspacemacs-themes=. |
|
||||
| ~SPC T s~ | select a theme using a =helm= buffer. |
|
||||
| ~SPC T s~ | select a theme. |
|
||||
|
||||
*** Browsing themes
|
||||
You can see samples of all themes included in the =themes-megapack= layer
|
||||
|
@ -1160,8 +1151,8 @@ and ~T~):
|
|||
| ~SPC T t~ | toggle tool bar |
|
||||
| ~SPC T T~ | toggle frame transparency and enter transparency transient state |
|
||||
|
||||
*Note*: These toggles are all available via the =helm-spacemacs-help= interface
|
||||
(press ~SPC h SPC~ to display the =helm-spacemacs-help= buffer).
|
||||
*Note*: These toggles are all available via the =spacemacs-help= interfaces
|
||||
(press ~SPC h SPC~ to display the =spacemacs-help= buffer).
|
||||
|
||||
**** Global line numbers
|
||||
Line numbers can be toggled on in all =prog-mode= and =text-mode= buffers by
|
||||
|
@ -1502,34 +1493,34 @@ selected layout.
|
|||
|
||||
Press ~?~ to toggle the full help.
|
||||
|
||||
| Key Binding | Description |
|
||||
|-------------------+------------------------------------------------------------|
|
||||
| ~SPC l~ | activate the transient- state |
|
||||
| ~?~ | toggle the documentation |
|
||||
| ~[0..9]~ | switch to nth layout |
|
||||
| ~[C-0..C-9]~ | switch to nth layout and keep the transient state active |
|
||||
| ~<tab>~ | switch to the latest layout |
|
||||
| ~a~ | add a buffer to the current layout |
|
||||
| ~A~ | add all the buffers from another layout in the current one |
|
||||
| ~b~ | select a buffer in the current layout |
|
||||
| ~d~ | delete the current layout and keep its buffers |
|
||||
| ~D~ | delete the other layouts and keep their buffers |
|
||||
| ~h~ | go to default layout |
|
||||
| ~C-h~ | previous layout in list |
|
||||
| ~l~ | select/create a layout with helm |
|
||||
| ~L~ | load layouts from file |
|
||||
| ~C-l~ | next layout in list |
|
||||
| ~n~ | next layout in list |
|
||||
| ~N~ | previous layout in list |
|
||||
| ~o~ | open a custom layout |
|
||||
| ~p~ | previous layout in list |
|
||||
| ~r~ | remove current buffer from layout |
|
||||
| ~R~ | rename current layout |
|
||||
| ~s~ | save layouts |
|
||||
| ~t~ | display a buffer without adding it to the current layout |
|
||||
| ~w~ | workspaces transient state (needs eyebrowse layer enabled) |
|
||||
| ~x~ | kill current layout with its buffers |
|
||||
| ~X~ | kill other layouts with their buffers |
|
||||
| Key Binding | Description |
|
||||
|--------------+------------------------------------------------------------|
|
||||
| ~SPC l~ | activate the transient- state |
|
||||
| ~?~ | toggle the documentation |
|
||||
| ~[0..9]~ | switch to nth layout |
|
||||
| ~[C-0..C-9]~ | switch to nth layout and keep the transient state active |
|
||||
| ~<tab>~ | switch to the latest layout |
|
||||
| ~a~ | add a buffer to the current layout |
|
||||
| ~A~ | add all the buffers from another layout in the current one |
|
||||
| ~b~ | select a buffer in the current layout |
|
||||
| ~d~ | delete the current layout and keep its buffers |
|
||||
| ~D~ | delete the other layouts and keep their buffers |
|
||||
| ~h~ | go to default layout |
|
||||
| ~C-h~ | previous layout in list |
|
||||
| ~l~ | select/create a layout |
|
||||
| ~L~ | load layouts from file |
|
||||
| ~C-l~ | next layout in list |
|
||||
| ~n~ | next layout in list |
|
||||
| ~N~ | previous layout in list |
|
||||
| ~o~ | open a custom layout |
|
||||
| ~p~ | previous layout in list |
|
||||
| ~r~ | remove current buffer from layout |
|
||||
| ~R~ | rename current layout |
|
||||
| ~s~ | save layouts |
|
||||
| ~t~ | display a buffer without adding it to the current layout |
|
||||
| ~w~ | workspaces transient state (needs eyebrowse layer enabled) |
|
||||
| ~x~ | kill current layout with its buffers |
|
||||
| ~X~ | kill other layouts with their buffers |
|
||||
|
||||
** Workspaces
|
||||
Workspaces are sub-layouts, they allow to define multiple layouts into a given
|
||||
|
@ -1686,61 +1677,10 @@ and more...
|
|||
|
||||
Mastering your choice of completion system will make you a Spacemacs power user.
|
||||
|
||||
*** Helm
|
||||
Do not hesitate to read the [[https://github.com/emacs-helm/helm/wiki][Helm documentation wiki]].
|
||||
For more information go to the layers documentation for [[https://github.com/syl20bnr/spacemacs/blob/master/layers/+completion/helm/README.org][Helm]] and [[https://github.com/syl20bnr/spacemacs/blob/master/layers/+completion/ivy/README.org][Ivy]].
|
||||
|
||||
Spacemacs add =hjkl= navigation to =helm= buffers:
|
||||
|
||||
| Key Binding | Description |
|
||||
|-------------+------------------------------|
|
||||
| ~C-h~ | go to next source |
|
||||
| ~C-H~ | describe key (replace ~C-h~) |
|
||||
| ~C-j~ | go to previous candidate |
|
||||
| ~C-k~ | go to next candidate |
|
||||
| ~C-l~ | same as ~return~ |
|
||||
|
||||
**** C-z and Tab switch
|
||||
The command bound to ~C-z~ is much more useful than the one bound to Tab, so it
|
||||
makes sense to swap them. It's also recommended [[http://tuhdo.github.io/helm-intro.html][here]].
|
||||
|
||||
**** Helm focus
|
||||
If you find yourself unable to return focus to Helm (after a careless
|
||||
mouse-click for example), use ~SPC w b~ to return focus to the minibuffer.
|
||||
|
||||
**** Helm transient state
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: helm-transient-state
|
||||
:END:
|
||||
Spacemacs defines a [[#transient-states][transient state]] for =Helm= to make it work like [[https://github.com/Shougo/unite.vim][Vim's Unite]]
|
||||
plugin.
|
||||
|
||||
Initiate the transient state with ~M-SPC~ or ~s-M-SPC~ while in a =Helm= buffer.
|
||||
|
||||
| Key Binding | Description |
|
||||
|----------------------+------------------------------------------------------|
|
||||
| ~M-SPC~ or ~s-M-SPC~ | initiate the transient state |
|
||||
| ~q~ | quit transient state |
|
||||
| ~TAB~ | switch to actions page and leave the transient state |
|
||||
| ~1~ | execute action 0 |
|
||||
| ~2~ | execute action 1 |
|
||||
| ~3~ | execute action 2 |
|
||||
| ~4~ | execute action 3 |
|
||||
| ~5~ | execute action 4 |
|
||||
| ~6~ | execute action 5 |
|
||||
| ~7~ | execute action 6 |
|
||||
| ~8~ | execute action 7 |
|
||||
| ~9~ | execute action 8 |
|
||||
| ~0~ | execute action 9 |
|
||||
| ~a~ | switch to actions page |
|
||||
| ~g~ | go to first candidate |
|
||||
| ~G~ | go to last candidate |
|
||||
| ~h~ | go to previous source |
|
||||
| ~j~ | select next candidate |
|
||||
| ~k~ | select previous candidate |
|
||||
| ~l~ | go to next source |
|
||||
| ~t~ | mark current candidate |
|
||||
| ~T~ | mark all candidates |
|
||||
| ~v~ | execute persistent action |
|
||||
*Note:* To open the Spacemacs documentation for Helm of Ivy in Emacs, open the
|
||||
=spacemacs-help= menu with ~SPC h SPC~ and type ~helm~ or ~ivy~ then ~return~.
|
||||
|
||||
*** Ivy
|
||||
If you choose =ivy= as completion system, make sure to read [[http://oremacs.com/swiper/][official manual]]. In
|
||||
|
@ -1765,7 +1705,7 @@ By default the [[https://github.com/justbur/emacs-which-key][which-key]] buffer
|
|||
pressed. You can change the delay by setting the variable
|
||||
=dotspacemacs-which-key-delay= to your liking (the value is in second).
|
||||
|
||||
**** Helm describe key bindings
|
||||
**** Describe key bindings
|
||||
It is possible to search for specific key bindings by pressing ~SPC ?~.
|
||||
|
||||
To narrow the list to some key bindings using the leader key type a pattern like
|
||||
|
@ -1779,7 +1719,7 @@ thusly:
|
|||
|
||||
| Key Binding | Description |
|
||||
|-------------+-----------------------------------------------------------|
|
||||
| ~SPC h d b~ | describe bindings in a =helm= buffer |
|
||||
| ~SPC h d b~ | describe bindings |
|
||||
| ~SPC h d c~ | describe current character under point |
|
||||
| ~SPC h d d~ | describe current expression under point |
|
||||
| ~SPC h d f~ | describe a function |
|
||||
|
@ -1796,13 +1736,13 @@ thusly:
|
|||
|
||||
Other help key bindings:
|
||||
|
||||
| Key Binding | Description |
|
||||
|-------------+--------------------------------------------------------------------|
|
||||
| ~SPC h SPC~ | discover Spacemacs documentation, layers and packages using =helm= |
|
||||
| ~SPC h i~ | search in info pages with the symbol at point |
|
||||
| ~SPC h k~ | show top-level bindings with =which-key= |
|
||||
| ~SPC h m~ | search available man pages |
|
||||
| ~SPC h n~ | browse emacs news |
|
||||
| Key Binding | Description |
|
||||
|-------------+-------------------------------------------------------|
|
||||
| ~SPC h SPC~ | discover Spacemacs documentation, layers and packages |
|
||||
| ~SPC h i~ | search in info pages with the symbol at point |
|
||||
| ~SPC h k~ | show top-level bindings with =which-key= |
|
||||
| ~SPC h m~ | search available man pages |
|
||||
| ~SPC h n~ | browse emacs news |
|
||||
|
||||
Navigation key bindings in =help-mode=:
|
||||
|
||||
|
@ -1819,23 +1759,23 @@ Reporting an issue:
|
|||
| ~SPC h I~ | Open Spacemacs GitHub issue page with pre-filled information |
|
||||
| ~SPC u SPC h I~ | Open Spacemacs GitHub issue page with pre-filled information - include last pressed keys |
|
||||
|
||||
/Note:/ If these two bindings are used with the =*Backtrace*= buffer open, the
|
||||
*Note:* If these two bindings are used with the =*Backtrace*= buffer open, the
|
||||
backtrace is automatically included
|
||||
|
||||
*** Available layers
|
||||
All layers can be easily discovered via =helm-spacemacs-help= accessible with
|
||||
~SPC h SPC~.
|
||||
All layers can be easily discovered via =spacemacs-help= accessible with
|
||||
~SPC h SPC~.
|
||||
|
||||
The following helm actions are available:
|
||||
The following actions on the selected candidate are available:
|
||||
- default: open the layer =README.org=
|
||||
- 2nd: open the layer =packages.el=
|
||||
|
||||
**** Available packages in Spacemacs
|
||||
=helm-spacemacs-help= also lists all the packages available in Spacemacs. The
|
||||
=spacemacs-help= also lists all the packages available in Spacemacs. The
|
||||
entry format is =(layer) packages=. If you type =flycheck= you'll be able to see
|
||||
all the layers where =flycheck= is used.
|
||||
|
||||
The following helm actions are available on packages:
|
||||
The following actions are available on selected package:
|
||||
- default: go the package init function
|
||||
|
||||
**** New packages from ELPA repositories
|
||||
|
@ -1882,15 +1822,14 @@ Spacemacs.
|
|||
| ~x~ | execute (action flags) |
|
||||
|
||||
*** Toggles
|
||||
=helm-spacemacs-help= is also a central place to discover the available toggles.
|
||||
To display only the toggles source press ~C-l~ (or in [[#helm-transient-state][Helm transient state]] you can
|
||||
press just ~l~).
|
||||
=spacemacs-help= is also a central place to discover the available toggles.
|
||||
To display only the toggles source press ~C-l~.
|
||||
|
||||
The following helm actions are available on packages:
|
||||
The following actions are available on selected toggle:
|
||||
- default: toggle on/off
|
||||
|
||||
*Tips* Use ~SPC h l~ to resume the last helm session. It is handy to quickly
|
||||
toggle on and off a toggle.
|
||||
*Tips* Use ~SPC h l~ to resume the last session. It is handy to quickly toggle
|
||||
on and off a toggle.
|
||||
|
||||
** Navigating
|
||||
*** Point/Cursor
|
||||
|
@ -2032,7 +1971,7 @@ Windows manipulation commands (start with ~w~):
|
|||
|------------------------+-----------------------------------------------------------------------------|
|
||||
| ~SPC w TAB~ | switch to alternate window in the current frame (switch back and forth) |
|
||||
| ~SPC w =~ | balance split windows |
|
||||
| ~SPC w b~ | force the focus back to the minibuffer (useful with =helm= popups) |
|
||||
| ~SPC w b~ | force the focus back to the minibuffer |
|
||||
| ~SPC w c~ | maximize/minimize a window and center it |
|
||||
| ~SPC w C~ | maximize/minimize a window and center it using [[https://github.com/abo-abo/ace-window][ace-window]] |
|
||||
| ~SPC w d~ | delete a window |
|
||||
|
@ -2123,15 +2062,13 @@ selected or not. By default =golden-ratio= is off.
|
|||
The mode can be toggled on and off with ~SPC t g~.
|
||||
|
||||
*** Buffers and Files
|
||||
By default Spacemacs uses =helm= to open files.
|
||||
|
||||
**** Buffers manipulation key bindings
|
||||
Buffer manipulation commands (start with ~b~):
|
||||
|
||||
| Key Binding | Description |
|
||||
|-----------------+--------------------------------------------------------------------------|
|
||||
| ~SPC TAB~ | switch to alternate buffer in the current window (switch back and forth) |
|
||||
| ~SPC b b~ | switch to a buffer using [[https://github.com/emacs-helm/helm][helm]] |
|
||||
| ~SPC b b~ | switch to a buffer |
|
||||
| ~SPC b d~ | kill the current buffer (does not delete the visited file) |
|
||||
| ~SPC u SPC b d~ | kill the current buffer and window (does not delete the visited file) |
|
||||
| ~SPC b D~ | kill a visible buffer using [[https://github.com/abo-abo/ace-window][ace-window]] |
|
||||
|
@ -2176,31 +2113,31 @@ Spacemacs marks buffers as useful. For instructions, see the [[file:FAQ.org::#ch
|
|||
**** Files manipulations key bindings
|
||||
Files manipulation commands (start with ~f~):
|
||||
|
||||
| Key Binding | Description |
|
||||
|-------------+---------------------------------------------------------------------------------------------------------------------------------|
|
||||
| ~SPC f b~ | go to file bookmarks |
|
||||
| ~SPC f c~ | copy current file to a different location |
|
||||
| ~SPC f C d~ | convert file from unix to dos encoding |
|
||||
| ~SPC f C u~ | convert file from dos to unix encoding |
|
||||
| ~SPC f D~ | delete a file and the associated buffer (ask for confirmation) |
|
||||
| ~SPC f E~ | open a file with elevated privileges (sudo edit) |
|
||||
| ~SPC f f~ | open file with =helm= |
|
||||
| ~SPC f F~ | try to open the file under point =helm= |
|
||||
| ~SPC f h~ | open binary file with =hexl= (a hex editor) |
|
||||
| ~SPC f j~ | jump to the current buffer file in dired |
|
||||
| ~SPC f J~ | open a junk file, in mode determined by the file extension provided (defaulting to =fundamental mode=), using =helm= (or =ivy=) |
|
||||
| ~SPC f l~ | open file literally in =fundamental mode= |
|
||||
| ~SPC f L~ | Locate a file (using =locate=) |
|
||||
| ~SPC f o~ | open a file using the default external program |
|
||||
| ~SPC f R~ | rename the current file |
|
||||
| ~SPC f s~ | save a file |
|
||||
| ~SPC f S~ | save all files |
|
||||
| ~SPC f r~ | open a recent file with =helm= |
|
||||
| ~SPC f t~ | toggle file tree side bar using [[https://github.com/jaypei/emacs-neotree][NeoTree]] |
|
||||
| ~SPC f v d~ | add a directory variable |
|
||||
| ~SPC f v f~ | add a local variable to the current file |
|
||||
| ~SPC f v p~ | add a local variable to the first line of the current file |
|
||||
| ~SPC f y~ | show and copy current file absolute path in the minibuffer |
|
||||
| Key Binding | Description |
|
||||
|-------------+--------------------------------------------------------------------------------------------------------|
|
||||
| ~SPC f b~ | go to file bookmarks |
|
||||
| ~SPC f c~ | copy current file to a different location |
|
||||
| ~SPC f C d~ | convert file from unix to dos encoding |
|
||||
| ~SPC f C u~ | convert file from dos to unix encoding |
|
||||
| ~SPC f D~ | delete a file and the associated buffer (ask for confirmation) |
|
||||
| ~SPC f E~ | open a file with elevated privileges (sudo edit) |
|
||||
| ~SPC f f~ | open file |
|
||||
| ~SPC f F~ | try to open the file under point |
|
||||
| ~SPC f h~ | open binary file with =hexl= (a hex editor) |
|
||||
| ~SPC f j~ | jump to the current buffer file in dired |
|
||||
| ~SPC f J~ | open a junk file, in mode determined by the file extension provided (defaulting to =fundamental mode=) |
|
||||
| ~SPC f l~ | open file literally in =fundamental mode= |
|
||||
| ~SPC f L~ | Locate a file (using =locate=) |
|
||||
| ~SPC f o~ | open a file using the default external program |
|
||||
| ~SPC f R~ | rename the current file |
|
||||
| ~SPC f s~ | save a file |
|
||||
| ~SPC f S~ | save all files |
|
||||
| ~SPC f r~ | open a recent file |
|
||||
| ~SPC f t~ | toggle file tree side bar using [[https://github.com/jaypei/emacs-neotree][NeoTree]] |
|
||||
| ~SPC f v d~ | add a directory variable |
|
||||
| ~SPC f v f~ | add a local variable to the current file |
|
||||
| ~SPC f v p~ | add a local variable to the first line of the current file |
|
||||
| ~SPC f y~ | show and copy current file absolute path in the minibuffer |
|
||||
|
||||
**** Emacs and Spacemacs files
|
||||
Convenient key bindings are located under the prefix ~SPC f e~ to quickly
|
||||
|
@ -2210,15 +2147,15 @@ navigate between =Emacs= and Spacemacs specific files.
|
|||
|-------------+-----------------------------------------------------------------|
|
||||
| ~SPC f e d~ | open the spacemacs dotfile (=~/.spacemacs=) |
|
||||
| ~SPC f e D~ | open =ediff= buffer of =~/.spacemacs= and =.spacemacs.template= |
|
||||
| ~SPC f e f~ | discover the =FAQ= using =helm= |
|
||||
| ~SPC f e f~ | discover the =FAQ= |
|
||||
| ~SPC f e i~ | open the all mighty =init.el= |
|
||||
| ~SPC f e l~ | locate an Emacs library |
|
||||
| ~SPC f e R~ | resync the dotfile with spacemacs |
|
||||
| ~SPC f e v~ | display and copy the spacemacs version |
|
||||
|
||||
**** Browsing files with Helm
|
||||
In =vim= and =hybrid= styles, Spacemacs remap the navigation in Helm find-files
|
||||
to keep finger on the home row.
|
||||
**** Browsing files in completion buffer
|
||||
In =vim= style and =hybrid= style with the variable
|
||||
=hybrid-mode-enable-hjkl-bindings= set to =t=, you can navigation with ~hjkl~.
|
||||
|
||||
| Key Binding | Description |
|
||||
|-------------+-----------------------------------|
|
||||
|
@ -2389,12 +2326,9 @@ Use =nerd= if you want it to look most like NERDTree in VIM. For example:
|
|||
|
||||
*** Bookmarks
|
||||
Bookmarks can be set anywhere in a file. Bookmarks are persistent. They are very
|
||||
useful to jump to/open a known project. Spacemacs uses =helm-bookmarks= to
|
||||
manage them.
|
||||
useful to jump to/open a known project.
|
||||
|
||||
Open an =helm= window with the current bookmarks by pressing: ~SPC f b~
|
||||
|
||||
Then in the =helm-bookmarks= buffer:
|
||||
Open the bookmark completion window by pressing= ~SPC f b~
|
||||
|
||||
| Key Binding | Description |
|
||||
|-------------+----------------------------------------------|
|
||||
|
@ -2509,20 +2443,20 @@ file with =ag=.
|
|||
- =rg=, =ag= and =pt= are optimized to be used in a source control repository but
|
||||
they can be used in an arbitrary directory as well.
|
||||
- It is also possible to search in several directories at once by marking
|
||||
them in the helm buffer.
|
||||
them in the Helm buffer (not available in Ivy).
|
||||
|
||||
*Beware* if you use =pt=, [[https://core.tcl.tk/tcllib/doc/trunk/embedded/www/tcllib/files/apps/pt.html][TCL parser tools]] also install a command line tool
|
||||
called =pt=.
|
||||
|
||||
**** Useful key bindings
|
||||
|
||||
| Key Binding | Description |
|
||||
|------------------------+---------------------------------------------------------------|
|
||||
| ~F3~ | in a =helm= or =ivy= buffer, save results to a regular buffer |
|
||||
| ~SPC r l~ | resume the last =completion= buffer |
|
||||
| ~SPC r s~ or ~SPC s l~ | resume search buffer (completion or converted search buffer) |
|
||||
| ~SPC s `~ | go back to the previous place reached with =helm-ag= |
|
||||
| Prefix argument | will ask for file extensions |
|
||||
| Key Binding | Description |
|
||||
|------------------------+--------------------------------------------------------------|
|
||||
| ~F3~ | in a completion buffer, save results to a regular buffer |
|
||||
| ~SPC r l~ | resume the last =completion= buffer |
|
||||
| ~SPC r s~ or ~SPC s l~ | resume search buffer (completion or converted search buffer) |
|
||||
| ~SPC s `~ | go back to the previous place before jump |
|
||||
| Prefix argument | will ask for file extensions |
|
||||
|
||||
When results have been saved in a regular buffer with ~F3~, that buffer supports
|
||||
browsing through the matches with Spacemacs’ =next-error= and =previous-error=
|
||||
|
@ -2675,24 +2609,7 @@ It is pretty useful combined with the [[#expand-region][expand-region]] bindings
|
|||
auto-highlight-symbol and its transient state.
|
||||
|
||||
*** Listing symbols by semantic
|
||||
Use =helm-semantic-or-imenu= command from =Helm= to quickly navigate between the
|
||||
symbols in a buffer.
|
||||
|
||||
To list all the symbols of a buffer press: ~SPC s j~
|
||||
|
||||
*** Helm-swoop
|
||||
This is very similar to =moccur=, it displays a =helm= buffer with all the
|
||||
occurrences of the word under point. You can then change the search query in
|
||||
real-time and navigate between them easily.
|
||||
|
||||
You can even edit the occurrences directly in the =helm= buffer and apply the
|
||||
modifications to the buffer.
|
||||
|
||||
| Key Binding | Description |
|
||||
|-------------+--------------------------------|
|
||||
| ~SPC s s~ | execute =helm-swoop= |
|
||||
| ~SPC s S~ | execute =helm-multi-swoop= |
|
||||
| ~SPC s C-s~ | execute =helm-multi-swoop-all= |
|
||||
To list all the symbols of a buffer press ~SPC s j~
|
||||
|
||||
** Editing
|
||||
*** Paste text
|
||||
|
@ -3169,8 +3086,6 @@ Projects in Spacemacs are managed with [[https://github.com/bbatsov/projectile][
|
|||
are defined implicitly, for instance the root of a project is found when a
|
||||
=.git= repository or =.projectile= file is encountered in the file tree.
|
||||
|
||||
=Helm= is used whenever it is possible.
|
||||
|
||||
To search in a project see [[#searching-in-a-project][project searching]].
|
||||
|
||||
=projectile= commands start with p:
|
||||
|
@ -3190,7 +3105,7 @@ To search in a project see [[#searching-in-a-project][project searching]].
|
|||
| ~SPC p F~ | find file based on path around point |
|
||||
| ~SPC p g~ | find tags |
|
||||
| ~SPC p G~ | regenerate the project's =etags= / =gtags= |
|
||||
| ~SPC p h~ | find file using =helm= |
|
||||
| ~SPC p h~ | find file |
|
||||
| ~SPC p I~ | invalidate the projectile cache |
|
||||
| ~SPC p k~ | kill all project buffers |
|
||||
| ~SPC p o~ | run =multi-occur= |
|
||||
|
|
|
@ -6,11 +6,19 @@
|
|||
- [[#description][Description]]
|
||||
- [[#install][Install]]
|
||||
- [[#key-bindings][Key bindings]]
|
||||
- [[#hjkl-navigation][hjkl navigation]]
|
||||
- [[#transient-state][Transient state]]
|
||||
- [[#bookmarks][Bookmarks]]
|
||||
- [[#c-z-and-tab-switch][C-z and Tab switch]]
|
||||
- [[#helm-focus][Helm focus]]
|
||||
- [[#helm-swoop][Helm-swoop]]
|
||||
- [[#universal-argument][Universal argument]]
|
||||
- [[#replacing-text-in-several-files][Replacing text in several files]]
|
||||
- [[#external-resources][External resources]]
|
||||
|
||||
* Description
|
||||
Spacemacs is powered by one of two incremental completion and selection
|
||||
narrowing frameworks: [[https://github.com/emacs-helm/helm][Helm]] (this layer, which is the default) or Ivy.
|
||||
This layer enables Helm everywhere in Spacemacs. The alternative to this
|
||||
layer is the Ivy layer which brings the same level of integration as Helm.
|
||||
|
||||
These completion systems are the central control towers of Spacemacs, they are
|
||||
used to manage buffers, projects, search results, configuration layers, toggles
|
||||
|
@ -27,8 +35,106 @@ To switch from Ivy to Helm, modify your =~/.spacemacs=. You will need to add
|
|||
and remove =ivy=.
|
||||
|
||||
* Key bindings
|
||||
The Spacemacs-specific keybindings are described in the Spacemacs documentation:
|
||||
- [[https://github.com/syl20bnr/spacemacs/blob/master/doc/DOCUMENTATION.org#helm][Navigating Helm buffers]]
|
||||
** hjkl navigation
|
||||
When using the Vim style or Hybrid style with the variable
|
||||
=hybrid-mode-enable-hjkl-bindings= set to =t=, Spacemacs adds navigation in the
|
||||
Helm buffers with ~hjkl~.
|
||||
|
||||
| Key Binding | Description |
|
||||
|-------------+------------------------------|
|
||||
| ~C-h~ | go to next source |
|
||||
| ~C-H~ | describe key (replace ~C-h~) |
|
||||
| ~C-j~ | go to previous candidate |
|
||||
| ~C-k~ | go to next candidate |
|
||||
| ~C-l~ | same as ~return~ |
|
||||
|
||||
** Transient state
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: helm-transient-state
|
||||
:END:
|
||||
Spacemacs defines a [[#transient-states][transient state]] for =Helm= to make it work like [[https://github.com/Shougo/unite.vim][Vim's Unite]]
|
||||
plugin.
|
||||
|
||||
Initiate the transient state with ~M-SPC~ or ~s-M-SPC~ while in a =Helm= buffer.
|
||||
|
||||
| Key Binding | Description |
|
||||
|----------------------+------------------------------------------------------|
|
||||
| ~M-SPC~ or ~s-M-SPC~ | initiate the transient state |
|
||||
| ~q~ | quit transient state |
|
||||
| ~TAB~ | switch to actions page and leave the transient state |
|
||||
| ~1~ | execute action 0 |
|
||||
| ~2~ | execute action 1 |
|
||||
| ~3~ | execute action 2 |
|
||||
| ~4~ | execute action 3 |
|
||||
| ~5~ | execute action 4 |
|
||||
| ~6~ | execute action 5 |
|
||||
| ~7~ | execute action 6 |
|
||||
| ~8~ | execute action 7 |
|
||||
| ~9~ | execute action 8 |
|
||||
| ~0~ | execute action 9 |
|
||||
| ~a~ | switch to actions page |
|
||||
| ~g~ | go to first candidate |
|
||||
| ~G~ | go to last candidate |
|
||||
| ~h~ | go to previous source |
|
||||
| ~j~ | select next candidate |
|
||||
| ~k~ | select previous candidate |
|
||||
| ~l~ | go to next source |
|
||||
| ~t~ | mark current candidate |
|
||||
| ~T~ | mark all candidates |
|
||||
| ~v~ | execute persistent action |
|
||||
|
||||
** Bookmarks
|
||||
In the =helm-bookmarks= buffer:
|
||||
|
||||
| Key Binding | Description |
|
||||
|-------------+----------------------------------------------|
|
||||
| ~C-d~ | delete the selected bookmark |
|
||||
| ~C-e~ | edit the selected bookmark |
|
||||
| ~C-f~ | toggle filename location |
|
||||
| ~C-o~ | open the selected bookmark in another window |
|
||||
|
||||
** C-z and Tab switch
|
||||
The command bound to ~C-z~ is much more useful than the one bound to Tab, so it
|
||||
makes sense to swap them. It's also recommended [[http://tuhdo.github.io/helm-intro.html][here]].
|
||||
|
||||
** Helm focus
|
||||
If you find yourself unable to return focus to Helm (after a careless
|
||||
mouse-click for example), use ~SPC w b~ to return focus to the minibuffer.
|
||||
|
||||
** Helm-swoop
|
||||
[[https://github.com/ShingoFukuyama/helm-swoop][Helm-swoop]] is very similar to =moccur=, it displays a =helm= buffer with all the
|
||||
occurrences of the word under point. You can then change the search query in
|
||||
real-time and navigate between them easily.
|
||||
|
||||
You can even edit the occurrences directly in the =helm= buffer and apply the
|
||||
modifications to the buffer.
|
||||
|
||||
| Key Binding | Description |
|
||||
|-------------+--------------------------------|
|
||||
| ~SPC s s~ | execute =helm-swoop= |
|
||||
| ~SPC s S~ | execute =helm-multi-swoop= |
|
||||
| ~SPC s C-s~ | execute =helm-multi-swoop-all= |
|
||||
|
||||
** Universal argument
|
||||
|
||||
~SPC u~ is not working before =helm-M-x= (~SPC SPC~). Instead, call =helm-M-x=
|
||||
first, select the command you want to run, and press ~C-u~ before pressing
|
||||
~RETURN~. For instance: ~SPC SPC org-reload C-u RET~
|
||||
|
||||
** Replacing text in several files
|
||||
If you have =rg=, =ag=, =pt= or =ack= installed, replacing an occurrence of text
|
||||
in several files can be performed via [[https://github.com/syohex/emacs-helm-ag][helm-ag]].
|
||||
|
||||
Say you want to replace all =foo= occurrences by =bar= in your current
|
||||
project:
|
||||
- initiate a search with ~SPC /~
|
||||
- enter in edit mode with ~C-c C-e~
|
||||
- go to the occurrence and enter in =iedit state= with ~SPC s e~
|
||||
- edit the occurrences then leave the =iedit state=
|
||||
- press ~C-c C-c~
|
||||
|
||||
*Note*: In Spacemacs, =helm-ag= despite its name works with =rg=, =pt= and =ack=
|
||||
as well (but not with =grep=).
|
||||
|
||||
* External resources
|
||||
- [[https://github.com/emacs-helm/helm/wiki][The Helm wiki]]
|
||||
|
|
|
@ -8,7 +8,8 @@
|
|||
- [[#transient-state][Transient state]]
|
||||
|
||||
* Description
|
||||
This layer enables Ivy for completion. It will replace the default completion by [[https://github.com/emacs-helm/helm][Helm]].
|
||||
This layer enables Ivy for completion. It will replace the default completion by
|
||||
[[https://github.com/emacs-helm/helm][Helm]].
|
||||
|
||||
These completion systems are the central control towers of Spacemacs, they are
|
||||
used to manage buffers, projects, search results, configuration layers, toggles
|
||||
|
@ -24,15 +25,21 @@ file.
|
|||
* Configuration
|
||||
You can customize ivy with the following variables:
|
||||
|
||||
- =ivy-wrap= Whether C-n and C-p should wrap-around when at the the first or last candidate. The default value is nil.
|
||||
- =ivy-extra-directories= Setting this to nil hides . and .. directories from file name completion. You can still go up a directory up by ~DEL~. The default value is ("../", "./").
|
||||
- =ivy-use-virtual-buffers= Add bookmarks and recent files to buffer completion menu. The Spacemacs default is t.
|
||||
- =ivy-wrap= Whether C-n and C-p should wrap-around when at the the first or
|
||||
last candidate. The default value is nil.
|
||||
- =ivy-extra-directories= Setting this to =nil= hides . and .. directories from
|
||||
file name completion. You can still go up a directory up by ~DEL~.
|
||||
The default value is ("../", "./").
|
||||
- =ivy-use-virtual-buffers= Add bookmarks and recent files to buffer completion
|
||||
menu. The Spacemacs default is t.
|
||||
- =ivy-height= The height of the minibuffer. The Spacemacs default is 15.
|
||||
|
||||
* Key Bindings
|
||||
If you choose =ivy= as completion system, make sure to read the [[http://oremacs.com/swiper/][official manual]]. In
|
||||
case you don't want to read everything, at least familiarise with [[http://oremacs.com/swiper/#minibuffer-key-bindings][minibuffer key
|
||||
bindings]]. Some useful key bindings are presented in the following table.
|
||||
If you choose =ivy= as completion system, make sure to read the [[http://oremacs.com/swiper/][official manual]].
|
||||
In case you don't want to read everything, at least familiarise with
|
||||
[[http://oremacs.com/swiper/#minibuffer-key-bindings][minibuffer key bindings]].
|
||||
|
||||
Some useful key bindings are presented in the following table.
|
||||
|
||||
| Key Binding | Description |
|
||||
|-------------+------------------------------------------------------------------------------------------------------|
|
||||
|
|
Loading…
Reference in New Issue