diff options
author | Georgi Kirilov <> | 2021-05-24 20:42:11 +0300 |
---|---|---|
committer | Matěj Cepl <mcepl@cepl.eu> | 2022-08-18 19:08:36 +0200 |
commit | 7fb0af9425010d406198c9e440990196722e7150 (patch) | |
tree | a5c1eed2034c283856296a0b889822e573d3944d | |
parent | 11d3d23d45e991c2a9414958a6c377d4506f5ea2 (diff) | |
download | vis-toggler-7fb0af9425010d406198c9e440990196722e7150.tar.gz |
use the full name from vis.h
-rw-r--r-- | init.lua | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -23,7 +23,8 @@ local ordinal_words local count -local char_next = 17 +-- copied from vis.h +local VIS_MOVE_CHAR_NEXT = 17 local dec_digit = R"09" local hex_digit = R("09", "af", "AF") @@ -150,12 +151,12 @@ end vis.events.subscribe(vis.events.INIT, function() local ord_next = vis:textobject_register(ordinal) - operator_new("<C-a>", toggle(increment), ord_next, nil, "Toggle/increment word or number", true) - operator_new("<C-x>", toggle(decrement), ord_next, nil, "Toggle/decrement word or number", true) - operator_new("~", toggle(case, true), nil, char_next, "Toggle case of character or selection") - operator_new("g~", toggle(case), nil, nil, "Toggle-case operator") - operator_new("gu", toggle(string.lower), nil, nil, "Lower-case operator") - operator_new("gU", toggle(string.upper), nil, nil, "Upper-case operator") + operator_new("<C-a>", toggle(increment), ord_next, nil, "Toggle/increment word or number", true) + operator_new("<C-x>", toggle(decrement), ord_next, nil, "Toggle/decrement word or number", true) + operator_new("~", toggle(case, true), nil, VIS_MOVE_CHAR_NEXT, "Toggle case of character or selection") + operator_new("g~", toggle(case), nil, nil, "Toggle-case operator") + operator_new("gu", toggle(string.lower), nil, nil, "Lower-case operator") + operator_new("gU", toggle(string.upper), nil, nil, "Upper-case operator") lookup, ordinal_words = preprocess(M.config) vis:map(vis.modes.NORMAL, "g~~", "g~il") vis:map(vis.modes.NORMAL, "guu", "guil") |