60
votes
How can I change the font size in gVim?
If you want to simply change the font size in a running GVim instance, type:
:set guifont=*
A window should pop up letting you set font size as well as pick a new font if desired. You can then ask ...
- 701
33
votes
Accepted
Can I use a non-monospaced font in either Vim or gVim?
I found mlterm, which supports this. Aside from Emacs' built-in terminal (M-x term) this is the only terminal I've found that supports this (I've tried about 15-20 different ones).
I've found that ...
- 59.8k
18
votes
How can I change the font size in gVim?
I have the following in my .vimrc to change font size quickly without changing the font. Works on Windows and GTK. I haven't tested other GUIs. I'm sure I originally copied it from somebody else, ...
- 545
14
votes
Accepted
How to zoom to text in VIM via shortcut?
If you are using vim in a terminal you can simply use its zoom shortcuts. For Gnome-Terminal this is Ctrl++. In others it may be Ctrl+Shift++.
Also there are several plugins out there for this ...
- 931
13
votes
Accepted
Quickly switch between fonts at runtime
The basic idea could be something like:
" Define a list of the fonts you want to use, and the index in the
" list of the default font. See :help Lists
let g:fc_list = [
\ "DejaVu Sans Mono 9",
\ ...
- 4,642
10
votes
gvim window looks bad
The problem is probably that you don't have the Consolas font installed and that Vim defaults to an ugly default font.
Try using a different font, for example this should work on most Linux systems:
...
- 59.8k
10
votes
Accepted
Visual Differences between vim on virtualbox Ubuntu guest (through putty) OR gVim on Windows host
PuTTY, like other high-color terminals, only supports a fixed color palette of 256 colors. GVIM can use the full 24-bit RGB color space; that's why you see "finer" nuances there.
As for attributes, ...
- 17.3k
10
votes
How can I change the font size in gVim?
Apparently, the way to write the font settings are quite platform-dependent. What worked for me (gVim in MX Linux 17, an XFCE Debian-based Linux distribution):
Determine the current font settings in ...
- 201
9
votes
How to display Font Awesome in Vim?
First off, Vim can only display a file in a single font, you can't use multiple fonts at the same time.
For gVim, you can use guifont to set this to Font Awesome:
set guifont=Font\ Awesome\ 14
...
- 59.8k
8
votes
How to change Vim's :hardcopy printfont?
Instead of printing from Vim, you could instead generate an HTML file using :TOhtml. Then you can use CSS to set the font used for the HTML and print that.
- 10.6k
7
votes
Can I use a non-monospaced font in either Vim or gVim?
It's definitely not supported in GUI Vim, and I'd be surprised if there were more than handful of terminal emulators that support proportional fonts in the way that you're hoping for: it would break ...
- 30.2k
7
votes
Quickly switch between fonts at runtime
I have the following defined in my .vimrc file.
set guifont=DejaVu\ Sans\ Mono\ for\ Powerline\ 10
So you can set that up as a mapping like this...
nmap <Leader>f :set guifont=DejaVu\ Sans\ ...
- 1,476
6
votes
Accepted
How do I create buttons on the toolbar to increase and decrease font size?
I think something along the following lines should work:
anoremenu ToolBar.Builtin#31 :let &guifont=substitute(&guifont, '\(\d\+\)', '\=submatch(1)+1', '')<cr>
anoremenu ToolBar....
- 24.1k
6
votes
Accepted
Why do symbols look ugly in gvim?
If you have a recent Vim, you may try to enable DirectX rendering. It should improve "wide" font rendering, among other things. Here's an example vimrc snip:
if has("gui_running")
set guioptions=...
- 9,510
5
votes
Accepted
Change a font in Vim/GVim in a simple way
Reading the 'guifont' option is useful here. I do understand your frustrations with this option however. It seems that how you set the 'guifont' setting, is dependent on the OS.
On macOS, you set '...
- 6,166
5
votes
How can I change the font size in gVim?
Based on Drew's answer this setup worked better for me.
It increases or decreases font-size using \+ or \- (assuming \ is your leader), and cycles through the predefined fonts using cot. I often swap ...
- 173
5
votes
How can I look up the current/default guifont reliably?
So it looks like if no guifont is specified in your vimrc, gVim will use some built in default font and it would not be reflected in guifont -- set guifont is empty.
But it turns out it is possible ...
- 12k
5
votes
Settings for the font in .vimrc are not working
Here is a trick what I usually do in a graphical Vim to select a nice looking font. First I interactively set the font using:
:set guifont=*
This brings up a nice dialog with all the known fonts ...
- 24.1k
5
votes
How to get emoji completion in markdown with `:<emoji>`, using neovim and coc
One way to get this feature is by using coc and coc-emoji.
Coc is a plugin which allows you to get the same Language Server Protocol (autocompletion, linting, go to definition, etc...) as VSCode ...
- 48.1k
4
votes
Can I use a non-monospaced font in either Vim or gVim?
Proportional fonts are supported in Oni, Neovim GUI. Use the "webgl" renderer for best results.
"editor.renderer": "webgl"
See also https://github.com/onivim/oni/issues/2359
- 787
4
votes
Accepted
Settings for the font in .vimrc are not working
Since font is specific to the GUI versions of vim (i.e. gvim and macvim), you need to should put the set guifont=... line in your gvimrc.
A good place for that is ~/.vim/gvimrc, but you can read ...
- 23.4k
4
votes
Settings for the font in .vimrc are not working
I had the same problem as the OP after upgrading from Ubuntu 16.04 to 18.04. Turns out the condition if has("gui_gtk2") in _vimc is no longer true, changed it to "gui_gtk3" as a ...
4
votes
How to change font style in Linux terminal?
To change the font used by terminal Vim or Neovim, you need to change the font the your terminal emulator uses. The exact settings vary between different terminal emulators.
For example, if you are ...
- 955
4
votes
Accepted
changing font size leaves white bars in gvim
First: I have no experience with i3wm. So my observation from "normal" windows manager.
Vim is working with monospaced fonts. So every character is displayed in a box with a certain width ...
- 8,937
3
votes
Latin Capital Letter Thorn
The answer was posted in the comments by @DJ McMayhem.
:set enc?
latin-1
So by changing it to utf-8 the text becomes readable.
:set enc=utf-8
- 6,160
3
votes
How to display Font Awesome in Vim?
Console Vim is using the font from the console terminal.
You can use Inconsolata Nerd Font, which includes FontAwesome glyphs.
For example, in urxvt including the following:
URxvt.font: xft:SF Mono:...
- 31
3
votes
How can I change the font size in gVim?
You can try this plugin:vim-fontzoom.
map <m-o> :Fontzoom!<cr>
map <m--> <Plug>(fontzoom-smaller)
map <m-=> <Plug>(fontzoom-larger)
- 335
3
votes
Accepted
Set gui's font in win7
See: :help guifont:
[...]
The font name depends on the GUI used.
[...]
For the Win32 GUI
takes these options in the font name:>
hXX - height is XX (points, can be ...
- 30.2k
3
votes
Accepted
Discover which fallback font was used in gvim
If there really isn't a simple query to find the information then we'll have to brute-force it...
Two key behaviors are described in :h 'guifonts':
[If a list of fonts is given] the first valid ...
- 19k
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
font × 61gvim × 31
unicode × 10
microsoft-windows × 7
syntax-highlighting × 5
vimrc × 4
neovim × 4
macvim × 4
linux × 4
terminal × 3
encoding × 3
key-bindings × 2
formatting × 2
macos × 2
iterm2 × 2
cygwin × 2
neovim-qt × 2
x11 × 2
colorscheme × 1
visual-mode × 1
filetype × 1
filetype-tex × 1
tabbed-user-interface × 1
options × 1
plugin-airline × 1