-
Notifications
You must be signed in to change notification settings - Fork 595
Support for multiline indentation #245
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
Support for multiline indentation #245
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
lhecker
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm unfortunately not sure if we can merge this in the current state. I apologize for that. 🙈
Aside from the issues I mentioned, I believe this needs some polishing, because it's currently significantly larger than it likely could be. I have a strong gut feeling that the feature can be implemented in around 100 lines of code with a general approach that's similar to the existing code.
AmirTallap
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well done, thanks!
Please have a look; refactored the implementation with a leaner approach & added multi-line support. Thanks! |
|
I'll review it again once I get a chance. 🙂 |
|
@DHowett requesting extra eyes on this 👀 would be nice early on so as to alleviate frequent conflicts. |
|
I'll go through this PR after #397 merges, as it introduces the ability to group multiple changes into a single undo. This will be very useful for this PR as well. |
DHowett
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks so much both of you for doing this!
Overview
Closes #110.
Normally, editors do support indentation based on where the cursor is positioned at:
TABshould add an indent from the beginning of the lineTABshould add an indent from the current cursor positionTABshould add an indent relative to that text selectionSHIFT+TABshould do the inverse of all the operations mentioned aboveTABorSHIFT+TAB, should work as explained above for the lines selectedThis PR aims to implement this feature in a simple way.
Demo
Screen.Recording.2025-05-24.at.17.50.50.mov