Re: [code] [textadept] Autoindent tweak

From: Mitchell <m.att.foicica.com>
Date: Fri, 4 Sep 2015 20:03:04 -0400 (EDT)

Hi Chris,

On Fri, 4 Sep 2015, Chris Emerson wrote:

> Hi,
>
> I really like textadept.editing.AUTOINDENT.
>
> One thing that's slightly annoying, though (ie not what I've been used to
> elsewhere), is that I end up leaving otherwise empty lines with spaces
> around.
>
> The behaviour I'd ideally want is that when you move the cursor off the
> line that's just been autoindented without adding/removing any characters,
> (either by pressing "enter" to make another new line, or using cursor keys,
> mouse, etc.), the newly added intentation is removed again.
>
> Alternatively, perhaps the autoindent could be implemented using virtual
> space - but I don't want virtual space otherwise.
>
> I'm struggling to find a reliable way to get it to behave exactly as I like.
> Anyone have any ideas?

I personally have `textadept.editing.STRIP_TRAILING_SPACES` enabled, so
this issue never presents itself.

Other than using virtual space, I cannot think of any other solution.
(However, auto-toggling virtual space would likely be a bug-ridden
endeavor.)

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 Fri 04 Sep 2015 - 20:03:04 EDT

This archive was generated by hypermail 2.2.0 : Sat 05 Sep 2015 - 06:50:53 EDT