咨询一个 vs code 的 vim 插件问题, 列编辑如何不自动切换模式 - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
746970179
V2EX    Visual Studio Code

咨询一个 vs code 的 vim 插件问题, 列编辑如何不自动切换模式

  •  
  •   746970179 2024-05-08 18:11:40 +08:00 2015 次点击
    这是一个创建于587 天前的主题,其中的信息可能已经有所发展或是发生改变。
    mac 下, 使用 vscode 的 vim 插件带来的 vim 模式
    最难受的地方, 是非预期得从插入模式自动切换到 normal 模式
    1 插入模式时, 使用 cmd+D 选中单词(我设置的选择当前单词, 如果重复按, 会选中下一个相同的单词), 会自动进入到 normal 模式
    2 列编辑的时候, 打散(此时光标在行尾), shift 和方向键左(其他都行), 就会切换模式.

    这个是我使用姿势不对吗?
    网上搜索了蛮多, 结果没有能解决的
    7 条回复    2024-05-09 14:14:36 +08:00
    november
        1
    november  
       2024-05-08 18:19:56 +08:00
    没遇到这种情况。
    试了下,在插入模式下,连续按 cmd + d ,会选择多个相同的单词,并且光标会自动跳到单词末尾,并且保持插入模式。
    第 2 个不懂。
    gitclose
        2
    gitclose  
       2024-05-09 02:20:24 +08:00
    vscode vim 插件不卡吗?我在 win 、linux 和 mac 上 hjkl 很卡。换到 neovim 就好了。
    746970179
        3
    746970179  
    OP
       2024-05-09 09:42:19 +08:00
    @gitclose 不卡的, 是不是和其他插件冲突了?
    746970179
        4
    746970179  
    OP
       2024-05-09 09:42:59 +08:00
    @november 可能有设置过吧, 方便贴一下配置的 json 吗?
    因为和 ctrl 有关联
    jqtmviyu
        5
    jqtmviyu  
       2024-05-09 12:40:29 +08:00
    反正我是进入 multi cursor 模式, 然后 shift+i/ shift+a 编辑. 或者 di
    gitclose
        6
    gitclose  
       2024-05-09 12:56:55 +08:00
    @746970179 现在换到 neovim 插件了,也很流畅
    november
        7
    november  
       2024-05-09 14:14:36 +08:00
    这是整个配置。

    {
    "editor.fontSize": 20,
    "security.workspace.trust.untrustedFiles": "open",
    "workbench.tree.indent": 22,
    "vim.handleKeys": {
    "<C-c>": false,
    "<C-v>": false,
    "<C-x>": false,
    "<C-k>": false,
    "<C-a>": false,
    },
    "vim.normalModeKeyBindingsNonRecursive": [
    {
    "before": ["d"],
    "after": ["\"", "_", "d"]
    },
    {
    "before": ["D"],
    "after": ["\"", "_", "D"]
    },
    {
    "before": ["d", "d"],
    "after": ["\"", "_", "d", "d"]
    },
    {
    "before": [ "c", "a" ],
    "after": [ "\"", "_", "c", "a" ]
    },
    // {
    // "before": [ "c" ],
    // "after": [ "\"", "_" ]
    // },
    {
    "before": [ "c", "i" ],
    "after": [ "\"", "_", "c", "i" ]
    },
    {
    "before": [ "d", "a" ],
    "after": [ "\"", "_", "d", "a" ]
    },
    ],
    "vim.visualModeKeyBindingsNonRecursive": [
    {
    "before": ["d"],
    "after": ["\"", "_", "d"]
    },
    {
    "before": ["D"],
    "after": ["\"", "_", "D"]
    },
    // {
    // "before": ["d", "d"],
    // "after": ["\"", "_", "d", "d"]
    // },
    // {
    // "before": ["<BS>"],
    // "after": ["\"", "_", "d"]
    // }
    ],
    "vim.insertModeKeyBindings": [
    {
    "before": [
    "up"
    ],
    "commands": [
    "cursorUp"
    ]
    },
    {
    "before": [
    "down"
    ],
    "commands": [
    "cursorDown"
    ]
    },
    {
    "before": [
    "left"
    ],
    "commands": [
    "cursorLeft"
    ]
    },
    {
    "before": [
    "right"
    ],
    "commands": [
    "cursorRight"
    ]
    }
    ],
    "vim.foldfix": true,
    "vim.useSystemClipboard": true,
    "editor.codeLensFontFamily": "\"Input\"",
    "editor.renderWhitespace": "all",
    "editor.trimAutoWhitespace": false,
    "editor.showFoldingControls": "always",
    "indenticator.color.dark": "#FFF10C",
    "workbench.colorTheme": "Monokai",
    "vim.autoSwitchInputMethod.defaultIM": "im.rime.inputmethod.Squirrel.Rime",
    "vim.autoSwitchInputMethod.obtainIMCmd": "/usr/local/bin/im-select",
    "vim.autoSwitchInputMethod.switchIMCmd": "/usr/local/bin/im-select {im}",
    "editor.minimap.showSlider": "always",
    "files.insertFinalNewline": true,
    "search.showLineNumbers": true,
    "files.trimTrailingWhitespace": true,
    "editor.dragAndDrop": false,
    "workbench.colorCustomizations": {
    "[Monokai]": {
    "tab.activeBorder":"#fff",
    "tab.activeForeground": "#fff",
    "editorGroupHeader.tabsBackground": "#44463a",
    "tab.inactiveBackground": "#44463a",
    "tab.border": "#44463a",
    "tab.hoverBackground": "#4e4e4e",
    },
    },
    "breadcrumbs.symbolPath": "off",
    "workbench.list.horizontalScrolling": true,
    "breadcrumbs.icons": false,
    "remote.SSH.remoteServerListenOnSocket": true,
    "remote.SSH.remotePlatform": {
    "release": "linux",
    "remote": "linux"
    },
    "bookmarks.saveBookmarksInProject": true,
    "clipboard-manager.preview": false,
    "clipboard-manager.maxClips": 500,
    "clipboard-manager.snippet.enabled": false,
    "liveServer.settings.donotShowInfoMsg": true,
    "diffEditor.renderSideBySide": false,
    "explorer.autoReveal": false,
    "typescript.format.insertSpaceBeforeFunctionParenthesis": true,
    "Javascript.format.insertSpaceBeforeFunctionParenthesis": true,
    "typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": false,
    "Javascript.format.insertSpaceAfterOpeningAndBeforeClosingEmptyBraces": false,
    "typescript.format.insertSpaceAfterOpeningAndBeforeClosingEmptyBraces": false,
    "vscode_custom_css.imports": [
    "file:///home/eos/Documents/vscode-css/custom.css"
    ],
    "eslint.enble": false,
    "html.format.enable": false,
    "explorer.confirmDelete": false,
    "markdown.preview.linkify": false,
    "bookmarks.sideBar.expanded": true,
    "bookmarks.label.suggestion": "suggestWhenSelected",
    "workbench.startupEditor": "none",
    "editor.multiCursorModifier": "ctrlCmd",
    "files.exclude": {
    "**/.vscode": true
    },
    "editor.acceptSuggestionOnCommitCharacter": false,
    "extensions.ignoreRecommendations": true,
    "github.copilot.enable": {
    "*": true,
    "plaintext": false,
    "markdown": false,
    "scminput": false,
    "yaml": false,
    "Javascript": true
    },
    "typescript.updateImportsOnFileMove.enabled": "never",
    "editor.tabSize": 2,
    "editor.foldingStrategy": "indentation",
    "html.format.indentHandlebars": true,
    "html.format.indentInnerHtml": true,
    "liveServer.settings.port": 3900,
    "editor.suggest.preview": true,
    "github.copilot.inlineSuggest.enable": true,
    "editor.inlineSuggest.enabled": true,
    "editor.inlineSuggest.allowQuickSuggestions": true,
    "workbench.list.openMode": "doubleClick",
    "search.quickOpen.includeHistory": false,
    "workbench.editor.enablePreview": false,
    "liveServer.settings.CustomBrowser": "chrome:PrivateMode",
    "liveServer.settings.NoBrowser": true,
    "[Javascript]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
    },
    "window.restoreWindows": "none",
    "clipboard-manager.maxClipboardSize": 100000,
    "git.openRepositoryInParentFolders": "never",
    "[shellscript]": {
    "editor.defaultFormatter": "foxundermoon.shell-format"
    },
    "codeium.enableConfig": {
    "*": false
    },
    "[typescriptreact]": {
    "editor.defaultFormatter": "vscode.typescript-language-features"
    },
    "explorer.compactFolders": false,
    "remote.SSH.defaultForwardedPorts": [

    ],
    "[typescript]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
    },
    "editor.unicodeHighlight.ambiguousCharacters": false,
    "[json]": {
    "editor.defaultFormatter": "vscode.json-language-features"
    },
    "editor.unicodeHighlight.invisibleCharacters": false,
    "[dart]": {
    "editor.formatOnSave": true,
    "editor.formatOnType": true,
    "editor.rulers": [
    80
    ],
    "editor.selectionHighlight": false,
    "editor.suggest.snippetsPreventQuickSuggestions": false,
    "editor.suggestSelection": "first",
    "editor.tabCompletion": "onlySnippets",
    "editor.wordBasedSuggestions": "off"
    },
    "prettier.ignorePath": "",
    "editor.fontFamily": "'Input', 'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'",
    "indentRainbow.indicatorStyle": "light",
    "indenticator.inner.showIndentGuide": true,
    "editor.accessibilitySupport": "off",
    "git.countBadge": "tracked",
    "git.untrackedChanges": "separate",
    "workbench.editor.empty.hint": "hidden",
    "window.commandCenter": false,
    "files.hotExit": "onExitAndWindowClose",
    "editor.lineNumbers": "relative",
    "notebook.lineNumbers": "on",
    "zenMode.hideLineNumbers": false,
    "window.zoomLevel": 1,
    "editor.mouseWheelScrollSensitivity": 3,
    "workbench.list.mouseWheelScrollSensitivity": 3,
    "typescript.preferences.includePackageJsonAutoImports": "on",
    "typescript.tsdk": "./node_modules/typescript/lib",
    "lldb.library": "/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Versions/A/LLDB",
    "lldb.launch.expressions": "native",
    "apple-swift-format.configSearchPaths": [
    ".swift-format",
    ],
    "diffEditor.ignoreTrimWhitespace": false
    }
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     5137 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 48ms UTC 05:58 PVG 13:58 LAX 21:58 JFK 00:58
    Do have faith in what you're doing.
    ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86