Add selectInside/selectSurroundingPair commands (with tests)#189
Open
CB2Moon wants to merge 3 commits intoselfint:mainfrom
Open
Add selectInside/selectSurroundingPair commands (with tests)#189CB2Moon wants to merge 3 commits intoselfint:mainfrom
CB2Moon wants to merge 3 commits intoselfint:mainfrom
Conversation
This commit adds multi-cursor support to selectBlock, updateSelection, moveSelection, and navigate commands. When multiple cursors or selections exist, each is processed independently and results are merged intelligently. Changes: - selectBlock: Maps over all selections to find blocks at each cursor - updateSelection: Updates each selection independently (parent/child/next/prev) - moveSelection: Orders moves to prevent interference, handles single vs multi - navigate: Collects navigation targets for all cursors - Add mergeSelections helper to combine overlapping selections - Add dedupeSelections helper to remove duplicate cursor positions - Add comprehensive test suite (MultiSelectBlockMode.test.ts)
…de; Update tree-sitter dependency to fix typing and parser loading issues This commit adds two new commands for working with paired delimiters (brackets, quotes, parentheses) along with an interactive pair edit mode. New commands: - selectInside: Cycle through content/full/outer selections for pairs - selectSurroundingPair: Enter pair edit mode to rename delimiters Features: - Pair edit mode with visual decorations and status bar indicator - Type opening delimiter to replace both open/close delimiters - Escape to exit mode, backspace/delete work within mode - Supports multi-cursor/multi-select for batch operations - Add utilities/selectionUtils.ts with findContainingPair helper - Export positionToPoint from FileTree for tree-sitter integration - Add keybindings: Ctrl+Alt+I (selectInside), Ctrl+Alt+' (pair edit) - Add context 'codeBlocks.awaitingPairEdit' for conditional keybindings
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.
Added select inside brackets (or markup tags) shortcut
Added select surrounding pair brackets
Update tree-sitter version to fix some errors