Vim Tips Wiki
Explore
Main Page
All Pages
Community
Interactive Maps
Community portal
To do
FANDOM
Fan Central
BETA
Games
Anime
Movies
TV
Video
Wikis
Explore Wikis
Community Central
Start a Wiki
Don't have an account?
Register
Sign In
Sign In
Register
Vim Tips Wiki
1,649
pages
Explore
Main Page
All Pages
Community
Interactive Maps
Community portal
To do
Editing
Change font
Back to page
Edit
Edit source
View history
Talk (0)
Edit Page
Change font
We recommend that you
log in
before editing. This will allow other users to leave you a message about your edit, and will let you track edits via your
Watchlist
.
Creating an account
is quick and free.
The edit appears to have already been undone.
Anti-spam check. Do
not
fill this in!
{{TipNew |id=1587 |previous=1586 |next=1588 |created=February 16, 2008 |complexity=basic |author=Metacosm |version=7.0 |subpage=/200802 |category1=Getting started |category2= }} In gvim, you can change the font using the '''Edit''' menu, '''Select Font'''. An alternative is to enter the command: <pre> :set guifont=* </pre> Once you have a font you like, you want to make it the default in the future. Do <pre> :set guifont? </pre> and Vim will display something like <pre> guifont=Lucida_Console:h11 </pre> Alternatively, enter the following to insert the current font setting into the buffer: <pre> :put =&guifont </pre> Now put a line in your [[vimrc]] to set guifont to this value, like this: <pre> if has('gui_running') set guifont=Console:h11 endif </pre> If there is a space in the font name, such as <pre> guifont=Monospace 10 </pre> it is necessary to escape the space <pre> set guifont=Monospace\ 10 </pre> The following example shows how vimrc can include settings for more than one operating system, on the assumption that the vimrc file is the same on more than one system. The example also shows how <code>'guioptions'</code>, a color scheme, and the window size can be set. <pre> if has('gui_running') set guioptions-=T " no toolbar colorscheme elflord set lines=60 columns=108 linespace=0 if has('gui_win32') set guifont=DejaVu_Sans_Mono:h10:cANSI else set guifont=DejaVu\ Sans\ Mono\ 10 endif endif </pre> ==Console Vim== Console Vim uses whatever font the console/terminal is using. Changing the font in your terminal is done differently depending on your system and the terminal in use. Consult the documentation or manpages for your terminal, or do a web search for how to change the font in your chosen terminal. Vim cannot use a different font than the rest of the terminal. ==See also== *[[VimTip632|Setting the font in the GUI]] details ==Comments==
Summary:
Please note that all contributions to the Vim Tips Wiki are considered to be released under the CC-BY-SA
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Navigation
(
view source
)
Template:TipNew
(
view source
)
Follow on IG
TikTok
Join Fan Lab