Skip to content

Namespaces

Iury O. G. Figueiredo edited this page Feb 20, 2026 · 1 revision

Plugins namespaces are used to customize keystrokes. They are defined in the plugin modules to be referenced from the escsrc.

An example of usage it is to change keystrokes.

from cspkg.plugins.extra_mode import ExtraModeNS
from cspkg.plugins.normal_mode import Normal
from cspkg.core import Main

First it maps <Alt-v> to <apostrophe>.
chkmap(ExtraModeNS, (Main, '<Alt-v>'), (Normal, '<apostrophe>'))

The above code is used to create a shortcut for switching to Extra mode. It maps the functionality/handle that is mapped to the keystroke.

<Alt-v>

To the keystroke below in Normal mode.

<apostrophe>

Thus when pressing such a key in Normal mode it will switch to Extra mode as well.

Clone this wiki locally