sminez / ad

an adaptable text editor
https://crates.io/crates/ad-editor
MIT License
264 stars 10 forks source link

Acme like mouse click selections #41

Closed Superpat closed 1 month ago

Superpat commented 1 month ago

Please describe the change / addition you'd like to see made

Is this a feature you have seen in other text editors?

Acme, though double clicking to select a word is pretty common. Triple clicking to select a line is also common, but not present in acme, though it could work well.

If so, please provide any links or reference to the existing implementation and some details on how the feature is used. I use this extensively, it's often quicker to copy paste this way then it is to use Edit.

sminez commented 1 month ago

This was implemented here: https://github.com/sminez/ad/issues/38#issuecomment-2414842446

Unless I'm misunderstanding what you are asking for?

Superpat commented 1 month ago

Yeah that stuff works, I'm talking about left mouse click double click. But acme also selects the whole word / line / block you're clicking on when you double click.

sminez commented 1 month ago

That's what is happening in the video I linked to 🙂

Double click selection of lines and delimited pairs works as you are describing here, other than "on a word to select the whole word": if you double click at the start of a word it will select until the next space character.

Superpat commented 1 month ago

Oh my bad, somehow last time I clicked on that link I got brought somewhere else and didnt see that video and that commit isnt in the latest release yet so just doing cargo install wasnt getting it. Thanks.