Helm & completionλ︎
Helm is an incremental completion and selection narrowing framework. Its the central control tower of Spacemacs, it is used to manage buffers, projects, search results, configuration layers, toggles and more.
For example, Helm helps you navigate files and directory names, only showing the matching names to the pattern you type. This minimises the need to type directory and file names in full.
|Helm Keybinding||Helm action|
|Ctrl+h||Up to parent directory|
|Ctrl+l||Into sub directory / open file|
|Ctrl+j||Move down the helm menu|
|Ctrl+k||Move up the helm menu|
|Meta+p||Traverse Helm history|
|Ctrl+y||Paste kill ring into helm|
|Space+w+b||Switch to minibuffer|
Helm Transient Stateλ︎
Use the Helm transient state to navigate the Helm results using Vim keybindings (
hjkl) and call additional actions on those results.
Enter this transient state with
S-M-SPC while in a Helm buffer, for example, when navigating the results such as file find
SPC f f, buffer list
SPC b b, or Emacs commands list
Gnome desktop binding clash
M-SPC is used by the Gnome desktop for the window menu, so recommend you change the Gnome keyboard settings to use a different binding, i.e.
|Meta+Space||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|
Helm actions for Buffer listλ︎
The transient state menu is really great for running actions over multiple files.
In this example Helm Transient State menu is used to select and kill multiple buffers easily. Combining the pattern based searching with marking files (
T marks all files listed for a particular pattern) makes it really easy to kill lots of Magit buffers that are no longer needed.
Prompt when using layouts
Layouts in Spacemacs show a prompt when killing a buffer that is not in the current layout, as seen at the end of the video when killing all magit buffers.
Layers separate projects into their own groups of buffers so its easier to switch between multiple projects.
a switches to the actions page, or using
C-z displays the list off all the available actions for a buffer.