Skip to content

Customize "smart selection" in .twee files #177

@BawdyInkSlinger

Description

@BawdyInkSlinger

The expand keyboard shortcut^1 works differently in different file types. Here's how it works in typescript files:

gif

The selection logic is much simpler for twee files:

gif

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 ):

Discord conversation with additional context: https://discord.com/channels/389867840406159362/805430927794372608/1325340706998321255


^1:
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions