2

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!

rshaw
  • 111
  • 1
  • 3
  • i have been using vi, is that mature enough? ;) Actually, I'm in a new environment, and didn't want to download gigabytes of XCode just for the editor. TextMate seems OK in coloring different file types, .html .js etc, but it has its own ideas about indenting, and I haven't figured out how to turn them off. Am open to lightweight editor suggestions. – rshaw Jul 10 '19 at 03:05
  • Then you could try vscode with vim extensions, that supports linux, windows and mac, then the vi experience comes back. – Alsein Jul 10 '19 at 03:15

1 Answers1

3

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

Graham P Heath
  • 7,009
  • 3
  • 31
  • 45
  • Thanks for the response, but the changes to the C bundle seemed to have no effect. Further, when I close and reopen TextMate, the changes have vanished. Maybe I have to change permissions on a file somewhere, or set a path? Will try a few more experiments... – rshaw Jul 11 '19 at 02:25
  • @rshaw: could you try an ⌘+S in the editor window to save? – Graham P Heath Jul 11 '19 at 12:37