Re: [code] I just can't seem to find the pattern...

From: Mitchell <m.att.foicica.com>
Date: Wed, 18 Sep 2013 22:12:44 -0400 (EDT)

Hi Michael,

On Thu, 19 Sep 2013, Michael Richter wrote:

> ...that allows me to pre-pend characters on each line.
>
> My use case is wanting to comment out blocks of text in a language which
> doesn't have block comments (rendering *Edit → Toggle Block
> Comment*unusable).

Have you tried setting `textadept.editing.comment_string.text = 'prefix'`
for your plain text buffer before picking "Edit -> Toggle Block Comment"?

> But... I can't seem to find a way to specify a
> pattern that
> claims a single line. ^.*$ selects all text from the current insertion
> point forward. ^.*\n selects ... something that's hard to describe.
> Suffice to say that it doesn't do the trick either. I just can't seem to
> find a pattern that will select the next *line* of text for replacing with
> that same line prepended with the line comment.

Are you trying to do this with the find & replace pane? You may be able to
use '\n[^\n]+\n' if your buffer uses '\n' for newlines. It's a bit ugly
and won't work on the first or last lines of the buffer, but it seems to
get the job done.

Cheers,
Mitchell

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Wed 18 Sep 2013 - 22:12:44 EDT

This archive was generated by hypermail 2.2.0 : Thu 19 Sep 2013 - 06:28:18 EDT