Use Ctrl+K. This goes clean your console in Visual Studio Code.
Per comments, in later versions of VSCode (1.29 and above) this shortcut is missing / needs to be created manually.
- Navigate:
File>Preferences>Keyboard Shortcuts - search for
workbench.action.terminal.clear - If it has no mapping or you wish to change the mapping, continue; otherwise note & use the existing mapping
- Double click on this entry & you'll be prompted for a key binding. Hold
CTRLand tapK.Ctrl + Kshould now be listed. Press enter to save this mapping - Right click the entry and select
Change when expression. TypeterminalFocusthen press enter. - That's it. Now, when the terminal is in focus and you press Ctrl+K you'll get the behaviour you'd have expected to get from running
clear/cls.
Tags:
vs code