17

I found we can do that in Emacs:

emacs zoom in/zoom out

What is the equivalent in Vim?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Chenming Zhang
  • 2,446
  • 2
  • 26
  • 34

4 Answers4

19

The font size of a a console-based vim is determined by the font size of the terminal. So changing the vim font size can be achieved by changing font size of the terminal that vim is called from :

|Terminal emulators |     + font size      |- font size
--------------------------------------------------------------------
|    xterm          |Shift + Keypad Plus(+)|Shift + Keypad Minus(-)
|                   |Or control + mouse right click to choose the 
|                   |desired font size.
--------------------------------------------------------------------
|  GNOME terminal   |Control+Shift+Plus(+) |Control + Minus(-)
|                   |Do not use keypad.    |Do not use keypad.
--------------------------------------------------------------------
|  Terminator       |Control+Shift+Plus(+) |Control+Minus(-) 
|                   |Do not use keypad.    |Do not use keypad.
--------------------------------------------------------------------
|    Konsole        |Control+Mouse Wheel   |Control + Mouse Wheel 
|                   |Scroll Up, or         |Scroll Down, or
|                   |Control + Plus(+)     |Control + Minus(-)
--------------------------------------------------------------------
|    lilyterm       | Control + Plus(+)    |Control + Minus(-)     
--------------------------------------------------------------------
| xfce4-terminal    | Right Click/Preferences/Appearance. 
|                   |   No keyboard or mouse shortcut.
--------------------------------------------------------------------
| lxterminal        | Edit/Preferences/Style. 
|                   |   No keyboard or mouse shortcut.
--------------------------------------------------------------------
| mlterm            | Control + Right click to bring up settings. 
|                   |Encoding tab/Font Size. 
|                   |   No keyboard or mouse shortcut.
--------------------------------------------------------------------
| kterm             | Control + Right click to bring up font size menu.
--------------------------------------------------------------------
|rxvt-unicode(urxvt)|Issue printf command inside terminal window. 
|                   |Eg: printf '\33]50;%s\007' "xft:DejaVu Sans Mono-8"
|                   |running this command inside flying vim is not       
|                   |working. One has to quit vim and issue the commmand
--------------------------------------------------------------------
Chenming Zhang
  • 2,446
  • 2
  • 26
  • 34
  • As [noted on Ask Ubuntu](https://askubuntu.com/a/897838/260416), xfce4-terminal supports the same shortcuts as listed above for GNOME terminal and Terminator as of [this 2016 commit](https://git.xfce.org/apps/xfce4-terminal/commit/?id=77194638860b9ddfe14e11bcad3fa9b66f840d8f). – Adam Katz Apr 16 '19 at 21:12
12

You can use the methods detailed here: http://vim.wikia.com/wiki/Change_font_size_quickly to create keybindings to do this for you. (Though I'm surprised gvim doesn't support this out of the box, MacVim does with CMD++)

Michael Anderson
  • 70,661
  • 7
  • 134
  • 187
0

I suggest installing the guifont++ plugin

https://www.vim.org/scripts/script.php?script_id=593

Its default binding are:

+ increases font size
- decreases font size
= restores  font size
ZJR
  • 9,308
  • 5
  • 31
  • 38
0

You can use "Ctrl -" to zoom out and "Ctrl + Shift +" to zoom in.