Re: Selecting words

From: <briancsch....at.gmail.com>
Date: Fri, 30 Apr 2010 22:24:52 -0700 (PDT)

On Apr 30, 10:17 pm, Brian Schott <briancsch....at.gmail.com> wrote:
> Just put this in your key_commands.lua:
>
> keys['cleft'] = { b.word_left }
> keys['cright'] = { b.word_right_end }
> keys['csleft'] = { b.word_left_extend }
> keys['csright'] = { b.word_right_end_extend }
>
> It's all so obvious, no?
>
> No?
>
> Yeah. It isn't obvious. I figured out that "cleft" would work for
> Control + Left by guessing. But the research I did to answer your
> question made me realize that I can do this:
>
> keys['cleft'] = { b.word_part_left }
> keys['cright'] = { b.word_part_right_end }
> keys['csleft'] = { b.word_part_left_extend }
> keys['csright'] = { b.word_part_right_end_extend }

Make that:

keys['cleft'] = { b.word_part_left }
keys['cright'] = { b.word_part_right }
keys['csleft'] = { b.word_part_left_extend }
keys['csright'] = { b.word_part_right_extend }

>
> That changes Textadept so that it stops the cursor at every underscore
> or change in capitalization.
>
> I'm going to go through the mailing list archives and build question and
> answer page on the wiki.
>
> On 04/30/10 21:42, Jay wrote:
>
> > When I select words using Shift+Control+left/right the selection goes
> > all the way to the next word including white-space.
> > I'd like to change this behavior to not include the white-space at the
> > end of the selection
>
> > Quick question:
> >   Where is the code for this behavior?
>
> --
> You received this message because you are subscribed to the Google Groups "textadept" group.
> To post to this group, send email to textadept.at.googlegroups.com.
> To unsubscribe from this group, send email to textadept+unsubscribe.at.googlegroups.com.
> For more options, visit this group athttp://groups.google.com/group/textadept?hl=en.

-- 
You received this message because you are subscribed to the Google Groups "textadept" group.
To post to this group, send email to textadept.at.googlegroups.com.
To unsubscribe from this group, send email to textadept+unsubscribe.at.googlegroups.com.
For more options, visit this group at http://groups.google.com/group/textadept?hl=en.
Received on Sat 01 May 2010 - 01:24:52 EDT

This archive was generated by hypermail 2.2.0 : Thu 08 Mar 2012 - 11:44:29 EST