Vim: vim.insertModeKeyBinding not working for Combinatorial key (Ctrl-?)

Created on 16 Jul 2018  路  9Comments  路  Source: VSCodeVim/Vim

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'user-settings'
  2. config
  "vim.insertModeKeyBindingsNonRecursive": [
    {
      "before": ["<C-j>"],
      "after": ["m", "m"]
    }
  ],
  1. press but nothing happend

Expected behavior
input characters: "mm"

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • Extension (VsCodeVim) version: 0.15.0
  • VSCode version:1.25.1
  • OS: 4.17.5-1-ARCH

Additional context
Add any other context about the problem here.

  1. Last version is ok.
  2. Other key(not Ctrl) is ok.
statuduplicate

All 9 comments

Have you read through the readme section regarding ctrl keys?

@expelledboy
Of course!
This is my setting:

"vim.useCtrlKeys": true
"vim.handleKeys": {
     "<C-j>": true
}

Any Problem?

I am new the project, was just in the back of my mind when I read your issue :)

We don't remap this ctrl+ combination most likely. Can you use native vscode bindings to do what you want to do? Something like this

{
"key": "ctrl+j",
"command": "xxxxxxx",
"when": "editorTextFocus && vim.active && vim.mode == 'Insert' && !inDebugRepl"
}

Duplicate of #757

@xconverge What about I just want to remap to some keypress, which a vscode command can't do it.Such as the example above inserting two 'm' character, none command can do the same, right?

{
  "key": "ctrl+j",
  "command": "type",
  "args": { "text": "mm" },
  "when": "editorTextFocus"
}

See the example here:
https://code.visualstudio.com/docs/getstarted/keybindings#_command-arguments

Wow, perfect! Although it is not remap key, this is enough and satisfy my needs.Power command and I am ignorant.

Yea a LOT can be done with the native keybindings. You can also add something like this to the when clause if you want

&& vim.mode == 'Insert'
Was this page helpful?
0 / 5 - 0 ratings

Related issues

lucastheisen picture lucastheisen  路  3Comments

triztian picture triztian  路  3Comments

elithrar picture elithrar  路  3Comments

ghost picture ghost  路  3Comments

jaredly picture jaredly  路  3Comments