From 7fb0af9425010d406198c9e440990196722e7150 Mon Sep 17 00:00:00 2001 From: Georgi Kirilov <> Date: Mon, 24 May 2021 20:42:11 +0300 Subject: use the full name from vis.h --- init.lua | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/init.lua b/init.lua index 815b4f8..c69e248 100644 --- a/init.lua +++ b/init.lua @@ -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("", toggle(increment), ord_next, nil, "Toggle/increment word or number", true) - operator_new("", 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("", toggle(increment), ord_next, nil, "Toggle/increment word or number", true) + operator_new("", 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") -- cgit