vifm / vifm.vim

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

Deciding how to open files from within vifm #1

Closed rosshadden closed 9 years ago

rosshadden commented 9 years ago

Often I browse to a file before I know whether I want to open said file in a buffer, tab, split, etc. In such things like unite and ctrlp this workflow is supported. While it is not currently possible in vifm.vim, I think it would be a great addition if possible.

I'm not really sure how it would work. It looks like you're saving selected file names into vimfiles, via vifm -f, and then immediately opening them upon returning to vim, which doesn't really facilitate the kind of workflow I am proposing.

If vifm.vim launches vifm with a custom config file, I suppose it could bind some key combinations to "open in tab", "open in vsplit", etc. commands, which would execute something slightly different for each one. Or maybe the plugin itself doesn't bind anything, and it's up to the user if they wish to buy into this.

xaizek commented 9 years ago

Not sure about shortcuts (no obvious candidates that won't clash with something else in most configurations), but we can start with commands named like related vifm.vim commands:

Using custom config file can be the way to go, I only note that it should be an additional one to what user has instead of a replacement for it.

In this case vifm.vim command defines default way of opening files and those vifm commands override that default.

Thanks, this should be nice addition, I'll look into this.

rosshadden commented 9 years ago

@xaizek This works perfectly, thanks so much! I will be relying much more heavily on vifm.vim now that you have added all this.

Thanks for the shoutout in the changelog/docs too.