Skip to content
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

Closed
mjbvz opened this issue Nov 18, 2016 · 69 comments
Closed

Zen mode: Centered Editor Layout #15684

mjbvz opened this issue Nov 18, 2016 · 69 comments
Assignees
Labels
feature-request Request for new features or functionality layout General VS Code workbench layout issues on-testplan release-notes Release notes issues ux User experience issues
Milestone

Comments

@mjbvz
Copy link
Collaborator

mjbvz commented Nov 18, 2016

With the recent addition of zen mode, it may be worth considering adding a centered editor layout option:

screen shot 2016-11-17 at 5 16 15 pm

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.

screen shot 2016-11-17 at 5 20 45 pm 2

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

@mjbvz mjbvz added feature-request Request for new features or functionality ux User experience issues labels Nov 18, 2016
@Zyst
Copy link

Zyst commented Dec 15, 2016

For now is there any extension doing something similar to this?

@mjbvz
Copy link
Collaborator Author

mjbvz commented Dec 15, 2016

@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.

@atombender
Copy link

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.

@coreh
Copy link

coreh commented Dec 16, 2016

An extension could at least add several extra gutters to fake this, no?

@phest
Copy link

phest commented Mar 2, 2017

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):

zen mode mockup

(Notice the top and bottom striped blocks in the scroll bar area.)

@filipesilva
Copy link

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.

@msageryd
Copy link

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.

@filipesilva
Copy link

As a comparison, this is how VSCode's Zen mode looks on 3440x1440 resolution (ultrawide):

image

By comparison, this is how the same file looks on Webstorm's distraction free fullscreen on 2560x1080
resolution (also ultrawide, but smaller):

image

@datendenker
Copy link

I would also like to see this feature.

@marcotas
Copy link

marcotas commented Apr 1, 2017

Oh yeah plz!! 👍

@Grogs
Copy link

Grogs commented May 2, 2017

+1, this prevents Zen Mode from being as good as IntelliJ's "distraction free" mode for me.

@prokher
Copy link

prokher commented May 11, 2017

+1, waiting for this feature since the day one...

@cmer
Copy link

cmer commented May 18, 2017

+1

5 similar comments
@bradharms
Copy link

+1

@prichodko
Copy link

+1

@bjrnt
Copy link

bjrnt commented May 26, 2017

+1

@neronmoon
Copy link

+1

@klaytonfaria
Copy link

+1

@jens1o
Copy link
Contributor

jens1o commented May 29, 2017

Guys, let me say: There is something called GitHub reactions, which avoids such useless comments and won't get maintainers mad.

You do it like this:

  1. Go to the top
  2. Click on that button:
    image
  3. Select an reaction(you can also use the heart emoji): image
  4. Be proud of yourself

Thanks in advance.

@filipesilva
Copy link

It also helps maintainers gauge how much interest there is from looking at the first post only. It's much better overall.

@phest
Copy link

phest commented May 29, 2017

@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.

@jens1o
Copy link
Contributor

jens1o commented May 30, 2017

There is a button on the side:
image

Actually, I used the wrong wording, I was a little bit upset, sorry...

@asgmojtaba
Copy link

asgmojtaba commented Jun 25, 2017

There is a workaround that i using until the issue fixed. Create empty tab and split editor vertically then adjust split area until give semi-center-aligned editor :

image

@exallium
Copy link

This would be very helpful even outsize of zen mode.

@bpasero
Copy link
Member

bpasero commented Feb 21, 2018

@isidorn I merged the PR, feel free to do follow up work as you see fit.

@MikeDevice
Copy link

Wow, great! So, is it going to be in the next release?

@isidorn
Copy link
Contributor

isidorn commented Feb 21, 2018

@bpasero thanks, taking over from now.

@SrTobi
Copy link
Contributor

SrTobi commented Feb 21, 2018

@isidorn the border looks great

I also opened a PR (#44116) for centering the layout when entering the zen mode.

@isidorn
Copy link
Contributor

isidorn commented Feb 21, 2018

Fixed by @SrTobi in #40757

@robsonsobral
Copy link

Is it possible to enable the centered layout for an specific file? Markdown, on my case.

Thanks.

@SrTobi
Copy link
Contributor

SrTobi commented Mar 8, 2018

@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

@alessandro-fazzi
Copy link

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?

@alessandro-fazzi
Copy link

Wiped config and reimported...all ok. Just an x-file.

@iCodeForBananas
Copy link

@pioneerskies What do you mean wiped config and reimported? Nothing happens for me either when running the command.

@alessandro-fazzi
Copy link

@michaelchiche I've reproduced the problem in a more scientific way: CMD+option+0 indirectly enables/disables the centred mode.

@OutThisLife
Copy link

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.

@robsonsobral
Copy link

Thanks, @SrTobi . So sad...

@3ximus
Copy link

3ximus commented Mar 8, 2018

@OutThisLife You mean how they show in the demo? https://code.visualstudio.com/updates/v1_21#_centered-editor-layout
You can use the ALT key while dragging to move the borders separately

@alessandro-fazzi
Copy link

@OutThisLife that is not working for me FYI 😢

@SrTobi
Copy link
Contributor

SrTobi commented Mar 8, 2018

@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

@OutThisLife
Copy link

@3ximus @SrTobi

Thanks, perfect :)

@nohwnd
Copy link
Member

nohwnd commented Mar 9, 2018

@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.

@isidorn
Copy link
Contributor

isidorn commented Mar 9, 2018

@nohwnd double click on sash resets them

@ericls
Copy link

ericls commented Mar 11, 2018

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?

@addertheblack
Copy link

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!

@Vxider
Copy link

Vxider commented Mar 16, 2018

Is there anyway to hide centered layout sash?

@SrTobi
Copy link
Contributor

SrTobi commented Mar 16, 2018

@Vxider no, you have to stick with them or open a new issue and request this feature

@davidmrnustik
Copy link

davidmrnustik commented Mar 16, 2018

When an user has View: Toggle Center Layout enabled, moving cursor over tabs over left and right sashes, an app provides you with a resize cursor for resizing centered layout instead of let you click the tab.

@vscodebot vscodebot bot locked and limited conversation to collaborators Apr 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality layout General VS Code workbench layout issues on-testplan release-notes Release notes issues ux User experience issues
Projects
None yet
Development

No branches or pull requests