If you want to simply change the font size in a running GVim instance, type:
A window should pop up letting you set font size as well as pick a new font if desired. You can then ask Vim to print the line you would need to add to your ~/.gvimrc to make the change permanent:
Produces something like the following in the status ...
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 mlterm works better than Emacs due to the sceen ratio settings, and you also avoid having to run Vim inside an Emacs session (I'm not even sure that is legally ...
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 purpose. e.x: https://github.com/drmikehenry/vim-fontsize
As an alternative you can define your own functions like this one from vim.wika.com
let s:pattern = '^\(.* ...
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, but it's been in my rc file so long I don't remember where it came from.
function! FontSizePlus ()
let l:gf_size_whole = matchstr(&...
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",
\ "Source Code Pro 12",
\ "GohuFont 11"
let g:fc_current = 0
" Set default font
let &guifont = g:fc_list[g:fc_current]
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, GVIM offers undercurl, which is not present in any terminal, and free mixture of bold (depending on configuration shown with lighter color instead) and italic (...
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
Which seems to work fine.
For Terminal Vim, you will need to configure your terminal emulator to use Font Awesome.
For xterm, this doesn't seem to work, for gnome-...
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:
set guifont=Dejavu\ Sans\ Mono\ 12
If you want it to work on both Windows and Linux you can use something like:
set guifont=Dejavu\ ...
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 too many of the standard things for which terminals are used. As so many parts of Unix and other command-line environments presume monospaced fonts, this type of ...
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\ Mono\ for\ Powerline\ 10<CR>
Add additional mappings for other fonts.
I think something along the following lines should work:
amenu ToolBar.Builtin#31 :let &guifont=substitute(&guifont, '\(\d\+\)', '\=submatch(1)+1', '')<cr>
amenu ToolBar.Builtin#32 :let &guifont=substitute(&guifont, '\(\d\+\)', '\=submatch(1)-1', '')<cr>
Now, to include nice icons, you simply need to add the icon argument.
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('win32') || has('win64')
if (v:version == 704 && has("patch393")) || v:version > 704
Apparently, the way to write the font settings are quite platform-dependent. What worked for me (gvim in MX Linux 17, (a Debian-based Linux distribution with an XFCE desktop)):
Determine the current font settings in an open gvim instance using : set guifont?
Example: guifont=DejaVu Sans Mono 12
Use this information to write the settings (modifying the ...
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 between these fonts depending on whether I am working with source code or text.
let g:fnt_types = ['SourceCode\ Pro', 'monofur' ]
let g:fnt_sizes = [ 10, 13 ]
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 to change the size of your default font -- use guifont without name, just size:
whatever your default bitmap font supports
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 'guifont' the following way (which is noted in :help 'guifont'):
On other OSes (Linux, etc) you use the backslash instead to specify the ...
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 font is used.
[If a single font is given and] the font cannot be found you will get an error message.
That suggests something like this function:
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 help gvimrc for locations.
According to setting-guifont:
When you use the same vimrc ...
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 connecting to your Linux server on Windows via mintty terminal, you can go to Options --> Text to change the font.
For other terminal emulators, you can ...
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 and height in pixels. If you change the size of the font, the size of this box changes.
If the GVim window is not fullscreen, the size of the window will change ...
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 because it uses the same extensions as VSCode. This is a pretty powerful tool but installing it just to get emoji support might be a bit overkill.
However if you do ...
Apparat's answer works for gVim; if you're using Vim from within a Terminal, you will need to configure the terminal to change the font size.
For Xterm, I like to use:
XTerm*VT100.translations: #override \n\
Ctrl <KeyPress> =:larger-vt-font() \n\
Ctrl <KeyPress> -:smaller-vt-font()
In my ~/.Xdefaults to change the font size with CTRL + ...
Looks like there is no easy way to change font/encoding for menu rendering. Maybe it's somewhere in the code files, and you need to change and compile it in order to be able to decode menu in another encoding.
I have the same issue (in Russian localization), I think it appears after adding in vimrc this: