Keyboard shortcut to close active file tab?! Follow
I'm using Eclipse shortcuts and I hit Ctrl+W to close the file tab I'm looking at but it collapses the Project window, and I go to Keymap settings and there's nothing I recognize there as to close the active file tab.
Please sign in to leave a comment.
You can customize your shortcuts. By default ctrl+w goes for "Extend Selection". You can assign this combination under Settings > Keymap > Main menu > Window > Editor Tabs > Close (Alt+f4 by defaul).
On "Settings/Preferences | Keymap" look for "Main Menu | Window | Editor Tabs | Close" action and assign any desired shortcut.
From what I see the default shortcut for this action using Eclipse keymap is Ctrl+F4
It would also be nice if CTRL+W closed a tab in the Editor window. Or if there was some keyboard shortcut to closing a tab. Every time I have to touch my mouse when coding, a part of me dies a little. ;)
Please, someone either tell me how to do this, or please add this enhancement to TOAD. Most Windows applications use CTRL+W to allow for the closing of the active file or tab.
Hmmm, I'm with acemary mary and have been trying to get ctrl-w to work. Currently it's the second short-cut assigned to close active tab but doesn't work. Any ideas why not?
So far it sounds like you assigning that shortcut to a wrong action ... or there is another action for that shortcut which cancels yours.
Oops! You were right, sorry: I confused "close" and "close active tab", apparently. I assigned ctrl+w to "close" and now it does what I want.
I can't get this working. The only close active tab that exist is for active tool window, and that closes the project view. How do you set it up to close the active editor tab?
>How do you set it up to close the active editor tab?
Just assign shortcut to the correct action
PhpStorm 2017.1.4 on Windows 10:
Thank you for the clarification. I would never have came up with the idea to search for Close Active Editor, even if i had seen that one i would not associate it to closing the current tab i am on.
Well .. that's "more correct" / dedicated action.
The one in my first comment (and one in the comment with "official" label) still works fine. It just that it has small downside (which you may never face or notice it) -- it can also close "other" tabs not just Editor ones (e.g. tabs in Search Results etc).
I think Jetbrains should reconsider this default. (I use IntelliJ Ultimate and have the same problem). If you have a tabbed interface, ctrl+w is pretty much expected to close the current tab. If not, it is supposed to close the current "W"indow. Browsers are prime example of doing this right.
Also, what Endasil did above makes perfect sense. It should have done what "Close Active Editor" mapping do, what other purpose it serves?
There's been a lot of discussion about that, but the platform team decided to keep things intact.
Wow, this is as binary as it gets. I understand making bad decisions but not acknowledging it or getting anchored to them for backward compatibility is worse.
I didn't read https://youtrack.jetbrains.com/issue/IDEA-118942 and I won't.
The decision is blatantly wrong because an editor is not a tab.
"Close Active Editor" should do as it says and close the editor tool, with all tabs in it.
Since it just closes a tab this is an error, by the grammatical pow, by the user interface pow, and it is also against a universally standardized behaviour.
Changing the "Keymap" from "Mac OS X" to "Mac OS X 10.5+" makes Cmd+W close editor tabs.
Currently using RM 2018.1.4.
I too would really, really like this to be fixed. If backwards compatibility is the problem, perhaps you can do something as with Mac and introduce a new keymap. My platforms: Debian & Ubuntu. When I must: OSX.
By the way, Steve Jobs got this one right :-) http://laydros.freeshell.org/docs/stevekeys.html
Window > Editor Tabs > Close works when navigating via the top menu on windows in webstorm 2019.3
I assigned Keymap to do the same and it does NOT work
Brian Mackey, I have just tried to assign "Ctrl+W" to this action and it works like a charm to me.
Is there any chance that you have left "Extend selection" on "Ctrl+W" as well? Could you please show a screenshot from keymap setting?
Aaaaaaaaaaaaahhhhhhhhhhhhh! This is so annoying!
Sorry, just had to vent.
I've spent far too long trying to get this working. I've removed Ctrl+W from extend selection. I have the setting above and it still won't close the active editor tab! I don't mind @Bazanov's "downside" in fact that might be useful. But Ctrl-W still does nothing! Windows 10, 2020.3.
The shortcut doesn't show up in the menu:
I figured it out, I was typing in an "abbreviation" whatever that is, I should have selected "add keyboard shortcut". Now I admit that is my stupidity, but whoppee after 2 years of using PHP Storm I finally have CTRL-W !!!!!
As to backward compatibility behavior, perhaps just add "Close Active Editors" along side "Close Active Editor".
As to changing the default keybind, I would also like this but have to say I think people are being a little quick to judge here.
I tried to find another suitable combination and it is a bit of a problem.
Largely because CNTRL+W and CNTRL+SHIFT+W work together to expand/shrink a selected phrase.
So, to give expand/shrink selection users a fair alternative you have to find a new home for those bindings. Problems with that:
Given all that drama, I can understand CNTRL + F4