Skip to content

Virtually prevent pushing code down when new lines are automatically added #94173

@rafaelrenanpacheco

Description

@rafaelrenanpacheco

I would like an option to virtually prevent vscode from pushing down the current focused line when new lines are automatically added. For example, when I click to automatically add an import, vscode adds the import line and the current focused line is scrolled down. This causes a distraction because the line I'm working on is moved away even tho I didn't want to scroll.

Here is a gif showing how IntelliJ behavior when new lines are automatically added above the current selected line. Note that after the import statement is added the current line is virtually kept the same (the line number do change, of course, but the scroll is set to a new position in order to respect the old position):

intellij

The next gif show how vscode pushes down the code and loses the previous virtual position:

vscode

Would be possible to add an option to vscode behavior like IntelliJ in this situation?

Metadata

Metadata

Assignees

Labels

feature-requestRequest for new features or functionalityhelp wantedIssues identified as good community contribution opportunitiessuggestIntelliSense, Auto CompleteverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions