[TxMt] Re: TextMate 2 turn off auto-indent

Freek Dijkstra public at macfreek.nl
Fri Nov 9 00:13:49 UTC 2012


Rob McBroom wrote:

>> Add a new “Settings” item to any bundle. (Most people have a 
>> personal bundle for stuff like this.) Set the scope to `*` and
>> enter this
>>
>>    {   disableIndentCorrections = :true;
>>        indentOnPaste = 'simple';
>>    }

Thanks, this works like a charm.

On 08-11-2012 21:26, Timothy Bates wrote:

>>> The MediaWiki bundle in TextMate 2 has a feature that when I type:
>>> Line1
>>> \s\sLine2
>>>
>>> It reindents to:
>>>
>>> Line1
>>> Line2
> 
> I don't replicate this in mediawiki. The mediawiki bundle also, AFAIK does not have its own Indent setting.

I just removed both ~/Library/Application Support/TextMate as well as
~/Library/Application Support/Avian, and tried again.

Steps to reproduce:
1. Open a new window
2. Select "MediaWiki" as the language
3. Type "One↩␣Two"
(with ↩ = return and ␣ = space)

Expected result:
One
 Two

Actual result:
One
Two

Notes:
TextMate re-indents as soon as the "T" of "Two" is written. I has
expected it to reindent as soon as the "↩" was typed (in this case to
zero indent).

Similarly, if there is line " One" and I type "↩⌫Two", I would expect:
 One
Two

But the actual result is:
 One
 Two

> ps, what's the point of the indent you are making? it has not syntactic meaning does it?

For Mediawiki, indentation creates a different markup, so yes, it has
syntactic meaning.

I was typing some Mediawiki text in this form:

Some text

 code line 1
 code line 2

Some more text


FYI, I also found this note in the release notes:

> • Indent
> 
  TextMate is more aggressive about doing indent corrections. This
>   works great when the patterns are well-calibrated but can be disabled
>   with the disableIndentCorrections scope-setting. This setting also
>   change the behavior of re-indented paste to a heuristic that works
>   much better with Python (for which indent corrections are disabled by
>   default).

Regards,
Freek


More information about the textmate mailing list