最近从Sublime3换到VScode,总结一下快捷键。官方地址:https://code.visualstudio.com...简单配置{"files.autoSave":"off",//禁用自动保存"workbench.iconTheme":"vs-minimal","explorer.autoReveal":false,//禁止Explorer在打开文件时自动显示和选择它们,类似于禁用Eclipse的链接编辑器"workbench.editor.enablePreviewFromQuickOpen":false,//对Ctrl+P页面打开的文件使用新标签,而不是替换原来的标签existing"workbench.editor.enablePreview":false//让鼠标左键打开的文件使用新的标签页,而不是替换现有的标签页}1.通用Ctrl+Shif+P,F1打开命令面板Ctrl+P快速打开Ctrl+Shift+N打开一个新的实例窗口Ctrl+Shift+W关闭窗口实例2,基本编辑Ctrl+X剪切Ctrl+C复制Alt+向下/向上移动行shift+Alt+向上/向下复制行Ctrl+Shift+K删除行,改为Ctrl+DCtrl+(Shift)+回车插入行Ctrl+Shift+跳转到匹配的括号Ctrl+[/]行缩进Ctrl+Shift+[/]代码折叠Ctrl+/行注释,Shift+Alt+A块注释,改为Ctrl+shif+/Alt+Z是否换行(wordwrap)Ctrl+空格键智能提示,改为Alt+/Ctrl+Shift+Space参数提示,Tab自动-完成Ctrl+KCtrl+I显示悬停(类似鼠标悬停悬停,一般用于触发提示)Shift+Alt+F格式化文档(改为Ctrl+Shift+F),Ctrl+KCtrl+F格式化选中代码F12跳转definition,Alt+F12查看定义,改成F3,Alt+F3Ctrl+KF12打开边上的定义Ctrl+.快速修复Shift+F12显示引用F2重命名变量Ctrl+KM更改文件语言类型3.导航Ctrl+T显示所有变量、函数名等#Ctrl+G跳转到行Ctrl+P打开文件Ctrl+Shift+O跳转到变量、函数等@Ctrl+Shift+M显示终端、错误等.程序面板F8跳转到下一个错误或警告,改成Ctrl+,Shift+F8跳转到上一个错误或警告,改成ctrl+shift+,Ctrl+Shift+Tab切换编辑器,我改的到Ctrl+EAlt+左/右前进/Ctrl+M后,切换标签焦点4.搜索替换Ctrl+F,Ctrl+H,F3/SHIft+F3Alt+Enter选择所有匹配的搜索5.多光标,选择,多行编辑Ctrl+I选择当前行Alt+点击插入多个光标Ctrl+Alt+Up/Down插入多个光标,改为Ctrl+Shift+Alt+Up/DownCtrl+U撤销上次光标操作Shift+Alt+I在所有选中行的末尾插入光标Ctrl+Shift+L,Ctrl+F2可以选中所有与当前选中或单词同名的中文单词。重构重命名的时候非常方便。Shift+Alt+左/右缩小和扩大选择块。Shift+Alt+方向键栏目选择Ctrl+Shift+Alt+PgUp/PgDown栏目页面选择6、编辑器管理Ctrl+W、Ctrl+F4关闭当前编辑器、Ctrl+KCtrl+W关闭所有Ctrl+Shift+T重启打开上次关闭的编辑器Ctrl+KF关闭目录Ctrl+拆分编辑器Ctrl+1/2/3将编辑器焦点转移到不同的编辑组Ctrl+K(Ctrl+)Left/Right将编辑器焦点转移到左右组Shift+F10显示上下文菜单7.文件管理Ctrl+N新建文件、Ctrl+O打开文件Ctrl+S、Ctrl+Shift+S、Ctrl+KS保存、另存为、全部保存Ctrl+KP复制文件路径Ctrl+KR在资源管理中在编辑器中打开文件Ctrl+KO在新窗口中打开文件8.显示F11全屏Shift+Alt+1改变编辑器布局Ctrl+=/-放大或缩小Ctrl+B切换侧边栏Ctrl+Shift+E专注于资源管理器Ctrl+Shift+F专注于搜索,改为ctrl+alt+fCtrl+Shift+G专注于GitCtrl+Shift+D专注于DebugCtrl+Shift+X专注于扩展Ctrl+Shift+Hreplaceinfiles9,debugF9setbreakpointF5Start/ContinueShift+F5StopF11/Shift+F11stepinto/outF10stepoverCtrl+KCtrl+Ishowhover10,TerminalIntegrationCtrl+`显示集成终端Ctrl+Shift+`创建新终端Ctrl+Shift+C复制选中Ctrl+Shift+V粘贴到终端Ctrl+↑/↓Scrollup/downShift+PgUp/PgDownScrollpageup/downCtrl+Home/EndScrolltotop/bottom针对Window快捷键冲突和Eclipse习惯自定义的部分//keyBindings放到这个文件里覆盖默认值[{"key":"alt+/","command":"editor.action.triggerSuggest","when":"editorHasCompletionItemProvider&&editorTextFocus&&!editorReadonly"},{"key":"ctrl+d","command":"editor.action.deleteLines","when":"editorTextFocus&&!editorReadonly"},{"key":"ctrl+shift+/","command":"editor.action.blockComment","当“:”编辑itorTextFocus&&!editorReadonly"},{"key":"ctrl+shift+f","command":"editor.action.formatDocument","when":"editorHasDocumentFormattingProvider&&editorTextFocus&&!editorReadonly"},{"key":"f3","command":"editor.action.goToDeclaration","when":"editorHasDefinitionProvider&&editorTextFocus&&!isInEmbeddedEditor"},{"key":"alt+f3","command":"editor.action.goToImplementation","when":"editorHasImplementationProvider&&editorTextFocus&&!isInEmbeddedEditor"},{"key":"ctrl+e","command":"workbench.action.openPreviousRecentlyUsedEditorInGroup"},{"key":"ctrl+,","command":"editor.action.marker.next","when":"editorFocus&&!editorReadonly"},{"key":"ctrl+shift+,","command":"editor.action.marker.prev","when":"editorFocus&&!editorReadonly"},{"key":"ctrl+shift+alt+up","command":"编辑or.action.insertCursorAbove","when":"editorTextFocus"},{"key":"ctrl+shift+alt+down","command":"editor.action.insertCursorBelow","when":"editorTextFocus"},{"key":"ctrl+alt+f","command":"search.action.focusActiveEditor","when":"searchInputBoxFocus&&searchViewletVisible"}]
