Closed mralusw closed 4 months ago
It's true that the built-in file selector is very primitive, and not a good fit for :cd
.
If you want something fancier, I'd advice adding a variant of the following snippet to your visrc:
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)
Still, not being able to pick a final directory is a bug, not a case of not enough polishing. However primitive the built-in selector is, it must have some switch (or some key binding) to allow me to pick a directory instead of a file.
If you have a workaround for this bug (like rcd
), it should be something that replaces the buggy command.
Problem
So I type
:cd <TAB>
. This brings up a completion list that includes all directories in the current directory, plus all files (nice!), then<TAB>
again selects the first choice (which is..
— nice, I have to delete that to get back to the list)<Left>
,<Right>
and<Enter>
one can eventually navigate to the desired destination, then FINALLY...Steps to reproduce
No response
vis version (vis -v)
g5cd6d03 +curses +lua +acl +selinux (the one at commit message "fix bug report template", nice to know this is being taken care of)
Terminal name/version
Gnome Terminator
$TERM environment variable
xterm-256color