Hi,
The MediaWiki bundle in TextMate 2 has a feature that when I type:
Line1 Line2
It automatically reindents to:
Line1 Line2
Despite that I explicitly typed the two spaces. I find this rather annoying. I'm trying to turn this feature off.
The only thing about indentation I can find is in the bundle, Settings:
Folding: foldingIndentedBlockStart = '^=+\s+'; foldingIndentedBlockIgnore = '^(?!=+\s+)';
But even when I remove these lines, the feature is still there. Anyone has an idea what may cause this behaviour and turn it off?
I'm also fine with any option that turns off auto-indenting off globally, like there was in the Preferences for TextMate 1 (I usually find it more annoying than useful).
Thanks, Freek
On Nov 8, 2012, at 11:47 AM, Freek Dijkstra public@macfreek.nl wrote:
The MediaWiki bundle in TextMate 2 has a feature that when I type:
Line1 Line2
It automatically reindents to:
Line1 Line2
Those look identical. I assume your message got mangled along the way to the list.
Despite that I explicitly typed the two spaces. I find this rather annoying. I'm trying to turn this feature off.
Auto-indent is nice in response to pasting or hitting ↩, but TextMate 2 has a tendency to alter indentation when you start typing, which is insane. Is that what you mean?
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'; }
One of those is documented in the list archives (maybe the wiki?) and the other in the release notes if you want to know more.
On Nov 8, 2012, at 11:47 AM, Freek Dijkstra public@macfreek.nl 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.
We can add one that is helpful.
What pattern do people suggest and I'll push it up.
tim
ps, what's the point of the indent you are making? it has not syntactic meaning does it?
Auto-indent is nice in response to pasting or hitting ↩, but TextMate 2 has a tendency to alter indentation when you start typing, which is insane. Is that what you mean?
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'; }
One of those is documented in the list archives (maybe the wiki?) and the other in the release notes if you want to know more.
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
Thanks Rob,
I indeed meant to write:
The MediaWiki bundle in TextMate 2 has a feature that when I type:
Line1 Line2
It automatically reindents to:
Line1 Line2
Despite that I explicitly typed the two spaces. This happens just after I type the "L" on the second line.
I find this rather annoying. I'm trying to turn this feature off.
Auto-indent is nice in response to pasting or hitting ↩, but TextMate 2 has a tendency to alter indentation when you start typing, which is insane. Is that what you mean?
Exactly! I loved the auto-indent *before* you type, which I can easy fix with adding or removing the indent before I type. However, this identing happens *after* I start to type, meaning I have to go back to the line, and edit. This is absolutely disastrous for my workflow.
Is there a way to turn this off, or should I just turn back to TextMate 1 until the sanity is restored? :)
Regards, Freek
On Nov 8, 2012, at 2:29 PM, Freek Dijkstra public@macfreek.nl wrote:
However, this identing happens *after* I start to type, meaning I have to go back to the line, and edit. This is absolutely disastrous for my workflow.
And to think someone took time to write code that makes this happen on purpose? It baffles me.
Is there a way to turn this off, or should I just turn back to TextMate 1 until the sanity is restored? :)
Yes. I explained how in my last message.