Need help keymap binding a package



I would like to create three different keybinding for the following package; calc
Including these commands:

  1. Evaluates (‘alt-c’)
  2. Replace (‘alt-z’)
  3. Count (‘alt-x’)

Thank you


You want one key press to perform all three commands? Please provide an example of how you want this to function.


Not 1 key, three separate for all three commands.

For example:

command: “calc:evaluate”

command: “calc:replace”

command: “calc:count”

I edited the OP, sorry for not being clear about it.


Add something like the following to your Keymap:

  'alt-c': 'calc:evaluate'
  'alt-z': 'calc:replace'
  'alt-x': 'calc:count'

I’m not sure if I remember this correctly, but I think Microsoft advises against shortcuts using the Alt-key as only modifier (at least on Windows).

Edit: removed unbind! as suggested in follow-up


The unbind! entries are unnecessary and don’t even get evaluated in your example because CSON overwrites all previous instances of the same key with the last instance of the key.


You live and learn :slight_smile:


Indeed, it worked like a charm without the unbind.

Thank You both. idleberg & leedohm