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

Feature request: open temporary buffer that isn't associated with file #93

Open
edwloef opened this issue Dec 23, 2024 · 3 comments
Open
Labels
enhancement New feature or request
Milestone

Comments

@edwloef
Copy link
Contributor

edwloef commented Dec 23, 2024

The way this could work is that you get the option to create an empty buffer, set its language, and then to save it to a file you perform the "save as" action.

@neurocyte
Copy link
Owner

You're describing the open_file command. open_file will allow you to 'open' a file that doesn't exist. It will be created when you save. If you want a keybinding that goes directly to a scratch buffer without first asking for a filename via the file_browser you can directly bind the navigate command with a (non-existant) file name.

@neurocyte neurocyte added the question Further information is requested label Dec 23, 2024
@edwloef
Copy link
Contributor Author

edwloef commented Dec 23, 2024

I guess this might just be a workflow difference... I very often just open up a text editor as a scratchpad for notes while I'm doing something else, and since I'm used to constantly saving anything I work on, I also reflexively ctrl-s the notes, which has for me often led to random files being created at random places or within projects, because there's no confirmation (no opportunity to cancel) before saving.

@edwloef edwloef closed this as completed Dec 23, 2024
@neurocyte
Copy link
Owner

I think it's a valid use case. So, basically a scratch buffer is a file that can only be saved with save_as. I think that could be generally useful. It could be used for help.md for example, which is an internal file opened by the Open help command and shouldn't accidentally be saved to the filesystem if the user presses ctrl+s. But if you really want to save it, save_as should be allowed.

@neurocyte neurocyte reopened this Dec 23, 2024
@neurocyte neurocyte added enhancement New feature or request and removed question Further information is requested labels Dec 23, 2024
@neurocyte neurocyte added this to the v0.3.0 milestone Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants