Vim icon indicating copy to clipboard operation
Vim copied to clipboard

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

Open yuhui-lin opened this issue 9 years ago • 5 comments

  • 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 <ctrl+b> does take effect because there is one more condition in "when" than <ctrl+f>. { "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:

yuhui-lin avatar Aug 10 '17 02:08 yuhui-lin

+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.

wYuanHpp avatar Aug 10 '17 08:08 wYuanHpp

this problem is resolve;you can config keybinding.json

wYuanHpp avatar Aug 12 '17 01:08 wYuanHpp

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

reducm avatar Apr 03 '18 12:04 reducm

@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"
  }

snowshoes avatar Apr 14 '18 22:04 snowshoes

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

jpoon avatar Jan 31 '19 07:01 jpoon