

Or 'Help > Find Action' (which is Ctrl-Shift-A), then type 'format'. Robert Longson says: w3.org/TR/SVG/struct. Right in the main menu: 'Code > Reformat Code' or just Ctrl-Alt-L. You need to edit them/set a local one by hand. Maybe the attribute has sneaked its way in there. There are some files templates/default.svg used to initialize empty files on startup. After importing this style in IntelliJ, I am able to indent to 4 spaces. You might want to look at the configuration folder of Inkscape (look at Settings -> System to find the locations for user/global configs). First I disabled the IntelliJ google-java-format plugin.Downloaded IntelliJ-java-google-style.xml from here and modified indent size property as below. Nonetheless, this is the first time I have seen it on the root element. It is a behaviour I have not found any possibility to change. Useful comments attached to the answer for posterity:Ĭcprog says: Inkscape adds this attribute to all text elements. svg files contain this attribute, some don't, and its presence or absence does not seem to affect the. (So, in light of that, the fact that IntelliJ IDEA's "Indent Lines" command does not pay attention to the xml:space="preserve" attribute might actually be a bug.)Īpparently some. Removing this attribute allows proper re-formatting of the. svg file, the tag contains a sneaky xml:space="preserve" attribute.Īnd it turns out that IntelliJ IDEA pays attention to this attribute, so the "Reformat Code" command does nothing. How can I have IntelliJ IDEA re-format my. Enter 'Code style' in the search field in the settings window. Choose File -> Settings in the IDEA menu (or press Ctrl+Alt+S).

If I do "Auto-indent Lines" (Ctrl+Alt+I) the current line is in fact properly indented with tabs, so if I do this for each line I can at least have the entire file properly indented, but no other formatting problems are fixed. So we need to edit the rule that IDEA uses for formatting. change tab space from 4 to 2 and it will only export the 'OTHERINDENTOPTIONS' part of the code style). I also tried exporting code style through the IntelliJ File menu, but it will only export the code style from areas that have changed (eg. svg files to the XML file type, no difference. in the IntelliJ settings code style dialog. I tried going to "File Types" and re-assigning. svg file, but when I do "Reformat Code" (Ctrl+Shift+L) in IntelliJ IDEA, nothing happens. Many other things are also wrong, for example /> File -> Settings -> Other Settings -> Eclipse Code Formatter (if you cannot find it, then use search field for that) select Use the Eclipse code formatter, browse your xml style.

#Intellij code formatter xml install#
For one thing, in my settings I have selected "Use Tab Character", but this file contains no tab characters. click Browse repositories button, enter Eclipse Code Formatter in the search field and install the plugin. As you can see, the formatting of the xml is quite messed up. I have the following SVG file generated by inkscape.
