How can I change font size in Eclipse for ALL text editors? - eclipse

I had to do a presentation yesterday, and as part of the presentation, I used Eclipse to show some code. Many of my coworkers in the room could not read the text and asked me to increase the size of the text for ALL files, not just Java files or XML files.
But it wasn't immediately obvious from the available options how to do this. I went to menu Window → Preferences and typed font in the search input. This filtered the options to General → Appearance → Colors and Fonts. From here, I could see an option to change the font in Java files, but I didn't know how to change the font globally.
I'm using Eclipse v4.3 Service Release 1 (Kepler) on Windows.
This is similar to Stack Overflow question How can I change font size in Eclipse for Java text editors?.

This is what we figured out, and this is also found in this answer and also this answer (I'll quote):
Go to Preferences → General → Appearance → Colors and Fonts, expand the "Basic" folder and select "Text Font" and change that to whatever size you like.
Pretty simple!

The answer by #Jake works fine on the editor. To also change the font size of the global Eclipse GUI, I have added the follows:
*{font-size:8;}
in the file:
ECLIPSE_HOME/plugins/org.eclipse.ui.themes_*/css/e4_default_gtk.css
worked for me. This is explained here: How to change eclipse font sizes

Go to Preferences → General → Appearance → Colors and Fonts, expand the "Basic" folder and select "Text Font" and change that to whatever size you like.
this video help you

Eclipse provides a handy shortcut to shortcut for what is well explained in Jake Toronto answer (only by 2 points increments/decrements though).
On MacOS:
Increase by 2 points: command + "+"
Decrease by 2 points: command + "-"
On Windows/Fedora:
Increase by 2 points: CTRL + "+"
Decrease by 2 points: CTRL + "-"

The answer by #George worked fine, but if it doesn't work on the file he referred to, then you might try applying the same modification on another file from the same folder: e4_basestyle.css.
For me it worked this way (my version of the Eclipse SDK is 4.2.2).

For XML or HTML Files, you can select the "Structured Text Editors" option instead of "Basic" in the path given by Jake Toronto's answer.

Just for reference, if anyone change font settings from Preferences → General → Appearance → *Colors and Fonts**, but it wouldn't work...
In my case, it caused by the Eclipse color theme. Just uninstall it.

Open Eclipse Preferences
In left menu select "General>Appearance>Colors and Fonts"
In the resulting window under the Java node select "Java Editor Text Font"
Notice button "Edit Defalt..." is now enabled, click it
Choose your preferred font settings and click OK
Now you will notice that all editor fonts have changed to your selected default (if they were set to the default to begin with). Also you can now change any editor back to this setting by selecting the editor font setting and clicking "Go to Default"

Related

how to change DVT eclipse menu font-size

I need to change DVT eclipse menu size. also in properties view and Project Explorer.
High DPI make them larger than the code font size.
Although this soultion did work it was complicated and change only the Project Explorer (without Menu and Project)
DVT Version - dvt_eclipse_20.1.37-e46
As mentioned in DVT "Themes" documentation page.
To change the fonts, please go to Window > Preferences > DVT > Themes.
You will find there the option to change both the Editor Font and the UI Font (the second one is what you are looking for)

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!

Eclipse: I turned on hidden characters now I can't turn off

Somehow I've turned on hidden characters in Eclipse. It's not the "whitespace" characters in the general editor preferences. When turned on, it adds another layer of hidden characters over the existing ones.
Then I have things like
\r\n
Does anyone know what these are and how to remove them?
It is under Preferences > General > Editors > Text Editors. There is a checkbox labeled "Show whitespace characters". If you uncheck this the editor switches back to normal.
If you click on the link (whitespace characters) (<= v3.6) or (configure visibility) (>= v3.7) in this line you will get a popup window, in which you can define which characters eclipse is supposed to consider as whitespace characters.
In this popup window you also get the option to define the transparency in which each whitespace character is displayed in the editor, which you can use to (indirectly) change their foreground colour. I'm just mentioning it here, because it took me about half an hour to find this setting! ;-)
There is a toggle button 'Show Whitespace Chars' on the Eclipse toolbar
A great tip about using 'quick access' from eclipse forum:
CTRL+3 swc
Allows to turn them on and off
The right shortcut is Ctrl + N
UPDATE From Eclipse 3.7 version, something is changed... Now you have to go to:
Window > Preferences > General > Editors > Text Editors
CTRL + . does the job.
For Aptana Users
To toggle hidden characters in Aptana on and off, use the following keyboard shortcut:
Ctrl+Alt+W
I am using Eclipse Oxygen and can see this option to toggle whitespace characters:
It is actually in two places...
Sandkastenliga points out the obvious one, but you can also show white space with a shortcut key combination. The key combination is separate from the text editor preferences and will superimpose additional characters when active (it uses \r and \n for carriage return an line feed respectively instead of the symbols used by the text editor preference.)
Go to preferences > general > keys and look for the binding for the 'Show Whitespace' command.
I have the text editor preference turned on, so I removed the binding for this command altogether (it was set to Ctrl+. in my profile) to prevent accidental activation as it doesn't affect the other preference.
Go to Window > Preferences > General > Editors > Text Editors
Uncheck the "Show whitespace characters" option on the right side of the page, then click "Apply" at the bottom of the page.
Since this is not a standard setting, it could be the result of one of your extra plugin.
Did you try starting your eclipse with the -clean parameter?
Do you reproduce the issue with a fresh Eclipse installation?
Go to Preferences > General > Editors > Text Editors and restore defaults.
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 + .
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 +
Hope that helps.
You can add "Show Whitespace Characters" button in toolbar by customizing your perspective.
It also contains buttons to toggle word wrap, and toggle selection mode.
Go to Window > Perspective > Customize Perspective > Action Set Availability, then select "Editor Presentation" action set:
This works in Eclipse Neon.
You can also add a key binding for this action.
Go to Preferences > General > Keys > "Show Whitespace Characters"
Sorry this is a bit vague but it's a while since i used Eclipse and i do not have it installed. I think this is it ..... in one of the menus you will find the Eclipse settings, there are two set's of settings, current project and overall Eclipse, you mat need to check them both. In there are various menus in tree form that allow you control the actions and look and feel. But some of them are nested so there is an overall control but some packages have their own options in a sub menu set. The menu's will expand when you click them and i'm afraid you need to walk through them all.
Eclipse > Preference > General > Editors > Text Editors > Show WhiteSpace characters.

Eclipse IDE: How to zoom in on text?

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.

Eclipse fonts and background color

I have been trying to change the background color of Eclipse's windows to black and customize the font colors. There doesn't seem to be a way to do this, at least not in an obvious way. I am using version 3.3.
How do I do this or are there any plugin's that might be able to assist in doing this?
To change background colour
Open menu *Windows → Preferences → General → Editors → Text Editors
Browse Appearance color options
Select background color options, uncheck default, change to black
Select background color options, uncheck default, change to colour of choice
To change text colours
Open Java → Editor → Syntax Colouring
Select element from Java
Change colour
List item
To change Java editor font
Open menu Windows → Preferences → General → Appearance → Colors and Fonts
Select Java → Java Editor Text font from list
Click on change and select font
I just came across this: Eclipse Colour Themes
Install the plugin and choose from a selection of pre-defined themes, or write your own.
Just what I needed!
Under Windows → Preferences → General → Apperance you can find a dark theme.
Background color of views (navigator, console, tasks etc) is set according to the desktop (system) settings. On Linux/GNome I changed System/Preferences/Appeareance to change this color.
Editor colors are set chaotically by different editors, search for background in eclipse preferences to find different options. One easy way to get beautiful dark (and not only dark) themes is to install Afae plugin, and then pick theme within its preferences (twilight theme is beautiful, for example) - again, eclipse prefs, Afae group. Of course this applies only when you edit with Afae.
If you are having trouble with Eclipse 2019 and using a dark theme and setting the background and having it not change: There seems to be a recent Eclipse bug. I suggest you look here or here for workarounds.
You can install eclipse theme plugin then select default.
Please visit here: http://eclipsecolorthemes.org/?view=plugin
If you go to Windows, Preferences then select General, Editors, Text editors, you can set colors on that property page (and there's a link for setting MORE colors - General, Appearance, Colors and fonts).
That's with an Eclipse 3.3 build anyway.
The easiest way is to install the plugin is from the Eclipse Marketplace. Go to Help→Eclipse Marketplace, then search for Eclipse Color Theme and install it.
... on a Mac, Preferences' is under the main 'Aptana Studio 3' menu rather than the 'Windows' menu as mentioned above.
On Windows or Mac, you can find this setting under the General → Editors → Text Editors menu.
Switch to Theme... is also an option