Is there a shortcut that'll hide everything **but** the current editor tab?

Answered

I appreciate the double clicking a tab to hide all windows. It helps a bit but not as much as it probably could. The real hero's action would be to hide everything except for the current editor tab. Is this an option in any way? A hidden setting? An obvious one but I keep on missing it? Is it possible?

0
8 comments

There is this action in the context menu when you right-click a tab:

You can assign a shortcut to it in Settings | Keymap

Is this what you are looking for?

0

Thanks Sergey,

Not exactly. This would require reopening tabs more often than not when done. It would be nice to temporarily hide them.

I have an idea and I'll try it in a moment. Hopefully there's a shortcut to detach/reattach a tab. If so, detach -> focus -> Fullscreen -> reattach -> resume.

I'll look into this when I can.

Thank you Sergey

0

Have you considered using Distraction Free Mode? Or do you still need other tool windows visible?

0

Hello Sergey,

I've tried my idea of detaching an editor tab but it sucks (it's not quick nor is it easy). Currently there is no shortcut to pop a tab out, pop a tab in and the dragged tab must be dropped outside of the IDE (but it's always full screen, so it's not that simple). I am quite surprised PyCharm being so feature rich, such an improvement to the workflow is not an option.

But, I guess I kind of refuse to believe it. PyCharm is so advanced I keep believing it's there and I'm simply missing it.

In the meantime, I'm pretty open to the fastest option to focus in on a single tab (hiding all splits, tools, other editors) but without closing, resetting or restarting the other stuff.

Thank you Sergey

0

Have you considered using Distraction Free Mode? Or do you still need other tool windows visible?

As proposed by Sergey - have you tried different viewing modes (distraction free, zen etc.): View > Appearance > Enter ... Mode
You can assign keyboard shortcuts to activate/deactivate different viewing modes in Settings (`⌘ + ,` or `Ctrl + Alt + S`) > Keymap > in search box type 'toggle mode': https://i.imgur.com/P7QQKEJ.gif

0

Hello Ivan,

I've tried all the modes and none have the desired effect. There is no view mode or shortcut or quick way to focus in on a single tab. I'm open to any ideas to help focus in quicker if you've got them (without closing tabs, resizing splits or scrolling).

My normal workflow is 3 tabs split, full screen in portrait mode.

  1. vertical top-left: Usually it's the main working source file e.g., (literally main.py, __main__.py, etc).
  2. vertical bottom-left: This is usually a scratch file where I can quickly write up experiments and mess around.
  3. vertical right: Usually it's the main library or utility script (this is where most of the docstrings and comments are found).

My opinions on the different view modes.

  • Presentation Mode: Splits still exist and scrolling is worse as the text size is zoomed in quite a bit (175%?).
  • Distraction Free Mode: Better mode as the scrolling and resizing of splits are minimized when compared to normal.
  • Zen Mode: It's Distraction Free Mode in full screen.

Although some of the modes do help, none are perfect. Here's a long work around.

  • Detach an editor tab by dragging it outside the PyCharm window (you can't drop back on PyCharm or else it'll reattach).
  • Use your OS shortcuts to maximize, full-screen and restore it to its previous size (still in a detached state).
  • Drag it back onto PyCharm and it'll reattach itself.

The current issue with the above workaround (on Manjaro 23.0.0) is PyCharm is usually already in a full-screen state. This means, there is no place to drop the dragged tab except onto a different display and this will usually involve moving it back.

In the end, everything is as it normally is (no real changes) to any scrolling, any split sizes, tab placements, what's opened and exactly where.., everything stays as is except the ability to literally focus in on only a single tab.

I thank you both very much for your time and suggestions. The view modes (distraction free and zen) are better than nothing but I'm hoping I keep missing it somehow or I'm open to the quickest means to workaround it.

Thank you again

0

Thank you for the detailed explanation.
Currently, the nearest possible workaround is similar to the one you already mentioned earlier - press Shift+F4 to detach the current editor tab and Win+Up arrow to maximize the new IDE window (this is on Windows). When you are done with editing the main file you can just close it  (no need to re-attach it back, since it is still open in the original IDE window).

But yes, I agree it is not as fast and as convenient as a native IDE action that would detach+maximize in one keystroke, and then re-attach in another. 
P.S. Did you have a look at LightEdit mode? It doesn't really seem to fit in your scenario, but its worth checking it.

2

Hello Ivan,

That's it <3

I wouldn't even consider this a workaround as it almost immediately gives the focus that's needed. This is almost perfect. This is what I was missing and couldn't find.

Thank you Ivan

1

Please sign in to leave a comment.