Vim icon indicating copy to clipboard operation
Vim copied to clipboard

j/k don't preserve column

Open bowernite opened this issue 11 months ago • 4 comments

I know this has been posted in the past for gj/gk, but this also seems to be broken whenever moving the cursor up or down.

Basically, in this scenario:

abc
a
abc

If you have your cursor on c and move to the other abc line, the cursor ends up on a in the other line for any of the following:

  1. normal mode j/k
  2. insert mode up/down
  3. visual mode j/k

If I reload VS Code with extensions disabled and use up/down, this bug does not exist.

bowernite avatar Feb 29 '24 17:02 bowernite

FWIW, this seems to be a bandaid fix:

  "vim.normalModeKeyBindingsNonRecursive": [
    {
      "before": ["j"],
      "commands": ["cursorDown"]
    },

bowernite avatar Feb 29 '24 17:02 bowernite

This is caused for this option: "vim.foldfix": true, once disabled, is gonna work just fine.

darianmorat avatar Mar 01 '24 13:03 darianmorat

duplicates #8840

ontanj avatar Apr 10 '24 12:04 ontanj

FWIW, this seems to be a bandaid fix:

  "vim.normalModeKeyBindingsNonRecursive": [
    {
      "before": ["j"],
      "commands": ["cursorDown"]
    },

Please note that this seems to work with "vim.foldfix": true!

p-se avatar Jul 15 '24 10:07 p-se