168

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?

Nico Zimmer
  • 325
  • 1
  • 12
Doug
  • 1,925
  • 3
  • 13
  • 9
  • I have looked for this too, but to my knowledge there is no such shortcut. The only way to change the font size is via the preferences. – Stephan Aug 06 '11 at 07:45
  • Related, but sadly also unanswered: http://stackoverflow.com/questions/790720/eclipse-ide-how-to-zoom-in-on-text – jakub.g Oct 15 '11 at 18:43
  • 2
    About CTRL+wheel, there is a [bug submitted to Eclipse](https://bugs.eclipse.org/bugs/show_bug.cgi?id=84776) but I see no one working on that; about CTRL++, CTRL+- I see the entries "Zoom in" and "Zoom out" in Eclipse Indigo's `Window > Preferences > General > Keys`, assigned to CTRL+- and CTRL+=, but I can't make them work... – jakub.g Oct 15 '11 at 19:02
  • 3
    Other solution Windows -> Preferences -> General -> appareance -> Colors a fonts -> Structured Text Editor -> Edit. this work for me :) – RicardoBalda Sep 15 '13 at 00:27

10 Answers10

64

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.

L Y E S - C H I O U K H
  • 4,765
  • 8
  • 40
  • 57
ROMANIA_engineer
  • 54,432
  • 29
  • 203
  • 199
  • 14
    Note that you have to use the standard `-` and `+` keys on the keyboard, not the numpad keys. _Ctrl+Numpad_Subtract_ and _Ctrl+Numpad_Add_ are mapped to collapse/expand by default. – kapex Jul 28 '16 at 08:16
  • 1
    This works but is limiting because there is a big step change between each size of font in the usual viewing zoom level. CTRL + WHEEL on browsers gives 10% changes which is nicer. I guess it's another idea for the next version of Eclipse . . . – Trunk Jul 18 '17 at 18:34
  • A good step forward for eclipse, but seems to zoom in or out too much for my eyes. Should lower the 'jump' for each zooms. – Bertie Oct 25 '17 at 10:18
54

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.

freedev
  • 25,946
  • 8
  • 108
  • 125
