[TxMt] Re: TM2 - indentation problem in Haskell

John Whitley whitley at bangpath.org
Wed Jan 11 22:35:51 UTC 2012


Allan Odgaard <mailinglist at ...> writes:
> You can disable this. Make a new settings item in the bundle editor and scope
it to Haskell, it should contain:
> 
>     { disableIndentCorrections = :true; }

I'm actually noticing the same sort of problem in CoffeeScript code.  Perhaps
the above setting isn't as extreme as it sounds, but turning off indent
corrections entirely seems overkill.

For example, here's a sequence I hit quite a lot:
1) Hit return.
2) TM2 places the cursor at an indent position based on the bundle, etc.
3) I backspace, etc. to get the cursor to the desired indent position.
4) I start typing and TM2 immediately resets the indent position again.
5) User is vexed.

It seems like indent should peek the history stack.  Certain immediately
preceding sequences (e.g. user selecting an indent position) should temporarily
disable auto-indent until more text insertion events occur.

-- John





More information about the textmate mailing list