Home Download Buy Blog Forum Support

Unwanted amendments to my files

Unwanted amendments to my files

Postby mmcgrath on Thu Oct 04, 2012 9:08 am

Hi
I *love* ST2 but am infuriated by its love of making edits to parts of my files that I am not editing. Our software revision control system (git) sees these changes, resulting in very messy commits. The problem seems to be where there are superfluous spaces in source code (Ruby and JavaScript, if this matters) -- Sublime Text helpfully cleans these up but I don't want it to -- I'm sure there's a simple config directive to prevent this behaviour but I don't know what it is.

Any help gratefully received!

Thanks,
Michael
mmcgrath
 
Posts: 2
Joined: Thu Oct 04, 2012 9:04 am

Re: Unwanted amendments to my files

Postby jbjornson on Thu Oct 04, 2012 9:22 am

Try adding the following setting in your user settings:
Code: Select all
   "trim_trailing_white_space_on_save": false
jbjornson
 
Posts: 353
Joined: Tue Oct 27, 2009 4:25 pm
Location: Zurich, Switzerland

Re: Unwanted amendments to my files

Postby jbjornson on Thu Oct 04, 2012 9:25 am

Not sure what is does, but you could also play with the "trim_automatic_white_space" settings as well...
jbjornson
 
Posts: 353
Joined: Tue Oct 27, 2009 4:25 pm
Location: Zurich, Switzerland

Re: Unwanted amendments to my files

Postby mmcgrath on Thu Oct 04, 2012 9:26 am

jbjornson wrote:Try adding the following setting in your user settings:
Code: Select all
   "trim_trailing_white_space_on_save": false

I now owe you a pint! Problem solved :D
mmcgrath
 
Posts: 2
Joined: Thu Oct 04, 2012 9:04 am


Return to Technical Support

Who is online

Users browsing this forum: Yahoo [Bot] and 15 guests