首页 > 其他分享 >vscode config vim

vscode config vim

时间:2024-07-30 08:57:31浏览次数:11  
标签:&& ctrl vscode when vim command key action config

settings.json

// Place your key bindings in this file to override the defaultsauto[]
[
  // terminal================= 
  // 切换到terminal终端
  {
    "key": "ctrl+,",
    "command": "workbench.action.terminal.toggleTerminal",
    "when": "terminal.active"
  },
  // 打开一个新的terminal
  {
    "key": "ctrl+shift+,",
    "command": "workbench.action.terminal.new",
    "when": "terminalProcessSupported || terminalWebExtensionContributedProfile"
  },
  {
    "key": "alt+j",
    "command": "workbench.action.terminal.focusNext",
    "when": "terminalFocus"
  },
  {
    "key": "alt+k",
    "command": "workbench.action.terminal.focusPrevious",
    "when": "terminalFocus"
  },
  // 切换到文件浏览器,可以在任何位置
  // {
  //   "key": "ctrl+;",
  //   "command": "workbench.view.explorer",
  //   "when": "viewContainer.workbench.view.explorer.enabled"
  // },
  // 切换到代码编辑区,不论在任何位置
  {
    "key": "ctrl+'",
    "command": "workbench.action.focusFirstEditorGroup"
  },
  // 在file tree 和editor区域切换 
  {
    "command": "workbench.action.focusFirstEditorGroup",
    "key": "ctrl+;",
  },
  {
    "command": "workbench.files.action.focusFilesExplorer",
    "key": "ctrl+;",
  },
  {
    "key": "ctrl+shift+j",
    "command": "workbench.action.togglePanel"
  },
  // 在文件夹资源管理器中新建一个文件
  {
    "key": "a",
    "command": "explorer.newFile",
    "when": "filesExplorerFocus && !inputFocus"
  },
  // 在文件资源管理器里面创建一个文件夹
  {
    "key": "shift+a",
    "command": "explorer.newFolder",
    "when": "filesExplorerFocus && !inputFocus"
  },
  // 在文件资源管理器里面重应名当前文件或文件夹
  {
    "key": "r",
    "command": "renameFile",
    "when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
  },
  // 在文件资源管理器中删除文件
  {
    "key": "d",
    "command": "deleteFile",
    "when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceReadonly && !inputFocus"
  },
  // 放大editor区域
  {
    "key": "ctrl+m",
    "command": "workbench.action.maximizeEditorHideSidebar"
  },
  // 使用code runner运行代码
  {
    "key": "ctrl+r",
    "command": "code-runner.run"
  },
  {
    "key": "y",
    "command": "filesExplorer.copy",
    "when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !inputFocus"
  },
  {
    "key": "p",
    "command": "filesExplorer.paste",
    "when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceReadonly && !inputFocus"
  },
  {
    "key": "ctrl+s",
    "command": "workbench.action.files.save"
  },
  {
    "key": "ctrl+/",
    "command": "-workbench.action.terminal.sendSequence",
    "when": "terminalFocus"
  },
  {
    "key": "ctrl+/",
    "command": "editor.action.commentLine",
    "when": "editorTextFocus && !editorReadonly"
  },
  {
    "key": "cmd+/",
    "command": "-editor.action.commentLine",
    "when": "editorTextFocus && !editorReadonly"
  },
  {
    "key": "ctrl+p",
    "command": "-extension.vim_ctrl+p",
    "when": "editorTextFocus && vim.active && vim.use<C-p> && !inDebugRepl || vim.active && vim.use<C-p> && !inDebugRepl && vim.mode == 'CommandlineInProgress' || vim.active && vim.use<C-p> && !inDebugRepl && vim.mode == 'SearchInProgressMode'"
  },
  {
    "key": "ctrl+h",
    "command": "editor.action.startFindReplaceAction",
    "when": "editorFocus || editorIsOpen"
  }
]

keybingdings.json

