Vim: Collapsed block was expanded when press J on the first line.

Created on 19 Jul 2017  路  6Comments  路  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:

  • VSCode Version: 1.14.1
  • VsCodeVim Version: 0.9.0
  • OS: windows 10

What happened:


I collapse a code block from line 11 to line 20.
and on the line 11 ,I press J or arrow down
then the code block was expaned.
What did you expect to happen:
The code block keep collapsed and the cursor jump to line 21
How to reproduce it:

  1. Collapse a code block
  2. On the vim mode,press J on when the cursor was on the first line of the collapsed block.

Most helpful comment

Looks like this is fixed in https://github.com/VSCodeVim/Vim/pull/1552? Add "vim.foldfix": true to your settings.json fixes it for me

All 6 comments

Unluckily, I doubt this is something we can change. Folds are largely outside of our control, and even our current fix for moving across folds is unbelievably hackish.

According to https://github.com/Microsoft/vscode/issues/16858 they're saying it is the extension's issue. What would need to happen to get it to work?

Looks like this is fixed in https://github.com/VSCodeVim/Vim/pull/1552? Add "vim.foldfix": true to your settings.json fixes it for me

@danawoodman ah I thought he meant <shift-j>. That actually does work properly. If so, this is a duplicate.

I haven't closed the other relevant fold issue as our current solution is unbelievably hacky (and not in a good way).

DO NOT use vim.foldfix.

you need gj to replace j.

this tips is in the README file's Key remapping chapter.

DO NOT use vim.foldfix.

you need gj to replace j.

this tips is in the README file's Key remapping chapter.

using this mapping, commands like 100j becomes nightmare...
vim.foldfix works faster but still far away from the original setting.

@Chillee ideas on reopening this issue?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

triztian picture triztian  路  3Comments

typeoneerror picture typeoneerror  路  3Comments

AndersenJ picture AndersenJ  路  3Comments

WangRongda picture WangRongda  路  3Comments

rajinder-yadav picture rajinder-yadav  路  3Comments