-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
The expand keyboard shortcut^1 works differently in different file types. Here's how it works in typescript files:
The selection logic is much simpler for twee files:
Although I'm not exactly sure how I would prefer this to work, I do think there's room for improvement. For example:
-
If the cursor is within a macro container, it would be helpful for it to expand to the whole body of the macro container
- then the macro tags
- then repeat until there are no more macros around the selection
- then select the entire passage excluding the passage line
- then select the entire passage, including the passage line
- then the entire file
-
Since twee files contain a lot of prose, expanding selections from words
- to surrounding quotes
- to the quotes themselves
- to the sentence (?)
- to the paragraph, would probably be helpful.
Here are some helpful resources to implement this functionality ( @cyrusfirheir found these, not me ):
- https://code.visualstudio.com/api/references/vscode-api#SelectionRangeProvider
- https://github.com/microsoft/vscode/blob/main/extensions/typescript-language-features/src/languageFeatures/smartSelect.ts
Discord conversation with additional context: https://discord.com/channels/389867840406159362/805430927794372608/1325340706998321255
Metadata
Metadata
Assignees
Labels
No labels