// Place your key bindings in this file to override the defaultsauto[]
[
  // terminal================= 
  // 切换到terminal终端
  {
    "key": "ctrl+,",
    "command": "workbench.action.terminal.toggleTerminal",
    "when": "terminal.active"
  },
  // 打开一个新的terminal
  {
    "key": "ctrl+shift+,",
    "command": "workbench.action.terminal.new",
    "when": "terminalProcessSupported || terminalWebExtensionContributedProfile"
  },
  {
    "key": "alt+j",
    "command": "workbench.action.terminal.focusNext",
    "when": "terminalFocus"
  },
  {
    "key": "alt+k",
    "command": "workbench.action.terminal.focusPrevious",
    "when": "terminalFocus"
  },
  // 切换到文件浏览器,可以在任何位置
  // {
  //   "key": "ctrl+;",
  //   "command": "workbench.view.explorer",
  //   "when": "viewContainer.workbench.view.explorer.enabled"
  // },
  // 切换到代码编辑区,不论在任何位置
  {
    "key": "ctrl+'",
    "command": "workbench.action.focusFirstEditorGroup"
  },
  // 在file tree 和editor区域切换 
  {
    "command": "workbench.action.focusFirstEditorGroup",
    "key": "ctrl+;",
  },
  {
    "command": "workbench.files.action.focusFilesExplorer",
    "key": "ctrl+;",
  },
  {
    "key": "ctrl+shift+j",
    "command": "workbench.action.togglePanel"
  },
  // 在文件夹资源管理器中新建一个文件
  {
    "key": "a",
    "command": "explorer.newFile",
    "when": "filesExplorerFocus && !inputFocus"
  },
  // 在文件资源管理器里面创建一个文件夹
  {
    "key": "shift+a",
    "command": "explorer.newFolder",
    "when": "filesExplorerFocus && !inputFocus"
  },
  // 在文件资源管理器里面重应名当前文件或文件夹
  {
    "key": "r",
    "command": "renameFile",
    "when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
  },
  // 在文件资源管理器中删除文件
  {
    "key": "d",
    "command": "deleteFile",
    "when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceReadonly && !inputFocus"
  },
  // 放大editor区域
  {
    "key": "ctrl+m",
    "command": "workbench.action.maximizeEditorHideSidebar"
  },
  // 使用code runner运行代码
  {
    "key": "ctrl+r",
    "command": "code-runner.run"
  },
  {
    "key": "y",
    "command": "filesExplorer.copy",
    "when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !inputFocus"
  },
  {
    "key": "p",
    "command": "filesExplorer.paste",
    "when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceReadonly && !inputFocus"
  },
  {
    "key": "ctrl+s",
    "command": "workbench.action.files.save"
  },
  {
    "key": "ctrl+/",
    "command": "-workbench.action.terminal.sendSequence",
    "when": "terminalFocus"
  },
  {
    "key": "ctrl+/",
    "command": "editor.action.commentLine",
    "when": "editorTextFocus && !editorReadonly"
  },
  {
    "key": "cmd+/",
    "command": "-editor.action.commentLine",
    "when": "editorTextFocus && !editorReadonly"
  },
  {
    "key": "ctrl+p",
    "command": "-extension.vim_ctrl+p",
    "when": "editorTextFocus && vim.active && vim.use<C-p> && !inDebugRepl || vim.active && vim.use<C-p> && !inDebugRepl && vim.mode == 'CommandlineInProgress' || vim.active && vim.use<C-p> && !inDebugRepl && vim.mode == 'SearchInProgressMode'"
  },
  {
    "key": "ctrl+h",
    "command": "editor.action.startFindReplaceAction",
    "when": "editorFocus || editorIsOpen"
  }
]

标签:&&,ctrl,vscode,when,vim,command,key,action,config
From: https://www.cnblogs.com/zhuoss/p/18331483

相关文章

  • vscode snippets
    snippets\cpp.json{ //Placeyoursnippetsforcpphere.Eachsnippetisdefinedunderasnippetnameandhasaprefix,bodyand //description.Theprefixiswhatisusedtotriggerthesnippetandthebodywillbeexpandedandinserted.Possibleva......
  • Nuxt.js必读:轻松掌握运行时配置与 useRuntimeConfig
    title:Nuxt.js必读:轻松掌握运行时配置与useRuntimeConfigdate:2024/7/29updated:2024/7/29author:cmdragonexcerpt:本文详细介绍了Nuxt.js中的运行时配置功能,包括定义和使用运行时配置的方法,以及如何通过useRuntimeConfig访问配置。同时,讲解了环境变量与.env文件的使......
  • Nuxt.js必读:轻松掌握运行时配置与 useRuntimeConfig
    title:Nuxt.js必读:轻松掌握运行时配置与useRuntimeConfigdate:2024/7/29updated:2024/7/29author:cmdragonexcerpt:本文详细介绍了Nuxt.js中的运行时配置功能,包括定义和使用运行时配置的方法,以及如何通过useRuntimeConfig访问配置。同时,讲解了环境变量与.env文......
  • Nuxt.js必读:轻松掌握运行时配置与 useRuntimeConfig
    title:Nuxt.js必读:轻松掌握运行时配置与useRuntimeConfigdate:2024/7/29updated:2024/7/29author:cmdragonexcerpt:本文详细介绍了Nuxt.js中的运行时配置功能,包括定义和使用运行时配置的方法,以及如何通过useRuntimeConfig访问配置。同时,讲解了环境变量与.env文......
  • ~/.vimrc
    配置方式:打开终端vim:edit~/.vimrc写入文件(i+Ctrl+Shift+V+esc):write:wq配置文件:""""""""""""""""""""""""""""""&qu......
  • VSCode 的 Python 扩展中更详细的属性提示
    假设我有一个对象args由parser.parse_args()返回,并且它应该具有像args.port=6001、args.seed=1234这样的属性。当我在VSCode中按args.时,port和seed不会显示在建议的属性列表中,因为这些属性可能会......
  • vscode 创建QT最简工程
    1.前提条件qt安装cmake安装参考:https://blog.csdn.net/qq_51355375/article/details/139890889vscode环境配置参考:https://blog.csdn.net/qq_51355375/article/details/1407334952.工程创建include放头文件src.cpp文件CMakeList.texcmake配置文件工程结构按......
  • Centos中修改Docker镜像源:解决error pulling image configuration:download failed a
    场景在进行拉取镜像时提示:errorpullingimageconfiguration:downloadfailedafterattempts=6:dialing... 这是因为镜像源无法连接和使用了。但是之前已经配置过国内docker的镜像源了。是因为自2024年6月份左右国内镜像源大部分失效,原因自行探索。所以记录下如何修......
  • 瑞斯康达-多业务智能网关 list_base_config.php 远程命令执行漏洞
    0x01阅读须知        技术文章仅供参考,此文所提供的信息只为网络安全人员对自己所负责的网站、服务器等(包括但不限于)进行检测或维护参考,未经授权请勿利用文章中的技术资料对任何计算机系统进行入侵操作。利用此文所提供的信息而造成的直接或间接后果和损失,均由使用者......
  • 在 vim 中保存,退出
    用不用vimvim学习起来很难,需要很多的时间、精力。如果喜欢折腾,就学吧!在vim中完成编辑、保存和退出操作如果在windows,你就用gvim,按windows键,然后输入gvim,再按Enter键;如果在linux,你就用vim。好!现在你进入了vim!界面是这样的。首先,我直接写下来整个操作(现在......