I had an issue. Using the clear or cls command in powershell clears only the visible portion of the terminal,I would like to know how to clear the entire terminal?
I use VSCode by the way.
To also clear the scrollback buffer , not just the visible portion of the terminal in Visual Studio Code's integrated terminal , use one of the following methods:
Use the command palette :
tclear
to match the Terminal: Clear
command and press EnterUse the integrated terminal's context menu :
Clear
from the context menu.terminal.integrated.rightClickBehavior
to either default
or selectWord
(the latter selects the word under the cursor before showing the context menu).Use a keybord shortcut from inside the integrated terminal:
keybindings.json
(command Preferences: Open Keyboard Shortcuts File
from the command palette):{
"key": "ctrl+k", // on macOS, alternatively use "cmd+k"
"command": "workbench.action.terminal.clear",
"when": "terminalFocus" // To avoid conflicts with Ctrl+K *chords* elsewhere
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.