Eclipse IDE:如何放大文本?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/790720/
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-10 18:41:52  来源:igfitidea点击:

Eclipse IDE: How to zoom in on text?

eclipseeclipse-plugin

提问by Yossale

I want the same behaviour Firefox has, when you use the scroll button in the mouse to zoom in and out on the current view. Is there something like it for eclipse?

当您使用鼠标中的滚动按钮放大和缩小当前视图时,我想要与 Firefox 相同的行为。日食有类似的东西吗?

采纳答案by Marcel Valdez Orozco

There is a project from a guy called 'tarlog' that made a plugin for eclipse at this google code site: http://code.google.com/p/tarlog-plugins/downloads/detail?name=tarlog.eclipse.plugins_1.4.2.jar&can=2&q=

有一个叫做“tarlog”的人在这个谷歌代码站点上为 Eclipse 制作了一个插件:http: //code.google.com/p/tarlog-plugins/downloads/detail?name=tarlog.eclipse.plugins_1 .4.2.jar&can=2&q=

It has some other features for eclipse, amongst which is Ctrl++and Ctrl+-to change the font size, it's frickin' awesome.

它还有一些其他的 eclipse 功能,其中包括Ctrl++Ctrl+-来改变字体大小,这真是太棒了。

回答by Mifmif

Too late but it could be helpful :

为时已晚,但可能会有所帮助:

Go to Window Menu > Preferences > General > Appearance > Colors and Fonts

转到窗口菜单 > 首选项 > 常规 > 外观 > 颜色和字体

then go to Java > Java Editor Text Font > Edit

然后转到 Java > Java Editor Text Font > Edit

回答by Naveed Ahmad

The Eclipse-Fontsextension will add toolbar buttons and keyboard shortcuts for changing font size. You can then use AutoHotkey to make Ctrl+Mousewheelzoom.

Eclipse的字体扩展将添加工具栏按钮和键盘快捷键改变字体大小。然后您可以使用 AutoHotkey 进行Ctrl+鼠标滚轮缩放。

