-
Notifications
You must be signed in to change notification settings - Fork 30k
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
Zen mode: Centered Editor Layout #15684
Comments
For now is there any extension doing something similar to this? |
@Zyst No, this is not something that an extension would be able to control. VSCode isolates extensions from the UI implementation, which has a number of benefits, but it also means that extensions cannot customize the VSCode UI like this. |
I think the most intuitive solution would be to let the user specify a desired width, in characters. So if I set 100 (that's how long my codes lines are before I wrap them) as my Zen width, it will adjust the padding so that a 100-character line effectively becomes centered at all times. |
An extension could at least add several extra gutters to fake this, no? |
Would love to have this. Ideally top and bottom margins should also be supported. In my opinion WriteRoom has one of the most well designed zen modes, thanks in part to the top and bottom margins. The margins only appear when scrolling to the top or the bottom of the page. I think ideally it should look something like this (mockup based on @mjbvz's): (Notice the top and bottom striped blocks in the scroll bar area.) |
I would also like this. Going into Zen mode on a ultrawide results in a lot of wasted space with an editor all the way to the left. |
This would be a very welcome feature. Working i zen-mode on a 27" monitor requires me to physically move to the left on my desk so I can look straight forward on the code. I'd rather stay centered in front of the screen with the code centered in front of me. |
I would also like to see this feature. |
Oh yeah plz!! 👍 |
+1, this prevents Zen Mode from being as good as IntelliJ's "distraction free" mode for me. |
+1, waiting for this feature since the day one... |
+1 |
5 similar comments
+1 |
+1 |
+1 |
+1 |
+1 |
It also helps maintainers gauge how much interest there is from looking at the first post only. It's much better overall. |
@jens1o they're not clueless. They're probably eager to get a status update, it's been a while. I'd also love to know if there are any plans to implement this. |
This would be very helpful even outsize of zen mode. |
@isidorn I merged the PR, feel free to do follow up work as you see fit. |
Wow, great! So, is it going to be in the next release? |
@bpasero thanks, taking over from now. |
Is it possible to enable the centered layout for an specific file? Markdown, on my case. Thanks. |
@robsonsobral no, not at the moment. You have to either activate zen-mode (where the center layout is automatically activated) or use the "Toggle centered layout" action. You may assign a key shortcut to that action though |
1.21 on mac does absolutely nothing when activating this awesome feature from command palette nor from the View menu. No output in console, no nothing. Just me? |
Wiped config and reimported...all ok. Just an x-file. |
@pioneerskies What do you mean wiped config and reimported? Nothing happens for me either when running the command. |
@michaelchiche I've reproduced the problem in a more scientific way: |
Not sure where to put this but it seems like the right place. Is there a way to resize the editor viewport (like how centered is now) but rather than centering, just let us resize it as we want? So we could have the editor 50% of the entire window on the left side, rather than straight center. |
Thanks, @SrTobi . So sad... |
@OutThisLife You mean how they show in the demo? https://code.visualstudio.com/updates/v1_21#_centered-editor-layout |
@OutThisLife that is not working for me FYI 😢 |
@OutThisLife that's possible. you can press and hold the alt key. That decouples the sashes and you can move them freely. Then you can move the left border all to the left and the right border to the middle or something. Currently it's only possible for the horizontal direction. We thought about the vertical direction but put that back for now. But I don't even see a usecase for that |
@SrTobi Is there a way to reset the borders back to default? I've moved them (by using the Alt key and dragging as you described above), but now I'd like to make them perfectly centered again. |
@nohwnd double click on sash resets them |
I almost switched back to atom because I did not know this is the reason / how to turn this off. How about not automatically set this to true when zenMode.FullScreen is false by default? |
I find myself using zen mode to see more of the code cut off horizontally. Is there any reason why someone would want to go into Zen Mode when they have a horizontal scrollbar and not want to expand the viewing area until at least they don't have to scroll horizontally? Secondly, there's a "zenMode.fullScreen": false! That's awesome! |
Is there anyway to hide centered layout sash? |
@Vxider no, you have to stick with them or open a new issue and request this feature |
When an user has |
With the recent addition of zen mode, it may be worth considering adding a centered editor layout option:
This is something that the Typewriter atom extension adds, and I see it being particularly useful in zen mode and when writing text documents, such as markdown. A centered layout would apply both a softwrap and align the wrapped editor content to the center of the current editor pane.
The major downside is that this would add an ui configuration that we would have to test and support. The centered editor layout also doesn't fit well with all VSCode ui paradigms
The text was updated successfully, but these errors were encountered: