Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

View .svg files as text in Xcode?

Tags:

xcode

svg

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?

like image 615
Geuis Avatar asked Nov 03 '22 02:11

Geuis


1 Answers

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):

  1. Right click on the file in your Project Navigator, choose "Show File Inspector"
  2. In File Inspector change the Type field to, for example, XML:

enter image description here

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.

like image 197
mojuba Avatar answered Nov 10 '22 16:11

mojuba