Under Help | Install New Software...in the menu, paste the update URL (http://eclipse-fonts.googlecode.com/svn/trunk/FontsUpdate/) into the Works with:text box and press Enter. Expand the tree and select FontsFeatureas in the following image:

帮助下 | Install New Software...在菜单中,将更新 URL ( http://eclipse-fonts.googlecode.com/svn/trunk/FontsUpdate/)粘贴到Works with:文本框中,然后按Enter。展开树并选择FontsFeature,如下图所示:

Eclipse extension installation screen capture

Eclipse 扩展安装屏幕截图

Complete the installation and restart Eclipse, then you should see the Atoolbar buttons (circled in red in the following image) and be able to use the keyboard shortcuts Ctrl+-and Ctrl+=to zoom (although you may have to unbind those keys from Eclipse first).

完成安装并重新启动 Eclipse,然后您应该会看到A工具栏按钮(下图中以红色圈出)并且能够使用键盘快捷键Ctrl+-Ctrl+=进行缩放(尽管您可能需要从 Eclipse 取消绑定这些键第一的)。

Eclipse screen capture with the font size toolbar buttons circled

带有圆圈字体大小工具栏按钮的 Eclipse 屏幕截图

To get Ctrl+MouseWheelzooming, you can use AutoHotkeywith the following script:

要获得Ctrl+MouseWheel缩放,您可以使用AutoHotkey和以下脚本:

; Ctrl+MouseWheel zooming in Eclipse.
; Requires Eclipse-Fonts (https://code.google.com/p/eclipse-fonts/).
; Thank you for the unique window class, SWT/Eclipse.
#IfWinActive ahk_class SWT_Window0
    ^WheelUp:: Send ^{=}
    ^WheelDown:: Send ^-
#IfWinActive

回答by Mickael

Starting from tonight nightly build of 4.6/Neon, the Eclipse Platform includes a way to increase/decrease font size on text editors using Ctrl+and Ctrl-(on Windows or Linux, Cmd=and Cmd-on Mac OS X) : https://www.eclipse.org/eclipse/news/4.6/M4/#text-zoom-commands. The implementation is shipped with any product using a recent build of the platform, and is more reliable that the one in the alternative plugins mentioned above. It will be more widely available within weeks, when the IDE packages for Neon M4 will be available, and it will be part of the public Neon release in June 2016.

从今晚 4.6/Neon 的每晚构建开始,Eclipse 平台包括一种使用Ctrl+Ctrl-(在 Windows 或 Linux 上,Cmd=Cmd-在 Mac OS X 上)增加/减小文本编辑器字体大小的方法:https:/ /www.eclipse.org/eclipse/news/4.6/M4/#text-zoom-commands。该实现随使用该平台的最新版本的任何产品一起提供,并且比上述替代插件中的更可靠。它将在几周内更广泛地提供,届时 Neon M4 的 IDE 包将可用,并且它将成为 2016 年 6 月公开 Neon 版本的一部分。

回答by ChandraBhan Singh

I've answered it here. How can I change font size in Eclipse for Java text editors?

我已经在这里回答了。 如何在 Eclipse 中为 Java 文本编辑器更改字体大小?

For Eclipse Neon

对于 Eclipse Neon

To Increase Ctrl +

增加Ctrl +

To reduce Ctrl -enter image description here

减少Ctrl -在此处输入图片说明

回答by Wozniak

To zoom on Eclipse you can use : CTRLSHIFT+OR -

要放大 Eclipse,您可以使用:CTRL SHIFT +OR -

回答by navis1692

As per the recent changes you can use: (1) Ctrl/Shift/(+) for Zoom-in (2) Ctrl/Shift/(-) for Zoom-out

根据最近的更改,您可以使用: (1) Ctrl/Shift/(+) 放大 (2) Ctrl/Shift/(-) 缩小

回答by AmigoNico

As mentioned in another answer, this plugin

正如另一个答案中提到的,这个插件

http://code.google.com/p/tarlog-plugins/downloads/detail?name=tarlog.eclipse.plugins_1.4.2.jar&can=2&q=

http://code.google.com/p/tarlog-plugins/downloads/detail?name=tarlog.eclipse.plugins_1.4.2.jar&can=2&q=

makes Ctrl-+ and Ctrl-- zoom in and out. On MacOS that would be ?+ and ?-.

使 Ctrl-+ 和 Ctrl-- 放大和缩小。在 MacOS 上,这将是 ?+ 和 ?-。

But at least on MacOS Lion and Eclipse Helios, ?- worked but not ?+ – no key combination (and I tried a bunch, including ?= and variants with Ctrl and Shift) would increase font size. However, by changing the key bindings, I was able to get it to work.

但至少在 MacOS Lion 和 Eclipse Helios 上,?- 工作但不是 ?+ – 没有组合键(我尝试了一堆,包括 ?= 和带有 Ctrl 和 Shift 的变体)会增加字体大小。但是,通过更改键绑定,我能够让它工作。

Preferences => General => Keys

首选项 => 常规 => 键

Commands "Zoom Out" and "Decrease Font" were already set to ?- (and that seemed to work), so I set "Zoom In" and "Increase Font" to ?= (one of them was that and the other was ?+), and that worked.

命令“Zoom Out”和“Decrease Font”已经设置为?-(这似乎有效),所以我将“Zoom In”和“Increase Font”设置为?=(其中一个是那个,另一个是? +),并且奏效了。

回答by Zek101

Here is a cool way of ensuring zoom in and zoom out with mouse scroll-wheel in the Eclipse Editor. This one takes inspiration from the solution above from naveed ahmad which was not working for me.

这是确保在 Eclipse 编辑器中使用鼠标滚轮放大和缩小的一种很酷的方法。这个是从 naveed ahmad 上面的解决方案中获得灵感的,这个解决方案对我不起作用。

1) First download Autohotkey from http://www.autohotkey.com/and install it, then run it.

1) 首先从http://www.autohotkey.com/下载 Autohotkey并安装它,然后运行它。

2) Then download tarlog-plugins from https://code.google.com/p/tarlog-plugins/downloads/list

2) 然后从https://code.google.com/p/tarlog-plugins/downloads/list下载 tarlog-plugins

3) Put the downloaded .jar file in the eclipse/plugins folder.

3) 将下载的 .jar 文件放在 eclipse/plugins 文件夹中。

4) Restart Eclipse.

4) 重启 Eclipse。

5) Add the following Autohotkey script, save it then reload it (right click on Autohotkey icon in taskbar and click "Reload this script")

5) 添加以下 Autohotkey 脚本,保存后重新加载(右键单击任务栏中的 Autohotkey 图标,然后单击“重新加载此脚本”)

; Ctrl + MouseWheel zooming in Eclipse Editor.
; Requires Tarlog plugins (https://code.google.com/p/tarlog-plugins/).
#IfWinActive ahk_class SWT_Window0
^WheelUp:: Send ^{NumpadAdd}
^WheelDown:: Send ^{NumpadSub}
#IfWinActive

And you should be done. You can now zoom in or zoom out with ctrl+mousewheel up and ctrl+mousewheel down. The only caveat is that Autohotkey must be running for this solution to work so ensure that it starts with Windows or run it just before firing Eclipse up. Works fine in Eclipse Kepler and Luna.

你应该完成。您现在可以使用 ctrl+mousewheel up 和 ctrl+mousewheel down 来放大或缩小。唯一的警告是 Autohotkey 必须运行才能使此解决方案工作,因此请确保它从 Windows 启动或在启动 Eclipse 之前运行它。在 Eclipse Kepler 和 Luna 中运行良好。

回答by Yi?it Ta?

go to Eclipse > Prefences > General > Appearance > Color and Fonts > Basic > Text Font

转到 Eclipse > 首选项 > 常规 > 外观 > 颜色和字体 > 基本 > 文本字体

Font problem will resolved I guess.Dont need a any plugin for this.

我猜字体问题会解决。为此不需要任何插件。