目的 :

VS Code 清空控制台 快捷键,ctrl+k, clear terminal。

操作:

一、进入设置:

方法一:

首先按住Ctrl+Shift+P组合按钮打开设置窗口,输入>open keyboard Shortcuts 会发现有两个选项,对应两种方法。
在这里插入图片描述

方法二:

英文:file—》 preferences ----》 Settings 或者 Keyboard Shortcuts
中文: 文件 首选项 设置,或者键盘快捷键设置
在这里插入图片描述

二、设置

2.1 快捷键配置

方法一中,选择open keyboard Shortcuts ,会进入快捷键配置
方法二中,选择keyboard Shortcuts (快捷键) 都会进入快捷键配置
在搜索框输入clear 双击ctrl+k 位置(未设置的显示default或其他)
在这里插入图片描述
弹出框会实时监听你的键盘,按想要的键即可,我的是ctrl+k 然后保存即可。
在这里插入图片描述

2.2 jsonSetting

方法一中,选择open keyboard Shortcuts(JSON)
方法二中,选择Setting 在弹出页面键入clear 点击 open keyboard Shortcuts JSON
在这里插入图片描述
在弹出页面在json文件最后,或者查询一下是否已经存在想要的设置。

{
"key": "ctrl+k",
"command": "workbench.action.terminal.clear",
"when": "terminalFocus"
}

填入json格式配置,ctrl+s保存即可
在这里插入图片描述

使用

如我的控台空 有很多的log 信息,当我点击控台面板,按ctrl+k 即清空。
在这里插入图片描述
在这里插入图片描述

结尾

码字不易,如有帮助 点个赞再走呗~~

GitHub 加速计划 / term / terminal
94.53 K
8.17 K
下载
The new Windows Terminal and the original Windows console host, all in the same place!
最近提交(Master分支:1 个月前 )
8d3f12b1 I wrote a big comment next to the changes I made. This is a redo of #17961 which had various issues. Closes #17916 Closes #18070 ## Validation Steps Performed * Pressing Enter within the input line doesn't crash ✅ * Type "Cour" and pick Courier New, press Save = Saved ✅ * Pick any other font from the dropdown, press Save = Saved ✅ * Picking an option dismisses focus but not to the tab row ✅ * The first time after launching the SUI, when the setting is still unmodified, when you focus the box and pick an option, it'll unfocus the box ✅ * When the setting is unmodified, and you pick the default (Cascadia Mono), it'll still unfocus the box ✅ 11 小时前
b58aa26e Closes #17752 1 天前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