Vim: <ctrl+f><ctrl+d><ctrl+a> has no effect on "Insert" mode

Created on 10 Aug 2017  路  5Comments  路  Source: VSCodeVim/Vim

  • Click thumbs-up 馃憤 on this issue if you want it!
  • Click confused 馃槙 on this issue if not having it makes VSCodeVim unusable.

The VSCodeVim team prioritizes issues based on reaction count.


Is this a BUG REPORT or FEATURE REQUEST? (choose one):
BUG REPORT

Environment:
latest MACOS + latest VSCode + VSCodeVim

  • VSCode Version: 1.14.2 (1.14.2)
  • VsCodeVim Version: latest 0.9
  • OS: macos

What happened:
In "Insert" mode, should be mapped to "CursorRight" which forward cursor one character.
should move cursor to the beginning of the line.
But they have no effect.

I notice that does take effect because there is one more condition in "when" than .
{ "key": "ctrl+f", "command": "extension.vim_ctrl+f",
"when": "editorTextFocus && vim.active && vim.use && !inDebugRepl" },
{ "key": "ctrl+b", "command": "extension.vim_ctrl+b",
"when": "editorTextFocus && vim.active && vim.use && !inDebugRepl && vim.mode != 'Insert'" },

I think "vim.mode != 'Insert'" should be applied to every "Normal" mode commands, like ^a, ^f, ^e, ^d ...

What did you expect to happen:

How to reproduce it:

statuduplicate

Most helpful comment

@reducm here is an example shows how to move cursor in insert mode

{
    // Ctrl-h : Move backward
    "key": "ctrl+h",
    "command": "extension.vim_left",
    "when": "editorTextFocus && vim.active && vim.mode == 'Insert' && !inDebugRepl"
  },
  {
    // Ctrl-l : Move foward
    "key": "ctrl+l",
    "command": "extension.vim_right",
    "when": "editorTextFocus && vim.active && vim.mode == 'Insert' && !inDebugRepl"
  },
  {
    // Ctrl-l : Move upward
    "key": "ctrl+k",
    "command": "extension.vim_up",
    "when": "editorTextFocus && vim.active && vim.mode == 'Insert' && !inDebugRepl"
  },
  {
    // Ctrl-l : Move downward
    "key": "ctrl+j",
    "command": "extension.vim_down",
    "when": "editorTextFocus && vim.active && vim.mode == 'Insert' && !inDebugRepl"
  }

All 5 comments

+1
I really want use ^a, ^f, ^e, ^b to control my cursor , because I use Mac . So I want to know how to remap these keys.

this problem is resolve;you can config keybinding.json

@wYuanHpp can you give an example how to bind ctrl+f to move forward a char in insertmode?

@reducm here is an example shows how to move cursor in insert mode

{
    // Ctrl-h : Move backward
    "key": "ctrl+h",
    "command": "extension.vim_left",
    "when": "editorTextFocus && vim.active && vim.mode == 'Insert' && !inDebugRepl"
  },
  {
    // Ctrl-l : Move foward
    "key": "ctrl+l",
    "command": "extension.vim_right",
    "when": "editorTextFocus && vim.active && vim.mode == 'Insert' && !inDebugRepl"
  },
  {
    // Ctrl-l : Move upward
    "key": "ctrl+k",
    "command": "extension.vim_up",
    "when": "editorTextFocus && vim.active && vim.mode == 'Insert' && !inDebugRepl"
  },
  {
    // Ctrl-l : Move downward
    "key": "ctrl+j",
    "command": "extension.vim_down",
    "when": "editorTextFocus && vim.active && vim.mode == 'Insert' && !inDebugRepl"
  }

I believe this is a dupe of https://github.com/VSCodeVim/Vim/issues/3126. The fix will be included in our next release 1.0.4

Was this page helpful?
0 / 5 - 0 ratings

Related issues

elithrar picture elithrar  路  3Comments

orn688 picture orn688  路  3Comments

ACollectionOfAtoms picture ACollectionOfAtoms  路  3Comments

edwintorok picture edwintorok  路  3Comments

triztian picture triztian  路  3Comments