Atom package that displays available keybindings in a panel. A clone of Emacs' emacs-which-key.
which-key
is an Atom package that displays the key bindings and their respective commands following your currently entered incomplete command (a prefix) in a pane. For example, after enabling the package, if you enter ctrl-k
/cmd-k
and wait for the default of half second, the panel will expand with all of the available key bindings that follow ctrl-k
/cmd-k
.
.which-key {
font-family: 'Insert font here', 'Comic Sans', sans-serif;
}
There is a total of 4 colors displayed in the which-key pane: the color displayed by keystrokes (on the left), the color of the arrow which separates keystrokes and commands, the color of mappings (assigned to the default text color) and the color of groups of mappings.
/* Change the color of individual commands */
.which-key { color: @command-color; }
/* Change the color of keystrokes */
.which-key-keys { color: @keys-color; }
/* Change the color of the (arrow) separator */
.which-key-arrow { color: @arrow-color; }
/* Change the color of groups of submappings */
.which-key-group { color: @group-color; }
The character which separates keystrokes and commands can be customized:
.which-key-arrow:after { content: " → "; }
In order to have specific keystrokes be ignored (not displayed) in the which-key pane, the user should define a list of such keystrokes in init.coffee
with the command:
# The following keystrokes won't appear in the pane
atom.config.set('which-key.ignoredKeys', [
'ctrl-space p 9',
'ctrl-space f w',
'ctrl-space b b'
])