I use xcode for my editing environment. I'm editing a few .svg files on a project, and I need xcode to open the files as text. Rather, it renders the documents as svg. While I appreciate how this helps most of the time (working and view svg's as such) its a hinderance to me right now.
Does anyone know how to tell xcode to treat a .svg file as regular text?
It doesn't appear you can view source for .svg in Xcode, I'd suggest using something like vim or TextEdit.app, both of which are built-in to your system.
In reply to mojuba and using the file inspector, I'm not sure this is what makes the difference but I have Location set to 'Relative to Workspace' (my workspace file and source files are in the same directory) and the settings do survive restarting Xcode. I'm using Xcode 4.2.1.
There is a simple way of changing the editor for any file type, particularly SVG in Xcode 5 (I believe this was possible in previous versions too):
You will have to do it for each SVG file though. Seeing the graphical preview of your SVG is still possible via right click in Project Navigator -> Open As -> Preview.
Renaming to .xml (make sure Finder isn't hiding the real extension by editing the name in the info panel) did work for me — in my case the SVG wasn't part of a project and so @mojumba's trick did not work.