diff options
Diffstat (limited to 'init.lua')
-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") |