vifm / vifm.vim

Vim plugin that allows use of vifm as a file picker
325 stars 18 forks source link

Choosing which directories to open with the Vifm command #50

Closed sholland1 closed 3 years ago

sholland1 commented 3 years ago

Is there a way to get the Vifm command to open the directory of the file I am currently editing in one pane and the working directory of Vim in the other?

I think this behavior would be a good default.

xaizek commented 3 years ago

This seems to work:

:execute 'Vifm' fnameescape(expand('%:p:h')) fnameescape(getcwd())
sholland1 commented 3 years ago

Yep. It works. Thanks.

kelvinzhao commented 3 years ago

I don't know about vimscript, but I found adding nnoremap <leader>vv :Vifm 1<CR> in vimrc file will work too.