Skip to content

Switches to another opened file on F8 #47367

Closed

Description

@iyegoroff

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

Activity

  1. monk-time commented on Apr 7, 2018

    @monk-time

    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.

  2. added
    languages-diagnostics
    under-discussion
    on Apr 9, 2018
  3. jrieken commented on Apr 9, 2018

    @jrieken
    Contributor

    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.

  4. monk-time commented on Apr 9, 2018

    @monk-time

    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.

  5. added
    feature-request
    and removed
    under-discussion
    on May 7, 2018
  6. added a commit that references this issue on May 7, 2018
    70ed5b4
  7. added a commit that references this issue on May 8, 2018
    4557aad
  8. jrieken commented on May 8, 2018

    @jrieken
    Contributor

    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.

  9. monk-time commented on May 8, 2018

    @monk-time

    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.

  10. jrieken commented on May 8, 2018

    @jrieken
    Contributor
  11. added
    verification-needed
    on May 29, 2018
  12. isidorn commented on May 29, 2018

    @isidorn

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

  13. alexr00 commented on May 29, 2018

    @alexr00
    Member

    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.

  14. locked and limited conversation to collaborators on Jun 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

feature-requestlanguages-diagnosticsverification-neededverified

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions