vifm / vifm.vim

Vim plugin that allows use of vifm as a file picker
335 stars 19 forks source link

Option to open vifm as a sidebar a lá NERDtree #19

Closed Pablo1107 closed 5 years ago

Pablo1107 commented 5 years ago

I don't know if it's possible in the current implementation. But as this plugin can be opened in the embedded terminal in Vim 8, can it be posible that the terminal launches in a split in the left side as if was a sidebar?

xaizek commented 5 years ago

It should be possible to add it as an option. Maybe more than one option, because neovim-vifm plugin has a variable for controlling width of the split.

Pablo1107 commented 5 years ago

Nice, how can this be implemented?

xaizek commented 5 years ago

I would imagine that conditionally changing these :enew https://github.com/vifm/vifm.vim/blob/abf765c83f3d00c50d4fefac4bc8f869cff9aec0/plugin/vifm.vim#L95-L97 https://github.com/vifm/vifm.vim/blob/abf765c83f3d00c50d4fefac4bc8f869cff9aec0/plugin/vifm.vim#L124-L126 to :vnew like in neovim-vifm (here) would be a start. Also these lines (also two times):

buffer #
silent! bdelete! #

would need to close the window instead of switching to previous buffer.

rbong commented 5 years ago

This will be added by #22. You can open in a vertical split that's 40 columns wide with :vertical 40Vifm if g:vifm_embed_term is enabled or if you're using neovim.

xaizek commented 5 years ago

g:vifm_embed_split also needs to be enabled. And for opening on the left side regardless of Vim's options it should be:

:leftabove vertical 40Vifm
xaizek commented 5 years ago

Should work now as per comments above.