Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to open vifm default vifm file opening behavior instead of always 'edit' #87

Open
fab4100 opened this issue Mar 2, 2023 · 2 comments

Comments

@fab4100
Copy link

fab4100 commented Mar 2, 2023

Sometime I need to browse the local neighborhood of the file I am editing and using vifm is convenient but can be cumbersome to quickly open a file and close it again due to the default 'edit' in the hosting vim behavior.

Is it possible to open vifm inside vim where I could just hit enter on, say, a pdf file for example and that would open in the default pdf viewer instead of opening the binary pdf file in a vim buffer? I can use :file inside vifm but it adds additional overhead for this typically quick type of file browsing. Same for text files, these would open in the vifm session (which is nested in vim) instead of open in a buffer of the hosting vim instance.

Thanks a lot!

@xaizek
Copy link
Member

xaizek commented Mar 2, 2023

When Vifm is run with --choose-files, default behaviour is overwritten and isn't directly accessible. However, since you want to use the plugin to not use it, maybe just run (wrapped in come custom :command or a mapping):

:term ++close vifm --select %:p

In principle, this plugin could provide a way to do this as well, but currently it doesn't.

@fab4100
Copy link
Author

fab4100 commented Mar 2, 2023

Makes sense. Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants