-
Notifications
You must be signed in to change notification settings - Fork 28.8k
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
Comments
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. |
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. |
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. |
Fixes #47367: Added a go to next error that stays within current file
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. |
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. |
Thanks to @alexr00 |
I verified the new command works as expected, however is the name "in Files" really clear what it does. |
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. |
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
The text was updated successfully, but these errors were encountered: