Skip to content
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

Switches to another opened file on F8 #47367

Closed
iyegoroff opened this issue Apr 7, 2018 · 8 comments
Closed

Switches to another opened file on F8 #47367

iyegoroff opened this issue Apr 7, 2018 · 8 comments
Assignees
Labels
feature-request Request for new features or functionality languages-diagnostics Source problems reporting verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@iyegoroff
Copy link

Issue Type: Bug

When pressing F8 in editor without error markers in current file, tab will switch to another opened file with error. Is it possible to prevent tab switching when F8 is pressed and there is no errors in current file?

VS Code version: Code 1.22.0 (6b4d53c, 2018-04-05T17:25:43.982Z)
OS version: Darwin x64 16.7.0

@monk-time
Copy link

It's caused by a change in behavior in 1.22 (link). I think it's a change to the worse: it's very easy to get used to hitting F8 to get a quick feedback for whether the current file has any errors, and this change breaks this workflow in a very noisy way.

It also punishes those who work on 'dirty' projects with lots of errors and prefer to concentrate on one file at a time. I think it would be great to have a config switch for "F8 checks all files/current file", or at least a pair of keyboard bindings for the old behavior. I'm actually surprised that it wasn't implemented with this change.

@jrieken jrieken added languages-diagnostics Source problems reporting under-discussion Issue is under discussion for relevance, priority, approach labels Apr 9, 2018
@jrieken
Copy link
Member

jrieken commented Apr 9, 2018

Understood. The goal was to keep the number of setting low, but I understand the different use-cases and muscle memory. Until then, a workaround, albeit weak, is to hit Shift+F8 which takes to back to the file.

@monk-time
Copy link

monk-time commented Apr 9, 2018

Yeah, I agree that "convention over configuration" has its benefits, and it seems that the suggestion that caused this change was quite popular, but IMO this warrants at least a pair of shortcut bindings. Speaking about conventions, I've just checked that for example similar shortcuts in PyCharm (and I assume all other JetBrains IDEs) only jump through errors in the current file.

One upside of the old behavior was that when the current file had no errors, there were no visual changes after pressing F8, and the cursor stayed where it was. Now in this case Shift+F8 after F8 won't even bring you back to that file, it would jump to another file with errors. "Go Back" or "Open Next Recently Used Editor" works though.

It was also very useful that F8 would wrap around and bring you to the first error in the current file if you are working near the end of it and did some changes that e.g. made some imports or vars unused. I think I was relying on this behavior 80% of times when I pressed F8. And now it's become quite difficult to predict whether F8 or Shift-F8 would keep you in the current file or move to another one.

@jrieken jrieken added feature-request Request for new features or functionality and removed under-discussion Issue is under discussion for relevance, priority, approach labels May 7, 2018
@jrieken jrieken added this to the May 2018 milestone May 8, 2018
@jrieken jrieken closed this as completed in 70ed5b4 May 8, 2018
jrieken added a commit that referenced this issue May 8, 2018
Fixes #47367: Added a go to next error that stays within current file
@jrieken
Copy link
Member

jrieken commented May 8, 2018

We have added the two old commands back (in addition to the new commands). That means there is now "Go to Next Problem" and "Go to Next Problem In Files" as well as the other direction. We have not changed the keybindings, so F8/Shift-F8 walks across the project and you would need to reassign the them to get old, old behaviour back.

@monk-time
Copy link

Wow, I didn't expect this minor issue to get resolved so quickly! Big thanks to the team, it's really a marvel to witness the development of this amazing project.

@jrieken
Copy link
Member

jrieken commented May 8, 2018

Thanks to @alexr00

@jrieken jrieken added the verification-needed Verification of issue is requested label May 29, 2018
@isidorn
Copy link
Contributor

isidorn commented May 29, 2018

I verified the new command works as expected, however is the name "in Files" really clear what it does.
Why not "across Files"?

@isidorn isidorn added the verified Verification succeeded label May 29, 2018
@alexr00
Copy link
Member

alexr00 commented May 29, 2018

We chose "in Files" to match "Find in Files". "across Files" makes sense too though and might be clearer for users who haven't used "Find in Files" before.

@vscodebot vscodebot bot locked and limited conversation to collaborators Jun 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality languages-diagnostics Source problems reporting verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

5 participants