3 ms·
How keyboard macro can possibly replace an editor that operates on text objects? Let's say you have 'foo bar' string, and you want to change quotes to " In Ka
by TeddyDD 5y ago
How keyboard macro can possibly replace an editor that operates on text objects?
Let's say you have 'foo bar' string, and you want to change quotes to "
In Kakoune this operation could look like this:
<a-a>' # select string including quotes
<a-S> # select first and last character of previous selection
r" # replace selections with "
Trivial, 5 keystrokes and it works for any type of quotes (I can do for example <a-a>`). Notice that "replace quotes around the string" is not built-in operation in Kakoune.
Now how would you achieve that in non-modal editor that also doesn't have this operation built-in?