1

Applications like for example TextEdit show multiple entries in the Open Recent list despite that the number of recent items is set to none in the system preferences.

Is there another way to adjust the number of recent items? Or to automatically clear the lists of all applications on logout?

enter image description here enter image description here

2

The number of Recent Items in TextEdit or other applications is independent from the general settings in the System Preferences. The amount of entries and the entries itself are stored in *.LSSharedFileList.plist files.

Example:

PlistEdit Pro method
To change the number for TextEdit clear the menu in TextEdit, quit TextEdit, open com.apple.TextEdit.LSSharedFileList.plist in ~/Library/Preferences/ with an appropriate application (e.g. PlistEdit Pro (free 14-day trial)) and enter 0 as MaxAmount.

com.apple.TextEdit.LSSharedFileList.plist

You may have to create (if the file doesn't exist) and modify com.apple.TextEdit.plist afterwards:

touch ~/Library/Preferences/com.apple.TextEdit.plist  

to create the file com.apple.TextEdit.plist

defaults write com.apple.TextEdit NSRecentDocumentsLimit 0  

to change the preferences.

plutil and nano method

Quit TextEdit and open Terminal.app and enter:

touch ~/Library/Preferences/com.apple.TextEdit.plist  

to create the file com.apple.TextEdit.plist if it doesn't exist

defaults write com.apple.TextEdit NSRecentDocumentsLimit 0  

to change the preferences

plutil -convert xml1 ~/Library/Preferences/com.apple.TextEdit.LSSharedFileList.plist  

to convert the file to XML.

Open the file with nano

nano ~/Library/Preferences/com.apple.TextEdit.LSSharedFileList.plist

and edit the value of MaxAmount, write out your edit to file with ctrlO and exit nano ctrlX
and finally

plutil -convert binary1 ~/Library/Preferences/com.apple.TextEdit.LSSharedFileList.plist  

to convert it back to the original binary format.

defaults method works with 10.7, 10.8 and obviously 10.9:

defaults delete com.apple.TextEdit.LSSharedFileList RecentDocuments
touch ~/Library/Preferences/com.apple.TextEdit.plist (if the file doesn't exist)
defaults write com.apple.TextEdit NSRecentDocumentsLimit 0
defaults write com.apple.TextEdit.LSSharedFileList RecentDocuments -dict-add MaxAmount 0
killall Dock
  • Thanks a lot! Especially your third solution works for me. – samcarter Dec 3 '14 at 15:05
  • @samcarter In Mavericks the last version didn't work for me at all. The file reverted to it's defaults (MaxAmount 10) most of the time. Maybe too much testing ;-) – klanomath Dec 3 '14 at 15:09
  • strange, I experienced this the other way round. First I tried to edit the .plist with XCode (similar to your first solution) but this did not work. Every time I opened TextEdit the MaxAmount was set back to 10. But your command line approach worked on the first try. – samcarter Dec 3 '14 at 15:44
  • @samcarter i didn't have a com.apple.TextEdit.plist file in my prefs folder at the beginning. Maybe that's the reason for the strange behavior – klanomath Dec 3 '14 at 15:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .