gpt4 book ai didi

visual-studio-code - 如何让 vim 用户快捷方式在 vscode 中工作

转载 作者:行者123 更新时间:2023-12-05 04:30:34 28 4
gpt4 key购买 nike

vscode > 首选项:打开设置 (JSON)

{  
"vim.normalModeKeyBindingsNonRecursive": [

{
"before": ["t", "s"],
"commands": ["python.sortImports"],
}
]
}

我按照上面的方法设置了,但是不行。有什么问题吗?我在 vim-normal 模式下输入 't' 和 's'。ctrl+alt+s 正在工作。但我想要自定义 vim 快捷方式

最佳答案

尝试重新安装 vim extension .如果失败,您可以尝试以下操作:

  1. Are your configurations correct?

Adjust the extension's logging level to 'debug', restart VS Code. As each > remapped configuration is loaded, it is outputted to console. In the Developer > Tools console, do you see any errors?

debug: Remapper: normalModeKeyBindingsNonRecursive. before=0. after=^.
debug: Remapper: insertModeKeyBindings. before=j,j. after=<Esc>.
error: Remapper: insertModeKeyBindings. Invalid configuration. Missing 'after' key or 'command'. before=j,k.

Misconfigured configurations are ignored.

  1. Does the extension handle the keys you are trying to remap?

VSCodeVim explicitly instructs VS Code which key events we care about through > the package.json. If the key you are trying to remap is a key in which vim/vscodevim generally does not handle, then it's most likely that this extension does not receive those key events from VS Code. With logging level adjusted to 'debug', as you press keys, you should see output similar to:

debug: ModeHandler: handling key=A.
debug: ModeHandler: handling key=l.
debug: ModeHandler: handling key=<BS>.
debug: ModeHandler: handling key=<C-a>.

As you press the key that you are trying to remap, do you see it outputted here? If not, it means we don't subscribe to those key events. It is still possible to remap those keys by using VSCode's keybindings.json.

来源:https://marketplace.visualstudio.com/items?itemName=vscodevim.vim#debugging-remappings

关于visual-studio-code - 如何让 vim 用户快捷方式在 vscode 中工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72039494/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com