Let escape in normal mode clear counts
This commit is contained in:
parent
74d2a15176
commit
eca5a75996
@ -19,20 +19,25 @@ vis.events.subscribe(vis.events.WIN_OPEN, function(win)
|
|||||||
vis:command('set number')
|
vis:command('set number')
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
vis:map(vis.modes.NORMAL, "<Escape>", function()
|
||||||
|
if vis.count then
|
||||||
|
vis.count = nil
|
||||||
|
else
|
||||||
|
vis:feedkeys"<vis-selections-remove-all>"
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
vis:command_register("fzf", function(argv, force, cur_win, selection, range)
|
vis:command_register("fzf", function(argv, force, cur_win, selection, range)
|
||||||
local out = io.popen("fzf"):read()
|
local out = io.popen("fzf"):read()
|
||||||
--local out = io.popen("fzf " .. table.concat(argv, " ")):read()
|
|
||||||
if out then
|
if out then
|
||||||
if argv[1] then
|
if argv[1] then
|
||||||
vis:command(string.format('e "%s"', out))
|
vis:command(string.format('e "%s"', out))
|
||||||
-- or vis:command(string.format('open %s', out))
|
|
||||||
-- should e return false when failed
|
|
||||||
else
|
else
|
||||||
vis:command(string.format('open "%s"', out))
|
vis:command(string.format('open "%s"', out))
|
||||||
end
|
end
|
||||||
vis:feedkeys("<vis-redraw>")
|
vis:feedkeys("<vis-redraw>")
|
||||||
end
|
end
|
||||||
end)
|
end, 'fuzzy file search')
|
||||||
|
|
||||||
vis:map(vis.modes.NORMAL, ";l", function()
|
vis:map(vis.modes.NORMAL, ";l", function()
|
||||||
vis:command('fzf')
|
vis:command('fzf')
|
||||||
|
Loading…
Reference in New Issue
Block a user