New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unmodified file will also be saved #32

Closed
huaz836 opened this Issue May 13, 2014 · 8 comments

Comments

Projects
None yet
3 participants
@huaz836

huaz836 commented May 13, 2014

So, the file's "Date Modified" will change. This is usually not the desired results.
Sublime Text 2.0.2,windows 8

@adampresley

This comment has been minimized.

Show comment
Hide comment
@adampresley

adampresley May 13, 2014

Owner

Can you describe exactly what you are seeing and the steps you take to get there please?

Owner

adampresley commented May 13, 2014

Can you describe exactly what you are seeing and the steps you take to get there please?

@huaz836

This comment has been minimized.

Show comment
Hide comment
@huaz836

huaz836 May 14, 2014

thx. I just viewing the code,and won't change it.
before "View in Browser"
before
View in Browser
view
I didn't modified the code in sublime,nor ctrl-s
sublime shows the file was saved
view2
after
after

huaz836 commented May 14, 2014

thx. I just viewing the code,and won't change it.
before "View in Browser"
before
View in Browser
view
I didn't modified the code in sublime,nor ctrl-s
sublime shows the file was saved
view2
after
after

@adampresley

This comment has been minimized.

Show comment
Hide comment
@adampresley

adampresley May 14, 2014

Owner

Ah, ok. Yes, currently the file is saved so that it can be opened in a browser, as the browser must have some file to point to. It would be possible to save to a temporary file and view that instead, but that would have negative side-effects to the ability to view files on a local server environment (https://github.com/adampresley/sublime-view-in-browser/wiki/Viewing-on-a-Local-Server). So I'm not sure that is the correct course of action.

Owner

adampresley commented May 14, 2014

Ah, ok. Yes, currently the file is saved so that it can be opened in a browser, as the browser must have some file to point to. It would be possible to save to a temporary file and view that instead, but that would have negative side-effects to the ability to view files on a local server environment (https://github.com/adampresley/sublime-view-in-browser/wiki/Viewing-on-a-Local-Server). So I'm not sure that is the correct course of action.

@huaz836

This comment has been minimized.

Show comment
Hide comment
@huaz836

huaz836 May 14, 2014

Well, I don't know how to make sublime plugin. I think if it can just read the file path, and view in broswer. Regardless of whether the file was saved. Actually a coder always ctrl-s. I don't know if it will affect on local server.

huaz836 commented May 14, 2014

Well, I don't know how to make sublime plugin. I think if it can just read the file path, and view in broswer. Regardless of whether the file was saved. Actually a coder always ctrl-s. I don't know if it will affect on local server.

@adampresley

This comment has been minimized.

Show comment
Hide comment
@adampresley

adampresley May 14, 2014

Owner

"Regardless of whether the file was saved" There is no way to load a file that isn't saved yet. At that point, unsaved, it will be in Sublime's buffer memory. Is your concern that the date/time stamp on the file's modified attribute is changed? If so why?

If you are simply trying to make changes to a file, not save them, and view it in the browser, you won't be able to do that with your existing file. You can, however, copy the file's contents to a new tab (buffer) and run View In Browser. That will save the contents to a temporary file and open in the browser.

Owner

adampresley commented May 14, 2014

"Regardless of whether the file was saved" There is no way to load a file that isn't saved yet. At that point, unsaved, it will be in Sublime's buffer memory. Is your concern that the date/time stamp on the file's modified attribute is changed? If so why?

If you are simply trying to make changes to a file, not save them, and view it in the browser, you won't be able to do that with your existing file. You can, however, copy the file's contents to a new tab (buffer) and run View In Browser. That will save the contents to a temporary file and open in the browser.

@Whitexp

This comment has been minimized.

Show comment
Hide comment
@Whitexp

Whitexp May 14, 2014

Good
Em 14/05/2014 07:39, "Mr.Huaz" notifications@github.com escreveu:

Well, I don't know how to make sublime plugin. I think if it can just read the file path, and view in broswer. Regardless of whether the file was saved. Actually a coder always ctrl-s. I don't know if it will affect on local server.


Reply to this email directly or view it on GitHub.

Whitexp commented May 14, 2014

Good
Em 14/05/2014 07:39, "Mr.Huaz" notifications@github.com escreveu:

Well, I don't know how to make sublime plugin. I think if it can just read the file path, and view in broswer. Regardless of whether the file was saved. Actually a coder always ctrl-s. I don't know if it will affect on local server.


Reply to this email directly or view it on GitHub.

@huaz836

This comment has been minimized.

Show comment
Hide comment
@huaz836

huaz836 May 15, 2014

Yeah, sometimes I sort files by the date/time stamp, so that I can find the latest modified file. (Actually I have worried about the date/time stamp changed will affect the svn or git, but it doesn't.) And, I feel weird if the date/time stamp changed while I didn't do any modify. Am I a little bit OCD? 😔

Sorry for confused you, maybe I can't make myself understood. The auto-save is good and reasonable, but not for unmodified file, although it just change it's date/time stamp. It will be better to not deal with them.

p.s. I'm in China, maybe the other side of the earth. You may be sleeping now. The github is amazing, and I'm a newbie here. Anyway, nice to meet you 😃 .

huaz836 commented May 15, 2014

Yeah, sometimes I sort files by the date/time stamp, so that I can find the latest modified file. (Actually I have worried about the date/time stamp changed will affect the svn or git, but it doesn't.) And, I feel weird if the date/time stamp changed while I didn't do any modify. Am I a little bit OCD? 😔

Sorry for confused you, maybe I can't make myself understood. The auto-save is good and reasonable, but not for unmodified file, although it just change it's date/time stamp. It will be better to not deal with them.

p.s. I'm in China, maybe the other side of the earth. You may be sleeping now. The github is amazing, and I'm a newbie here. Anyway, nice to meet you 😃 .

@adampresley

This comment has been minimized.

Show comment
Hide comment
@adampresley

adampresley May 15, 2014

Owner

I have pushed an update that will only save the file if it is marked as "dirty", meaning if it has modifications.

Owner

adampresley commented May 15, 2014

I have pushed an update that will only save the file if it is marked as "dirty", meaning if it has modifications.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment