It's kind of weird how un-ergonomically placed the parenthesis keys are. I'd like a function that smartly brackets my stuff for me based on context:
- If the mark is active, the region should be enclosed by ()
- If the mark is not active and the cursor is in the middle of a symbol, it should enclose the region between the cursor and the next whitespace:
foo|bar bla -> foo(|bar) bla
. - Consecutive calls should result in cycling the bracket type, i.e.
(x) -> [x] -> {x} -> ('x') -> ("x") -> ...
This would be awesome. Does there exist a package/function that does something similar already?