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

gvim font vs console->:gui font

Expand Messages
  • Yakov
    When I start :gui from the console vim, it uses some ugly font not same as my gvim uses when I start gvim directly from shell (this is Linux). What would
    Message 1 of 3 , Dec 1, 2007
    • 0 Attachment
      When I start :gui from the console vim, it uses some
      ugly font not same as my gvim uses when I start gvim
      directly from shell (this is Linux). What would cause this ?
      What would I need to do to keep gvim and console vim->:gui
      using same font ?

      Thanks
      Yakov
      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Tony Mechelynck
      ... There are several possibilities: here are the main two which come first to my mind. (a) set guifont in your gvimrc, not in your vimrc. That way, it will
      Message 2 of 3 , Dec 1, 2007
      • 0 Attachment
        Yakov wrote:
        > When I start :gui from the console vim, it uses some
        > ugly font not same as my gvim uses when I start gvim
        > directly from shell (this is Linux). What would cause this ?
        > What would I need to do to keep gvim and console vim->:gui
        > using same font ?
        >
        > Thanks
        > Yakov

        There are several possibilities: here are the main two which come first to my
        mind.

        (a) set 'guifont' in your gvimrc, not in your vimrc. That way, it will be set
        whenever the GUI starts.

        (b) set 'guifont' in the vimrc, but within an if for has("gui"), not
        has("gui_running"): has("gui") means GUI is compiled-in, has("gui_running")
        means we already know that we're starting the GUI. If you use ":gui" manually,
        your vimrc will already have been run by that time (with has("gui_running")
        set to zero aka FALSE), and it won't be sourced again.
        -- If 'guifont' is already set by the time the GUI starts, that setting will
        be remembered for use once the GUI has started.


        Best regards,
        Tony
        --
        George Washington not only chopped down his father's cherry tree, but
        he also admitted doing it. Now, do you know why his father didn't
        punish him? Because George still had the axe in his hand.

        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_use" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • Yakov
        ... Tony thanks, that solved it. Yakov --~--~---------~--~----~------------~-------~--~----~ You received this message from the vim_use maillist. For more
        Message 3 of 3 , Dec 2, 2007
        • 0 Attachment
          Tony Mechelynck wrote:

          > (b) set 'guifont' in the vimrc, but within an if for has("gui"), not
          > has("gui_running"): has("gui") means GUI is compiled-in, has("gui_running")
          > means we already know that we're starting the GUI. If you use ":gui" manually,
          > your vimrc will already have been run by that time (with has("gui_running")
          > set to zero aka FALSE), and it won't be sourced again.
          > -- If 'guifont' is already set by the time the GUI starts, that setting will
          > be remembered for use once the GUI has started.

          Tony thanks, that solved it.

          Yakov
          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_use" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        Your message has been successfully submitted and would be delivered to recipients shortly.