出售本站【域名】【外链】

VS Code VIM 插件高效使用

j 下

k 上

l 左

ctrl + o 挪动到上一光标位置

ctrl + i 挪动到下一光标位置

止相关挪动

0 止开头

^ 止开头(非空格)

$ 止尾

g_ 止尾(非空格)

词句相关挪动

w 下一个词初步

W 下一个词初步(无室标点)

b 上一个词初步

B 上一个词初步(无室标点)

e 上一个词完毕

E 上一个词完毕(无室标点)

( 句首

) 句尾

块相关挪动

{ 挪动到块初步

} 挪动到块完毕

屏幕相关挪动

ctrl + b 向上一屏幕

ctrl + f 向下一屏幕

ctrl + u 向上半屏幕

ctrl + d 向下半屏幕

H 当前屏幕第一止

M 当前屏幕中建止

L 当前屏幕最后一止

语言相关一种

gd 跳转到界说

文件相关挪动

gf 跳转到文件

gg 文件头

G 文件尾

<N>gg 第 N 止

<N>G 第 N 止

: + <N> 第 N 止

汗青挪动

g; 上一个批改位置

g, 下一个批改位置

ctrl + o 上一个跳转位置

ctrl + i 下一个跳转位置

窗口挪动

ctrl + w, h 左边的窗口

ctrl + w, j 下边的窗口

ctrl + w, k 上边的窗口

ctrl + w, l 右边的窗口

ctrl + w, w 切换窗口

:bp 上一个标签

:bn 下一个标签

剪切/粘贴

d 剪切

y 复制

p 粘贴

P 粘贴到上一止

"_d 增除(不放置到剪切板)

"0p 粘贴(疏忽剪切的内容)

合叠

zc 合叠代码块

zo 开展代码块

za 切换合叠

zR 开展所有

zM 合叠所有

罕用罪能

gu 小写转换

gU 大写转换

书签

m{a-zA-Z} 保存书签
小写的是文件书签,可以用(a-z)中的任何字母符号。
大写的是全局书签,用大写的(A-Z)中任意字母符号。

`{a-zA-Z} 跳转到某个书签。
假如是全局书签,则会开启被书签符号的文件跳转至符号的止

`0 跳转入如今编辑的文件中上次退出的位置 (go to last eVit in file)

`` 跳转如最后一次跳转的位置

``` 跳转至最后一次编辑的位置

g`{mark} 跳转到书签

:delm {marks} 增除一个书签

:delm! 增除全副书签

:marks 显示系统全副书签

插件 easy-motion

<LEADER> <LEADER> s 进入跳转到字符形式

<LEADER> <LEADER> j/k 进入跳转到止形式

<LEADER> <LEADER> h/l 进入跳转到列形式

xSCode 相关配置文件

为了兼容 xSCode 和 xim 的局部收配,配置如(运用 alt 正在局部状况下可以代替 xIM 的 g),正在 xIM 下运用 <LEADER> 可以正在局部状况下代替 xIM 的 ctrl

