-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Folded code unfolds if you spend some (unknown number) of ms idle in a fold #1004
Comments
This is annoying, but also hard. @aminroosta tried but had a bad time: #708 The problem as I understand it is that the only API VSCode allows us is |
on ubuntu, i also suffer from this a log I found the solution using |
|
@phrohdoh for example |
@NikosEfthias Oh I see, TIL. Thanks! |
I can confirm this on VSCode 1.9.1 with Vim Plugin 0.5.3. This makes working with larger, more complex files very unwieldy! I've tried disabling the vim plugin and moving with the cursor keys. In that case it works as expected (folds remain closed). |
+1 for this. Having my folds open while I'm navigating is quite frustrating. I find myself having to use my mouse to reposition my cursor, which should make all of us sad. |
+1 for fixing this asap |
+1 for this. It makes me very painful. |
+1 comments aren't going to do anything but annoy the repo owners. |
Oops now I'm spamming (I didn't mean to close this). |
:) It's okay. We generally use thumbs up as a measure of importance, but the extra signal we get from people who were so bothered they had to come and leave a comment is a little useful too. We're definitely aware this one is painful - we'll try to fix it as soon as we can! |
Investigated this and realized it required some help from VSCode. Opened up an issue over there: microsoft/vscode#22276 |
Related: microsoft/vscode#25097 Glad to hear I'm not the first one to experience it. |
sorry to say, but this makes the extension useless for me. greetz... |
I polished up my fix over here: #1552 It does some hackish stuff, but it seems to work great for me. Here's a pretty bad demo: |
Fixing the automatic fold expansion (#1004)
We just pushed out a new version, so enable It's a hack and not a proper solution to this problem, so we'll probably leave this issue open for now. |
The
|
As an alternative to CTRL-u & CTRL-d I've been using H & L which do not break the fold. |
I was really liking the feel of vscode. I really appreciate the work this project's contributors have done. Not being able to scroll past folded regions in vim mode makes vscode useless to me. QtCreator would be my preferred IDE for the time being. Thank you all for your hard work. |
Can you make this a default option, not everyone know about this, I just want to open an issue then when I search again on google, finally I landed on this, or at least the issue should be pinned down. Thank you for brigging the foldfix, I really frustated with how the cursor open all fold |
To add on this, you can use the following settings to make it more jump like:
|
@scutxd Could you please file a separate issue? |
OK. Thank you. |
does anyone know how to rebind up and down arrow to gj gk? Occasionly I go back to the old way, using arrow keys and it breaks the fold and it's quite frustrating. currently I have, which only works for the j , k remap: (
|
I have only |
Not sure why it has been closed because ctrl+d and ctrl+u still unfolds the code. @J-Fields my bad, it's a linked issue that is closed, not the actual ticket |
@desprit The issue isn't closed. As far as I know (it's been a while since I've looked into this very closely), there's nothing we can do unless VSCode expands its API to give us more information about folded regions. |
@benyaminl |
I agree with @Chillee . Maybe some one should reopen the issue with vscode? It has been a couple of years maybe it can be prioritized. |
@J-Fields I'd like to open a feature request on VSCode, but I think to make it effective they will need communication from you on what API surface do you really need to support this feature. Could you provide a technical overview of (1) how you currently handle folds in this extension, (2) what actually triggers this issue, and (3) what would you need to fix it? My best guess is that you don't know if there is a 5-line fold on say line 10, so when I press j you're telling VSCode to go to line 11 but actually if you had that information then you'd ask vscode to go to line 16? |
there was a response here from a maintainer of vscode suggesting a solution to this. Wouldn't a good solution to this be a vscode api where |
@JackCA Annoying that we can't see status on: microsoft/vscode#108960 and no progress here: microsoft/vscode#81498 |
It looks like the only solution at the moment is to use safe line number to go + |
If you use relative line numbers, you can supplement this tactic with |
PRs welcome |
What's the problem? |
The VSCodeVim team prioritizes issues based on reaction count.
What did you do?
Scrolled through folded code once with the
j
key held down, another time pressing it over and over.What did you expect to happen?
Folded lines were skipped.
What happened instead?
Cursor did not skip the folded lines (watch the line numbers in the gif).
Technical details:
The text was updated successfully, but these errors were encountered: