Skip to content

Feature request: Pre-selected default text at cursor position #11

@R4ygen

Description

@R4ygen

I was thinking about the possibility to implement another variable, similar to %%cursor%%, but that would pre-select some default text present in the snippet, when triggering it. Instead of only placing the cursor at X position.

Like those password fields that say "insert password here" and when you click on them, the whole phrase gets selected so you can start typing your password directly.

For example:

Let's say the variable is made of two parts: %%startText%% and %%endText%%

If I write the snippet:

``` %%startText%%insert programming language here%%endText%%
%%textSelection%%
```

And I trigger it while having the phrase int a=3; selected, I will obtain:

``` insert programming language here
int a=3;
```

with the phrase "insert programming language here" actively selected.

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