Re: [code] [textadept] Indenting after {Enter}

From: Mitchell <m.att.foicica.com>
Date: Sun, 25 Aug 2019 09:32:44 -0400 (EDT)

Hi,

Sorry for the late reply, but I have a fix.

On Thu, 22 Aug 2019, Procházka Lukáš Ing. wrote:

> Hello all,
>
> Querky's reading my mind!
>
> On Wed, 21 Aug 2019 21:21:32 +0200, Qwerky <mr.qwerky.att.gmail.com> wrote:
>
>> Hi Lukas,
>>
>> On 2019-08-21 07:50, Procházka Lukáš Ing. wrote:
>>> Hello,
>>>
>>> when I press {enter}, the cursor goes to the next line and
>>> automatically indents - indentation is derived from indentation of the
>>> text above.
>>>
>>> Is there a way to affect if (or how) the text is intended (filled by '
>>> ') when cursor is moved to the next line after pressing {enter}?
>>>
>>> Best regards,
>>>
>>> Lukas
>>>
>>>
>> Is this what you are looking for:
>>
>>
>> |textadept.editing.auto_indent| (bool)
>
> Yes, that's what I was looking for.
>
>> Match the previous line’s indentation level after inserting a new line.
>> The default value is |true|.
>>
>> I would add to Lukas' question the following:
>>
>> Is there a way (or can a way be made) such that when the caret is at the
>> end of a line when {enter} is pressed, the indentation follows the above
>> setting, *but* when the caret is at the beginning of a line when {enter}
>> is pressed, no indentation takes place?
>
> Yes, exactly - that should have be my following question, providing that
> there was a way to control indenting after {enter} anyway!
>
>> It is very disconcerting when {enter} is pressed at the beginning of a
>> line, and suddenly the current line jumps right to match indentation
>> above it!
>
> Yes, my feelings are almost identical.

I pushed a change[1] that should fix this.

Cheers,
Mitchell

[1]: https://foicica.com/hg/textadept/rev/4b4d0d7a7b4b

-- 
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 Sun 25 Aug 2019 - 09:32:44 EDT

This archive was generated by hypermail 2.2.0 : Mon 26 Aug 2019 - 06:50:22 EDT