VSCodeVim / Vim

:star: Vim for Visual Studio Code
http://aka.ms/vscodevim
MIT License
14.02k stars 1.32k forks source link

Remap 's' to easymotion on visualmode not working #4532

Closed aquaductape closed 4 years ago

aquaductape commented 4 years ago

I remapped 's' to easymotion on normalModeKeyBindingsNonRecursive with no problems

"vim.normalModeKeyBindingsNonRecursive": [
  {
    "before": [
      "s"
    ],
    "after": [
      "leader",
      "leader",
      "s"
    ]
  }
]

But on visual mode when I press 's' the substitute command(delete and insert) is ran instead.

"vim.visualModeKeyBindingsNonRecursive": [
  {
    "before": [
      "s"
    ],
    "after": [
      "leader",
      "leader",
      "s"
    ]
  },
],

But if I use a move command(in this case 'l') during visualMode, then I can use remapped 's' easymotion.

settings.json

{
  "editor.fontSize": 18,
  "editor.wordWrap": "on",
  // "editor.lineNumbers": "relative",
  "emmet.triggerExpansionOnTab": true,
  "liveServer.settings.donotShowInfoMsg": true,
  "workbench.startupEditor": "newUntitledFile",
  "window.menuBarVisibility": "toggle",
  "window.zoomLevel": 0,
  "emmet.includeLanguages": {
    "javascript": "javascriptreact",
  },
  "emmet.syntaxProfiles": {
    "javascript": "jsx"
  },
  "liveServer.settings.donotVerifyTags": true,
  "javascript.updateImportsOnFileMove.enabled": "always",
  "terminal.integrated.fontSize": 17,
  "workbench.sideBar.location": "left",
  "workbench.editor.enablePreviewFromQuickOpen": true,
  "editor.showUnused": true,
  "editor.tabSize": 2,
  "editor.formatOnSave": true,
  "editor.suggestSelection": "first",
  "html.mirrorCursorOnMatchingTag": false,
  "html.autoClosingTags": false,
  "html.format.preserveNewLines": false,
  "[html]": {
    "editor.defaultFormatter": "vscode.html-language-features"
  },
  "javascript.autoClosingTags": false,
  "vim.easymotion": true,
  "vim.enableNeovim": true,
  "vim.neovimPath": "nvim",
  "vim.incsearch": true,
  "vim.useSystemClipboard": true,
  "vim.useCtrlKeys": true,
  "vim.hlsearch": true,
  "vim.normalModeKeyBindingsNonRecursive": [
    {
      "before": [
        "s"
      ],
      "after": [
        "leader",
        "leader",
        "s"
      ]
    },
    {
      "before": [
        "<C-n>"
      ],
      "commands": [
        ":nohl"
      ]
    },
    // {
    //   "before": [
    //     "j"
    //   ],
    //   "after": [
    //     "g",
    //     "j"
    //   ]
    // },
    {
      "before": [
        "Z",
        "Z"
      ],
      "commands": [
        ":wq"
      ]
    },
    {
      "before": [
        "Y",
      ],
      "after": [
        "y",
        "$"
      ]
    },
    {
      "before": [
        "J"
      ],
      "after": [
        "5",
        "j"
      ]
    },
    {
      "before": [
        "K"
      ],
      "after": [
        "5",
        "k"
      ]
    },
    {
      "before": [
        "<C-j>"
      ],
      "after": [
        "J",
      ]
    },
  ],
  "vim.visualModeKeyBindingsNonRecursive": [
    {
      "before": [
        "p"
      ],
      "after": [
        "p",
        "g",
        "v",
        "y"
      ]
    },
    {
      "before": [
        "y"
      ],
      "after": [
        "y",
        "g",
        "v",
        "<Esc>"
      ]
    },
    {
      "before": [
        "s"
      ],
      "after": [
        "leader",
        "leader",
        "s"
      ]
    },
    {
      "before": [
        ">"
      ],
      "commands": [
        "editor.action.indentLines"
      ]
    },
    {
      "before": [
        "<"
      ],
      "commands": [
        "editor.action.outdentLines"
      ]
    },
  ],
  "vim.leader": "<space>",
  "vim.handleKeys": {
    "<C-a>": true,
    "<C-f>": false
  },
  "vim.easymotionMarkerHeight": 20,
  "vsicons.associations.folders": [
    {
      "icon": "container",
      "extensions": [
        "container",
        "containers"
      ],
      "format": "svg"
    }
  ],
  "vsicons.associations.folderDefault.folder": {
    "icon": "myFolder",
    "format": "svg"
  },
  "vsicons.associations.files": [
    {
      "icon": "myMarkdown",
      "extensions": [
        "md",
        "custom.md",
        "markdown",
        "mdown"
      ],
      "format": "svg",
      "overrides": "md"
    }
  ],
  "workbench.iconTheme": "vscode-icons",
  "breadcrumbs.filePath": "off",
  "debug.allowBreakpointsEverywhere": true,
  "terminal.integrated.fontFamily": "'PowerlineSymbols','Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'",
  "vim.easymotionMarkerFontWeight": "bold",
  "vim.easymotionMarkerFontSize": "15",
  "typescript.updateImportsOnFileMove.enabled": "always",
}
ericschlanger commented 4 years ago

Same issue here!