Re: [code] Tab spacing weirdness in 6.3

From: Michael Richter <ttmrichter.att.gmail.com>
Date: Wed, 6 Feb 2013 14:51:53 +0800

That was it, Mitchell. I was using the "Black" theme from the web site and
it has buffer.indent = 2 in it.

On 5 February 2013 22:46, Mitchell <m.att.foicica.com> wrote:

> 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

-- 
"Perhaps people don't believe this, but throughout all of the discussions
of entering China our focus has really been what's best for the Chinese
people. It's not been about our revenue or profit or whatnot."
--Sergey Brin, demonstrating the emptiness of the "don't be evil" mantra.
-- 
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 Wed 06 Feb 2013 - 01:51:53 EST

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