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

Re: wide letter spacing when using gvim (GUI mode)

Expand Messages
  • Ben Fritz
    ... Thanks, those details and the screenshots help a lot. I m not 100% certain your set guifont line in your .vimrc is doing what you want; the exact string
    Message 1 of 12 , Feb 20, 2013
    • 0 Attachment
      On Wednesday, February 20, 2013 12:48:28 PM UTC-6, alexdongli wrote:
      > Dear Sirs,
      >
      >
      > I am adding more details to my problem.
      >
      >
      > I use monospace. I access gvim using xterm via reflectionX (an xterm app). I am attaching two files vim.png and gvim.png generated using the same vimrc and the same xterm. You will immediately see what I mean. Now I know it probably has something to do with guifontwide, but just cannot get the problem solved. 
      >
      > My .vimrc file is simple:
      >
      > " set fileencodings=latin1          " tried this too but it does not work.
      > set hlsearch
      >
      > set cinoptions=:0,p0,t0
      > set cinwords=if,elsif,else,while,do,for,switch,case,foreach,unless,until
      >
      > set guifont=Monospace\ 8
      >
      > "set guifontset=Monospace \8      " tried this too but it does not work
      > "set guifontwide=Monospace\ 8    " tried this too but it does not work.
      >
      >
      >

      Thanks, those details and the screenshots help a lot.

      I'm not 100% certain your "set guifont" line in your .vimrc is doing what you want; the exact string needed depends very much on your system.

      Can you try, from gvim, the following command to select a font?

      :set guifont=*

      This should bring up a dialog where you can choose a font from a list of supported fonts and sizes.

      If selecting a font in this way makes your issue go away, do:

      :set guifont?

      or

      :echo getfontname()

      to see what string you should put in your .vimrc to set the font permanently.

      See http://vim.wikia.com/wiki/Change_font if any of this confuses you.

      --
      --
      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+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Alex Dong Li
      Ben, I tried and 4 fonts showed up: DejaVu Sans, Monospace, Sans, Serif, same as if I use GUI s menu to set the font. I have tried each of them but it does not
      Message 2 of 12 , Feb 20, 2013
      • 0 Attachment
        Ben,

        I tried and 4 fonts showed up: DejaVu Sans, Monospace, Sans, Serif, same as if I use GUI's menu to set the font. I have tried each of them but it does not work either.
        I wishes I had the root access to our company linux servers so that I could compile vim with multi-byte disabled. Too many libraries/headers are missing for me to compile gvim myself.

        Thank you very much for your help anyway!

        Alex.


        On Wed, Feb 20, 2013 at 1:27 PM, Ben Fritz <fritzophrenic@...> wrote:
        On Wednesday, February 20, 2013 12:48:28 PM UTC-6, alexdongli wrote:
        > Dear Sirs,
        >
        >
        > I am adding more details to my problem.
        >
        >
        > I use monospace. I access gvim using xterm via reflectionX (an xterm app). I am attaching two files vim.png and gvim.png generated using the same vimrc and the same xterm. You will immediately see what I mean. Now I know it probably has something to do with guifontwide, but just cannot get the problem solved. 
        >
        > My .vimrc file is simple:
        >
        > " set fileencodings=latin1          " tried this too but it does not work.
        > set hlsearch
        >
        > set cinoptions=:0,p0,t0
        > set cinwords=if,elsif,else,while,do,for,switch,case,foreach,unless,until
        >
        > set guifont=Monospace\ 8
        >
        > "set guifontset=Monospace \8      " tried this too but it does not work
        > "set guifontwide=Monospace\ 8    " tried this too but it does not work.
        >
        >
        >

        Thanks, those details and the screenshots help a lot.

        I'm not 100% certain your "set guifont" line in your .vimrc is doing what you want; the exact string needed depends very much on your system.

        Can you try, from gvim, the following command to select a font?

          :set guifont=*

        This should bring up a dialog where you can choose a font from a list of supported fonts and sizes.

        If selecting a font in this way makes your issue go away, do:

          :set guifont?

        or

          :echo getfontname()

        to see what string you should put in your .vimrc to set the font permanently.

        See http://vim.wikia.com/wiki/Change_font if any of this confuses you.

        --
        --
        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+unsubscribe@....
        For more options, visit https://groups.google.com/groups/opt_out.
         
         
      • Ben Fritz
        ... There should be absolutely no need to strip out multibyte support. Thousands of people use gvim with multibyte every day without ever seeing your issue.
        Message 3 of 12 , Feb 20, 2013
        • 0 Attachment
          On Wednesday, February 20, 2013 2:21:54 PM UTC-6, alexdongli wrote:
          > Ben,
          >
          >
          > I tried and 4 fonts showed up: DejaVu Sans, Monospace, Sans, Serif, same as if I use GUI's menu to set the font. I have tried each of them but it does not work either.
          >
          > I wishes I had the root access to our company linux servers so that I could compile vim with multi-byte disabled. Too many libraries/headers are missing for me to compile gvim myself.
          >
          >
          > Thank you very much for your help anyway!
          >

          There should be absolutely no need to strip out multibyte support. Thousands of people use gvim with multibyte every day without ever seeing your issue.

          Can you please respond with what font name Vim is actually using, the output of :set guifont? and :echo getfontname() as I mentioned before? We may still be able to help.

          --
          --
          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+unsubscribe@....
          For more options, visit https://groups.google.com/groups/opt_out.
        • Tony Mechelynck
          ... If :set gfn=* shows only those four and nothing else (and no way to scroll to bring more font names into view) and what is called Monospace on your
          Message 4 of 12 , Feb 20, 2013
          • 0 Attachment
            On 20/02/13 21:21, Alex Dong Li wrote:
            > Ben,
            >
            > I tried and 4 fonts showed up: DejaVu Sans, Monospace, Sans, Serif, same
            > as if I use GUI's menu to set the font. I have tried each of them but it
            > does not work either.
            > I wishes I had the root access to our company linux servers so that I
            > could compile vim with multi-byte disabled. Too many libraries/headers
            > are missing for me to compile gvim myself.
            >
            > Thank you very much for your help anyway!
            >
            > Alex.

            If ":set gfn=*" shows only those four and nothing else (and no way to
            scroll to bring more font names into view) and what is called Monospace
            on your computer is what you showed in the gvim screenshot, then it
            means there is _no_ monospaced font on your computer that gvim can see
            (that font in the gvim screenshot isn't a monospace font: it's a
            proportional sans-serif font, maybe "DejaVu Sans" but not "DejaVu Sans
            Mono" which would be the "real" monospaced font in the same family).

            So, you could either complain to your sysadmin, that there is no
            fixed-width typewriter-like font that you can reach from gvim…

            …or use console vim. Or, on Linux, use gvim in console mode by means of
            a softlink, to make sure you have a full-featured Console Vim with X11
            support:

            pushd ~/bin
            ln -sv `which vim` vim-orig
            ln -sv `which gvim` vim
            popd


            Best regards,
            Tony.
            --
            "All my friends and I are crazy. That's the only thing that keeps us
            sane."

            --
            --
            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+unsubscribe@....
            For more options, visit https://groups.google.com/groups/opt_out.
          • Alex Dong Li
            I think Tony has got the point: Monospace on my system is a proportional font, not a width-fixed font. Sorry for my wrong assumption! As matter of the fact, I
            Message 5 of 12 , Feb 20, 2013
            • 0 Attachment
              I think Tony has got the point: Monospace on my system is a proportional font, not a width-fixed font. Sorry for my wrong assumption! As matter of the fact, I do not have any width-fixed fonts available to gvim.

              Thank everyone who has helped very much! Also sorry for sending file attachments to everyone!

              Alex.

              --
              --
              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+unsubscribe@....
              For more options, visit https://groups.google.com/groups/opt_out.
               
               
            • John Little
              ... You don t need root access to install a font for your own use. - Download a .ttf or .otf to wherever. - With KDE, open it with kfontviewer, click install,
              Message 6 of 12 , Feb 20, 2013
              • 0 Attachment
                On Thursday, February 21, 2013 9:21:54 AM UTC+13, alexdongli wrote:
                > I wishes I had the root access to our company linux servers so that I could >compile vim with multi-byte disabled. Too many libraries/headers are missing >for me to compile gvim myself.

                You don't need root access to install a font for your own use.
                - Download a .ttf or .otf to wherever.
                - With KDE, open it with kfontviewer, click install, click personal.
                - With Gnome3, I think nautilus has support. Gnome 2 had gnome-font-viewer.

                This just copies the font file to .fonts in your home directory, in a directory whose name is the first letter of the font file name. I just downloaded monofur.ttf, and copied it to ~/.fonts/m, and gvim found it without further ado. (Unpleasant font, IMO).

                Regards, John Little

                --
                --
                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+unsubscribe@....
                For more options, visit https://groups.google.com/groups/opt_out.
              Your message has been successfully submitted and would be delivered to recipients shortly.