zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
47.64k stars 2.79k forks source link

Persistent scratch buffer #5274

Open Daeraxa opened 2 years ago

Daeraxa commented 2 years ago

Check for existing issues

Is your feature request related to a problem?

Would be nice to have an auto-saving scratch buffer that persists across windows and sessions. Zed starts with your standard 'untitled' buffer but this is only relevant to the current window and is lost on close unless manually saved. The reasoning behind this is to have somewhere to jot down notes or keep snippets of data for re-use (not full snippet support, just a generic temporary storage).

Describe the solution you'd like

On a new window (or new pane) the scratch buffer is opened (as an optional alternative to the standard untitled buffer). Could also be manually opened in any existing pane.

The buffer would save automatically and would persist over sessions and windows (i.e. if I have two Zed windows then the scratch is shared between them). It would remain 'pinned' to the top of the project list (if desired).

Not sure how Zed would detect the language used unless a setting is added to manually mark the language of current buffer. If I wanted to be really fancy then it should be able to detect URLs and make them clickable.

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

image

bersace commented 2 months ago

Doom Emacs binds scratch buffer to space x.

I usually have an unversionned markdown file in each project. Like a personnal README. Having it per project is very useful before triggering an issue for every idea in each project.