Mohamed El-Beltagy
  • 902
  • 10
  • 19
  • 5
    This worked for me on some files but not on the ones I cared about: .scala and .java files. The problem turned out to be that eclipse-fonts appears to affect only the "Text Font" setting rather than being aware of the font setting used in the current window. If you have changed the "Java Editor Text Font" settings away from the default (which is to just use the "Text Font" settings), eclipse-fonts won't work. The solution is to select "Java Editor Text Font" in "Preferences / General / Appearance / Colors and Fonts" and press Reset. – AmigoNico Dec 06 '12 at 18:45
  • Works great for my simple use case (most fonts defaulting to the "Text Font" setting) on Juno on Mac. :) – Mark A. Fitzgerald Mar 07 '13 at 15:36
  • Works fine with Eclipse Juno, along with [Color Themes](http://eclipsecolorthemes.org/) – iNFINITEi Mar 23 '13 at 17:25
  • Sidebar buttons are ugly on os x version, but shortcuts work great so that's awesome :) Most popular answer here did not work for me so here goes my upvote. – GabLeRoux Mar 24 '13 at 00:57
  • Works great, Juno on OS X 10.9, JDK 7u25 here. The best part is you don't need to close/reopen the file editor for changes to take effect. – Jeff Evans Oct 29 '13 at 16:34
  • 1
    I just tried this on Kepler, and it didn't seem to work. But tarlog 1.4.2 did work (in dropins/). – AmigoNico Jan 12 '14 at 18:12
  • 1
    Works with Luna, but only with the menu buttons, not with ctrl+/- – Cengiz Dec 10 '14 at 15:32
  • 1
    xkr47 has forked the original plugin on github and updated it to a working version with Eclipse Luna. URL to the working version is updated. In regards to the ctrl +/-; make sure to use the '+' and '-' found at the top of the keyboard. They don't work with +/- next found on numpad. – Mohamed El-Beltagy Feb 05 '15 at 21:47
  • @MohamedEl-Beltagy The link still points to Google Code, rather than xkr47's GitHub repo. Is this intentional? – DeejUK Feb 03 '16 at 06:56
  • 3
    @EngineerBetter I'm not sure why the link is not updated. But any way, the fork is here: https://github.com/xkr47/Eclipse-Fonts – Mohamed El-Beltagy Feb 06 '16 at 00:31
  • Neon has Ctrl +/- to zoom font size by default (no plugin needed) – Kevin Hooke Nov 02 '17 at 00:01
50

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.

Marcel Valdez Orozco
  • 2,985
  • 1
  • 25
  • 24
  • hey marcel can u give some link or documentation abt it? i need some more info abt this. – RAS Oct 19 '11 at 06:41
  • 6
    Well other than this post http://tarlogonjava.blogspot.com/2008/07/open-command-prompt-or-windows-explorer.html at the creator's website there isn't much. But if you're wondering how to install it, just copy the jar to you eclipse/plugins/ directory and restart eclipse, you should be able to do ctrl++ and ctrl+- to change font size then – Marcel Valdez Orozco Oct 19 '11 at 15:07
  • Great, thanks for sharing. To install the plugin, all you have to do in Eclipse 3.7 is to copy the JAR into `/eclipse/dropins`. – jakub.g Oct 19 '11 at 20:42
  • @RAS You can always ask, if you need to know more :) All posts about this plugin can be found by http://tarlogonjava.blogspot.com/search/label/tarlog-plugins – Tarlog Nov 08 '11 at 06:20
  • 1
    @MarcelValdezOrozco, this is working for me in 4.2.1 as of 1/15/13, so I think its still working with new versions. – studgeek Jan 15 '13 at 17:10
  • I want to use this plugin, but I don't seem to have a plugins or dropins directory in eclipse/: anyone know where to put the file/how to use it? – George Tomlinson Oct 01 '13 at 14:57
  • Works for me, but only if I put it in plugins/ not in dropins/ - whatever the difference is, it matters. This on a Linux machine, and Eclipse updated itself earlier today. – DarenW Oct 07 '13 at 04:50
  • 3
    It should be `Ctrl` + `Shift` + `+` for zoom – ajdeguzman Jun 16 '14 at 09:45
  • 1
    New location for tool is https://github.com/tarlog/tarlog-plugins/releases and doc is at http://tarlogonjava.blogspot.com/search/label/tarlog-plugins – studgeek May 04 '16 at 23:44
  • @DarenW Works on Eclipse Mars, Linux when putting it into /dropins. Using the 1.4.2 jar from Github. – jmiserez Jun 08 '16 at 13:40
28

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:

Eclipse extension installation screen capture

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).

Eclipse screen capture with the font size toolbar buttons circled

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
Naveed Ahmad
  • 6,627
  • 2
  • 58
  • 83
  • 1
    I'm using luna 4.4.1. I installed it but the buttons don't work. I've bound the keys and tried them but still didn't work. I'm writing this just to let you know as I've managed to install tarlog's plug in successfully – WVrock Nov 29 '14 at 05:19
  • 1
    also I had to change the {=} into {+} for it to work. – WVrock Nov 29 '14 at 05:35
15

Windows > Preferences > General > Appearance > Colors and Fonts

Then, to change Java editor font: Java > Java Editor Text Font > EDIT

There it is.

DaveShaw
  • 52,123
  • 16
  • 112
  • 141
pellox
  • 313
  • 2
  • 2
  • 47
    since he writes **It is relatively straightforward to change font sizes in Eclipse through preferences** this solution is explicitly **not** requested. -1! – eckes Jun 26 '12 at 19:36
  • Also I do not seek so many short-cuts in such kind of IDE. Otherwise I prefer to go to vim :-) – peeyush Jul 16 '12 at 11:04
  • Unfortunately, eclipse doesn't have any feature `font size` for `PyDev` – PersianGulf Aug 31 '13 at 08:11
10

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.

Hulk1991
  • 3,079
  • 13
  • 31
  • 46
Hedeer
  • 101
  • 1
  • 2
8

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).

Xsasan
  • 400
  • 3
  • 14
4

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/

steve-o
  • 1,303
  • 1
  • 14
  • 20
0

I use an Eclipse plugin (in Eclipse Marketplace) https://marketplace.eclipse.org/content/fontsize

Abdu
  • 487
  • 4
  • 12
0

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!

jamesc1101
  • 185
  • 1
  • 8