how to zoom in characters in vim-windows forever?

59 views
Skip to first unread message

wang xu

unread,
Nov 12, 2024, 5:14:05 AM11/12/24
to vim_use
  I am used to working in debain, and i know how to configure .vimrc to control vim. But now i am working in windows and using vim-windows, which get installed by following links: https://github.com/vim/vim-win32-installer/releases/tag/v9.1.0514.
  Every time i open files by vim , i feel that characters are so small , so i have to fix it by hands in top menu. So i really want to know some way to configure vim like it in debian that i can use it  automatically.
  Thanks a lot.


Tony Mechelynck

unread,
Nov 12, 2024, 5:36:04 AM11/12/24
to wangx...@gmail.com, vim...@googlegroups.com
In gvim, the size of the font is part of the 'guifont' setting, but
the value to set it to differs from one OS to the next. Happily, gvim
can determine which OS it is running in.

• For a short example of a code snippet which can be put in your
vimrc, see :help setting-guifont
• For a detailed explanation and a code snippet covering all OSes I
could find about, see
https://vim.fandom.com/wiki/Setting_the_font_in_the_GUI
• In both cases, the size of the font for Windows is the number after
:h in the value "for Windows". Increasing or decreasing that number
will make the font bigger or smaller respectively. You may, of course,
adjust to fit your taste whichever of the above-mentioned snippets you
decide to insert in your vimrc.

If, rather than gvim, you are using Vim in a console, then the console
(sometimes called the "DOS box" in Windows) determines the font to be
used and Vim has no power over it.

Best regards,
Tony.

Boyko Bantchev

unread,
Nov 14, 2024, 5:13:43 AM11/14/24
to vim...@googlegroups.com
For gvim, I use something as simple as

if has('unix')
set guifont=UbuntuMono\ 11
elseif has('win32') || has('win64')
set guifont=consolas:h10
endif

For Vim as a terminal editor, one has to select the font name and size
in the terminal (console). Vim itself has nothing to do with that.
> --
> --
> You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>
> ---
> You received this message because you are subscribed to the Google Groups "vim_use" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+u...@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/vim_use/1703a500-0765-430f-94e0-2a93519dff06n%40googlegroups.com.

pansz

unread,
Nov 14, 2024, 5:13:43 AM11/14/24
to vim...@googlegroups.com
you need a .gvimrc  (or _gvimrc in Windows platform), set the guifont option in gvimrc and you got what you want.

Reply all
Reply to author
Forward
0 new messages