如何在 Eclipse 中更改布局 (XML) 编辑器的字体?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11185300/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 18:24:11  来源:igfitidea点击:

How can I change the font of layout (XML) editor in Eclipse?

javaxmleclipsexml-editor

提问by Bobs

I know how to change the font of "Java editor" in Eclipse in menu WindowsPreferencesAppearanceColors and Fonts, but I could not find an option for changing the font of "layout editor" for files like myLayout.xml or strings.xml.

我知道如何在菜单WindowsPreferencesAppearanceColors and Fonts 中更改 Eclipse 中“Java 编辑器”的字体,但我找不到更改 myLayout.xml 或字符串等文件的“布局编辑器”字体的选项.xml。

Where is it?

它在哪里?

回答by Aleksandr Kravets

Use menu WindowsPreferencesAppearanceColors and FontsBasicText Font. This is a common text font setting that is applied to XML file editors by default.

使用菜单WindowsPreferencesAppearanceColors and FontsBasicText Font。这是默认应用于 XML 文件编辑器的常见文本字体设置。

I also found this message.

我也发现了这个消息

回答by Abdull

For my Eclipse v4.4 (Luna) installation, the XML editor font size is changed under:

对于我的 Eclipse v4.4 (Luna) 安装,XML 编辑器字体大小更改为:

Menu WindowPreferencesGeneralAppearanceColors and FontsStructured Text EditorsStructured Text Editor Text Font.

Menu WindowPreferencesGeneralAppearanceColors and FontsStructured Text EditorsStructured Text Editor Text Font

回答by Lou Morda

I had to expand General to get to Appearance... I figured it out in about 3.2 seconds, but just in case anyone wants to save that 3.2 seconds:

我不得不扩展 General 以获得 Appearance ......我在大约 3.2 秒内弄清楚了,但以防万一有人想节省这 3.2 秒:

Windows-> General -> Preferences-> Appearance-> Colors and Fonts-> Basic -> TextFont -> Edit...

Windows-> 常规-> 首选项-> 外观-> 颜色和字体-> 基本-> TextFont -> 编辑...

This is in Eclipse IDE for Android Developers v23.0.2. I'm pretty sure this changes all font sizes for everything in the editor.. ? But I'm assuming if you want XML font to be bigger, you want all files to be that font size.

这是在 Eclipse IDE for Android Developers v23.0.2 中。我很确定这会更改编辑器中所有内容的所有字体大小..?但我假设如果您希望 XML 字体更大,您希望所有文件都是该字体大小。

回答by MerkoSMS

I wanted to set bold font for XML attribute values in XML editor. It is in Window -> Preferences -> XML -> XML Files -> Editor -> Syntax Coloring.

我想在 XML 编辑器中为 XML 属性值设置粗体字体。它位于窗口 -> 首选项 -> XML -> XML 文件 -> 编辑器 -> 语法着色。