- How do I set the default save location for a file?
- How do I set the default file type when saving a file?
Default save location and default file extension
Setting to change the default save location?
- The default save location is the location of the last active saved file.
- The default file type is based on the syntax applied to the buffer (shown in the lower-right corner, on the status bar).
[quote=“adzenith”]1) The default save location is the location of the last active saved file.
2) The default file type is based on the syntax applied to the buffer (shown in the lower-right corner, on the status bar).[/quote]
- Not for me, mine always defaults back to the Sublime install directory
- It says “Plain text” but it never appends the .txt extension automatically.
I have the VERY same two questions!
Can we set somehow to always save on the desktop by default instead of current file’s dir?
My syntaxes are now all set (was difficult to have them work), and, in my case, it is set to AutoHotKey. However, I’d like to have Sublime always assume I’m writing a .txt file to be saved in the desktop by default (thus automatically appending the .txt extension) and do not apply the AHK syntax unless I save with the .ahk extension for the first time. Is it possible?
bump
The default behavior assumes I never work on two projects, or that it is perfectly fine to randomly save files from one project into another. Furthermore, it’s weird enough that I assume it works right until my file is missing when I try to add it to git. This is wrong and indefensible.
You can use github.com/skuroda/Sublime-AdvancedNewFile to create your files. Don’t know how well it’ll fit your workflow, but you can define initial paths and a default extension.
bump…
Is there any status or ideas about this… it really is very frustrating…
updated:
I’ll clarify that the most frustrating part is where the file is saved. And, searching doesn’t seem to provide any ways/ideas on how to fix this…
It is now some year later, and I too want action on these two fronts of (1) setting a fixed, default file save location and (2) on Windows, getting Sublime to be the default editor for extensionless text files. Come on, Sublime Text, you are meant to be a good editor, so get these things (and, for goodness sake, the lack of native printing support) sorted out. Not doing so is just slapping yourself in the face, frankly.
1 https://github.com/SublimeTextIssues/Core/issues/1418#issuecomment-252268641
(or how about writing a two line plugin to set the default folder from preferences when a new tab is created?)
2 has nothing to do with ST:
https://superuser.com/questions/13653/how-to-set-the-default-program-for-opening-files-without-an-extension-in-windows
It is now even more years later, and I thought I had the same problem as everyone else…They might genuinely have a problem but for me I realized that It turns out that for only the first time you “Save as…” you have to specify the file path and the type of file manually. Once you do that, it then saves to the last active file, depending on where you saved it. Hopefully this helps.
[Because this thread keeps coming up on Google / DuckDuckGo]
https://sublime-text-unofficial-documentation.readthedocs.io/en/latest/reference/settings.html#file-and-directory-settings has the variable default_dir
for your settings file. On my Windows machine that is CTRL-SHIFT-P
--> preferences:settings, then add a line
"default_dir": "C:\\Users\\tcl\\OneDrive\\Desktop",
(you have to escape the \
)
Thorsten