Note that there's no way to call a Jwno command in the system command line (cmd.exe or PowerShell) at the moment. This page is about calling a command in your Janet code, or the REPL.

To directly call a command in your Janet code, use the :call-command method from the command manager object, and pass the command's name and its arguments separately. Take the :split-frame command from the previous section as an example again:

(:call-command (in jwno/context :command-manager)
               :split-frame :horizontal 2)

Comparing to specifying a command in a :define-key call, notice the square brackets around the command name and its arguments are gone. This is designed to relieve parenthesis/bracket allergy symptoms for certain users.

Special Commands

Currently all keymap-related commands are special, in that you cannot use :call-command to call them, since they work exclusively in another thread that handles keyboard events. These commands include:

  • :push-keymap
  • :pop-keymap

For example, doing this will raise an unknown command error in your Janet code:

(:call-command (in jwno/context :command-manager)
               :push-keymap some-keymap)