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 #4382

Open
13 of 17 tasks
gldtn opened this issue Nov 4, 2023 · 21 comments
Open
13 of 17 tasks

Zen mode #4382

gldtn opened this issue Nov 4, 2023 · 21 comments
Labels
editor Feedback for code editing, formatting, editor iterations, etc enhancement [core label] setting Feedback for preferences, configuration, etc status bar Status bar editor state discovery, style, etc tabs Feedback for tabs behavior, navigation, style, etc workspace Feedback for workspace management, layout, interactions, etc

Comments

@gldtn
Copy link

gldtn commented Nov 4, 2023

Check for existing issues

  • Completed

Describe the feature

I've seen a few feature request to allow us to hide a bunch of things, so I wanted to summarize a few here and call it Zen mode or God mode LOL.

Like most of us coming from vscode, we know about the zen mode feature we all love as we can pretty much hide anything we want and focus strictly on our code. Additionally to being able to hide it we can get everything that we might want back by exiting zen mode with our preferred keybinding.

Any other suggestion, just reply below and I would try to added to the list if I can edit the issue in the future. Or perhaps an admin can take over.

Things we would like to hide, the ones checked can already be hidden and as far as I know we can't hide the unchecked ones yet:

  • Left/Right Sidebar
  • Dock
  • Title bar
  • Tabs
  • Breadcrumbs
  • Status bar
  • Line numbers
  • Current line highlight
  • Occurrences highlight
  • Indent guides* (zed doesn't have them yet?)
  • Ignore files in finder/explorer bar
  • Setting to hide/show the navigation history buttons (v0.131.0-pre)

Additionally in zen mode we should be able to set:

**plus anything in that might get added in the future, such as popover, overlays, underlines, lightbulbs, etc..

  • buffer_font_family
  • buffer_font_features
  • buffer_line_height
  • buffer_font_size

With a config like this we can define what we want and don't want in zen mode and when we exit it.

List of hiding requests I found so far:

  1. Indent guides #5373
  2. Add options to hide title and status bar #5120
  3. Add equivalent to VSCode "centered layout" view option. #4685
  4. Add option to hide breadcrumbs #4756
  5. Hide certain visual elements #4963
  6. Hide Mouse Cursor While Typing #4461
  7. Add a setting to hide Inline Assist button #4500
  8. Hide directories #5150
  9. Ability to hide hidden files when viewing code base #5185
  10. Project-specific settings for including / excluding directories and files #5443
  11. Don't include project symbols' of .gitignored paths #5365
  12. [Feature] Tabless editing #6424
  13. Add a setting to hide line numbers #7422
  14. Show lines selected #4204
  15. GPUI window transparency #5040

If applicable, add mockups / screenshots to help present your vision of the feature

Here is a keybinding I have in vscode that takes me in and out of my personalized zen mode.

{
// Toggle Font Size
"key": "cmd+k cmd+k",
"command": "toggle",
"when": "editorTextFocus",
"args": {
    "id": "fontSize",
    "value": [
       	{
      		"editor.fontSize": 20,
      		"editor.lineHeight": 45,
      		"editor.lineNumbers": "off",
      		"editor.guides.indentation": false,
       	},
       	{
      		"editor.fontSize": 16,
      		"editor.lineHeight": 0,
      		"editor.lineNumbers": "on",
      		"editor.guides.indentation": true,
       	}
    ]
    }
},

Here is my editor font setting:

{
    // Typography
    "editor.fontFamily": "MonoLisa",
    "editor.fontSize": 15,
    "editor.lineHeight": 45,
    "editor.suggestFontSize": 15,
    "editor.suggestLineHeight": 28,
    "terminal.integrated.fontSize": 15,
    "terminal.integrated.lineHeight": 1.5,
}

So by using the keybinding above I can zoom out if needed and get an "overview" of my code with linenumbers/currentline/indent guides, etc.. enabled so I can debug.

Here is a quick video:

god_mode.mp4
@gldtn gldtn added admin read Pending admin review enhancement [core label] triage Maintainer needs to classify the issue labels Nov 4, 2023
@gldtn gldtn changed the title Zen mode/God mode Zen/God mode Nov 4, 2023
@JosephTLyons
Copy link
Contributor

Very nicely written issue @gldtn! Thank you! I think it would be super cool if we had settings to make Zed even more minimal. We had a PR for hiding the tab bar, but it didn't land because we still want to provide some way of being able to see what open buffers need to be saved (via some small tiny button you could click and get a drop down summary of the hidden tabs), and that was never added in, so it didn't happen, but I'm sure some of this will happen after we open source Zed (which is coming soon!).

@JosephTLyons JosephTLyons added workspace Feedback for workspace management, layout, interactions, etc editor Feedback for code editing, formatting, editor iterations, etc tabs Feedback for tabs behavior, navigation, style, etc setting Feedback for preferences, configuration, etc and removed triage Maintainer needs to classify the issue admin read Pending admin review labels Nov 6, 2023
@krstp
Copy link

krstp commented Nov 7, 2023

I like the idea to have control over multiple features, but isn't SHIFT+ESC already delivering this in large part? Just saying.

@gldtn
Copy link
Author

gldtn commented Nov 7, 2023

I like the idea to have control over multiple features, but isn't SHIFT+ESC already delivering this in large part? Just saying.

I would probably say far away from what vscode zen mode is capable of. All "zoom in" or SHIFT+ESC is doing is detaching the editor temporally to hide sidebar, terminal, etc..(from what I can see)! In vscode you can control tabs/fonts/line height, and all other editor/workspace aspects.. and still access sidebar, terminal, etc.. all while in the zen mode state. In Zed, it takes me out of zoom immediately if I try to access my sidebar which makes sense on how they implemented it.

With what my initial issue is proposing.. it gives us far more control of the editor. Here is another quick video for comparison, side-by-side:

zen-comparison.mp4

Notice how clean vscode is when I'm in zen mode. Also if I close and open it again, it remains that way until I choose to exit out of it.

@jansol
Copy link
Contributor

jansol commented Nov 7, 2023

Could be interesting to also optionally add something like Ghostwriter's "Focus Mode" to such a zen mode: https://ghostwriter.kde.org/ along with this.

@gldtn
Copy link
Author

gldtn commented Nov 7, 2023

Could be interesting to also optionally add something like Ghostwriter's "Focus Mode" to such a zen mode: https://ghostwriter.kde.org/ along with this.

That is a nice touch!

@JosephTLyons JosephTLyons transferred this issue from zed-industries/community Jan 24, 2024
@titouandk
Copy link

titouandk commented Jan 26, 2024

A zen mode would be very nice indeed.

I like to have a very minimal zen mode when I edit markdown in ST4 (the font is Cascadia Code):
zen-mode

I like the fact that in ST4, settings are duplicated (you have one settings file for normal mode, and another file for zen mode).
One file can display tabs for the normal mode, the other hide them for the zen mode, and so on.

ConradIrwin added a commit that referenced this issue Feb 23, 2024
The current gutter was a bit too big for my taste, so I added some
settings to change which visual elements are shown, including being able
to hide the gutter completely.

This should help with the following issues: #4963, #4382, #7422

New settings:
```json5
"gutter": {
    "line_numbers": true, // Whether line numbers are shown
    "buttons": true // Whether the code action/folding buttons are shown
}
```

The existing `git.git_gutter` setting is also taken into account when
calculating the width of the gutter.

We could also separate the display of the code action and folding
buttons into separate settings, let me know if that is desirable.

## Screenshots:

- Everything on (`gutter.line_numbers`, `gutter.buttons`,
`git.git_gutter`):
<img width="434" alt="SCR-20240210-trfb"
src="https://github.com/zed-industries/zed/assets/17355488/bcc55311-6e1d-4c22-8c43-4f364637959b">

- Only line numbers and git gutter (`gutter.line_numbers`,
`git.git_gutter`):
<img width="406" alt="SCR-20240210-trhm"
src="https://github.com/zed-industries/zed/assets/17355488/0a0e074d-64d0-437c-851b-55560d5a6c6b">

- Only git gutter (`git.git_gutter`):
<img width="356" alt="SCR-20240210-trkb"
src="https://github.com/zed-industries/zed/assets/17355488/7ebdb38d-93a5-4e38-b008-beabf355510d">

- Only git gutter and buttons (`git.git_gutter`, `gutter.buttons`):
<img width="356" alt="SCR-20240210-txyo"
src="https://github.com/zed-industries/zed/assets/17355488/e2c92c05-cc30-43bc-9399-09ea5e376e1b">


- Nothing:
<img width="350" alt="SCR-20240210-trne"
src="https://github.com/zed-industries/zed/assets/17355488/e0cd301d-c3e0-4b31-ac69-997515928b5a">



## Release Notes:
- Added settings to control the display of gutter visual elements. `"gutter": {"line_numbers": true,    "code_actions": true,    "folds": true}` ([#8041](#8041))  ([#7422](#7422))
```

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
@TerminalFi
Copy link

#8241 Would solve some of this

@insign
Copy link

insign commented Mar 1, 2024

Very very useful comment: Where can I look desperate enough to have the feature of hiding tabs implemented?

@narqo
Copy link

narqo commented Mar 1, 2024

@insign

Where can I look desperate enough to have the feature of hiding tabs implemented?

There is a list of related issues in the description. Check #6424 (this one also has more drafts and related discussions linked)

@Moshyfawn
Copy link
Contributor

Related #8762

@JosephTLyons JosephTLyons added the status bar Status bar editor state discovery, style, etc label Mar 10, 2024
@coratype
Copy link

To add to this, I'd love for the zen-mode to also get rid of the title bar. A pure, unfiltered view into the code something I haven't seen any editor do yet except for VS Code with weird extensions but I refrain from using it because the text rendering is garbage

@gldtn gldtn changed the title Zen/God mode Zen mode Mar 14, 2024
@alygin
Copy link
Contributor

alygin commented Mar 23, 2024

@gldtn,

Things we would like to hide...
[ ] Occurrences highlight

It looks like this setting does the job:

"scrollbar": {
  "symbols_selections": false
}

@codeams
Copy link

codeams commented Mar 26, 2024

Where can I find documentation on the setting keys I can set to hide/show things?

@codeams
Copy link

codeams commented Mar 26, 2024

Answering myself lol

I believe the intention is to see the defaults as there is no auto-complete at the moment?

For anyone else wondering, you can follow the instruction that is by default at the top of the settings json:

// To see all of Zed's default settings without changing your
// custom settings, run the `open default settings` command
// from the command palette or from `Zed` application menu

@alygin
Copy link
Contributor

alygin commented Mar 26, 2024

I believe the intention is to see the defaults as there is no auto-complete at the moment?

Actually, there's auto-completion in settings.json, with documentation:

изображение

@Feel-ix-343
Copy link
Contributor

Feel-ix-343 commented Apr 4, 2024

A zen mode command would be a great touch too. It shldnt change any config but just be temporary

@Feel-ix-343
Copy link
Contributor

I want to use Zen to write my notes (daily notes) and I'm very excited about this feature

@failable
Copy link

Configurable title bar would also be helpful, e.g. show file path when breadcrumb and tab bar are hidden.

Zed:

image

Emacs:

image image

mikayla-maki pushed a commit that referenced this issue Apr 16, 2024
This PR implements the Centered Layout feature (#4685):
- Added the `toggle centered layout` action.
- The centered layout mode only takes effect when there's a single
central pane.
- The state of the centered layout toggle is saved / restored between
Zed restarts.
- The paddings are controlled by the `centered_layout` setting:

```json
"centered_layout": {
  "left_padding": 0.2,
  "right_padding": 0.2
}
```

This allows us to support both the VSCode-style (equal paddings) and
IntelliJ-style (only left padding in Zen mode).

Release Notes:

- Added support for Centered Layout
([#4685](#9754)).


https://github.com/zed-industries/zed/assets/2101250/2d5b2a16-c248-48b5-9e8c-6f1219619398

Related Issues:

- Part of #4382
@PJUllrich
Copy link

PJUllrich commented Apr 27, 2024

Just wanted to share my current settings that get me pretty close to Zen mode. If I could hide the status and top bar, I'd be 100% there.

One other thing missing is a padding on the left side if I hide the gutter. If you look at the screenshots below, VSCode has a generious left padding, but Zed shows the code right next to the window edge. It would be nice to be able to configure that left padding in Zed too.

Background: I record coding session and want to eliminate any distraction from the code.

  // ZEN MODE
  "toolbar": {
    // Whether to show breadcrumbs.
    "breadcrumbs": false,
    // Whether to show quick action buttons.
    "quick_actions": false
  },
  "scrollbar": {
    // When to show the scrollbar in the editor.
    // This setting can take four values:
    //
    // 1. Show the scrollbar if there's important information or
    //    follow the system's configured behavior (default):
    //   "auto"
    // 2. Match the system's configured behavior:
    //    "system"
    // 3. Always show the scrollbar:
    //    "always"
    // 4. Never show the scrollbar:
    //    "never"
    "show": "never"
  },
  "cursor_blink": false,
  // Whether to pop the completions menu while typing in an editor without
  // explicitly requesting it.
  "show_completions_on_input": false,
  "gutter": {
    // Whether to show line numbers in the gutter.
    "line_numbers": false,
    // Whether to show code action buttons in the gutter.
    "code_actions": false,
    // Whether to show fold buttons in the gutter.
    "folds": false
  }

Current Zed Layout

CleanShot 2024-04-27 at 09 23 40@2x

Current VSCode Layout

CleanShot 2024-04-27 at 09 27 14@2x

@Yevgnen
Copy link

Yevgnen commented Apr 27, 2024

@PJUllrich You cannot enter zen when you have tabs. 🥹

@alygin
Copy link
Contributor

alygin commented Apr 27, 2024

One other thing missing is a padding on the left side if I hide the gutter.

The Centered Layout mode may help you to some extent. Though it comes with borders. You can hide borders by setting the pane_group.border theme color.

SomeoneToIgnore pushed a commit that referenced this issue May 13, 2024
None:

<img width="717" alt="none"
src="https://github.com/zed-industries/zed/assets/2101250/b2a741db-c64a-4275-a612-5a0d15c9cab7">

Gutter:

<img width="715" alt="gutter"
src="https://github.com/zed-industries/zed/assets/2101250/f7a68a6e-6eba-41b4-9042-5a5fe2ee21a4">

Line:

<img width="717" alt="line"
src="https://github.com/zed-industries/zed/assets/2101250/117f5b00-abd7-425b-8047-1a6fab8293a7">

All:

<img width="715" alt="all"
src="https://github.com/zed-industries/zed/assets/2101250/ebccc0da-0fa0-44e5-903c-cc49d975db76">

This PR adds the `current_line_highlight` setting that defines how to
highlight the current line in the editor:

- `none`: Don't highlight the current line.
- `gutter`: Highlight the gutter area only.
- `line`: Highlight the editor area only.
- `all` (default): Highlight the whole line.

The options have been borrowed from VSCode.

Fixes #5222
Part of #4382

Release Notes:

- Added the `current_line_highlight` setting that defines how to
highlight the current line in the editor (#5222).
osiewicz pushed a commit to RemcoSmitsDev/zed that referenced this issue May 18, 2024
None:

<img width="717" alt="none"
src="https://github.com/zed-industries/zed/assets/2101250/b2a741db-c64a-4275-a612-5a0d15c9cab7">

Gutter:

<img width="715" alt="gutter"
src="https://github.com/zed-industries/zed/assets/2101250/f7a68a6e-6eba-41b4-9042-5a5fe2ee21a4">

Line:

<img width="717" alt="line"
src="https://github.com/zed-industries/zed/assets/2101250/117f5b00-abd7-425b-8047-1a6fab8293a7">

All:

<img width="715" alt="all"
src="https://github.com/zed-industries/zed/assets/2101250/ebccc0da-0fa0-44e5-903c-cc49d975db76">

This PR adds the `current_line_highlight` setting that defines how to
highlight the current line in the editor:

- `none`: Don't highlight the current line.
- `gutter`: Highlight the gutter area only.
- `line`: Highlight the editor area only.
- `all` (default): Highlight the whole line.

The options have been borrowed from VSCode.

Fixes zed-industries#5222
Part of zed-industries#4382

Release Notes:

- Added the `current_line_highlight` setting that defines how to
highlight the current line in the editor (zed-industries#5222).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editor Feedback for code editing, formatting, editor iterations, etc enhancement [core label] setting Feedback for preferences, configuration, etc status bar Status bar editor state discovery, style, etc tabs Feedback for tabs behavior, navigation, style, etc workspace Feedback for workspace management, layout, interactions, etc
Projects
None yet
Development

No branches or pull requests