eclipse xml editor indent using spaces

不羁的心 提交于 2019-12-03 06:44:08

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
Rob van der Most

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.

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