Hi,
I would like to create three different keybinding for the following package; calc
Including these commands:
- Evaluates (‘alt-c’)
- Replace (‘alt-z’)
- Count (‘alt-x’)
Thank you
Hi,
I would like to create three different keybinding for the following package; calc
Including these commands:
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”
‘alt-c’:
command: “calc:replace”
‘alt-z’:
command: “calc:count”
‘alt-x’:
I edited the OP, sorry for not being clear about it.
Add something like the following to your Keymap:
'atom-text-editor:not([mini])':
'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.