Frodak wrote:
--- Steve Hall wrote:

From: ben lieb, Fri, February 09, 2007 12:54 pm
Steve Hall wrote:
From: ben lieb, Fri, February 09, 2007 11:58 am
I often have to paste from Word for Windows
into vim/gvim
(cygwin). Some characters don't transfer
properly.
It could just be a font issue, make sure your
gvim font supports
non-ASCII characters. (I find Courier New or
Andale Mono provide
extensive support.)
I checked this out. I'm using gvim, and neither of
the fonts you
mentioned are in the list available. I literally
have thousands of
fonts on my machine however, so how does it choose
which font are
available, and which are not? Is there a separate
dir for them?

So if you do

  :set guifont=*

you don't get a dialog displaying a list similar to
what you see when
you select a font in Notepad? I wonder if this is a
build issue, where
did you get your Vim?

--
Steve Hall  [ digitect dancingpaper com ]



I've just installed the standard Cygwin/X and gvim
package, and cutting and pasting from Word works fine.

My .vimrc sets "encoding=utf-8"

set guifont?
guifont=

So the default font seems to be okay.  Still I don't
know if the fonts that GTK/X/gvim uses covers all
unicode codepoints (i.e. all the possible characters
in unicode).

--
Frodak

IIUC, no font covers all the /possible/ codepoints in Unicode. Some fonts are better for Chinese, others for Arabic, others for Latin, etc.

You might try the following:

if has("multi_byte")
  if &encoding !~? '^u'             " no change needed if already in Unicode
    if &termencoding == ""
      let &termencoding = &encoding " avoid clobbering the keyboard encoding
    endif
    set encoding=utf-8
  endif
else
  echoerr("Error: Mutibyte support not compiled-in")
endif
if has("gui_running")               " 'guifont' doesn't work in the console
  if has("gui_gtk2")                " GTK+2 but not GTK+1
    set guifont=Courier\ New\ 10
  elseif has("gui_kde")             " the obsolete kvim (6.2 or earlier)
    set guifont=Courier\ New/10/-1/5/50/0/0/1/0
  elseif has("gui_photon")          " QNX Photon
    set guifont=Courier\ New:s10
  elseif has("x11")                 " other X11 GUIs, including GTK+1
    set guifont=*-courier-medium-r-normal-*-*-100-*-*-m-*-*
  else                              " non-X11 GUIs (Windows, Carbon, ...)
    set guifont=Courier_New:h10
  endif
endif

Once gvim is loaded, you can use

        :set guifont=<Tab>

(assuming 'nocompatible' is set) to edit the font setting on the command-line.


Best regards,
Tony.
--
Mathematicians do it in theory.

Reply via email to