The bind
plugin provides a vim-like interface for Luminescence (1.0.1 at the time of this writing). The source file for this plugin can be found here.
To register key bindings, you should use the bind
command. You can either call it directly from the command-line, or write your bindings in the configuration file (see the README or the exec
plugin).
bind i insert-mode
bind ^v uri-paste # ^ means Ctrl
The exec
-style usage is:
bind KEY COMMAND ARG1 ARG2 ...
Technically, the bind
command takes at least 2 arguments.
The key is usually a single letter, and the case is important.
There is also the ^
modifer to match the Ctrl modifier.
Currently, other special keys (like Escape or Backspace) are not meant to be bound. However you can probably bind them the right non-printable characters. Otherwise you might as well add a few lines of code to bind the key you want.
Note: this section is for developers.
When the focus
command is called, bind
relays key events to Gtk instead of handling them like it usually does. The user can release the focus by pressing the Escape key. When releasing the focus, bind
calls the leave
command, so that all the plugins which have registered the leave
command will be aware of the focus release (which usually means "cancel").
In other words: you lose all control over the keyboard when focusing.