-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
Editor improvements (#4637, #3685) #5423
Editor improvements (#4637, #3685) #5423
Conversation
Hi @outcoldman, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution! TTYL, MSBOT; |
@outcoldman, Thanks for signing the contribution license agreement so quickly! Actual humans will now validate the agreement and then evaluate the PR. |
5b0205e
to
2becfdf
Compare
Should the option only trim empty lines(only contain space characters) and not trim trailing spaces if the line have other content? Thus, the markdown file's wanted trailing spaces will not be removed when we press enter. |
@treri yeah, that makes sense, I will do appropriate changes (also checked with Sublime Text on default behaviors):
|
@outcoldman Thanks for your awesome work 👍 |
2becfdf
to
d0893f0
Compare
@alexandrudima @egamma could you take a look on fix for the test |
@treri you are welcome :) This "feature" also annoys me, good to have an option to fix editor you use. |
@outcoldman thanks for the contribution. Some of the team members are on vacation expect some delays until we get back to you. |
@egamma @alexandrudima I updated this PR with one more change for the editor. I keep changes in separate commits, but the same PR, because one is depend on another one (just a common helper function). Travis failed with some unrelated problem, could you guys bump it to run it again? |
7e04814
to
c875ade
Compare
ac1cdea
to
30ae671
Compare
@egamma @alexandrudima can we get it to the April milestone? I made it configurable, so if it will break something - will be possible to turn it off. |
When use double enter with automatic indention - in most cases user does not want to keep indentation on skipped lines. On every enter command cursor checks if the line which will be on the left has only whitespaces - and extend cursor range to remove whitespaces.
In case when on the left side of the line there are only spaces - help user to delete whole indent = tab size.
30ae671
to
07cc283
Compare
Fixed merge conflict. @alexandrudima @egamma any updates on this PR? Could you add it to April milestone? |
👍 ping @alexandrudima @egamma |
@outcoldman April's development is finishing up on Monday and @alexandrudima is still out. Since he's the one who needs to review this I don't think it will make it in. |
Could anyone add this PR to May milestone? |
…sed changes - add `editor.useTabStops` for tab/backspace behaviour - add `editor.trimAutoWhitespace` for auto inserted whitespace cleanup
@outcoldman Thank you for the contribution! ❤️ I have merged the proposed changes in fb5b68d and I also did quite some improvements to them, specifically:
P.S. It does not appear as a merge here because this PR contains two 2 MB files and I dropped the parent reference on the merge commit to try to keep our repo .git folder footprint small. |
[sarcasm] |
@outcoldman I am very sorry, it was not my intention to not give you credit for your work, you get all the credit for what you have contributed! ❤️ . I have tried my best to do the right thing (give credit where it's due) in the commit message (fb5b68d) and in the comments of #4637 and #3685. We will also link to this pull request and mention it in the VSCode May release notes. Looking forward to further contributions from you where I can just click the merge button -- you can ignore |
Maybe you can firstly checkout this PR locally, and then edit as you like, and then use Then the commit log will be |
@alexandrudima next time you could ask. I know rebase/reset magic which allows me to remove these files from the history. I actually did it right after I relalized that there were checked in, but got distracted and forgot to update my branch. Anyway, no bad feelings. Thank you for accepting the work and making improvements. |
Thanks so much, @outcoldman! Probs my favorite update in 1.2! |
@outcoldman I think you can add a option, when selected to show indentation, like Sublime Text. |
Implement trim whitespaces on enter #4637
When use double enter with automatic indention - in most cases user does
not want to keep identation on skipped lines. This change introduces new
editor configuration
editor.trimWhitespacesOnEnter
, which isfalse
by default (for backcompatibility).
On every enter command cursor checks if the line which will be on the
left has some whitespaces which can be trimmed - and extend cursor
range to remove whitespaces.
Backspaces decreases indent #3685
In case when on the left side of the line there are only spaces - help
user to delete whole indent = tabSize.