TextEdit default background for .plist files

Discussion in 'Mac Apps and Mac App Store' started by GGJstudios, Jun 21, 2010.

  1. GGJstudios macrumors Westmere


    May 16, 2008
    Over the past few weeks I've noticed that when I open any .plist file with TextEdit, it opens with black text on a black background, forcing me to manually change the background every time in order to read the text. This wasn't the case in the past, when it would open with black text on a white background.

    Opening a new TextEdit document or any other .txt file results in the standard black text on a white background. The black background only appears when opening .plist files, which are associated with TextEdit.

    Things I've tried, but didn't work:
    • Rebooting (naturally)
    • Trashing com.apple.TextEdit.plist
    • Changing association of .plist files to MS Word and back to TextEdit
    • Editing default style for TextEdit.
    • Editing a .plist and saving with the white background

    10.5.8... everything current. No new software installed since it last worked properly.

    Any suggestions?
  2. joshjoshlol macrumors member

    Nov 8, 2009
    Hello, sorry to bump an older thread, but I've also come across this for quite some time and have yet to figure out a solution. I'm also running 10.5.8, and get nothing but black backgrounds on my .plist files. The most bizarre thing is that if you use an application like SnapNDrag to create a screenshot of the window itself, it appears white in the capture.

    Are there other 10.5.8 or even 10.6 users who can verify that this also affects them?
  3. LPZ macrumors 65816

    Jul 11, 2006
    Out of curiosity: Use TextEdit to create a new file that contains just a single word of ordinary text. Name the file Test.plist. Close TextEdit and then use it to open the newly-created file. I'm guessing no black background ...

    By the way, many .plist files contain binary data, and handling them with TextEdit doesn't seem such a good idea. A Property List Editor utility is part of the Developer Tools that are installed along with Xcode.
  4. joshjoshlol macrumors member

    Nov 8, 2009
    You are correct: there was no black background on the newly created test.plist file. What does this mean?
  5. LPZ macrumors 65816

    Jul 11, 2006
    I have no idea. :eek: Well, I guess I was thinking that the black background might be generated when you use TextEdit to open files that contain binary data/non-standard characters. Really don't know, but again TextEdit may not be a good choice for .plist files.

    [EDIT] This seems useful, and works for me on 10.6.4.
  6. joshjoshlol macrumors member

    Nov 8, 2009
    That is a very interesting link which provides many good alternatives... but what I am wondering is, how come for 2 separate and vastly different machines (my 2008 iMac and 2001 iBook, running 10.5 and 10.4 respectively) both of them worked fine for editing .plist's in textedit and then all of a sudden, cease being able to do so without the hinderance of a black screen.

    I've organized a phone call session with an Apple tech person this coming week, so hopefully I will be able to get a solid answer, rather than just a list of various workarounds. Personally, I'm thinking a discreet change came in a recent update from this year, but I cannot find documentation on which one.
  7. GGJstudios thread starter macrumors Westmere


    May 16, 2008
    There's nothing wrong with using TextEdit for .plist files. It works fine in most cases, since most .plist files you'd want to edit contain only standard text.
  8. LPZ macrumors 65816

    Jul 11, 2006
    It works fine---when it works.
  9. joshjoshlol macrumors member

    Nov 8, 2009
    I've personally never run into a situation where editing one of the .plist files through Textedit caused any issue of any sort. As a matter of fact, it's the fastest way for me to sort out various wireless networking issues dealing with passwords and the sort, should any trouble arise.

    I'm definitely going to press the issue when the Apple tech person calls me up in a few days.
  10. LPZ macrumors 65816

    Jul 11, 2006
    Good luck. Maybe let us know what happens.

    By the way, try using TextEdit to open something like Library/Preferences/com.apple.TextEdit.plist --- doesn't work so well for me!
  11. GGJstudios thread starter macrumors Westmere


    May 16, 2008
    It always works. The background is easily changed with two clicks of the mouse. The only question in this thread is how to set the default. TextEdit never fails to open, edit or save a .plist file. To suggest it's not an appropriate tool for editing .plists is misleading.
    That's because there is no Library/Preferences/com.apple.TextEdit.plist
    There is, however, a /Users/username/Library/Preferences/com.apple.TextEdit.plist
    Editing that file with TextEdit works fine. However, it's not advisable to edit any .plist while the app is running, so it's not a failure of TextEdit.

    If you prefer not to use TextEdit for plist files, that's fine. Don't mislead people by suggesting they can't successfully use it to edit plists, if they choose to.
  12. LPZ macrumors 65816

    Jul 11, 2006
    I'm curious---can you even properly read a file like Library/Preferences/com.apple.TextEdit.plist using TextEdit? Yes or no?

    I ask because I cannot. I see a garbled mess of standard and non-standard characters. I don't have any problem with the background; it's the content that is muddled.

    It's not my intent to mislead anyone.

    [EDIT] I think folks who might care can figure out the path! The point is that it's not in /Library.

    And I guess I'm doing something stupid with TextEdit, since apparently it works well for you. Sorry for suggesting the problem was non-local.

    [EDIT] Same happens if I open a .plist file for an app that isn't running, by the way.
  13. GGJstudios thread starter macrumors Westmere


    May 16, 2008
    No, you can't read the file Library/Preferences/com.apple.TextEdit.plist with a plist editor either, because that file doesn't exist. See my previous post.
    Many plist files contain both simple text and binary data, which appears as special characters. In the vast majority of cases where an average user would be modifying a plist file, they would be modifying the plain text portion, leaving the binary data intact. For that, TextEdit works perfectly. As is the case with anything related to your computer, if you don't know what you're doing, don't do it!
  14. LPZ macrumors 65816

    Jul 11, 2006


    We probably both mean well, and both of us probably have something better to do anyway.

    [EDIT] Well, it occurred to me that I still have a bootable 10.5.8 system (as well as 10.6.4) on this box. So ... I also get the solid black background using TextEdit 1.5 (244) under Leopard. No such background using 1.6 (264) under Snow Leo.
  15. Strolls macrumors newbie

    Sep 7, 2009
    Before editing with TextEdit you need to convert the plist from binary to XML like this:

    plutil -convert xml1 ~/Library/Preferences/com.apple.iChat.plist
    The new binary format was introduced with 10.4 - I think it's just a compressed form of the previous XML format, but the binary plist files are supposed to load slightly quicker than the XML ones. I'd doubt this makes a noticeable difference for most people, but I guess Apple must have thought there was something in it.

    Anyway, once you've converted the .plist using `plutil -convert` you can then edit it in vi, TextEdit or any other text edit. You can save it in the normal way, and there's no real need to convert it back to binary - the next time the app changes its preferences the plist will be converted back to binary, anyway. So this is a little inconvenient if you like using text editors to edit your preferences often, but it's not a huge deal. It's just a pain if you don't know about it.
  16. LPZ macrumors 65816

    Jul 11, 2006
    Thanks, but see post #5 above. :)

Share This Page