You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
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.
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.
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.
The text was updated successfully, but these errors were encountered: