Home Download Buy Blog Forum Support

bindings with key="/@|+/"

Re: bindings with key="/@|+/"

Postby jps on Fri Oct 02, 2009 11:48 pm

I can bind both without any hassle, the only proviso being that '+' needs to be escaped if it's in a regex, of course.

Can you send me a binding key sequence that's not working for you?
jps
Site Admin
 
Posts: 3062
Joined: Wed Mar 19, 2008 12:33 pm

Re: bindings with key="/@|+/"

Postby jps on Sat Oct 03, 2009 12:09 am

No worries, I'd already written a reply, I'll leave it here anyway:

That binding works fine for me, although with the contexts:
- allPrecedingText should likely have a star after the [], rather than a plus...?
- allSelectionsNonEmpty==false, I suspect allSelectionsEmpty==true would be more correct (in the face of some selections being empty and others not)

On a side note, contexts interact a little strangely with sequence key bindings and predicted character input: they're evaluated at each step of the way, so you need to ensure that the contexts still match when predicted characters are in the buffer. I don't think this is an issue here, but it was with the HTML snippets in previous versions.
jps
Site Admin
 
Posts: 3062
Joined: Wed Mar 19, 2008 12:33 pm

Re: bindings with key="/@|+/"

Postby jps on Sat Oct 03, 2009 12:40 am

'+' is one or more of the preceding characters, '*' is 0 or more.
jps
Site Admin
 
Posts: 3062
Joined: Wed Mar 19, 2008 12:33 pm

Previous

Return to Technical Support

Who is online

Users browsing this forum: Yahoo [Bot] and 33 guests