hbuilderX uni-app 自定义快捷键无效、无法生效解决方法(附:好用的常用的快捷键自定义代码片段)

 在最后加上

,"override": true

才能让原有默认的快捷键被覆盖 


好用的常用的快捷键自定义代码片段

[
	//打开快捷键设置
	{
		"key": "alt+shift+k",
		"command": "workbench.action.openGlobalKeybindings",
		"override": true
	},
	//查找索引符号
	{
		"key": "ctrl+shift+a",
		"command": "actions.quickFind",
		"override": true
	},
	//置焦到项目管理器
	{
		"key": "ctrl+shift+e",
		"command": "workbench.view.explorer",
		"override": true
	},
	//复制标签卡到分栏
	{
		"key": "ctrl+\\",
		"command": "workbench.action.copyEditor",
		"override": true
	},
	//清空控制台
	{
		"key": "ctrl+l",
		"command": "workbench.console.action.clearLog",
		"override": true
	},
	{
		"key": "ctrl+shift+j",
		"command": "editor.action.joinLines",
		"override": true
	},
	{
		"key": "shift+alt+x",
		"command": "workbench.files.action.collapseExplorerFolders",
		"override": true
	},
	{
		"key": "alt+s",
		"command": "workbench.action.toggleAutoSave",
		"override": true
	},
	{
		"key": "shift+alt+w",
		"command": "workbench.action.closeOtherEditors",
		"override": true
	},
	{
		"key": "shift+alt+oem_6",
		"command": "workbench.action.closeEditorsToTheRight",
		"override": true
	},
	{
		"key": "shift+alt+oem_4",
		"command": "workbench.action.closeEditorsToTheLeft",
		"override": true
	},
	{
		"key": "ctrl+shift+pagedown",
		"command": "-workbench.action.moveEditorRightInGroup",
		"override": true
	},
	{
		"key": "ctrl+shift+pagedown",
		"command": "workbench.action.moveEditorRightInGroup",
		"override": true
	},
	{
		"key": "ctrl+numpad0",
		"command": "editor.action.fontZoomReset",
		"override": true
	},
	{
		"key": "alt+e",
		"command": "workbench.action.switchWindow",
		"override": true
	},
	{
		"key": "alt+insert",
		"command": "explorer.newFile",
		"override": true
	},
	{
		"key": "shift+alt+insert",
		"command": "explorer.newFolder",
		"override": true
	},
	{
		"key": "alt+enter",
		"command": "editor.action.quickFix",
		"when": "editorHasCodeActionsProvider && editorTextFocus && !editorReadonly",
		"override": true
	},
	{
		"key": "ctrl+oem_period",
		"command": "-editor.action.quickFix",
		"when": "editorHasCodeActionsProvider && editorTextFocus && !editorReadonly",
		"override": true
	},
	{
		"key": "ctrl+shift+oem_3",
		"command": "-workbench.action.terminal.new",
		"when": "terminalProcessSupported",
		"override": true
	},
	{
		"key": "shift+alt+z",
		"command": "workbench.action.terminal.newInActiveWorkspace",
		"override": true
	},
	{
		"key": "ctrl+l",
		"command": "workbench.action.terminal.clear",
		"override": true
	},
	{
		"key": "ctrl+alt+k",
		"command": "workbench.action.openGlobalKeybindings",
		"override": true
	},
	{
		"key": "ctrl+shift+f",
		"command": "-vueBeautify.format",
		"when": "editorTextFocus && editorTextFocus && !editorReadonly && resourceLangId == 'vue'",
		"override": true
	},
	{
		"key": "alt+m",
		"command": "editor.action.toggleMinimap",
		"override": true
	},
	{
		"key": "alt+n",
		"command": "npm.focus",
		"override": true
	},
	{
		"key": "shift shift",
		"command": "workbench.action.gotoSymbol",
		"override": true
	},
	{
		"key": "ctrl+shift+o",
		"command": "-workbench.action.gotoSymbol",
		"override": true
	},
	{
		"key": "shift+alt+l",
		"command": "editor.action.transformToLowercase",
		"override": true
	},
	{
		"key": "shift+alt+u",
		"command": "editor.action.transformToUppercase",
		"override": true
	},
	{
		"key": "alt+u",
		"command": "editor.action.transformToTitlecase",
		"override": true
	},
	{
		"key": "alt+numpad_add",
		"command": "workbench.action.increaseViewSize",
		"override": true
	},
	{
		"key": "alt+pagedown",
		"command": "workbench.action.terminal.resizePaneDown",
		"override": true
	},
	{
		"key": "alt+numpad_subtract",
		"command": "workbench.action.decreaseViewSize",
		"override": true
	},
	{
		"key": "alt+numpad0",
		"command": "workbench.action.evenEditorWidths",
		"override": true
	},
	{
		"key": "alt+pageup",
		"command": "workbench.action.terminal.resizePaneUp",
		"override": true
	},
	{
		"key": "ctrl+alt+s",
		"command": "extension.autoScssStruct",
		"override": true
	},
	{
		"key": "alt+b",
		"command": "workbench.action.toggleStatusbarVisibility",
		"override": true
	},
	{
		"key": "shift+alt+k",
		"command": "workbench.action.openGlobalKeybindingsFile",
		"override": true
	},
	{
		"key": "alt+f",
		"command": "workbench.action.toggleZenMode",
		"override": true
	},
	{
		"key": "alt+q",
		"command": "workbench.action.toggleActivityBarVisibility",
		"override": true
	},
	{
		"key": "alt+oem_5",
		"command": "workbench.action.splitEditorDown",
		"override": true
	},
	{
		"key": "alt+g",
		"command": "git.checkout",
		"override": true
	},
	{
		"key": "ctrl+alt+r",
		"command": "workbench.files.action.refreshFilesExplorer",
		"override": true
	},
	{
		"key": "alt+r",
		"command": "workbench.action.tasks.runTask",
		"override": true
	},
	{
		"key": "alt+c",
		"command": "-extension.switchCSS",
		"override": true
	},
	{
		"key": "alt+c",
		"command": "extension.switchCSS",
		"override": true
	},
	{
		"key": "alt+x",
		"command": "extension.cssremNaNpx-switch-px",
		"override": true
	},
	{
		"key": "alt+z",
		"command": "-extension.cssremNaNpx-switch-px",
		"override": true
	},
	//转到Page.json(在uni-app的page页面可快速转到Page.json里对应的节点)
	{
		"key": "ctrl+shift+p",
		"command": "workbench.action.openPageJsonFile"
	},
	//在项目管理器中追踪/不追踪当前文件位置
	{
		"key": "ctrl+alt+f",
		"command": "editor.action.revealInProjectExplorer"
	}
]

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值