vimrc debug help

19 views
Skip to first unread message

zenius

unread,
Nov 29, 2019, 4:50:46 AM11/29/19
to vim_use
Hi guys,

New to the vim_use group - hi :) Apologies if I'm breaking policy with this! Please point me to policy guides if I am.

I'm struggling to set the guifont from my .vimrc and I don't know how to debug it :( Can you advise?

I've been using vim (I use gvim almost exclusively) for a couple of years, but only tend to learn reactively - I face a problem and I search how to solve it. But I can't seem to fix this one! I've included my .vimrc below. I'm using the command that I believe *should* change the guifont, but it doesn't work from my .vimrc. It gets set to (I guess) the default of 'Monospace 16' whenever I open a new vim window. Can any of you see what I'm doing wrong?

Thanks in advance!

(N.B. I pretty much only code in linux world so I haven't got around to trying to set guifont based on OS.

Also, if you see commands where you infer I'm trying to do something, but you know it won't work, please say :) )

.vimrc:

syntax on
set guifont=Monospace\ 5
set backspace=indent,eol,start
set number
set ignorecase
set hlsearch
set cursorline
set listchars=eol:$,tab:>-,trail:~,extends:>,precedes:<
set list
set lines=15
set columns=80
set directory^=$HOME/.vim/tmp//
set ruler
set autoindent
set noswapfile
filetype plugin indent on

au BufRead,BufNewFile *.v setfiletype systemverilog
au BufRead,BufNewFile *.sv setfiletype systemverilog
au BufRead,BufNewFile *.svh setfiletype systemverilog
au BufRead,BufNewFile *.sva setfiletype systemverilog
au BufRead,BufNewFile *.vc setfiletype systemverilog
au BufRead,BufNewFile *.xml setfiletype xml

Francis Grizzly Smit

unread,
Nov 29, 2019, 5:15:49 AM11/29/19
to vim...@googlegroups.com

I'd do that in .gvimrc  for a start

try :tab help helpgrep

or :help helpgrep

to learn how to find out how to search form stuff


then

:helpgrep font

or :tab helpgrep font

to get all the help on fonts

or

:tab helpgrep guifont

or :tab help guifont

                    *'guifont'* *'gfn'*
                           *E235* *E596*
'guifont' 'gfn'        string    (default "")
            global
            {not in Vi}
            {only available when compiled with GUI enabled}
    This is a list of fonts which will be used for the GUI version of Vim.
    In its simplest form the value is just one font name.  When
    the font cannot be found you will get an error message.  To try other
    font names a list can be specified, font names separated with commas.
    The first valid font is used.

    On systems where 'guifontset' is supported (X11) and 'guifontset' is
    not empty, then 'guifont' is not used.
:

:

:

--
--
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 on the web visit https://groups.google.com/d/msgid/vim_use/1c67ebf9-6c4d-4108-ad9f-759ca9473883%40googlegroups.com.
--
   .~.     In my life God comes first....
   /V\         but Linux is pretty high after that :-D
  /( )\    Francis (Grizzly) Smit
  ^^-^^    http://www.smit.id.au/

Gary Johnson

unread,
Nov 29, 2019, 10:18:04 AM11/29/19
to vim...@googlegroups.com
On 2019-11-29, Francis Grizzly Smit wrote:
> I'd do that in .gvimrc  for a start

That's not necessary. I set mine in my vimrc and it works fine.

On 29/11/2019 20:32, zenius wrote:

> set guifont=Monospace\ 5

What happens when you execute that command at the command line?
Does your system have that font? You can find out what 'guifont' is
set to and where it was last set with

:verbose set guifont?

and get a dialog box allowing you to set an available font with

:set guifont=*

or by selecting Edit -> Select Font... from the menu bar.

Regards,
Gary

Reply all
Reply to author
Forward
0 new messages