-
Notifications
You must be signed in to change notification settings - Fork 19
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
relative path and non-existant file to Vifm gives error #12
Comments
Actually, this part looks like a bug. Both kinds of paths should be treated identically, in this case give an error. Argument should be a directory, why are you trying to pass path to a file? |
When a file is passed to Vifm the file opens in vim, is this not intended? I have replaced :e and :vs built-in vim commands with the Vifm equivalents. Does not the built-in :e(dit) handle file paths? Vifm - or is it Vifm.vim - should too. If i had to pick between the two behaviors when a file is not found, I would choose the one where Vifm opens the parent directory of the supposed file. Versus giving an error message. What is your opinion xaizek? The docs says that file or files is part of the argument. Should it not mention directories as well?
|
That's description of a command, not its arguments. Arguments are specified below:
It is intended, but when file exists and therefore user probably meant just that.
Not necessarily. The reason why it errors is because when file doesn't exist, you might have made a typo. And if vifm won't fail, user might proceed doing something else without noticing that he's in the wrong directory.
That doesn't seem optimal. Instead of Vim just opening a file, it runs vifm, which returns path and only then Vim opens it. An external process is spawn for no reason. Just to avoid this, it seems to make sense to invoke the plugin only when directory/directories or no arguments are passed. This way you also won't break use of wildcards in arguments for |
When calling Vifm with a relative path and a non-existant file like so:
Vim spits out the error:
On the other hand, when using an absolute path the behavior is much better, Vifm starts and opens the folder.
Thanks
The text was updated successfully, but these errors were encountered: