Page 1 of 1

Options for double-click selection of text

Posted: Wed Jan 15, 2020 10:55 am
by jwellbelove
I run a C++ programming site and I'm often selecting bits of code to change the colour or font.
A lot of my code contains words separated by a hyphen i.e. uint_least8_t

When selecting these with a double-click I only ever get the text up to the hyphen. i.e. uint_least8_t
Because of this I have to hand select the text with the mouse, which is slow and agravates RSI.

It would be really useful to have the option to make words with a hyphen a single whole word when it comes to double-click selection.

Re: Options for double-click selection of text

Posted: Wed Jan 15, 2020 10:58 am
by WWBman
You mean an underscore.

Re: Options for double-click selection of text

Posted: Wed Jan 15, 2020 11:03 am
by jwellbelove
Yes, that's what I meant!

Re: Options for double-click selection of text

Posted: Wed Jan 15, 2020 11:24 am
by Pablo
WWB uses the standard text editor of Windows (richedit). Unfortunately, I do not have any control over this behavior.
Only Microsoft can add this functionality.

Re: Options for double-click selection of text

Posted: Wed Jan 15, 2020 11:45 am
by jwellbelove
That's a shame. It really slows me down and aggravates my RSI to hand select dozens of underscore separated words.

Re: Options for double-click selection of text

Posted: Wed Jan 15, 2020 1:14 pm
by jwellbelove
How about, as an alternative, a search/replace option to modify the style for all instances of specified text on a page.

i.e. Change all instances of "uint_least8_t" to have style "X"

Then I could change all of the styles in one go without a laborious 'click'-'drag'-'select style' for every item.

Re: Options for double-click selection of text

Posted: Wed Jan 15, 2020 1:20 pm
by WWBman
Have you tried using Edit > Replace?

Re: Options for double-click selection of text

Posted: Wed Jan 15, 2020 1:23 pm
by jwellbelove
There is no option for changing the style in that dialog.

In the page I've just been editing I had to make 258 individual style changes. It's taken me ages!

Re: Options for double-click selection of text

Posted: Wed Jan 15, 2020 1:25 pm
by WWBman
I wasn’t referring to the style, just a straight global or partial replace.

Re: Options for double-click selection of text

Posted: Wed Jan 15, 2020 1:28 pm
by jwellbelove
But it's the style I want to replace, not the text.

https://www.etlcpp.com/binary.html

Re: Options for double-click selection of text

Posted: Wed Jan 15, 2020 5:52 pm
by crispy68
Why not set up and use a global style? Then all you have to do is change it in one place.

Re: Options for double-click selection of text

Posted: Thu Jan 16, 2020 12:21 pm
by jwellbelove
That's exactly what I have.

I have four styles for code.
'Code' (Droid Sans Mono, White)
'CodeCPP' (Droid Sans Mono, Light Blue)
'CodeUser' (Droid Sans Mono, Light Magenta)
'CodeComment' (Droid Sans Mono, Light Green)

When adding code samples, I copy them straight from the code editor.
I then paste them into the web page and block set the style to 'Code'
I then need to change all of the C++ keywords to 'CodeCPP' style
I then need to change all of the library typenames to 'CodeUser' style

At the moment I have to manually highlight every instance and select the applicable style for that particular keyword/typename.

For example, see this page https://www.etlcpp.com/binary.html

Imagine pasting all of this code in and then manually changing all of the instances of 'template', 'typename', 'void', 'unsigned', 'value_type' etc to the appropriate style. That page required me to manually change the style of over 250 pieces of text!

It would be so much easier and less error prone (and better for my RSI) if I could easily change the style of every instance of 'template' to 'CodeCPP'.

If there's a dialog I'm missing that does this, then please tell me where it is!

Re: Options for double-click selection of text

Posted: Thu Jan 16, 2020 12:32 pm
by jwellbelove
Like this.

Image