TextEdit in Lion changing document extensions to TXT

A bug in Lion means Apple's popular TextEdit utility may append the TXT extension to files regardless of their original file types.

Apple's TextEdit program is a convenient utility that allows for quick viewing of various basic text formats, including standard TXT and RTF formats, as well as other ASCII text documents such as property lists, HTML, and programming and scripting codes. Many people have come to rely on TextEdit for making small and quick changes to files, but recently some have encountered a problem in Lion's version of TextEdit in which the program does not seem to handle file name extensions properly.

MacFixIt reader "Edward" writes:

TextEdit insists on adding .txt [to documents] no matter what. There are many file types that contain plain text that can be usefully edited with TextEdit, but it's a pain in the you know what to have to use the finder to change the extension back after editing with TextEdit. For example, I like to edit html files in plain text mode with TextEdit. But then I wind up with something.txt rather than something.html.

This problem is not universal, and in a correspondence with Edward I was not able to replicate the issue myself; however, in an Apple Support discussion thread on the problem it appears others are experiencing it as well.

If you are having this problem with TextEdit, do know Apple is aware of it and a fix will likely be included in the OS X 10.7.2 update that is due out any day now. Until then, or if the fix does not make it into the update, there are a couple of things you can try:

  1. Delete TextEdit's preferences
    As this is a known bug, removing the preferences file for the program may not have much of an effect; however, it will not hurt to try. The preferences file is called "com.apple.TextEdit.plist" and is located in the /username/Library/Preferences/ folder. To get to the user library in Lion, hold the Option key and select Library from the Finder's Go menu.

  2. Use another editor
    There are numerous alternative text editors out there that will work just as well as, if not better than, TextEdit. One of the most popular ones is the free TextWrangler utility from Bare Bones Software, and there are command-line tools like vi and pico/nano. Lastly, if you have Apple's Xcode developer tools installed, you can use them to edit text files.



Questions? Comments? Have a fix? Post them below or e-mail us!
Be sure to check us out on Twitter and the CNET Mac forums.

Tags:
Computers
About the author

    Topher, an avid Mac user for the past 15 years, has been a contributing author to MacFixIt since the spring of 2008. One of his passions is troubleshooting Mac problems and making the best use of Macs and Apple hardware at home and in the workplace.

     

    Join the discussion

    Conversation powered by Livefyre

    Don't Miss
    Hot Products
    Trending on CNET

    HOT ON CNET

    Up for a challenge?

    Put yourself to the real tech test by building your own virtual-reality headset with a few household items.