Selecting words

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
HY

Selecting words

Post by HY »

When I check "Include trailing spaces when selecting words" and doubleclick a word, the space following the word (if any) is selected along with the word (of course). If I uncheck it, doubleclicking a word selects nothing but the word. But if I hold down shift and CTRL and push the right arrow, the trailing space is included. Does anyone know how to avoid this? Is it a bug, or is it supposed to work that way?

Regards,
HY
Thomas Schremser

Re: Selecting words

Post by Thomas Schremser »

Hi HY,

I think that this is the way it is supposed to work. The online help says that Ctrl+Right moves the cursor to the next word, so Shift+Ctrl+Right is not supposed to mark a word but mark from current cursor position to the beginning of the next word.

HTH
Greetings
Thomas
Jeff Epstein

Re: Selecting words

Post by Jeff Epstein »

Shift+Ctrl+RightArrow is, by default, assigned to WordRight. You can reassign it to WordRightEnd. The difference between these commands is just what you want/don't want: The trailing space.

There's also the corresponding WordLeft and WordLeftEnd. I personally use WordLeft, and WordRightEnd. That way I never get the trailing space.

Open the preferences dialog, and click the "Keyboard" branch.
HY

Re: Selecting words

Post by HY »

Thanks, Jeff (and TextPad!), that's brilliant.

Could this possibly be an option under preferences --> document classes in later releases of TextPad? What I mean is, if I uncheck "include trailing spaces when selecting words," could another check otion become available at that point, offering to switch the use of Shift+Ctrl+RightArrow?

HY
Jeff Epstein

Re: Selecting words

Post by Jeff Epstein »

You're welcome, HY!

Having *lots* of things attached to Document Classes would be indescribably cool. Key combinations, macros, dictionaries, clip books, saved searches and replaces, ...?

This seems to me, to be the logical future for both TextPad. TextPad would completely change its personality each time I switch to a different type of file. How COOL is that?

I can't speak for how difficult this will be to fully implement, nor how far in the future we can expect to see this. Hopefully there are some baby steps that could be taken in that direction...

:' )

Jeff
http://www.jeffyjeffy.com/textpad
HY

Re: Selecting words

Post by HY »

...but then, if I have the cursor at the end of a word and do Shift+Ctrl+RightArrow to span the selection to, say, the next line, it won't stop until it reaches _the end of a word_. Ex (don't know how this will look, but I'll give it a try):

This is {
an example
}

Let's say I have the cursor right after the right bracket. I push Shift+Ctrl+RightArrow to select all whitespace until (not including) the word "an". With my new setting, I get "an" as well. So thanks for your help, folks, but I think I'll go back to my old settings. I dearn't suggest taking this into account as a new feature for future upgrades. :-)

HY
Randall McDougall

Re: Selecting words

Post by Randall McDougall »

Personally I like to have the Right/LeftEnd[Extend] keys available AS WELL as the normal set ... So I define ctrl+ALT[+shift] Right/Left to those functions ...
Post Reply