个人 VSCode 编辑器 代码助手工具
参考
扩展中心 - mmmhaha85
扩展中心 - 插件地址
支持功能
快捷键
详情
见 插件"package.json"里的"contributes.keybindings" 配置项
列表
快捷键 |
功能 |
何时 |
vscode.command |
vscode.when |
Cmd + Shift + T |
切换命令行窗口 |
任何时候 |
workbench.action.terminal.toggleTerminal |
|
Cmd + Shift + L |
格式化代码 |
编辑器当前文档配置了格式化工具 && 编辑器文本获得焦点 && 当前文件非只读 && !inCompositeEditor(感觉是不在复合编辑器里,比如打开图片时的编辑器) |
editor.action.formatDocument |
editorHasDocumentFormattingProvider && editorTextFocus && !editorReadonly && !inCompositeEditor |
Cmd + [ |
向前一位置查找 |
可以导航的情况下 |
workbench.action.navigateBack |
canNavigateBack |
Cmd + ] |
向后一位置查找 |
可以导航的情况下 |
workbench.action.navigateForward |
canNavigateForward |
Cmd + Shift + [ |
全部折叠 |
编辑器聚焦 && 可以折叠 |
editor.foldAll |
editorTextFocus && foldingEnabled |
Cmd + Shift + ] |
全部展开 |
编辑器聚焦 && 可以折叠 |
editor.unfoldAll |
editorTextFocus && foldingEnabled |
Cmd + Option(Alt) + [ |
折叠 |
编辑器聚焦 && 可以折叠 |
editor.fold |
editorTextFocus && foldingEnabled |
Cmd + Option(Alt) + ] |
折叠 |
编辑器聚焦 && 可以折叠 |
editor.fold |
editorTextFocus && foldingEnabled |
Cmd + Backspace |
在单词里时删除一个单词 |
任何时候 |
deleteInsideWord |
|
Cmd + T |
新建一个命令行窗口 |
命令行聚焦 && 命令行窗口支持 |
workbench.action.terminal.new |
terminalFocus && terminalProcessSupported || terminalWebExtensionContributedProfile |
Cmd + D |
删除一行 |
编辑器聚焦 && 当前文件非只读 |
editor.action.deleteLines |
textInputFocus && !editorReadonly |
Cmd + D |
命令行窗口分割 |
命令行聚焦 && 命令行窗口支持 |
workbench.action.terminal.split |
terminalFocus && terminalProcessSupported || terminalFocus && terminalWebExtensionContributedProfile |
Cmd + W |
关闭当前命令行窗口 |
命令行聚焦 && 命令行窗口支持 |
workbench.action.terminal.kill |
terminalFocus && terminalProcessSupported || terminalFocus && terminalWebExtensionContributedProfile |
Cmd + Shift + C |
拷贝文件相对路径 |
编辑器窗口支持 |
copyRelativeFilePath |
|
调试
F5,打开新窗口进行调试
发布
参考
安装依赖
yarn
安装vsce
npm install -g @vscode/vsce
打包插件
vsce package
发布插件
vsce publish
待深入探讨
要点
参考
调用系统命令写一个组件(主要使用watchFileChange)。
要点
- 使用workspace.createFileSystemWatcher组件
参考
| |