-
-
Notifications
You must be signed in to change notification settings - Fork 176
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
Pass current file name to TermExec #12
Comments
@oscarprabhakar when you say pass the path do you mean set the path of the terminal to that of the current buffer? in which case I'm working on that in #11 if not then can you clarify what you mean |
No. I mean I would like to execute a shell command on the current file for which I would need the relative path of the file in the current buffer. I could of course use toggleterm to open a new terminal and enter the command there and switch back, but it would be cool to do it in one command using the % register like so: For e.g. to run unit tests in the current file I would like to run This works: |
hmm I think you can do this on the commandline in vim without it needed to be built into the plugin tbh something like |
Alright. I guess I could easily put this into a mapping. I just thought there might have been an easier way to integrate this in the plugin as I see it supported in other plugins. I'm not familiar with Vim script or Lua or I would have offered to make a PR. Thanks for checking though :-) |
@oscarprabhakar I'd accept a PR that implemented this but, it would involve having to add logic to parse each term exec command looking for a |
Yeah, I totally understand. Out of curiosity I checked the vim-floaterm plugin I mentioned earlier. It does indeed look like there is special handling of command line parameters, and it goes beyond the % register. See here I have closed the issue. Thanks for your time. |
Is there. a way to pass the path of the current buffer (%) to the TermExec function like you can with the :terminal command?
The text was updated successfully, but these errors were encountered: