Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can you toggle comments with VSCode in Linux?

I've usually used Sublime Text for editing JavaScript files, there I can toggle comments with Ctrl+Shift+7|/.

Now I'm trying VSCode, which is a great project. But I failed in toggling comments per shortcut. The documentation says: Ctrl+K and the like, but this did not work.

Any suggestions?


I'm using Ubuntu 14 with Gnome.

like image 574
BairDev Avatar asked Aug 28 '15 14:08

BairDev


2 Answers

Tipp: Press F1 and type the name of the command you are looking for - it will show the keybinding. Bonus: https://code.visualstudio.com/Docs/editor/keybindings explains many shortcuts and how to customise them.

like image 150
Johannes Rieken Avatar answered Oct 12 '22 23:10

Johannes Rieken


CTRL+K then CTRL+C to comment and CTRL+K then CTRL+U to uncomment. Works for Gnu/Linux Ubuntu 12.04 LTS Gnome...

like image 3
GJSmith3rd Avatar answered Oct 12 '22 21:10

GJSmith3rd