Comments (1)
Yeah, I can see that might be annoying. Although what we really need is just to not trim the current line; I would like to trim other lines that I am done working on. Otherwise the auto-saved version would be too different from the "ctrl+s" manually saved file. Other editors (e.g. Komodo Edit) has an option to not trim the current line when trimming trailing white spaces.
As a short term solution, you can increase the auto-save delay, but I can see that's not really an optimal solution. A better solution might be to have auto-save manually trim the current view, but exclude the current line. AFAIK, it is not possible to alter the behaviour of Sublime Text when saving, i.e. if you have trim_trailing_white_space_on_save
enabled, then sublime text will trim trailing white spaces, just like when you manually save with ctrl+s. And there is nothing we can do from the plugin side to change that. Other than, perhaps, toggling trim_trailing_white_space_on_save
off before saving, and on again after saving.
This does seem a bit like another example where it would be nice to customize how the API save command is invoked. We have a similar case where we don't want Sublime Text to hide word completions when saving (PR #27). In other words, it would be nice to be able to invoke save with something like: view.run_command("save", {"trim_trailing_white_spaces": False, "hide_autocomplete_popup": False}))
-- where the second argument is a dict to customize the behaviour of the save command, in this case not hiding autocomplete popups and not trimming trailing white spaces.
from auto-save.
Related Issues (20)
- enable plugin change time of save HOT 1
- I want: By default, auto-save is enabled. HOT 3
- Problem with autocomplete HOT 27
- CAN'T GET IT TO WORK! What might I be doing wrong?! HOT 1
- Editor scrolling after each save
- Use debouncing to save only when necessary HOT 2
- Going back to start of line when saving on empty line HOT 2
- have auto indent alongside auto save HOT 4
- Can all the autobackups have a folder specified so they are all saved in one folder?
- [Feature request] Auto save temporary files
- Autosave not working HOT 4
- Main.sublime-menu and Main.sublime-commands should be renamed to auto-save.*
- Autosave: Please provide option to be on by default HOT 3
- Autosave current file only for few files
- Don't save repeatedly while I'm editing HOT 1
- losing focus when saving HOT 1
- I added code in Preferences / Key Bindings, but auto-save is not happened HOT 2
- AutoSave Not Saving Automatically (FIXED) HOT 1
- Conflict with extension latextools
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from auto-save.