Keyboard shortcut to change font size in Eclipse?

前端 未结 10 1546
南方客
南方客 2020-11-30 17:59

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 si

10条回答
  •  执念已碎
    2020-11-30 18:01

    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
    

提交回复
热议问题