eclipse xml editor indent using spaces

ε祈祈猫儿з 提交于 2019-12-04 10:59:25

问题


My eclipse version is Mars Release (4.5.0).Preferences->XML->XML Files->Editor,I can not set the value of Indentation size. The "+" and "-" can not be clicked . I can not input value yet!


回答1:


Had the same problem, I found the following workaround:

  1. open with a text editor this file in your workspace folder: .metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.wst.xml.core.prefs
  2. change or add the following line ("4" is just an example): indentationSize=4
  3. (Re)start Eclipse



回答2:


This is a known bug in Eclipse. It is related to GTK3: https://bugs.eclipse.org/bugs/show_bug.cgi?id=428246

It was originally reported in early 2014 for the Kepler release.




回答3:


In addition to Kollgandren's answer, if you want to use spaces as your indent, include two options in your ${WORKSPACE}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.wst.xml.core.prefs file.

indentationChar=space
indentationSize=4


来源:https://stackoverflow.com/questions/31747059/eclipse-xml-editor-indent-using-spaces

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!