Vim EasyMotion for VS Code not activating

Viewed 6255

Does anyone use Vim with VSCode? For some reason, my <leader> key (space), does not activate the easy-motion plugin (I made sure it is enabled in the settings), but just moves the cursor to the right once. I am new to VS Code, am I missing something? I still haven't figured out how .vimrc works with VS Code.

TIA!

2 Answers

As far as I know, vim mode in VS code isn't configured by .vimrc file, instead, it's configured by setting.json. You can find how to configure them in this README.md.

Check that:

  • "vim.leader"is set to <Space>
  • go to preference -> Keyboard shortcut in VS code. Make sure that you did not customize any command to any shortcut starting with <space>. (I made this mistake before)
  • the timeout length of the leader key is pretty short, make sure you press, let's say, 'w' key right after <leader><leader>

I hope this would help

It's not nessesary to use .vimrc file for vscode unless you want some customized behaviors.

  • Make sure you've enbaled the easymotion in vsvim settings:

    "vim.easymotion": true

    (in your settings.json file)

  • When it comes to VSCode, easymotion will be triggered by double press <leader> key.
    Different from Terminal Vim, for example: (in your case <leader> is set to space)

    space + space + 2 + s

    after you press the above keys, your status bar should look like this.

Hope it would help you get into Visual Studio Code quickly.

Related