How to change directory quickly with vifm
vifm
vifm is a file manager similar to ranger, but supports vim-like keybindings.
vicd
The vifm wiki shows how to add custom command vicd to change directory easily. You may add this to the .zshrc file.
vicd()
{
local dst="$(command vifm --choose-dir - "$@")"
if [ -z "$dst" ]; then
echo 'Directory picking cancelled/failed'
return 1
fi
cd "$dst"
}
Usage: in terminal shell type vicd to open vifm. Select a directory, press enter. :q exits vifm and changes directory. :cq exits vifm without changing directory.
how to install
On macOS you can install via Homebrew:
brew install vifm
References
vifm
vicd for vifm
https://wiki.vifm.info/index.php/How_to_set_shell_working_directory_after_leaving_Vifm