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

Automatic trailing white spaces on line move #86

Open
eorroe opened this issue Jun 16, 2015 · 3 comments
Open

Automatic trailing white spaces on line move #86

eorroe opened this issue Jun 16, 2015 · 3 comments

Comments

@eorroe
Copy link

eorroe commented Jun 16, 2015

So if I'm on a line of code and I move to another line the trailing spaces are automatically deleted from last line I was on.

Pros:

  1. When on an untitled tab where let's say I paste some code and edit it I'll be able to delete trailing spaces by moving from line to line (As of right now I can't delete trailing spaces on save since it's an untitled tab, so I have to call Delete Trailing spaces)
  2. No need to call Delete Trailing Spaces since it'll just delete all the trailing spaces when I move from line to line. (Yet you'll keep this simply because of people just installing this, and call this on files which they already have trailing spaces)
  3. Your algorithm wouldn't have to search the whole file for trailing spaces, again since it'll do it by moving from line to line.

Cons:

I had one in mind but I already forgot so I'm not sure if there really is any.

So over all this would improve productivity because we don't need to wait till we save file, or call Delete Trailing Spaces

If this is a sure no, perhaps as an option in the settings

@rchl
Copy link
Member

rchl commented Sep 20, 2015

Could potentially be annoying in following situation:

  1. You press enter after writing a line.
    => Next line gets indented automatically
  2. You move back to previous line for a moment (maybe you forgot to add semicolon or something)
  3. You go back to previous line and now indentation is gone so you have to press tab.

@eorroe
Copy link
Author

eorroe commented Sep 20, 2015

That's true and interesting, I can't really think of a way to avoid this, not sure if you can think of one, but perhaps leave this issue open just in case someone does?

@rchl
Copy link
Member

rchl commented Apr 27, 2020

To be fair, that auto-added indention is currently removed by ST on typing something on another line.
But it still could get more annoying if trailing spaces would just be removed on navigating to another 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