-
Notifications
You must be signed in to change notification settings - Fork 78
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
[Feature request] Enhance the --opener option to pass a function #259
Comments
Passing a function would be not a sensible choice. It was denied by myself at the begining of implementation of command! MyEdit -nargs=1 .... |
Thank you for your suggestion. Defining a command is a very good solution. Here is the one I created to insert the relative path of the file selected in Ranger:
Then, I can use
The path of the selected file is correctly inserted at the position of the cursor, but the selected file is also opened. It seems to be related to those lines in the |
The problem lies in this line, but I don't have any good solutions for this. vim-floaterm/autoload/floaterm/util.vim Line 45 in 3610b8a
Do you have some ideas? |
A possible solution could be to process
|
Thanks. I've fixed it. |
@voldikss What if one wants to use the custom opener passed as argument to the |
It's expected. We must use 'edit' after 'vsplit'(for example). Otherwise there will be a lot of splitting windows |
But the files being selected could be anything, not just text files. In my personal use case I'm trying to write a command that checks what kind of file I'm trying to open, and then opens it accordingly. For example I could have selected 3 files: a text file, a pdf and an image. Even if I implemented a custom opener that does what I need, only the first file I select will be opened with that custom opener. The other two will always be opened in neovim. Could it be possible to pass all the selected files to that |
Sense reasonable. However if the I could not come up with an idea how to do that elegantly... Sorry for... PR is welcomed and I don't have much time for now. |
Use |
Describe your feature request
Could you please enhance the
--opener
option so that we can set a Vim function?It would be a generic way to do any operation on the selected files. On my end, my goal is to use the ranger plugin to insert the path of the selected file to the edited buffer at the current cursor position.
The text was updated successfully, but these errors were encountered: