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

Re: Input greek characters

Expand Messages
  • Tony Mechelynck
    ... 1. Make sure that encoding is set to some charset which includes Greek glyphs: UTF-8 will certainly do it, or maybe GB18030 will, but not the other
    Message 1 of 8 , Mar 7 6:48 PM
    • 0 Attachment
      On 07/03/10 09:53, Dennis Cao wrote:
      > System Environment:
      > * Windows XP Pro SP2 Simple Chinese Version
      > * Vim 7.2
      >
      > I want to input greek characters. As my system is Simple Chinese, I
      > tried keymap feature in vim.
      >
      > After I have doen all the configuration according to vim doc, I typed
      > the keyboard. I find some strangle Chinese chracters are displayed.
      >
      > Then I set option 'enc' empty, which make all the existing Chinese
      > characters in the file replaces with some digits.
      > In this case, I typed the keyboard. I get the greek character, but
      > only HALF of a character is displayed.
      >
      > Can anybody tell me how to input these greek characters correctly on
      > my system? Thanks:)
      >
      > ---------------------------------
      > 曹贵林 ( TheodoreCao )
      >

      1. Make sure that 'encoding' is set to some charset which includes Greek
      glyphs: UTF-8 will certainly do it, or maybe GB18030 will, but not the
      other Chinese charsets. To set Vim up for UTF-8, see
      http://vim.wikia.com/wiki/Working_with_Unicode

      2. There are several possible methods to input Greek characters. To use
      a keymap, you must be sure that your keyboard can send the {lhs} of the
      keymaps (the first part, before the first whitespace, on every line of
      the keymap which is neither empty nor starting with a double quote,
      after the loadkeymap line). OTOH, the following methods should work on
      every keyboard setting:

      2a. Digraphs (see :help digraph.txt). IMHO for Greek this is the
      easiest, except if you need to type long Greek texts, in which case you
      might be better off making up your own keymap. For Greek, use the
      corresponding Latin letter followed by an asterisk, except that the
      word-final lowercase sigma is *s. In all cases you type Ctrl-K followed
      by the two characters of the digraph (in Insert mode).

      2b. Unicode codepoint: see :help i_CTRL-V_digit -- for this method you
      must know the Unicode codepoint number (in hex) of the character you
      want to enter, and 'encoding' must be UTF-8. IMHO it is best suited for
      individual characters for which no digraphs exist.

      2c. Writing your own ad-hoc keymap according to which characters your
      keyboard produces: see http://vim.wikia.com/wiki/How_to_make_a_keymap --
      I use this for Russian and Arabic (with two different owncoded keymaps)
      because the existing keymaps are based on mapping the "usual" keyboard
      layouts of these countries over a QWERTY keyboard, and it's less hard on
      my memory to type Latin letters whose sound is similar to that of the
      letter I want to type.


      Best regards,
      Tony.
      --
      FIGHTING WORDS

      Say my love is easy had,
      Say I'm bitten raw with pride,
      Say I am too often sad --
      Still behold me at your side.

      Say I'm neither brave nor young,
      Say I woo and coddle care,
      Say the devil touched my tongue --
      Still you have my heart to wear.

      But say my verses do not scan,
      And I get me another man!
      -- Dorothy Parker

      --
      You received this message from the "vim_multibyte" maillist.
      For more information, visit http://www.vim.org/maillist.php
    • Aditya Kher
      This is interesting. I wonder if it is possible to use VIM for Devnagari (http://en.wikipedia.org/wiki/Devanagari)? The encoding is UTF-8 and there are
      Message 2 of 8 , Mar 7 7:51 PM
      • 0 Attachment
        This is interesting.
        I wonder if it is possible to use VIM for Devnagari
        (http://en.wikipedia.org/wiki/Devanagari)? The encoding is UTF-8 and
        there are several Keyboard layouts available that use transliteration
        (http://en.wikipedia.org/wiki/Devanagari#INSCRIPT_layout).
        Any ideas?

        --
        You received this message from the "vim_multibyte" maillist.
        For more information, visit http://www.vim.org/maillist.php
      • Tony Mechelynck
        ... I m not sure. You d probably have to use gvim, or maybe (on Linux) Vim in mlterm if your mlterm font has Indian glyphs; and I don t know how Vim handles
        Message 3 of 8 , Mar 8 7:08 AM
        • 0 Attachment
          On 08/03/10 04:51, Aditya Kher wrote:
          > This is interesting.
          > I wonder if it is possible to use VIM for Devnagari
          > (http://en.wikipedia.org/wiki/Devanagari)? The encoding is UTF-8 and
          > there are several Keyboard layouts available that use transliteration
          > (http://en.wikipedia.org/wiki/Devanagari#INSCRIPT_layout).
          > Any ideas?
          >

          I'm not sure. You'd probably have to use gvim, or maybe (on Linux) Vim
          in mlterm if your mlterm font has Indian glyphs; and I don't know how
          Vim handles the occasional "reordering", e.g. the fact that the "long i"
          vowel comes after its consonant in the UTF-8 text but is written to its
          left in the written text. If it is treated as a "combining character"
          the result will probably be OK but otherwise I'm not sure. I'm also not
          sure how gvim handles the contextual changes in glyph shape which are
          frequent in Indian scripts.

          I suppose you will have to experiment.


          Best regards,
          Tony.
          --
          If anything can go wrong, it will.

          --
          You received this message from the "vim_multibyte" maillist.
          For more information, visit http://www.vim.org/maillist.php
        • Tony Mechelynck
          ... The site works for me. If you are in mainland China, maybe the site is blocked by your government? (though I can t imagine what would be subversive on
          Message 4 of 8 , Mar 8 11:27 PM
          • 0 Attachment
            On 09/03/10 02:37, Dennis Cao wrote:
            > Another Two Issue
            > 1. When using 'digraph' and 'i_CTRL-V_digit':
            > I find I can NOT input characters whose value are between 128 and
            > 255 (decimal).
            > All these char are displayed as a small rectangle. Why?
            > 2. http://vim.wikia.com/wiki/Working_with_Unicode are not available
            > for me. My IE reports 'address is unavaiable'. Is the wiki site OK?
            >
            > Thanks:)
            >
            >
            > ---------------------------------
            > 曹贵林 ( Theodore Cao )
            >

            The site works for me. If you are in mainland China, maybe the site is
            blocked by your government? (though I can't imagine what would be
            "subversive" on that site)

            Best regards,
            Tony.
            --
            Mark's Dental-Chair Discovery:
            Dentists are incapable of asking questions that require a
            simple yes or no answer.

            --
            You received this message from the "vim_multibyte" maillist.
            For more information, visit http://www.vim.org/maillist.php
          • Tony Mechelynck
            ... Try changing it as follows: if has( multi_byte ) if not compiled-in, we can t use it if &enc !~? ^u if already Unicode, no need to change if &tenc
            Message 5 of 8 , Mar 8 11:55 PM
            • 0 Attachment
              On 09/03/10 02:09, Dennis Cao wrote:
              > Thanks Tony. I can input greek characters in gvim:) These are my steps:
              >
              > ----------------------------------------------------------------------------------------------------
              > ENVIRONMENT: Windows XP Pro SP3 Simple Chinese / Vim 7.2/
              >
              > 1. config _vimrc as follows:
              > set enc=utf-8
              > set fenc=utf-8
              > set guifont=courier_new:h12

              Try changing it as follows:

              if has('multi_byte') " if not compiled-in, we can't use it
              if &enc !~? '^u' " if already Unicode, no need to change
              if &tenc == "" " don't clobber keyboard locale
              let &tenc = &enc
              endif
              set enc=utf-8
              endif
              " define the heuristics to identify 'fileencoding'
              " of existing files
              set fencs=ucs-bom,utf-8,default,latin1
              " the following sets defaults for newly created files
              " comment, uncomment, or change at will
              setglobal bomb
              setglobal fenc=utf8
              endif
              if has('gui') " non-GUI-enabled versions don't know about 'guifont'
              if has('gui_gtk2') " GTK2 but not GTK1
              set gfn=Courier\ New\ 12
              elseif has('gui_photon') " Photon
              set gfn=Courier\ New:s12
              elseif has('gui_kde') " kvim (obsolete)
              set gfn=Courier\ New/12/-1/5/50/0/0/0/1/0
              elseif has('x11') " other X11 (including GTK1)
              set gfn=-*-courier-medium-r-normal-*-*-120-*-*-m-*-*
              else " other (including Windows)
              set gfn=Courier_New:h12:cDEFAULT
              endif
              endif


              >
              > 2. open gvim from cygwin
              > Inputing greek characters with keymap and i_CTRL-V_digit works

              I don't know. Maybe Cygwin starts in UTF-8, which would mean that Vim
              <=> Cygwin happens in UTF-8 without misunderstanding even if
              'termencoding' (q.v.) is left empty.

              > ----------------------------------------------------------------------------------------------------
              >
              > And I find another issue. I have to START GVIM FROM "Cygwin"!!!
              > If I start gvim from windows explorer. The message characters in gvim
              > are not correctly displayed (see the attachment.)
              > Can can you tell the reasons? Thanks :)
              >
              >

              Hm, I'm not sure.


              Best regards,
              Tony.
              --
              Down with categorical imperative!

              --
              You received this message from the "vim_multibyte" maillist.
              For more information, visit http://www.vim.org/maillist.php
            • John Beckett
              ... To the OP: Wikia is blocked in China (I don t know why). An old version of vim.wikia.com is available at a mirror site set up in response. The site is not
              Message 6 of 8 , Mar 9 1:17 AM
              • 0 Attachment
                Tony Mechelynck wrote:
                > The site works for me. If you are in mainland China, maybe
                > the site is blocked by your government? (though I can't
                > imagine what would be "subversive" on that site)

                To the OP: Wikia is blocked in China (I don't know why). An old
                version of vim.wikia.com is available at a mirror site set up in
                response. The site is not maintained (I think) and is somewhat
                broken because various templates and so forth were not imported
                properly, however the content of most tips is available.

                The tip in question is:
                http://broom9.com/Vim_Tips_Wiki/index.php?title=Working_with_Unicode

                John

                --
                You received this message from the "vim_multibyte" maillist.
                For more information, visit http://www.vim.org/maillist.php
              • Tony Mechelynck
                ... 曹贵林: I m not sure you follow vim_multibyte (though for this kind of discussion, you should). If it s the whole of wikia, then I suppose some Chinese
                Message 7 of 8 , Mar 9 7:07 AM
                • 0 Attachment
                  On 09/03/10 10:17, John Beckett wrote:
                  > Tony Mechelynck wrote:
                  >> The site works for me. If you are in mainland China, maybe
                  >> the site is blocked by your government? (though I can't
                  >> imagine what would be "subversive" on that site)
                  >
                  > To the OP: Wikia is blocked in China (I don't know why). An old
                  > version of vim.wikia.com is available at a mirror site set up in
                  > response. The site is not maintained (I think) and is somewhat
                  > broken because various templates and so forth were not imported
                  > properly, however the content of most tips is available.
                  >
                  > The tip in question is:
                  > http://broom9.com/Vim_Tips_Wiki/index.php?title=Working_with_Unicode
                  >
                  > John
                  >

                  曹贵林: I'm not sure you follow vim_multibyte (though for this kind of
                  discussion, you should).

                  If it's the whole of wikia, then I suppose some Chinese official
                  disliked something that was published on some /other/ wikia site, and
                  that they blocked the whole of wikia without checking the fine points.

                  Best regards,
                  Tony.
                  --
                  "I played lead guitar in a band called The Federal Duck, which is the
                  kind of name that was popular in the '60s as a result of controlled
                  substances being in widespread use. Back then, there were no
                  restrictions, in terms of talent, on who could make an album, so we
                  made one, and it sounds like a group of people who have been given
                  powerful but unfamiliar instruments as a therapy for a degenerative
                  nerve disease."
                  -- Dave Barry, "The Snake"

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