Crtl-Tab switcher navigation does not work correctly with sub tabs

Issue #1131 resolved
Jonny Power (he/him) created an issue

If I open a lightning component, and use the sub tab to navigate to another file (e.g. the js controller) crtl+tab (go to previous file) does not return me to the cmp, it returns me to the file I was viewing before the .cmp.

This really throws me out of the zone when editing between apex/js/cmp markup as I use the crtl+tab navigation extensively during my workflow.

IntelliJ: 2018.2.4

Comments (7)

  1. Scott Wells repo owner

    Hi, Jonny, Unfortunately this is just the nature of how subtabs work in IntelliJ IDEA/WebStorm (and other JetBrains IDEs). You can bring up the top-level tab selector with Ctrl+Tab/Ctrl+Shift+Tab, but to move between subtabs you use Alt+Shift+Left/Right on Windows/Linux and Ctrl+Shift+Left/Right on Mac. The two navigation mechanisms don't really intersect. What I do (on Windows) is use Alt+Left/Right to move between top-level tabs and Alt+Shift+Left/Right to move between subtabs when available.

  2. Jonny Power (he/him) reporter

    Thanks Scott - that's frustrating - do you think it would be possible to add an option to hide the subtabs? They are so convenient that I find myself clicking them and then making changes in the wrong file after crtl-tabbing to a different component accidentally (e.g. editing multiple components at the same time). I will probably just get used to it over time and learn not to use the subtabs, but would be nice if there was an option.

  3. Scott Wells repo owner

    Jonny, the subtabs are an expansion atop everything you could do before. I understand the convenience aspect, but I might recommend using Ctrl+Alt+Home (if you're on Windows) for Go to Related as an alternative method of navigating between related files, in particular Aura bundles, which opens the associated file in a new top-level tab. Then Ctrl+Tab will act as you expect.

    I'm not opposed to adding an option for disabling the subtabs...it's just that you're the first to ask. Most people are finding them to be a major usability enhancement. Let me know if Go to Related helps or not and we can discuss the requested option further based on the outcome of that.

  4. Jonny Power (he/him) reporter

    Thanks Scott, I'll just learn not to use them - I appreciate that it's a really useful enhancement to 99% of people (they are really convenient, it's just a pity the navigation is detached in IntelliJ in the way that it is). I could totally be the exception and I understand not wanting to build a feature for one user :)

  5. Scott Wells repo owner

    And I'm not at all meaning to disparage your particular workflow. I know what it's like to find a particularly efficient workflow and then find that it's changed. Let me noodle on what might be involved in making the subtabs optional. It won't likely come in the next build or two, but I'll keep it on my radar.

  6. Log in to comment