Sign in to follow this  
Followers 0
Spiff59

Changing the save behavior of SciTE?

6 posts in this topic

(Maybe this question should go on another website?)

Here's my habit:

I need a one-time quick-fix or test job, so:

I jump into some source file with code similar to what I'll need.

I butcher the heck out of it to suit my needs.

Then I "Save As" in SciTE with a new filename, and exit SciTE.

Does anyone know why a couple times now, with no prompt out of SciTE, , I've also ended up with the original file chopped to pieces?

Thinking (way) back, I can't recall ICCF, X-Edit or any editor I've used since allowing me to unknowingly get away with this.

Is there a preference/option I can change to put more prompting on SciTE's save routines, or stop save-as from doing a hidden, no-prompt, save of the original file?

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

(Maybe this question should go on another website?)

Here's my habit:

I need a one-time quick-fix or test job, so:

I jump into some source file with code similar to what I'll need.

I butcher the heck out of it to suit my needs.

Then I "Save As" in SciTE with a new filename, and exit SciTE.

Does anyone know why a couple times now, with no prompt out of SciTE, , I've also ended up with the original file chopped to pieces?

Thinking (way) back, I can't recall ICCF, X-Edit or any editor I've used since allowing me to unknowingly get away with this.

Is there a preference/option I can change to put more prompting on SciTE's save routines, or stop save-as from doing a hidden, no-prompt, save of the original file?

Did you run the script from within SciTE before your "save-as"? That causes an automatic save.

Best habit: open the file you want to steal from, immediately do a save-as, and then start butchering :P

Edited by ResNullius

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Did you run the script from within SciTE before your "save-as"? That causes an automatic save.

Best habit: open the file you want to steal from, immediately do a save-as, and then start butchering :P

Thanks, Res.

That would explain it.

SciTE must submit the actual original source file to the interpreter and therefore needs to save the changes you've made in the editor first. A shame it doesn't just build a temp file and submit that, and let me decide what files are saved when.

Are there no options to avoid this, other than tying a string around my finger?

Thanks again.

Edit: I found an answer on the Scintilla site. You can edit the SciTE .properties file:

When running or building a file, its most likely that you want the file to be saved first. To enable a confirmation dialog for performing Compile, Build or Go commands, set are.you.sure.for.build=1.

Now, I have to decide if the hassle of getting prompted every time I do a run out of SciTE is worth it... Edited by Spiff59

Share this post


Link to post
Share on other sites

You could also use the SciTE4Autoit3 installer which has an option that will keep the last X version of the file.

This allows for an oops :P


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

....SciTE must submit the actual original source file to the interpreter and therefore needs to save the changes you've made in the editor first....

Yes, it does that.

Another trick that you might try is to place a read-only attribute on the original file and/or make a copy of it before editing.


[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

THe best option which is what I have learned to do. Very first thing when you are about to butcher an existing script just save it with a name like testblahblahblah . Just makes life easier and this does not happen. I got used to this after the first three times or so of losing my originals

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0