Open bumbummen99 opened 5 years ago
Maybe we accidentally stopped contributing that command at some point 🤔
@fabiospampinato Maybe, sadly i don't have the experience in vs-code extension development to prove that this is in fact the issue. Does it work on your end?
I want to use this extension in order to hotkey my 'tail error.log' as i got sick of scrolling trough the command history and without the command the user still has to select the terminal he wants to run.
I just checked this and the terminals.runTerminalByName
command is working fine for me 🤷♂
How are you triggering it? Can you share your settings for doing it and your vscode-terminals settings, including the terminals.json
file?
Well, first i have installed vscode-terminals, then i have added this to my keybindings.json. This is also where i receive the warning that the command is not available.
{
"key": "shift+alt+t",
"command": "terminals.runTerminal",
"args": {
"TailApache2": ""
}
}
In addition to that i have also defined the terminal in my settings.json. When i define it in the terminals.json it will not recognize my terminals.
{
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"git.enableSmartCommit": true,
"telemetry.enableTelemetry": false,
"telemetry.enableCrashReporter": false,
"terminals.configPath": "~/.config/Code/User/terminals.json",
"terminals.showCommands": true,
"terminals.autorun": true,
"terminals.terminals": [
{
"name": "TailApache2",
"description": "This will open an console which tails the apache2 error.log file",
"command": "tail -f -n 50 /var/log/apache2/error.log"
}
]
}
This doesn't look right:
{
"key": "shift+alt+t",
"command": "terminals.runTerminal",
"args": {
"TailApache2": ""
}
}
Try this:
{
"key": "shift+alt+t",
"command": "terminals.runTerminalByName",
"args": ["TailApache2"]
}
I have corrected it but i am still facing the same issue: I have disabled all extensions except terminals but it seems like it is still not able to either find or register the command.
Now I can reproduce this, I'm not sure why this is happening, it looks like a VSCode bug to me 🤔
Same issue with other tools.
Relevant, probably a better place to post.
There are 2 total errors in VSC, for macros and multiCommand keybindings. The vs-external-tools binding has no error but it does not work. Binding different keys and super simple settings, no change. Alt-D triggers Debug menu. This should override that.
[
{ "key": "F5", "command": "macros.homeEnd" },
{ "key": "alt+d", "command": "vs-external-tools.externalCommand5" },
{ "key": "alt+g", "command": "multiCommand.homeEndMC" },
{ "key": "alt+left","command":"editsHistory.moveCursorToPreviousEditInSameFile" },
{ "key": "alt+right","command":"editsHistory.moveCursorToNextEditInSameFile" },
{ "key": "ctrl+alt+`", "command": "workbench.action.terminal.toggleTerminal" },
{ "key": "ctrl+`", "command": "-workbench.action.terminal.toggleTerminal" },
{ "key": "ctrl+2", "command": "-workbench.action.focusSecondEditorGroup" },
]
No issues in settings.
"macros.list": {
"homeEnd": [
"cursorHome",
{
"command": "$delay",
"args": { "delay": 1500 }
},
"cursorEnd",
{
"command": "$delay",
"args": { "delay": 1500 }
},
"cursorHome",
{
"command": "$delay",
"args": { "delay": 1500 }
},
"cursorEnd"
]
},
"vs-external-tools.externalCommand5.command": "editor.action.cursorEnd",
"multiCommand.commands": [ {
"command": "homeEndMC",
"sequence": [
{ "command": "workbench.action.cursorHome" },
{ "command": "workbench.action.cursorEnd" }
]
}],
Also tried several other variants of macros extensions, all fail with same issue. And I removed almost all the other addons, for testing.
Maybe Sublime has better bugs.
You can safely ignore these warnings in keybindings.json
, but still, extension itself doesn't runTerminalByName
. Oof.
same issue
It's possible this is no longer an issue. I can successfully run this command in my keybindings in VSCode v1.80.1 and Terminals Manager v1.15.0
The command 'terminals.runTerminalByName' does not work when i try to use it in my keybindings.json. After setting the command to 'terminals.runTerminalByName' the keybind stopped working, in addition VS Code does complain about the command with the following message:
As you can see it is not included in the list of available commands, the extension only provides the following commands:
"terminals.editConfig", "-terminals.editConfig", "terminals.kill", "-terminals.kill", "terminals.runTerminals", "-terminals.runTerminals", "terminals.runTerminal", "-terminals.runTerminal"