Map undo selection change to <a-u>/<a-U>
Change the initial <c-h>/<c-k> bindings to the recently freed-up <a-u></a-U>. Pros: - easier to remember - the redo binding is logical. - works on legacy terminals, unlike <c-h> Cons: - It's less convenient to toggle between selection undo and redo keys. I think this is okay since this scenario does not happen that often in practice.
This commit is contained in:
parent
2adc81c4c9
commit
7d2bae63b9
|
@ -308,10 +308,10 @@ Yanking (copying) and pasting use the *"* register by default (See <<registers#,
|
|||
*U*::
|
||||
redo last change
|
||||
|
||||
*<c-h>*::
|
||||
*<a-u>*::
|
||||
undo last selection change
|
||||
|
||||
*<c-k>*::
|
||||
*<a-U>*::
|
||||
redo last selection change
|
||||
|
||||
*&*::
|
||||
|
|
|
@ -2340,8 +2340,8 @@ static constexpr HashMap<Key, NormalCmd, MemoryDomain::Undefined, KeymapBackend>
|
|||
{ {'u'}, {"undo", undo} },
|
||||
{ {'U'}, {"redo", redo} },
|
||||
|
||||
{ {ctrl('h')}, {"undo selection change", undo_selection_change<Backward>} },
|
||||
{ {ctrl('k')}, {"redo selection change", undo_selection_change<Forward>} },
|
||||
{ {alt('u')}, {"undo selection change", undo_selection_change<Backward>} },
|
||||
{ {alt('U')}, {"redo selection change", undo_selection_change<Forward>} },
|
||||
|
||||
{ {alt('i')}, {"select inner object", select_object<ObjectFlags::ToBegin | ObjectFlags::ToEnd | ObjectFlags::Inner>} },
|
||||
{ {alt('a')}, {"select whole object", select_object<ObjectFlags::ToBegin | ObjectFlags::ToEnd>} },
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
ui_out -ignore 4
|
||||
ui_in '{ "jsonrpc": "2.0", "method": "keys", "params": [ "gjgkxd<c-h>ihere<esc>" ] }'
|
||||
ui_in '{ "jsonrpc": "2.0", "method": "keys", "params": [ "gjgkxd<a-u>ihere<esc>" ] }'
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
ui_out -ignore 4
|
||||
ui_in '{ "jsonrpc": "2.0", "method": "keys", "params": [ "2jj<c-h><c-h><c-k>ihere<esc>" ] }'
|
||||
ui_in '{ "jsonrpc": "2.0", "method": "keys", "params": [ "2jj<a-u><a-u><a-U>ihere<esc>" ] }'
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
ui_out -ignore 4
|
||||
ui_in '{ "jsonrpc": "2.0", "method": "keys", "params": [ "j2j<c-h><c-h>ihere<esc>" ] }'
|
||||
ui_in '{ "jsonrpc": "2.0", "method": "keys", "params": [ "j2j<a-u><a-u>ihere<esc>" ] }'
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
ui_out -ignore 4
|
||||
ui_in '{ "jsonrpc": "2.0", "method": "keys", "params": [ "j:buffer *debug*<ret><c-h>ihere<esc>" ] }'
|
||||
ui_in '{ "jsonrpc": "2.0", "method": "keys", "params": [ "j:buffer *debug*<ret><a-u>ihere<esc>" ] }'
|
||||
|
|
Loading…
Reference in New Issue
Block a user