Hey, I see that when writing context conditions for a keymap, there’s a few operands supported, such as “preceding_text” and “following_text”, but there’s nothing to test the current selection.
Essentially, I’m trying to add a shortcut which replaces the quotes used in a string.
Selection (including the quotes): “foo”
Keypress: ’ (single quote)
Output: ‘foo’
and vice versa.
What I want to do is add a check to the hotkey to see if the selection starts and ends with a single- or double-quote.