Sublime Forum

Text storage?

#1

When I create text with Sublime and close the program without saving it, is the text saved anywhere on disk such that I can access it with another program,
or do I have to explicitly save it myself before I exit Sublime? If so, where?

I thnk it would be better if it saved somewhere when I exit.

0 Likes

#2

The contents are saved in the session file along with the rest of the application’s data. It is not accessible separately.

0 Likes

#3

Is there any chance for enabling automatic external storage at exit for emergencies? I had instances of system crashes where I lost large amounts of text.

0 Likes

#4

The session is written atomically, it should not be lost in the case of system crashes or power outages.

0 Likes

#5

That’s what I expected, but…

Sublime was installed on partition D. System was on partition C:. I had to restore C from backup and when I opened Sublime, the text was not there.

If the text was on D it should have been there, but wasn’t.

Am I missing something here?

0 Likes

#6

ST stores session file in %APPDATA%\Sublime Text when installed normally. So if you don’t use ST in portable mode and your user profile is located on C:, restoring C: partition cleared your ST profile as well.

0 Likes

#7

That’s what I figured, which is why I never liked splitting the components of an application in multiple locations – I see no benefit and only risks with that.

And I just got more proof of it.

0 Likes

#8

Separation of application and data is a crucial security concept. You should just had to have moved your user profile folder to a separate partition as well, to separate it from Windows.

That said, ST supports “portable mode”. If a “Data” directory exists in install directory, it is used to store all user preferences.

1 Like

#9

Also, if you have your unsaved buffers in a “project”, SLT will save them within the *.sublime-workspace file. I have a Scratchpad.sublime-project in my google drive for that exact reason.

FWIW %APPDATA% is the exact place to put such data according to OS guidelines, so it’s always a good idea to include that in your backup.

1 Like

#10

Methinks that security preferences are the user’s and should be left to her/his choice, If I risk it and lose, it’s my responsibility – can’t blame anybody else.
But that’s just me.

Can you pls advise what folder do I move from where to where to have everything in the app folder on D?

Thanx.

0 Likes

#11

I am sorry, but this is too technical for me.

All I would like to know is what Sublime folder(s) on C: exist thaat I could xfr to D such that the app is aware of it.

Thanx.

0 Likes

#12

It really reads like you should try the portable version of Sublime. That’s a zip you can extract wherever you want and basically is a self-contained Sublime version. (It still updates.) But you can put it on any drive, and it is easy to backup. (You could also have multiple versions of Sublime this way.)

0 Likes

#13

Thank you.

It does sound like what I need, it just did not appear so from the name. So I will try it. Will try.

0 Likes

#14

I switched to the portable version and it looks like that’s what I wanted.

But as long as I have you here, there is a very weird problem with both versions that I do not see in any other program. While I write, the cursors often jumps to random locations in the text so fast that I cannot react and continue to type and the text is inserted in those placesand I have to wipe it out. It happens a lot and is extremely annoying. It seems it happens in particular if I stop typing for a second or two. The system emits an annoying sound when it happens.

Anybody experiencing this? Any idea what causes it and how to stop it?

0 Likes

#15

Does it happen in safe mode?

0 Likes

#16

Have no idea – never used it.
My question is whatever happens in safe mode, why don’t I see the problem in other apps? Why only Sublime?

0 Likes

#17

I’m asking you to try safe mode, to see if it’s due to a customization you’ve made to ST.

0 Likes

#18

Since I just uninstalled ST and installed portable, I made NO customization. I did not have time and besides I did not customize even the first version. It works for me out of the box – don’t need it.

Besides, it happens in both versions.

BTW, where is the text in the portable installation – could not see it.

0 Likes

#19

You may have some Accessible tools enabled in Windows. Also older keyboards can beep if you’re holding too many keys down at the same time. And e.g. a track pad can misbehave if you’re on a laptop. There are really many ways to get that.

0 Likes

#20

Sorry, but based on my experience, none of these seem to be the cause.
I do not use any Windows tools.
I do not have any need to hold multiple keys.
I do not have and use a trackpad.
And, to repeat: it happens only in Sublime. If any of those factors were responsible, I would have the problem in other applications.

The text would remain in Sublime after I closed it; but not in the portable version. Is this how it should be? Why? In this sense it is worse than the regular.

0 Likes