Skip to content

Atom package that displays available keybindings in a panel

License

Notifications You must be signed in to change notification settings

arthurxavierx/atom-which-key

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

which-key package

Atom package that displays available keybindings in a panel. A clone of Emacs' emacs-which-key.

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.

Customizing

Font

.which-key {
  font-family: 'Insert font here', 'Comic Sans', sans-serif;
}

Colors

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; }

Arrow

The character which separates keystrokes and commands can be customized:

.which-key-arrow:after { content: " → "; }

Ignore specific keystrokes

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'
])

About

Atom package that displays available keybindings in a panel

Resources

License

Stars

Watchers

Forks

Packages

No packages published