Re: [code] Tab spacing weirdness in 6.3

From: Mitchell <m.att.foicica.com>
Date: Tue, 5 Feb 2013 09:46:47 -0500 (Eastern Standard Time)

Michael,

On Tue, 5 Feb 2013, Michael Richter wrote:

> On 5 February 2013 03:58, Mitchell <m.att.foicica.com> wrote:
>
>> Problem #2: adjusting the tab width in Buffers→Indentation isn't changing
>>> the indentation levels. The status display says Spaces: 4 but tabbing
>>> gives me two-space indentation.
>>>
>>
>> I cannot reproduce this on a plain-text file:
>>
>> 1. Open Textadept.
>> 2. Select Buffers -> Indentation -> Tab Width: 4.
>> 3. Tab key --> 4 spaces inserted.
>
>
> 1. Open Textadept. (blank unnamed file)
> 2. Buffer→Indentation→Tab Width: 4.
> 3. Tab key → 2 spaces inserted
>
> And yes, it does say Spaces: 4 at the bottom. And yes, it goes to 4 spaces
> *after* text is inserted. Here's a screen shot.
>
>> Perhaps you have custom indentation settings that are causing some
>> problems? In the above example if I go to the command entry and enter
>> "buffer.indent = 2" and then press Tab in the buffer, I get 2-space
>> indentation even though my statusbar says 4. Reading the LuaDoc for
>> buffer.tab_width vs buffer.indent may shed some light on this.
>>
>
> This is the entire contents of my init.lua:
>
> _M.textadept = require 'textadept'
>
> -- Personal settings
>
> I'm at a complete loss here.

It looks like you are using a custom theme. Check if you're setting
buffer.indent = 2 anywhere in it.

If your buffer.tab_size == 4 (which it does according to the screenshot)
and tabbing inserts two spaces, I'm almost certain buffer.indent == 2. The
default themes leave buffer.indent == 0 so it matches buffer.tab_size and
averts this kind of confusion.

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 Tue 05 Feb 2013 - 09:46:47 EST

This archive was generated by hypermail 2.2.0 : Wed 06 Feb 2013 - 06:33:02 EST