Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recursive mapping V key #3173

Closed
trofimovilya opened this issue Oct 28, 2018 · 2 comments
Closed

Recursive mapping V key #3173

trofimovilya opened this issue Oct 28, 2018 · 2 comments

Comments

@trofimovilya
Copy link

Hi.

In VIM I had such mapping: vmap v <Plug>(expand_region_expand)
That trick was allowing me to just tap v several times to first start selection, and then expand it. In that case, to select a word under the cursor it was enough to type vv instead of viw.

I'm trying to implement something similar in VSCode:

  "vim.visualModeKeyBindings": [
    {
      "before": [ "v" ],
      "commands": [ "editor.action.smartSelect.grow" ]
    },
  ]

But pressing v in Visual Mode just leads to exit to Normal Mode.

Is there any other a hacky-way to map v in Visual Mode?

@trofimovilya
Copy link
Author

#3037

#2942
#1806

@trofimovilya
Copy link
Author

trofimovilya commented Oct 29, 2018

I ended up with:

  "vim.normalModeKeyBindingsNonRecursive": [
    {
      "before": [ "v" ],
      "after": [ "v" ]
    }
  ],
  "vim.visualModeKeyBindingsNonRecursive": [
    {
      "before": [ "v" ],
      "after": [ "a", "f" ]
    }
  ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant