general cleanup
This commit is contained in:
parent
ffced8fca4
commit
3ffb35cc2e
25 changed files with 149 additions and 120 deletions
|
@ -21,6 +21,13 @@ vis.events.subscribe(vis.events.WIN_OPEN, function(win)
|
|||
vis:command('set number')
|
||||
end)
|
||||
|
||||
vis.events.subscribe(vis.events.FILE_SAVE_PRE, function(file, path)
|
||||
if file.size ~= 0 and file:content(file.size - 1, 1) ~= "\n" then
|
||||
file:insert(file.size, "\n")
|
||||
end
|
||||
return true
|
||||
end)
|
||||
|
||||
vis:map(vis.modes.NORMAL, ";;", "<vis-window-next>")
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
@ -34,6 +41,15 @@ vis:map(vis.modes.NORMAL, "<Escape>", function()
|
|||
end
|
||||
end)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
-- Fancy cd
|
||||
vis:command_register("rcd", function(argv, force, cur_win, selection, range)
|
||||
handle = io.popen('f=$(mktemp); st -e ranger --choosedir="$f" --show-only-dirs; cat "$f"')
|
||||
local output = handle:read()
|
||||
handle:close()
|
||||
vis:command('cd '..output)
|
||||
end)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
-- Fuzzy search filenames to open files
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue