rshaw
rshaw

Reputation: 141

How to disable auto-indent in TextMate (C bundle)?

I'm trying to edit C code in TextMate, and the auto-indent feature is inconvenient for the style of the code.

I tried, from the menu bar, Bundles -> Edit Bundles -> C -> Settings -> Indentation Rules and unchecked "Enable this item", and restarted the editor, but that didn't seem to have any effect. I was able to disable the auto-pairing of braces, using the suggestions in Disable auto-pairing of characters in Textmate 2? but so far haven't found a way to turn off auto-tabbing, other than just using the plain text mode. Thanks for any suggestions!

Upvotes: 2

Views: 622

Answers (1)

Graham P Heath
Graham P Heath

Reputation: 7399

You were so close!

The missing piece was

disableIndentCorrections = :true;

Which you insert under Bundles -> Edit Bundles -> C -> Settings -> Indentation Rules

{   
  disableIndentCorrections = :true; 
  [rest of file...]

This disables the indentation for the C bundle.

You can disable it for all scopes by adding the same line to Bundles -> Edit Bundles -> Source -> Settings -> Miscellaneous

Upvotes: 3

Related Questions