Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

john-c

macrumors newbie
Original poster
Oct 28, 2008
12
9
When editing text files in Monterey outside of your home folder (or /usr/local), all TAB occurrences are magically replaced with two-spaces. For example, anything inside /Library/WebServer or the /opt directory. However files saved in a home folder or /usr/local edit correctly. This is driving me crazy. I am not a Python love child. I HATE double-spaces.

I get the same results whether editing with BBEdit or Xcode, ignoring the preferences set with the application. TextEdit does not exhibit this behaviour.

Does anyone know what is going on? I've jumped OS versions from Mohave straight to Monterey, so I don't know when this behaviour crept in. It's not an issue in Mohave. I'd be interested to hear anyone's thoughts.

Thanks,
John
 

john-c

macrumors newbie
Original poster
Oct 28, 2008
12
9
When editing text files in Monterey outside of your home folder (or /usr/local), all TAB occurrences are magically replaced with two-spaces. For example, anything inside /Library/WebServer or the /opt directory. However files saved in a home folder or /usr/local edit correctly. This is driving me crazy. I am not a Python love child. I HATE double-spaces.

I get the same results whether editing with BBEdit or Xcode, ignoring the preferences set with the application. TextEdit does not exhibit this behaviour.

Does anyone know what is going on? I've jumped OS versions from Mohave straight to Monterey, so I don't know when this behaviour crept in. It's not an issue in Mohave. I'd be interested to hear anyone's thoughts.

Thanks,
John

Allow me to answer my own question, in case anyone else has this issue.

There is a (probably little-known?) file installed with homebrew known as ".editorconfig" which overrides your default settings. You will find one at /opt/homebrew/.editorconfig, though it could exist in other places also. The file overrides default settings for BBEdit and other applications. (What a horrible thing to include in the OS, with no System Preference to change it).

There must be an executable file reading it somewhere, which I would like to delete, but I couldn't find the relevant information. So instead I have edited the file to my preferences. I fear if I delete it a homebrew update could reinstate their own preferences again.

You can read more about this autocrat at https://editorconfig.org.

Cheers,
John
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.