Add smart numbers for other keybindings that enter insert mode
This commit is contained in:
parent
d5120a2398
commit
2b662b6254
|
@ -0,0 +1,2 @@
|
|||
# TODO
|
||||
Get Change Operator to work with smart numbers. Will involve writing a more copmlex function.
|
29
init.lua
29
init.lua
|
@ -26,6 +26,35 @@ vis.events.subscribe(vis.events.INIT, function()
|
|||
vis:map(vis.modes.NORMAL, "A", fk(":set numbers<Enter><vis-append-line-end>"),
|
||||
"Append text after the end of the line")
|
||||
|
||||
vis:map(vis.modes.NORMAL, "o", fk(":set numbers<Enter><vis-open-line-below>"),
|
||||
"Begin a new line below the cursor")
|
||||
|
||||
vis:map(vis.modes.NORMAL, "O", fk(":set numbers<Enter><vis-open-line-above>"),
|
||||
"Begin a new line above the cursor")
|
||||
|
||||
-- TODO -- not working
|
||||
--vis:map(vis.modes.NORMAL, "c", fk(":set numbers<Enter><vis-operator-change>"),
|
||||
--"Change operator")
|
||||
|
||||
vis:map(vis.modes.NORMAL, "s", fk(":set numbers<Enter>cn"),
|
||||
"cn")
|
||||
|
||||
vis:map(vis.modes.NORMAL, "S", fk(":set numbers<Enter>^c$"),
|
||||
"^c$")
|
||||
|
||||
-- operator pending
|
||||
|
||||
-- TODO -- not working
|
||||
--vis:map(vis.modes.OPERATOR_PENDING, "c", fk(":set numbers<Enter><vis-operator-change>"),
|
||||
--"Change operator")
|
||||
|
||||
-- visual
|
||||
vis:map(vis.modes.VISUAL, "c", fk(":set numbers<Enter><vis-operator-change>"),
|
||||
"Change operator")
|
||||
|
||||
vis:map(vis.modes.VISUAL, "s", fk(":set numbers<Enter>c"),
|
||||
"c")
|
||||
|
||||
-- insert
|
||||
vis:map(vis.modes.INSERT, "<Escape>", fk("<vis-mode-normal>:set relativenumber<Enter>"),
|
||||
"Enter normal mode")
|
||||
|
|
Loading…
Reference in New Issue