Eclipse IDE: How to zoom in on text? - eclipse

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?

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=
It has some other features for eclipse, amongst which is Ctrl++ and Ctrl+- to change the font size, it's frickin' awesome.

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

The Eclipse-Fonts extension will add toolbar buttons and keyboard shortcuts for changing font size. You can then use AutoHotkey to make Ctrl+Mousewheel zoom.
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 FontsFeature as in the following image:
Complete the installation and restart Eclipse, then you should see the A toolbar 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).
To get Ctrl+MouseWheel zooming, you can use AutoHotkey with the following script:
; 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

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.

I've answered it here.
How can I change font size in Eclipse for Java text editors?
For Eclipse Neon
To Increase Ctrl +
To reduce Ctrl -

For Zoom In: CTRL + SHIFT + +
For Zoom Out: `CTRL + SHIFT + -

To zoom on Eclipse you can use : CTRL SHIFT + OR -

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

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=
makes Ctrl-+ and Ctrl-- zoom in and out. On MacOS that would be ⌘+ and ⌘-.
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.
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.

go to Eclipse > Prefences > General > Appearance > Color and Fonts > Basic > Text Font
Font problem will resolved I guess.Dont need a any plugin for this.

Just by pressing Ctrl + Shift + '+' or '-'.
At least, it worked for me at Eclipse "2020-03" version.

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.
1) First download Autohotkey from http://www.autohotkey.com/ and install it, then run it.
2) Then download tarlog-plugins from https://code.google.com/p/tarlog-plugins/downloads/list
3) Put the downloaded .jar file in the eclipse/plugins folder.
4) Restart Eclipse.
5) Add the following Autohotkey script, save it then reload it (right click on Autohotkey icon in taskbar and click "Reload this script")
; 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.

The googlecode fontsupdate does not work anymore unfortunately. You can however just download the code from github:
https://github.com/gkorland/Eclipse-Fonts
Just download it as .zip, and add it in eclipse:
Adding a local plugin
Then you have the familiar buttons again!

On Mac you can do
Press 'Command' and '+' buttons to zoom in.
press 'Command' and '-' buttons to zoom out.

Even more reliable than #mifmif :
Go to Window Menu > Preferences > General > Appearance > Colors and Fonts
then go to Basic.
This section has about 5 different fonts in it, all of which contain a size. If you go to an item in any other section (like Java > Java Editor Text Font as #mifmif suggested) the Edit Default and Go to Default buttons will be enabled. Clicking the latter takes you to the corresponding item in the Basic section. Clicking the former lets you edit that item directly.
Changing the Basic font items will handle not only Java text but just about every other text in Eclipse that can be resized, as far as I can tell.

Here's a quicker way than multi-layer menus without resorting to plug-ins:
Use the Quick Access tool at the upper left corner.
Type in "font", then, from the list that drops down, click on the link for "Preferences->Colors and Fonts->General->Appearance".
One click replaces the 4 needed to get there through menus. I do it so often, my Quick Access tool pulls it up as a previous choice right at the top of the list so I can just type "font" with a tap on the enter key and Boom!, I'm there.
If you want a keyboard shortcut, Ctrl+3 sets the focus to the Quick Access tool. Better yet, this even automatically brings up a list with your previous choices. The last one you chose will be on top, in which case a simple Ctrl+3 followed by enter would bring you straight there! I use this all the time to make it bigger during long typing or reading sessions to ease eye strain, or to make it smaller if I need more text on the screen at one time to make it easier to find something.
It's not quite as nice as zooming with the scroll wheel, but it's a lot better than navigating through the menus every time!

What I am doing is using the Windows 10 magnifier. Not the same as zooming on firefox, but it has been quite useful.

The tarlog plugin, combined with removing -Dorg.eclipse.swt.internal.carbon.smallFonts from eclipse.ini, helps my tired eyes on MacOS Yosemite with Eclipse Luna (4.4).
Problem: Didn't work for me for a PyDev foo.py Python file.
Workaround: Open a file named foo.java - change the font size. Go back to foo.py and voila!! - the python font size matches the java font size.

Related

eclipse luna ctrl+space (content assist) no colored box/background around selection

there are a lot of questions about content assist in here, but nothing that fits to my problem. I downloaded eclipse luna and I am missing a dotted selection box, around my current selection when I hit ctrl + space. I can use my arrow keys as usual to navigate up and down to choose a different suggestion. The dotted selection box appears (or selection background) if I press tab after pressing ctrl + space.
Hopefully this is not a feature of the new luna release, because this is driving my crazy like hell...
Are there any fixes for this? I don't want to switch back to previous release, because there are a LOT of troubles with the GUI elements in open suse 12.3 / kde.
thx

How do I turn off Tab and New Line markers in Eclipse?

I am using Adobe's ColdFusion Builder, an Eclipse-based IDE built on top of Aptana.
All of a sudden, I am getting a type of whitespace marker showing in my Eclipse Editor. I must have accidentally hit a key combination.
Here is a screen dump.
I have already tried "General > Editors > Text Editors > Show whitespace characters" and it is not this. I already have show whitespace characters turned off. If I turn it on, then the Whitespace Characters display over the top of what I am already seeing.
Can anyone tell me how this can be turned off? Most annoying.
Many Thanks
It's under Preferences -> General -> Editors -> Text Editors
Just uncheck 'Show Whitespace Characters':
Did you try Restarting Eclipse? If that didn't work, you might try this http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.faqs/ka11640.html which explains which file to delete to force eclipse to revert to use default settings.
I have done this several times by accidentally hitting some keystrokes.
If you go to Windows/Preferences/General/Keys you will see all the keyboard shortcuts you have.
Mine is set to Control + .
(that's a period by the way) I had to place my cursor inside the document and do it a couple of times to make it work because there is also a keyboard shortcut for Control +
On a Mac it is Cmd +.
Hope that helps.

How to make Netbeans window undecorated?

I'm using Netbeans IDE on tiny screen of my laptop, so I don't want to waste space for its titlebar. Is there any option in menus or command line that can remove it?
One option (and most probably the only option) is to put NB into full screen mode. To do this you can use the View > Full Screen menu item (Alt + Shift + Enter).
Note that I'm running on Windows and I can't really say what Gnome will do with this.

Keyboard shortcut to change font size in Eclipse?

It is relatively straightforward to change font sizes in Eclipse through preferences (and answered several times in this forum).
However I'd like to change font size quickly (e.g., with Ctrl++ and Ctrl+- like in Linux terminal or Ctrl+mouse wheel in MS Office apps). Is there a way to do this in Eclipse?
Eclipse Neon (4.6)
Zoom In
Ctrl++
or
Ctrl+=
Zoom Out
Ctrl+-
This feature is described here:
In text editors, you can now use Zoom In (Ctrl++ or Ctrl+=) and Zoom Out (Ctrl+-) commands to increase and decrease the font size.
Like a change in the General > Appearance > Colors and Fonts preference page, the commands persistently change the font size in all editors of the same type. If the editor type's font is configured to use a default font, then that default font will be zoomed.
So, the font size change is not limited to the current file and the new value of the font size is available here Window > Preferences > General > Appearance > Colors and Fonts.
I know it has been long since the original question was posted, but for future reference:
check this project, https://github.com/gkorland/Eclipse-Fonts
I have used it, and it's very simple and efficient.
Take a look at this project: 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, but most importantly, it has Ctrl++ and Ctrl+- to change the font size, it's awesome.
The Eclipse-Fonts extension will add toolbar buttons and keyboard shortcuts for changing font size. You can then use AutoHotkey to make Ctrl+Mousewheel zoom.
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 FontsFeature as in the following image:
Complete the installation and restart Eclipse, then you should see the A toolbar 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).
To get Ctrl+MouseWheel zooming, you can use AutoHotkey with the following script:
; 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
Windows > Preferences > General > Appearance > Colors and Fonts
Then, to change Java editor font: Java > Java Editor Text Font > EDIT
There it is.
Oddly, working on a .js file and Ctrl, Shift, += works to zoom in (and Ctrl - works to zoom out but you have to select 1 or 2 after Ctrl -). This only works when I'm in the js file but the zoom applies to all my open tabs. Using Eclipse Juno on Ubuntu.
In Eclipse Neon.3, as well as in the new Eclipse Photon (4.8.0), I can resize the font easily with Ctrl + Shift + + and -, without any plugin or special key binding.
At least in Editor Windows (this does not work in other Views like Console, Project Explorer etc).
Found a great plugin that works in Juno and Kepler. It puts shortcuts on the quick access bar for increasing or decreasing text size.
Install New Software -> http://eclipse-fonts.googlecode.com/svn/trunk/FontsUpdate/
I use an Eclipse plugin (in Eclipse Marketplace)
https://marketplace.eclipse.org/content/fontsize
Here's a quicker way than multi-layer menus without resorting to plug-ins:
Use the Quick Access tool at the upper left corner.
Type in "font", then, from the list that drops down, click on the link for "Preferences->Colors and Fonts->General->Appearance".
One click replaces the 4 needed to get there through menus. I do it so often, my Quick Access tool pulls it up as a previous choice right at the top of the list so I can just type "font" with a tap on the enter key and Boom!, I'm there.
If you want a keyboard shortcut, Ctrl+3 sets the focus to the Quick Access tool. Better yet, this even automatically brings up a list with your previous choices. The last one you chose will be on top, in which case a simple Ctrl+3 followed by enter would bring you straight there! I use this all the time to make it bigger during long typing or reading sessions to ease eye strain, or to make it smaller if I need more text on the screen at one time to make it easier to find something.
It's not quite as nice as zooming with the scroll wheel or with a simple Ctrl+ or Ctrl-, but it's a lot better than navigating through the menus every time!

Horizontal scrolling with the scrollwheel in Eclipse

I've been trying to find a way to scroll the text horizontally with my scrollwheel in Eclipse, similar to the way you can do it in Textpad. In Textpad if you hold ctrl while you scroll vertically it will scroll horizontally. Does anybody know if there is a configurable setting somewhere in Eclipse that will allow this? I've looked all over the "keys" setting page without being able to find it, and Google/Stack Overflow searches haven't turned anything up for me.
Thanks.
I guess this depends more on your OS than on Eclipse. For instance on Mac OS it's Shift + Scrolling.
#Daniel Sokolowski's answer was almost working. I have been using X-Mouse Button Control for over a year now and didn't know how to get the Horizontal Scrolling to work on certain programs (like Eclipse and Chrome) until I read Sokolowski's answer which pointed me in the right direction.
For the sake of brevity, and not to duplicate what has already been written clearly by Sokolowski, follow his directions, and in addition do the following:
Add Eclipse to your Applications list in X-Mouse by clicking Add and finding javaw.exe in the "Choose Application" popup and clicking OK.
Now click on the "Eclipse" profile and choose the "Scrolling & Navigation" tab
Under the "Advanced Window Scrolling" choose Method 1(SCROLL Msg) option for Scroll Method
Click Apply
If you correctly followed Sokolowski's and my instructions together you should be able to press Shift while scrolling up or down to trigger a horizontal scroll.
On a Windows machine this worked for me:
Download X-Mouse Button Control
In the main window go to 'Layer 2' and change 'Wheel Up' and 'Wheel Down' to 'Scroll Windows Right' and 'Scroll Window Left'
Go into the 'Settings > Modifier Keys Tab' and select 'Shift' for the 'Activate Layer 2' setting.
Now in whatever active window, including Eclipse pressing shift and then scrolling up and down will scroll horizontally.
Update: I have been using this approach for a few days now and noticed that not all windows are horizontal scroll enabled, for example 'Package Explorer' is not but 'Navigator' is - this appears to be a limitation of Eclipse IDE rather than this approach. Please take a moment and upvote this Eclipse Bug #201984
You have a plugin supposed (not tested) to support horizontal scrolling.
But without plugin, SWT does not support horizontal scrolling on Windows.
Its support is planed for 3.6 though. (since 3.6M2, actually -- September 18, 2009)
New event constants have been added for horizontal mouse wheels.
See SWT.MouseHorizontalWheel and SWT.MouseVerticalWheel.
For me the best way while using eclipse or for that matter any IDE, is to have a new line char at the end of screen. I feel that to use horizontal scrolling to view data becomes bit difficult while going back and forth and I would like all code to be visible to me always. If the code you are trying to view requires you to use horizontal scroll bar then try to format it by using Ctrl+Shift+F.
The bug has been fixed in the latest update of Eclipse.
In your Eclipse menu bar, simply:
1. Click Help>Check for Updates.. (and wait for the progress bar at the bottom to finish checking)
2. Install all updates.
Once Eclipse IDE gets restarted, you are now able to scroll horizontally.
(Save yourself from having to install additional mouse softwares to create new configurations. Phew, I'm so glad I figured this one out for myself)
Cheers!