DEV Community

Discussion on: My VSCode shortcuts, settings, and extensions for productivity.

Collapse
 
labibllaca profile image
labibllaca

A really good article here Mark, thank you.
Is it possible to add more commands in the keybindings.json file like the snippet below?

...
{
"key":"altGr+/",
"command":"openTerminal + whoamI"
}

Additionally i dont know hows the right name of the right alt-key :D

Collapse
 
macmacky profile image
Mark Abeto • Edited

Thanks, I appreciate that you like it. Of course, you can add as much as you like but remember that your new command must have a different key binding not included in the default keybinding settings CTRL+K CTRK+S.

Collapse
 
labibllaca profile image
labibllaca

All right thank you. Is it possible to apply 2 commands with a shortcut though ?

Thread Thread
 
macmacky profile image
Mark Abeto

Hi! Ok, I tried using one key binding for two commands.

Sample.json

So, when I pressed CTRL+B the toggle sidebar command works but the toggle terminal does not. Basically, It prioritizes the last command you put in your settings.

Thread Thread
 
labibllaca profile image
labibllaca

Hi Mark thanks for your response. All right I got it.
What I was looked for isn't possible in vs code apparantly.
I was hoping with a shortcut to open the terminal and then to apply an command on the terminal.
Like an combination of to shortcut into one.

Have a great day.

Thread Thread
 
macmacky profile image
Mark Abeto • Edited

😃 That's some advanced shit man! Maybe the VSCode devs will apply that in the future just wait. Have a Nice Day too!

Thread Thread
 
labibllaca profile image
labibllaca

hehehehe I see....maybe there is a workaround I need to find. Something like linux in its terminal has where more commands could be executed from one line devided by a semicolon.

Greeting,
Labi

Thread Thread
 
macmacky profile image
Mark Abeto

Ok, If I find some workarounds about the problem that you want to solve I will tell you about it but for now Good Luck Labi!.

Thread Thread
 
labibllaca profile image
labibllaca • Edited

Yeah, thanks for man. Same here, if I find something usefull I'd share it here too.