Question

I use a several text editors, but every time I save with TextWrangler it changes the file's icon in Finder to a TextWrangler icon with the following extended attributes;

com.apple.FinderInfo
com.apple.TextEncoding

How do I get TextWrangler to stop doing this? I can't find a settings that seems to fix this.

Was it helpful?

Solution

A support request was filed and Bare Bones responded quickly.

TextWrangler sets the file type (com.apple.FinderInfo; file icon) when it determines that the file name cannot be used to determine that it is a text file. The exact determination here is not too important; as I found, hence I would assume that source code files would fall into this category. The text encoding is a standard attribute and is set to indicate the file's character encoding.

To disable the writing of these extended file attributes, the following command is used;

defaults write com.barebones.textwrangler WriteExtendedAttributes -string "Never"

The command itself is documented in the TextWrangler help files; but not how it relates to the character encoding and file associations.

To find and clear the attributes of the modified file(s), you can use the following standard commands;

ls -@l # list the files with extended attributes
xattr -c filename.sh # where the file name and extension is as required

OTHER TIPS

I assume this is because TextWrangler sets the "Always Open With" option in your case. I can suggest you to take a look for an option to stop this or to try manually make a file to Always Open With TextEdit (for example) just to test if this is the issue.

Licensed under: CC-BY-SA with attribution
Not affiliated with apple.stackexchange
scroll top