nano-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nano-devel] set brackets in .nanorc


From: David Lawrence Ramsey
Subject: Re: [Nano-devel] set brackets in .nanorc
Date: Thu, 23 Feb 2006 15:09:15 -0500
User-agent: Thunderbird 1.5 (X11/20051201)

John M. Gabriele wrote:
>
>> John M. Gabriele wrote:
>>  > What does using
>>  >
>>  >     set brackets "'")}]>"
>>  >
>>  > in your .nanorc currently affect? Without that line
>>  > I can already bounce between matching brackets/braces
>>  > with 'ESC ]' -- uncommenting it doesn't seem to change
>>  > anything...
>>
>> It affects what punctuation can end sentences, which is only used when
>> justifying paragraphs.
>
> When I justify a paragraph, it looks like everything between the two
> blank lines (that is, between \n\n and \n\n) gets justified. How does
> punctuation like "'")}]>" enter the picture? To me, they don't have
> anything to do with justifying paragraphs (that is, making lines
> end after a given number of characters, but not in the middle of
> a word).
>
> BTW, why does the double-quote show up in the middle of that clump
> of funny characters "'")}]>"? Do the double-quotes on the outside
> of '")}]> not count?

Quotes inside rcfile strings don't have to be escaped with backslashes. The last double quote in the string will be treated as its end. This
means that the above string will match ', ", ), }, ], and >.

> Also, my .nanorc contains:
>
> ## The characters treated as closing punctuation.  They cannot contain
> ## blank characters.  Only closing punctuation, optionally followed by
> ## closing brackets, can end sentences.
> ##
> # set punct ".?!"
>
> and that sounds a little like what you're talking about above...
>
> If not, what does this "punct" setting affect? That is, why would
> nano care about what character ends a sentence?

It only cares about it when determining whether to keep two spaces after
a sentence.  Given the punct and brackets strings above, if you tried
justifying

(This is a.)      (test.)

it would find the . after "a", which is in "punct", followed by the ),
which is in "brackets", so it would keep two spaces instead of one
between the two items.  This means that the justified form would turn
out to be

(This is a.)  (test.)

instead of

(This is a.) (test.)

Pico would come up with the latter, since it apparently doesn't take
anything like "brackets" into account.

>>  If you want to change what brackets are used for
>> matching, you'll have to use the "matchbrackets" rcfile option, which is
>> only available in current CVS at the moment.  (Let me know if the
>> comments in nanorc.sample explain the format for it clearly enough.
>> Thanks in advance.)
>
> Sure, as soon as I understand it. :)

I hope I'm helping you to.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]