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

Passing command-line arguments, when running whole file like :%SnipRun {args} #97

Closed
DipeshChouhan opened this issue Sep 17, 2021 · 3 comments · Fixed by #98
Closed

Comments

@DipeshChouhan
Copy link

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

@michaelb
Copy link
Owner

Hmm i'll have to think about that

There is surely a way to capture arguments from the vim command line and pass them to the final script/executable but:

  • may be a bit clunky to use. I mean typing ":%SnipRun arg1 arg2 arg3" each time you want to test something?

  • relative path (as CLI argument) will be an issue, because sniprun runs in its own location. This won't change but maybe we can hack around with symlinks and stuff

@DipeshChouhan
Copy link
Author

Is it possible to toggle the feature on or off. If on then only it will ask for arguments.

@michaelb
Copy link
Owner

Is it possible to toggle the feature on or off. If on then only it will ask for arguments.

I don't think it is necessary: you'd think when there is no arguments after the SnipRun command, then, no args. Otherwise, copy the extra arguments from the neovim command to the (ex in python) python main.py command sniprun launches

Or maybe I don't understand what you mean by 'ask for argument'

Your feature request is quite feasible and a good suggestion, though I'll need some time to work on implementation details and making the thing work, especially when the argument is a relative path

Anyway, the more we discuss here, the clearer your request will be :-)

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

Successfully merging a pull request may close this issue.

2 participants