-
Notifications
You must be signed in to change notification settings - Fork 29.5k
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
Enable use of snippet variables in workbench.action.terminal.sendSequence #66337
Comments
@alexr00 any tips on leveraging task code to resolve this? |
Let me make sure I understand the request:
Is all that correct? If so, I think this can be accomplished with tasks in insiders. There is now a third You might need to make your task |
@alexr00 the The example keybinding: { "key": "ctrl+shift+t",
"command": "workbench.action.terminal.sendSequence",
"args": { "text": ". ${file}" } Could be used to 'source' (run) the active file in the active terminal. I mainly wanted to code pointer to where this variable resolution happens in tasks and/or debug so that a contributor could put a PR together and share the code. |
@Tyriar I think we need to handle |
@njkevlani you'll probably need to call this And yes in the code for the sendSequence action. |
@fbehrens you wanna work over this or can I take it? |
@njkevlani Great ! You can take it. |
This is a fairly simple task, and to implements this, I need to resolve (variables like ${file}, etc) the I have a question, To resolve a How do I instantiate or pass such object to ping @Tyriar |
@njkevlani you can use our dependency injection system like in this command: |
That works for classes which extend Probably It is because how the |
@njkevlani I think you should be able to convert it to an |
@Tyriar I thought exactly the same!! But could not find an example of an |
@njkevlani ah I see, I guess that's why it's a Looks like a |
It's working!! Should auto completion be implemented? If yes, how do we kick in auto suggestions in |
@njkevlani great! I've never done that before so I'm not sure, also not sure if we support doing that in other keybindings (in which case it'd be a bunch of work). Let's do a PR without it to start with 😃 |
Works like a charm in I have another edge case question concerning the feature, more about haw the task variables are resolved. Don't expect an answer, and hope it is OK to ask here. On Windows |
Hi :)
I would love to be able to use task variables to send snippets of code to my terminal.
I am developing all the time interactively with editing a file and fiddling in a REPL (in integrated Terminal) alongside, where I have my environment loaded. I edit a function, I load the file from the REPL, and then test it interactively.
The difference to
Tasks
is that I have state in the REPL. This then can be used for different languages with a simple configuration.I have written a Sublime Plugin for this feature,
and I will write a Extension, according to your response.
Thanks for reading, and keep up the good work
The text was updated successfully, but these errors were encountered: