Repository navigation
feat: #2052 indent and outdent selected lines and list items - #5905
Merged
Merged
Conversation
Jocs
force-pushed
the
feat/2052-selection-indentation
branch
from
October 27, 2026 05:39
204a144 to
e761d91
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2052
Closes #2371
Closes #3205
Summary
Selecting several list items and pressing Tab or Shift+Tab previously did nothing. Code selections also lacked consistent multiline outdent and ignored the configured indentation width. This PR applies indentation to the selected lines/items, restores both selection endpoints, and records each key press as one undo step.
Implementation and review
block/listOperations.tsowns the structural rules shared by caret and selection indentation: item kinds, sublist reuse, looseness, tail ownership, numbering, and cloned leaf mappings. ParagraphContent passes one item; the editor coordinates selected ranges. Caret-only exit from a nested list to a paragraph and table navigation remain unchanged.block/paragraphIndentation.tsreconciles edited paragraph siblings using the existing Markdown lexer for code boundaries and the existing parser for a newly exposed paragraph tail. Its temporary source spans map the selection after structural whitespace is consumed; no source spans or new fields are persisted in document state. Both paragraph input and cross-paragraph selection handling use this conversion.Validation
Related scope
Real Tab input and code payload preservation were implemented by #5891, which also resolves #2114. This PR adds no preference keys or document state fields and does not change parser/serializer implementations. Exact source-whitespace preservation remains tracked by #2189.
Additional Ctrl+[/Ctrl+] command shortcuts (#2994) and Python-aware Enter indentation (#2427) remain separate requests.