Anyone use default code snippets in Xcode? There are too many useless code snippets there, such that I don't even want to create my snippets there. So looked for answers on ST, but they did not help much.
Is there any improvement so I can remove code snippets in Xcode 6?
For further question, can I import or export customised snippets, so I can use them across different computers?
Thanks a lot,
Yes you can delete the default snippets.
Since snippets are saved in XML
in a plist
file at the path:
/Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Versions/A/Resources/SystemCodeSnippets.codesnippets
You can create an empty snippets file in TextEdit
with the following code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array></array>
</plist>
And save it as SystemCodeSnippets.codesnippets
.
Replace it with the file in the folder named above and there are no default system snippets anymore.
In Xcode 10 the default snippets are at
/Applications/Xcode.app/Contents/PlugIns/IDESourceEditor.framework/Versions/A/Resources/SystemCodeSnippets.codesnippets
To remove contents change it to
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array></array>
</plist>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With