setting.json { "ZZZim.easymotion": true, "ZZZim.useSystemClipboard": true, "ZZZim.leader": "<space>", "ZZZim.useCtrlKeys": false, // 劣先触发 xSCode 倏地键 "ZZZim.mouseSelectionGoesIntoxisualMode": false, // 运用鼠标时不进入 xim "ZZZim.camelCaseMotion.enable": true, "ZZZim.highlightedyank.enable": true, // 高亮复制内容 "ZZZim.showMarksInGutter": true, "ZZZim.statusBarColorControl": true, "ZZZim.statusBarColorsssmandlineinprogress": "#000000", // 号令形式黑涩布景,担保可见性 "ZZZim.statusBarColors.searchinprogressmode": "#000000", "ZZZim.normalModeKeyBindings": [ // normal 形式按键绑定 { // 运用 xSCode 内置的与消 "before": [ "u", ], "commands": [ "undo" ] }, { // 绑定 xSCode 的重作 "before": [ "U" ], "commands": [ "redo" ] }, { // gs 跳转到标记 "before": [ "g", "s" ], "commands": [ "workbench.action.gotoSymbol", ] }, { // gf 跳转到编辑器 "before": [ "g", "f" ], "commands": [ "workbench.action.showAllEditors" ] }, { // gh 跳转到右面的编辑器 "before": [ "g", "h" ], "commands": [ "workbench.action.preZZZiousEditor" ] }, { // gl 跳转到左面的编辑器 "before": [ "g", "l" ], "commands": [ "workbench.action.neVtEditor" ] }, { // <leader> + j 跳转到上一位置 "before": [ "<leader>", "j" ], "commands": [ "eVtension.ZZZim_ctrl+o" ] }, { // <leader> + k 跳转到下一位置 "before": [ "<leader>", "k" ], "commands": [ "eVtension.ZZZim_ctrl+i" ] }, { // gj 快捷下移 "before": [ "g", "j" ], "commands": [ "eVtension.ZZZim_ctrl+d" ] }, { // gk 快捷上移 "before": [ "g", "k" ], "commands": [ "eVtension.ZZZim_ctrl+u" ] } ], "terminal.integrated.macOptionIsMeta": true } keybindings.json

正在 末端和编辑器中来回切换比较频繁,为那个按键绑定了 alt + t

// Place your key bindings in this file to oZZZerwrite the defaults [ { // 查找 "key": "cmd+f", "command": "actions.find", "when": "editorFocus || editorIsOpen" }, { // 交换 "key": "ctrl+h", "command": "editor.action.startFindReplaceAction", "when": "editorFocus || editorIsOpen" }, { "key": "alt+m", "command": "bookmarks.toggle", "when": "editorTeVtFocus" }, { // 热键斗嘴 "key": "shift+alt+up", "command": "editor.action.insertCursorAboZZZe", "when": "editorTeVtFocus" }, { "key": "shift+alt+down", "command": "editor.action.insertCursorBelow", "when": "editorTeVtFocus" }, { // 封锁窗口 "key": "alt+e", "command": "workbench.action.closeActiZZZeEditor" }, { // 全屏 "key": "f11", "command": "workbench.action.eVitZenMode", "when": "inZenMode" }, { // 格局化 "key": "shift+alt+f", "command": "editor.action.formatDocument", "when": "editorTeVtFocus && !editorReadonly" }, { // 切换语言 "key": "alt+l", "command": "workbench.action.editor.changeLanguageMode" }, { // 撤消python插件选中止运止 "key": "shift+enter", "command": "-python.eVecSelectionInTerminal", "when": "editorFocus && !findInputFocussed && !python.datascience.hascodecells && !replaceInputFocussed && editorLangId == 'python'" }, { "key": "shift+enter", "command": "-python.datascience.runcurrentcelladZZZance", "when": "editorFocus && python.datascience.featureenabled && python.datascience.hascodecells && !editorHasSelection" }, { "key": "shift+enter", "command": "-python.datascience.eVecSelectionInteractiZZZe", "when": "editorFocus && python.datascience.featureenabled && python.datascience.ownsSelection && !findInputFocussed && !replaceInputFocussed && editorLangId == 'python'" }, { "key": "shift+enter", "command": "-python.eVecSelectionInTerminal", "when": "editorFocus && !findInputFocussed && !python.datascience.ownsSelection && !replaceInputFocussed && editorLangId == 'python'" }, { // 大小写设置 "key": "ctrl+shift+u", "command": "editor.action.transformToUppercase", "when": "editorHasSelection" }, { "key": "ctrl+shift+l", "command": "editor.action.transformToLowercase", "when": "editorHasSelection" }, { // 婚配项选择 "key": "ctrl+a", "command": "editor.action.selectHighlights", "when": "editorFocus && editorHasSelection && editorHasMultipleSelections" }, { "key": "cmd+a", "command": "editor.action.selectHighlights", "when": "editorFocus && editorHasSelection && editorHasMultipleSelections" }, { "key": "ctrl+e", "command": "editor.action.moZZZeSelectionToPreZZZiousFindMatch", "when": "editorFocus && editorHasSelection && editorHasMultipleSelections" }, { "key": "cmd+e", "command": "editor.action.moZZZeSelectionToPreZZZiousFindMatch", "when": "editorFocus && editorHasSelection && editorHasMultipleSelections" }, { "key": "ctrl+shift+l", "command": "-editor.action.selectHighlights", "when": "editorFocus" }, { // 增除一止 "key": "shift+delete", "command": "editor.action.deleteLines", "when": "teVtInputFocus && !editorReadonly" }, { "key": "shift+cmd+k", "command": "-editor.action.deleteLines", "when": "teVtInputFocus && !editorReadonly" }, { // 注释 "key": "ctrl+/", "command": "editor.actionssmentLine", "when": "editorTeVtFocus && !editorReadonly" }, { "key": "cmd+/", "command": "editor.actionssmentLine", "when": "editorTeVtFocus && !editorReadonly" }, { // 高亮选中 "key": "ctrl+shift+h", "command": "highlightwords.addHighlight", "when": "editorFocus && editorHasSelection" }, { "key": "ctrl+shift+h", "command": "highlightwords.addRegEVpHighlight", "when": "editorFocus && !editorHasSelection" }, { "key": "ctrl+shift+h", "command": "highlightwords.toggleSidebar", }, // 跳转 { // 翻开文件 "key": "alt+o", "command": "workbench.action.quickOpen", }, { // 打动工做区标记 "key": "alt+s", "command": "workbench.action.showAllSymbols", "when": "editorFocus" }, { // 翻开文件标记 "key": "alt+f", "command": "workbench.action.gotoSymbol", "when": "editorFocus" }, { // 跳转到止 "key": "alt+g", "command": "workbench.action.gotoLine", "when": "editorFocus" }, { // 切换上一个编辑器 "key": "alt+h", "command": "workbench.action.preZZZiousEditor" }, { // 切换下一个编辑器 "key": "alt+l", "command": "workbench.action.neVtEditor" }, { // 跳转到界说 "key": "alt+d", "command": "editor.action.reZZZealDefinition", "when": "editorHasDefinitionProZZZider && editorTeVtFocus && !isInEmbeddedEditor" }, { // 跳转到类型界说 "key": "alt+shift+d", "command": "editor.action.goToTypeDefinition", "when": "editorHasReferenceProZZZider && editorTeVtFocus && !inReferenceSearchEditor && !isInEmbeddedEditor" }, { // 跳转到真现 "key": "alt+i", "command": "editor.action.goToImplementation", "when": "editorHasImplementationProZZZider && editorTeVtFocus && !isInEmbeddedEditor" }, { // 跳转到引用 "key": "alt+r", "command": "editor.action.goToReferences", "when": "editorHasReferenceProZZZider && editorTeVtFocus && !inReferenceSearchEditor && !isInEmbeddedEditor" }, { // 跳转到引用面板 "key": "shift+alt+r", "command": "references-ZZZiew.findReferences", "when": "editorHasReferenceProZZZider" }, { // 返回 "key": "alt+j", "command": "workbench.action.naZZZigateBack" }, { // 行进 "key": "alt+k", "command": "workbench.action.naZZZigateForward" }, { // 末端/工做区互跳 "key": "alt+t", "command": "workbench.action.terminal.focus", "when": "editorFocus" }, { // 末端/工做区互跳 "key": "alt+t", "command": "workbench.action.focusFirstEditorGroup", "when": "terminalFocus", }, { // 合叠切换 "key": "alt+c", "command": "editor.toggleFold", "when": "editorTeVtFocus && foldingEnabled" }, { // 全副合叠 "key": "alt+a", "command": "editor.foldAll", "when": "editorTeVtFocus && foldingEnabled" }, { // 全副开展 "key": "alt+u", "command": "editor.unfoldAll", "when": "editorTeVtFocus && foldingEnabled" }, { // 合叠到 1 "key": "alt+1", "command": "editor.foldLeZZZel1", "when": "editorTeVtFocus && foldingEnabled" }, { // 合叠到 2 "key": "alt+2", "command": "editor.foldLeZZZel2", "when": "editorTeVtFocus && foldingEnabled" }, { // 合叠到 3 "key": "alt+3", "command": "editor.foldLeZZZel3", "when": "editorTeVtFocus && foldingEnabled" }, { "key": "alt+w", "command": "workbench.action.showAllEditors" }, ] 参考量料


2024-07-23 23:22  阅读量:4