Skip to content
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

Should not trim current line on save given these settings #97

Open
pavellishin opened this issue Dec 5, 2015 · 2 comments
Open

Should not trim current line on save given these settings #97

pavellishin opened this issue Dec 5, 2015 · 2 comments

Comments

@pavellishin
Copy link

My current user settings are:

{
    "trailing_spaces_trim_on_save": true,
    "trailing_spaces_include_current_line" : false
}

I believe that this means that my current line should not be trimmed when I hit save, but it does get trimmed.

@pavellishin pavellishin changed the title Should not trim current line on save Should not trim current line on save given these settings Dec 5, 2015
@Vlad-Shcherbina
Copy link

(just another user here)
According to the documentation in default config, trailing_spaces_include_current_line affects what is displayed, not what is trimmed (unlike, say, trailing_spaces_modified_lines_only).

In my opinion, this behavior makes sense. The idea is to avoid constant flashing with trailing whitespace highlights as one types text with spaces. I can imagine situations where you might want to trim current line only, but trimming all but current line?.. Do you have a usecase for that?

@pavellishin
Copy link
Author

Sorry for the late reply, life's a bit hectic at the moment.

According to the documentation in default config, trailing_spaces_include_current_line affects what is displayed, not what is trimmed (unlike, say, trailing_spaces_modified_lines_only).

Ah, okay, you're right - I should have read that more closely.

Do you have a usecase for that?

I'm a habitual CMD-S typer, and when I'm in the middle of an indented block of code, it's a little annoying to have my cursor get reset to the start of the line. Basically, any time when you're in the middle of something and want to save and come back in a minute without being sent to the start of the line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants