Loading ...
Sorry, an error occurred while loading the content.

Re: guifont

Expand Messages
  • Don Stefani
    ... *Thank you* all for your hints and help. My fonts are loading perfectly. ... - Don Stefani
    Message 1 of 9 , Jan 1, 2004
    • 0 Attachment
      Don Stefani wrote:
      > Hello,
      > I am working with a new install of Linux/suse 9 pro and trying to set
      > the guifont in my .gvimrc.
      > When I choose a font from the menu > edit > select font...
      > and I choose B&H LucidaTypewriter 11, all is well and my fonts are pretty.
      >
      > What should I put into my .gvimrc file to use this as my startup font?

      *Thank you* all for your hints and help. My fonts are loading perfectly.
      :help hints are always apprecitated!

      - Don Stefani
    • Don Stefani
      ... Thanks, I ve been *playing* with kvim (KDE) since I ve only used gnome and gvim before. I did the :mkv! command while in kvim with all my setting ready
      Message 2 of 9 , Jan 1, 2004
      • 0 Attachment
        Antoine J. Mechelynck wrote:
        > Don Stefani <vimuser@...> wrote:
        >
        >>Hello,
        >>I am working with a new install of Linux/suse 9 pro and trying to set
        >>the guifont in my .gvimrc.
        >>When I choose a font from the menu > edit > select font...
        >>and I choose B&H LucidaTypewriter 11, all is well and my fonts are
        >>pretty.
        >>
        >>What should I put into my .gvimrc file to use this as my startup font?
        >>
        >>I've read the help on guifont, and ran the xlsfonts program, and
        >>pasted the font line from there into my config file and it's not
        >>working. Any hints?
        >>
        >>Thanks,
        >>
        >>Don Stefani
        >
        >
        > As others pointed out, the value can be got from the option after setting it
        > through the menu (if set guifont=* works for you). Sometimes, however, there
        > are characters (such as spaces) which must be backslash-escaped. Thus I
        > suggest (after you have set the font you like) to do
        >
        > :set guifont=<Tab>
        >
        > The current value will appear, with escaping backslashes if and where
        > needed. Copy that line into your vimrc.
        >
        > Now here's where it gets complicated.
        >
        > (a) 'guifont' of course only exists in the GUI; but maybe you don't have a
        > gvimrc yet -- no problem, you can put it in the vimrc, inside an "if
        > has("gui_running")" statement.
        >
        > (b) There are (as of this writing) 3 possible formats for 'guifont' (namely,
        > GTK+2, X11 without GTK+2 and non-X11). Each version of gvim accepps only one
        > of them.
        >
        > (c) Sometimes the font chosen by the font chooser can be too specific. You
        > may omit some unneeded values, except in the non-GTK+2 X11 format, where you
        > may replace them by asterisks.
        >
        > So here's a snipped (not fully tested) which you may adapt as you like if
        > you use multi-boot. Get ready. Get set. Go.
        >
        > if has("gui_running")
        > if has("x11")
        > if has("gui_gtk2")
        > " GTK+2
        > set guifont=Lucida\ Typewriter\ 11
        > else
        > " X11 without GTK+2
        > set
        > guifont=-*-lucidatypewriter-medium -r-normal-*-*-180-*-*-m-*-*
        > endif
        > else
        > " non-X11 (Windows or similar)
        > set guifont=Lucida_Console:h11:cDEFAULT
        > endif
        > endif
        >
        > HTH,
        > Tony.
        >
        >
        >
        Thanks,
        I've been *playing* with kvim (KDE) since I've only used gnome and gvim
        before. I did the :mkv! command while in kvim with all my setting ready
        and then pasted the output from my .vimrc to my .gvimrc. Just before I
        read your post I used: ' if has ("gui_kde") <kde stuff > else ' < gvim
        stuff > endif

        It's the first time I've written a control statement in my config file.
        Cool! I'll take a closer look at your post and see what I can glean from it.

        Thanks again for your help!

        Don
      • Antoine J. Mechelynck
        ... [...] ... Note: the above two lines should be joined ... Note that if / else / endif etc. must either be on separate lines or be separated by the
        Message 3 of 9 , Jan 1, 2004
        • 0 Attachment
          Don Stefani <vimuser@...> wrote:
          > Antoine J. Mechelynck wrote:
          [...]
          > > if has("gui_running")
          > > if has("x11")
          > > if has("gui_gtk2")
          > > " GTK+2
          > > set guifont=Lucida\ Typewriter\ 11
          > > else
          > > " X11 without GTK+2
          > > set
          > > guifont=-*-lucidatypewriter-medium -r-normal-*-*-180-*-*-m-*-*

          Note: the above two lines should be joined

          > > endif
          > > else
          > > " non-X11 (Windows or similar)
          > > set guifont=Lucida_Console:h11:cDEFAULT
          > > endif
          > > endif
          > >
          > > HTH,
          > > Tony.
          > >
          > >
          > >
          > Thanks,
          > I've been *playing* with kvim (KDE) since I've only used gnome and
          > gvim before. I did the :mkv! command while in kvim with all my
          > setting ready
          > and then pasted the output from my .vimrc to my .gvimrc. Just before I
          > read your post I used: ' if has ("gui_kde") <kde stuff > else ' < gvim
          > stuff > endif

          Note that if / else / endif etc. must either be on separate lines or be
          separated by the neighbouring statements by vertical bars.

          BTW, I don't see gui_kde under ":help feature-list". Is that a non-standard
          one? I suppose gvim for KDE would use one of the other standard X11
          interfaces.

          >
          > It's the first time I've written a control statement in my config
          > file.
          > Cool! I'll take a closer look at your post and see what I can glean
          > from it.
          >
          > Thanks again for your help!
          >
          > Don

          My pleasure. Note that my mail client added a spurious linefeed in the "set"
          line for X11 ("set" and "guifont=-*-lucidatypewriter..." should of course be
          on the same line).

          Happy Vimming and (while it's still Jan. 1 here) Happy New Year

          Tony.
        • Don Stefani
          ... After I sent it I realized that I didn t write that snippet in style, my config works great. ... I had never heard of it either until I
          Message 4 of 9 , Jan 1, 2004
          • 0 Attachment
            Antoine J. Mechelynck wrote:
            >
            > Note that if / else / endif etc. must either be on separate lines or be
            > separated by the neighbouring statements by vertical bars.

            After I sent it I realized that I didn't write that snippet in
            <code></code> style, my config works great.

            > BTW, I don't see gui_kde under ":help feature-list". Is that a non-standard
            > one? I suppose gvim for KDE would use one of the other standard X11
            > interfaces.

            I had never heard of it either until I installed suse 9 using KDE. I've
            been a gnome guy.
            Here's the site from the help > about kvim
            http://freehackers.org/kvim

            I've been tweaking suse for the last day or so, so far I really like it.
            That's one main reason I'm moving to vim, working on my linux box and
            uing my windows box for Photoshop and playing MP3's! ;-) Plus at the
            first shop I worked at with Perl / Java programmers, these guys made me
            learn to use vi even though I was the only "clicky clicky" front end guy
            there.
            Now I do both my front end and programming in vim. I'm feeling more like
            a geek every day!!!

            Thanks again,

            Don Stefani
          Your message has been successfully submitted and would be delivered to recipients shortly.