vifm.vim
vifm.vim copied to clipboard
Is it possible to select a directory to be neovim cwd within vifm?
No, but it probably won't be hard to add.
Sorry for the really late reply @xaizek . I was wondering how this can be approached? I thought of 2 functions and I am not sure if this can already be achieved in some way other than vifm or default netrw has something built in for this:
-
Function 1: Setting directory of the currently opened buffer as the
cwd. -
Function 2: Choosing the last opened directory in the file tree as the
cwd. (https://wiki.vifm.info/index.php/How_to_set_shell_working_directory_after_leaving_Vifm may be using this option--choose-dirand passing this on to the editor?)
Yes, need to use result of --choose-dir, specifically feed it into :cd or :lcd. The catch though is that plugin's code is a mess. Code-wise:
- In
s:StartVifmands:HandleRunResults. - Need to check
cdforeditcmdparameter and upon detection, pass--choose-dirinstead of--choose-files. -
s:HandleRunResultsshould doexec cd <path>after checking that there is only one path.