vifm / neovim-vifm

A neovim plugin to use vifm like netrw and NERDTree.
Other
47 stars 2 forks source link

Consider "single pane" mode for vifm within neovim #4

Closed vlcinsky closed 7 years ago

vlcinsky commented 7 years ago

neovim is naturally working very well in single pane mode.

netrw is working in single pane mode only.

vifm excells in single pane mode as one can use registers to copy, paste files etc.

Currently the plugin starts vifm within neovim in dual pane mode mostly (without editing .vifm/vifmrc file it opens dual pane). Especially with :Vifm . the dual pane clutters the space and I found myself all the time switching to single pane.

My current workaround will be to keep within my ~.vifm/vifmrc file a line :only to open always in single pane.

For those who like dual pane outside of neovim and single pane in neovim would be an improvement any of:

vlcinsky commented 7 years ago

vifm can be started in single pane mode by:

$ vifm -c ":only"
rbong commented 7 years ago

I always keep it in single-pane mode so I never thought of it. It's definitely intended to be used in single-pane mode.

I have problems with each of the solutions:

This will not work for the people who would like to open it in :split mode, which also works

I would not like to start adding specific options for startup options. Instead I'd like to make it more general so people can enter any options. I'd like to add a configuration file, but vifm already uses rc files. I had to look it up, but vifm provides an external way to define the path to the rc file, which is setting the $MYVIFMRC environment variable.

So my recommended way to do this is: 1) Set let $MYVIFMRC="/path/to/custom/vifmrc" inside of your neovimrc file 2) Put source /path/to/original/vifmrc in the custom vifmrc file 3) Put any commands (only) below that line that you wish to run at startup

I have added this to the documentation.

If this is not sufficient, please feel free to reopen, but I think this should work for most normal workflows.

vlcinsky commented 7 years ago

@rbong Thanks.

Recently I had to do a few steps back regarding vifm:

rbong commented 7 years ago

I can understand that. I often use cw to change file names in vifm, and from there it gets confusing. It would be nice to have closer integration. I will put some thought into this.