zed icon indicating copy to clipboard operation
zed copied to clipboard

Zen mode

Open gldtn opened this issue 1 year ago • 21 comments

Check for existing issues

  • [X] 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:

  • [X] Left/Right Sidebar
  • [X] Dock
  • [ ] Title bar
  • [ ] Tabs
  • [X] Breadcrumbs
  • [ ] Status bar
  • [X] Line numbers
  • [ ] Current line highlight
  • [X] Occurrences highlight
  • [ ] Indent guides* (zed doesn't have them yet?)
  • [X] Ignore files in finder/explorer bar
  • [X] 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..

  • [x] buffer_font_family
  • [x] buffer_font_features
  • [x] buffer_line_height
  • [x] 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. https://github.com/zed-industries/zed/issues/5373
  2. https://github.com/zed-industries/zed/issues/5120
  3. https://github.com/zed-industries/zed/issues/4685
  4. https://github.com/zed-industries/zed/issues/4756
  5. https://github.com/zed-industries/zed/issues/4963
  6. https://github.com/zed-industries/zed/issues/4461
  7. https://github.com/zed-industries/zed/issues/4500
  8. https://github.com/zed-industries/zed/issues/5150
  9. https://github.com/zed-industries/zed/issues/5185
  10. https://github.com/zed-industries/zed/issues/5443
  11. https://github.com/zed-industries/zed/issues/5365
  12. https://github.com/zed-industries/zed/issues/6424
  13. https://github.com/zed-industries/zed/issues/7422
  14. https://github.com/zed-industries/zed/issues/4204
  15. https://github.com/zed-industries/zed/issues/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:

https://github.com/zed-industries/community/assets/981383/639167f8-78a2-4560-9818-46220dc0c615

gldtn avatar Nov 04 '23 05:11 gldtn

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 avatar Nov 06 '23 14:11 JosephTLyons

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

krstp avatar Nov 07 '23 05:11 krstp

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:

https://github.com/zed-industries/community/assets/981383/a45143a6-c01a-46ca-aa79-fa00c22657c7

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.

gldtn avatar Nov 07 '23 23:11 gldtn

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.

jansol avatar Nov 07 '23 23:11 jansol

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!

gldtn avatar Nov 07 '23 23:11 gldtn

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.

titouandk avatar Jan 26 '24 17:01 titouandk

https://github.com/zed-industries/zed/pull/8241 Would solve some of this

TerminalFi avatar Feb 23 '24 15:02 TerminalFi

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

insign avatar Mar 01 '24 10:03 insign

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

narqo avatar Mar 01 '24 11:03 narqo

Related #8762

Moshyfawn avatar Mar 03 '24 16:03 Moshyfawn

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

sihayas avatar Mar 14 '24 03:03 sihayas

@gldtn,

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

It looks like this setting does the job:

"scrollbar": {
  "symbols_selections": false
}

alygin avatar Mar 23 '24 16:03 alygin

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

codeams avatar Mar 26 '24 01:03 codeams

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

codeams avatar Mar 26 '24 01:03 codeams

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:

изображение

alygin avatar Mar 26 '24 04:03 alygin

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

Feel-ix-343 avatar Apr 04 '24 16:04 Feel-ix-343

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

Feel-ix-343 avatar Apr 04 '24 16:04 Feel-ix-343

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

Zed:

image

Emacs:

image image

failable avatar Apr 14 '24 15:04 failable

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

PJUllrich avatar Apr 27 '24 07:04 PJUllrich

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

Yevgnen avatar Apr 27 '24 07:04 Yevgnen

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.

alygin avatar Apr 27 '24 18:04 alygin