question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[folding] Move line up/down should skip over folded regions or folded sections

See original GitHub issue
  • VSCode Version:1.30.0-insider
  • OS Version: windows 10

I think when code is in a folded region or section it should never unfold unless explicitly commanded, so if you are moving a line using move command, the line should skip over both folded regions and folded sections Steps to Reproduce:

  1. create a folded region using #region #endregion
  2. fold some code section
  3. move a line using alt+up/down over the folded region/section vscodemovelinebug

Does this issue occur when all extensions are disabled?: Yes

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:27
  • Comments:12 (1 by maintainers)

github_iconTop GitHub Comments

28reactions
beaugundersoncommented, Jan 13, 2020

@Frug you can set the vim.foldfix setting to true if you’re using the vim plugin and it will fix this annoyance for you 😄️ (this works with simple movement but I’m not sure if it works with moving lines up and down, which is what this issue is about)

7reactions
minig0dcommented, Dec 20, 2020

Any solution to the issue without an extension? I frequently use the alt up/down (editor.action.moveLinesUpAction / editor.action.moveLinesDownAction) shortcuts and this may be one of the most annoying counter-intuitive behaviors of VSC… Honestly, if you’re moving a line of text (or a block), would anyone really want folded section to unfold? I mean, isn’t the reason we are folding the section because we are not actively dealing with it?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Basic Editing in Visual Studio Code
You can fold regions of source code using the folding icons on the gutter between line numbers and line start. Move the mouse...
Read more >
Overview of Geological Structures Part 2: Folds, Faults, and ...
In Part II of geological structures, students will learn how stress and strain ... Folds have three main parts: a fold axis (also...
Read more >
Prevent VSCode from unfolding code when cursor moves past ...
If I do this in VSCode, the folded section will unfold as soon as my cursor crosses the top of the section. I...
Read more >
Make vim's {} motions skip over folds - Super User
I've recently been using folding more, and while that's a great feature, it doesn't do what I would expect with respect to the...
Read more >
Crystallization of Bulk Polymers With Chain Folding - NCBI - NIH
Under certain conditions, the noncoherent model with chain folds can lead to a ... derived on the basis that the nucleus contains a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found