[Top][All Lists]

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

Re: [Nano-devel] indent and unindent marked text

From: David Lawrence Ramsey
Subject: Re: [Nano-devel] indent and unindent marked text
Date: Wed, 05 Jul 2006 16:11:03 -0400
User-agent: Thunderbird (X11/20060516)

John M. Gabriele wrote:
> This is a great new feature. Thanks for implementing it.

No problem, but Chris Allegretta actually implemented it.  I only
tweaked it to make it fit better into 1.3.x.

> It would seem to me though, that the indent unindent feature would be
> more useful if it snapped to $tabsize * $n column number rather than
> moving +/- tabsize when you indent and unident. That is, for multiple
> lines of variously-indented text, it would use the left-most character
> of all lines as an anchor (or maybe the left-most character of the
> first line in the marked block), and, keeping all the lines in
> lock-step, would move that anchor however many spaces it takes (either
> left (M-{) or right (M-})) to have it land on the nearest column
> that's a multiple of tabsize.
> I use only spaces for indentation. I don't know which way would be
> more useful to folks who use tabs, or even how nano deals with tabs.

Interesting idea, but rather complicated.  Besides, (a) I don't know how
the people who use tabs for indentation would react in some cases, and
(b) I can't add something like this due to the feature freeze.  However,
I've added it to the TODO list for after 2.0.

> Also, it would be handy if I could just go to a given line and hit the
> M-{ or M-} to get the text to shift, rather than having to first hit
> C-^, shift the text, then hit C-^ again (to unset the mark). The help
> screen says, "(Un)Indent marked text", but the feature actually works
> even if nothing is marked -- you can just tap C-^ to turn on "Mark
> Set", and then hit M-{ or M-} and you get indenting/unindenting.

Actually, something is marked; it just happens to have a length of zero
:) This is also a new feature, but considering that the existing code
can indent the current line of text with no problem when the mark covers
it, and that the changes needed to make it do so without the mark are
*extremely* minor, I've bent the feature freeze in this one case and
added the functionality to CVS.

reply via email to

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