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

how does russians use vim?

Expand Messages
  • bill lam
    Just curious. Users who use Cyrillic (or Greek) have to shift toggle in order to type Latin letters. However vim by default only recognize ascii such as hjkl
    Message 1 of 13 , Feb 1, 2009
    • 0 Attachment
      Just curious. Users who use Cyrillic (or Greek) have to shift toggle
      in order to type Latin letters. However vim by default only recognize
      ascii such as hjkl or modkey+ascii such <C-F>. Will it be very clumsy
      to use vim to edit text such as email?

      --
      regards,
      ====================================================
      GPG key 1024D/4434BAB3 2008-08-24
      gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
      唐詩183 杜甫 客至
      舍南舍北皆春水 但見群鷗日日來 花徑不曾緣客掃 蓬門今始為君開
      盤飧市遠無兼味 樽酒家貧只舊醅 肯與鄰翁相對飲 隔籬呼取盡餘杯

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Tony Mechelynck
      ... Use a keymap (one of those distributed with Vim, or an own-coded one using |mbyte-keymap|), and set keymap , if your keyboard normally sends Latin text
      Message 2 of 13 , Feb 1, 2009
      • 0 Attachment
        On 01/02/09 17:11, bill lam wrote:
        > Just curious. Users who use Cyrillic (or Greek) have to shift toggle
        > in order to type Latin letters. However vim by default only recognize
        > ascii such as hjkl or modkey+ascii such<C-F>. Will it be very clumsy
        > to use vim to edit text such as email?
        >

        :help 'keymap'
        :help 'langmap'
        :help mbyte-keymap

        Use a keymap (one of those distributed with Vim, or an own-coded one
        using |mbyte-keymap|), and set 'keymap', if your keyboard normally sends
        Latin text (e.g. at the shell prompt, which also expects ASCII), and you
        want to change the interpretation for Insert mode (and the operands of r
        t f etc.). Use 'langmap' if your keyboard normally sends non-Latin text
        (Cyrillic, Greek, Hebrew, Arabic, whatever) and you want to change the
        interpretation in Normal and Command-line modes. For RTL languages
        additional steps are required to make Vim ready, see |hebrew.txt|,
        |farsi.txt| and |arabic.txt|.

        For CJK, of course, you would use a full-fledged Input Method.


        Best regards,
        Tony.
        --
        This is the story of the bee
        Whose sex is very hard to see

        You cannot tell the he from the she
        But she can tell, and so can he

        The little bee is never still
        She has no time to take the pill

        And that is why, in times like these
        There are so many sons of bees.

        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_use" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • Cyril Slobin
        On Sun, Feb 1, 2009 at 7:43 PM, Tony Mechelynck ... Plea from a Russian Vim user: langmap doesn t work with encodig=utf8, and who is using 8-bit encodings
        Message 3 of 13 , Feb 1, 2009
        • 0 Attachment
          On Sun, Feb 1, 2009 at 7:43 PM, Tony Mechelynck
          <antoine.mechelynck@...> wrote:

          > t f etc.). Use 'langmap' if your keyboard normally sends non-Latin text
          > (Cyrillic, Greek, Hebrew, Arabic, whatever) and you want to change the
          > interpretation in Normal and Command-line modes.

          Plea from a Russian Vim user: 'langmap' doesn't work with
          encodig=utf8, and who is using 8-bit encodings today? Therefore
          'keymap' is the only option, but to have two different keyboard
          switches (one for Vim and other system-wide) is a pain. Last time I
          have checked, fixing 'langmap' for unicode has a very low priority.
          :-(

          --
          http://slobin.pp.ru/ `When I use a word,' Humpty Dumpty said,
          <cyril@...> `it means just what I choose it to mean'

          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_use" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        • Tony Mechelynck
          ... Actually, according to the help (last paragraph above :help greek ), langmap may be specified using multi-byte characters, but it will use them modulo
          Message 4 of 13 , Feb 1, 2009
          • 0 Attachment
            On 01/02/09 18:29, Cyril Slobin wrote:
            > On Sun, Feb 1, 2009 at 7:43 PM, Tony Mechelynck
            > <antoine.mechelynck@...> wrote:
            >
            >> t f etc.). Use 'langmap' if your keyboard normally sends non-Latin text
            >> (Cyrillic, Greek, Hebrew, Arabic, whatever) and you want to change the
            >> interpretation in Normal and Command-line modes.
            >
            > Plea from a Russian Vim user: 'langmap' doesn't work with
            > encodig=utf8, and who is using 8-bit encodings today? Therefore
            > 'keymap' is the only option, but to have two different keyboard
            > switches (one for Vim and other system-wide) is a pain. Last time I
            > have checked, fixing 'langmap' for unicode has a very low priority.
            > :-(
            >

            Actually, according to the help (last paragraph above ":help greek"),
            'langmap' may be specified using multi-byte characters, but it will use
            them modulo 256. Two different keys will still produce different results
            unless their Cyrillic characters are at a "distance" which is an integer
            multiple of 256 in the Unicode standard. (This is assuming that the
            codepoint rank is used. If, instead, Vim uses the leader byte or the
            last trailer byte, then IMHO the help would deserve a clarification.)

            As for Vim vs. system-wide, do you mean you never use the shell command
            line? Well, I suppose there are people nowadays who have never heard of
            any of COMMAND.COM, cmd.exe, Terminal.app, xterm, konsole or
            gnome-terminal, not to mention a plain old text-only console. Or else,
            maybe on your system it takes all its commands in Cyrillic?


            Best regards,
            Tony.
            --
            "I don't believe in astrology. But then I'm an Aquarius, and Aquarians
            don't believe in astrology."
            -- James R. F. Quirk

            --~--~---------~--~----~------------~-------~--~----~
            You received this message from the "vim_use" maillist.
            For more information, visit http://www.vim.org/maillist.php
            -~----------~----~----~----~------~----~------~--~---
          • Agathoklis D. Hatzimanikas
            ... There is patch for this, see the vim patches page. Hopefully will be integrated into mainline soon. Regards, Ag.
            Message 5 of 13 , Feb 1, 2009
            • 0 Attachment
              On Sun, Feb 01, at 08:29 Cyril Slobin wrote:
              >
              > On Sun, Feb 1, 2009 at 7:43 PM, Tony Mechelynck
              > <antoine.mechelynck@...> wrote:
              >
              > > t f etc.). Use 'langmap' if your keyboard normally sends non-Latin text
              > > (Cyrillic, Greek, Hebrew, Arabic, whatever) and you want to change the
              > > interpretation in Normal and Command-line modes.
              >
              > Plea from a Russian Vim user: 'langmap' doesn't work with
              > encodig=utf8, and who is using 8-bit encodings today? Therefore
              > 'keymap' is the only option, but to have two different keyboard
              > switches (one for Vim and other system-wide) is a pain. Last time I
              > have checked, fixing 'langmap' for unicode has a very low priority.
              > :-(
              >

              There is patch for this, see the vim patches page.

              Hopefully will be integrated into mainline soon.

              Regards,
              Ag.

              --~--~---------~--~----~------------~-------~--~----~
              You received this message from the "vim_use" maillist.
              For more information, visit http://www.vim.org/maillist.php
              -~----------~----~----~----~------~----~------~--~---
            • Anton Sharonov
              ... I use keymap option (for corresponding :help topics see very informative first post from Tony). keymap option allows me to press CTRL-6 in insert mode
              Message 6 of 13 , Feb 1, 2009
              • 0 Attachment
                bill lam wrote:
                > Just curious. Users who use Cyrillic (or Greek) have to shift
                > toggle in order to type Latin letters. However vim by default
                > only recognize ascii such as hjkl or modkey+ascii such <C-F>.
                > Will it be very clumsy to use vim to edit text such as email?

                I use 'keymap' option (for corresponding :help topics see very
                informative first post from Tony). 'keymap' option allows me to
                press CTRL-6 in insert mode and after that Cyrillic characters
                are seems to be sent by my keyboard like they are sent if you
                have switched system-wide input method. But the coolest thing is
                that system-wide input method remains on ASCII, so that it's only
                VIM, who is involved in this magic. This option works for me very
                reliable across all my unixes, windows boxes, via SSH, remote
                desktops, from the collegue computer, which even don't have
                russian input method installed, ... And of course, if I leave
                insert mode and go to normal, all commands are still works as
                usual - you can <C-F>, <C-B>, hjkl etc just normally in normal
                mode. Coming back in insert mode you will find your 'keymap' is
                still activated. So, to type ASCII, you need to use CTRL-6 again.
                Very nice solution in my opinion.

                Cyril Slobin wrote:

                > Plea from a Russian Vim user: 'langmap' doesn't work with
                > encodig=utf8, and who is using 8-bit encodings today?

                Until now I haven't yet tried 'langmap' option. I seem to be
                satisfied with 'keymap' for my needs.

                > Therefore 'keymap' is the only option, but to have two
                > different keyboard switches (one for Vim and other system-wide)
                > is a pain.

                I use 'keymap' all the days in VIM for my russian edits since
                2005, and I find it really convenient to have special switch for
                activating keymap in VIM being different from system-wide switch
                of input mode - they does different things after all.

                --
                Anton.

                --~--~---------~--~----~------------~-------~--~----~
                You received this message from the "vim_use" maillist.
                For more information, visit http://www.vim.org/maillist.php
                -~----------~----~----~----~------~----~------~--~---
              • Pento
                Hello! You can read about it in my blog about vim: http://allaboutvim.blogspot.com/2008/01/blog-post.htmlOn Feb 1, 7:11 pm, bill lam
                Message 7 of 13 , Feb 2, 2009
                • 0 Attachment
                  Hello!
                  You can read about it in my blog about vim:
                  http://allaboutvim.blogspot.com/2008/01/blog-post.html

                  On Feb 1, 7:11 pm, bill lam <cbill....@...> wrote:
                  > Just curious.  Users who use Cyrillic (or Greek) have to shift toggle
                  > in order to type Latin letters.  However vim by default only recognize
                  > ascii such as hjkl or modkey+ascii such <C-F>.  Will it be very clumsy
                  > to use vim to edit text such as email?
                  >
                  > --
                  > regards,
                  > ====================================================
                  > GPG key 1024D/4434BAB3 2008-08-24
                  > gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
                  > 唐詩183 杜甫  客至
                  >     舍南舍北皆春水  但見群鷗日日來  花徑不曾緣客掃  蓬門今始為君開
                  >     盤飧市遠無兼味  樽酒家貧只舊醅  肯與鄰翁相對飲  隔籬呼取盡餘杯
                  --~--~---------~--~----~------------~-------~--~----~
                  You received this message from the "vim_use" maillist.
                  For more information, visit http://www.vim.org/maillist.php
                  -~----------~----~----~----~------~----~------~--~---
                • Valery Kondakoff
                  ... Please, Bram, include this patch: we really need it in the mainline! It is much more convenient to use langmaps instead of keymaps, but it is impossible
                  Message 8 of 13 , Feb 2, 2009
                  • 0 Attachment
                    On 01.02.2009 21:13, Agathoklis D. Hatzimanikas wrote:

                    >> Plea from a Russian Vim user: 'langmap' doesn't work with
                    >> encodig=utf8, and who is using 8-bit encodings today?
                    >
                    > There is patch for this, see the vim patches page.
                    > Hopefully will be integrated into mainline soon.

                    Please, Bram, include this patch: we really need it in the mainline! It
                    is much more convenient to use langmaps instead of keymaps, but it is
                    impossible currently if you have set Vim to use UTF-8. :(

                    --
                    Best regards,
                    Valery Kondakoff

                    PGP key:
                    http://pool.sks-keyservers.net:11371/pks/lookup?op=get&search=0xEEDF8590
                    np: Boy In Static'2007 (Violet) - Immortal

                    --~--~---------~--~----~------------~-------~--~----~
                    You received this message from the "vim_use" maillist.
                    For more information, visit http://www.vim.org/maillist.php
                    -~----------~----~----~----~------~----~------~--~---
                  • bill lam
                    Thank all for informative responses. If I understand correctly, use keymap if your default keyboard from xorg.conf or setkbmap is latin; but use langmap if
                    Message 9 of 13 , Feb 2, 2009
                    • 0 Attachment
                      Thank all for informative responses. If I understand correctly, use
                      keymap if your default keyboard from xorg.conf or setkbmap is latin;
                      but use langmap if system keyboard layout is ru.

                      One more question, suppose the system keyboard layout is russian. In
                      programs other than vim where langmap is not available, how to press
                      those cmd/alt/meta keys? For instance, to press <C-Z> (suspense),
                      does it just press ctrl-Я or need to shift_toggle to us, then press
                      ctrl-Z?

                      --
                      regards,
                      ====================================================
                      GPG key 1024D/4434BAB3 2008-08-24
                      gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
                      唐詩193 杜甫 詠懷古跡五首之四
                      蜀主征吳幸三峽 崩年亦在永安宮 翠華想像空山裡 玉殿虛無野寺中
                      古廟杉松巢水鶴 歲時伏臘走村翁 武侯祠屋常鄰近 一體君臣祭祀同

                      --~--~---------~--~----~------------~-------~--~----~
                      You received this message from the "vim_use" maillist.
                      For more information, visit http://www.vim.org/maillist.php
                      -~----------~----~----~----~------~----~------~--~---
                    • Cyril Slobin
                      On Sun, Feb 1, 2009 at 9:01 PM, Tony Mechelynck ... I ll check this, thank you. If this works well, this may be a solution. ... No, no, the problem is
                      Message 10 of 13 , Feb 2, 2009
                      • 0 Attachment
                        On Sun, Feb 1, 2009 at 9:01 PM, Tony Mechelynck
                        <antoine.mechelynck@...> wrote:

                        > 'langmap' may be specified using multi-byte characters, but it will use
                        > them modulo 256. Two different keys will still produce different results
                        > unless their Cyrillic characters are at a "distance" which is an integer
                        > multiple of 256 in the Unicode standard.

                        I'll check this, thank you. If this works well, this may be a solution.

                        > As for Vim vs. system-wide, do you mean you never use the shell command
                        > line? Well, I suppose there are people nowadays who have never heard of
                        > any of COMMAND.COM, cmd.exe, Terminal.app, xterm, konsole or

                        No, no, the problem is different. I do use cmd.exe in Windows, bash in
                        terminal window in Linux, and even bash in Windows (MSYS port)
                        sometimes! And when I am to type, for example, a line

                        echo "Привет"

                        anywhere in the system (cmd.exe in windows, terminal in linux, firefox
                        window to write this one letter in google mail), I am to type "echo"
                        in Latin letters, switch to Cyrillic (using the system-wide switch
                        (Alt-Shift in most systems, but this may vary)), and type "Привет".
                        Anywhere in the system BUT in Vim! In fact, if I forget this
                        misfeature and type this in Vim using system-wide switch, the Cyrillic
                        letters will be put in buffer in insert mode. But then, when I'll
                        leave the insert mode, and my keyboard still send Cyrillic -- it is a
                        pain. And it is too easy to forget to use the different switch.

                        > not to mention a plain old text-only console.

                        I should not praise myself, but console-cyrillic package in Debian is
                        partially based on my work back in 1999. So I know a bit about work in
                        plain old console, and how to use Cyrillic letters in it. ;-)

                        --
                        http://slobin.pp.ru/ `When I use a word,' Humpty Dumpty said,
                        <cyril@...> `it means just what I choose it to mean'

                        --~--~---------~--~----~------------~-------~--~----~
                        You received this message from the "vim_use" maillist.
                        For more information, visit http://www.vim.org/maillist.php
                        -~----------~----~----~----~------~----~------~--~---
                      • Bram Moolenaar
                        ... The remark for this patch had sunk in the todo list, which is as deep as the ocean. I ll float it upwards. This patch was originally made in 2006. Is
                        Message 11 of 13 , Feb 2, 2009
                        • 0 Attachment
                          Valery Kondakoff wrote:

                          > On 01.02.2009 21:13, Agathoklis D. Hatzimanikas wrote:
                          >
                          > >> Plea from a Russian Vim user: 'langmap' doesn't work with
                          > >> encodig=utf8, and who is using 8-bit encodings today?
                          > >
                          > > There is patch for this, see the vim patches page.
                          > > Hopefully will be integrated into mainline soon.
                          >
                          > Please, Bram, include this patch: we really need it in the mainline! It
                          > is much more convenient to use langmaps instead of keymaps, but it is
                          > impossible currently if you have set Vim to use UTF-8. :(

                          The remark for this patch had sunk in the todo list, which is as deep as
                          the ocean. I'll float it upwards.

                          This patch was originally made in 2006. Is there an updated version?

                          --
                          The users that I support would double-click on a landmine to find out
                          what happens. -- A system administrator

                          /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
                          /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
                          \\\ download, build and distribute -- http://www.A-A-P.org ///
                          \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

                          --~--~---------~--~----~------------~-------~--~----~
                          You received this message from the "vim_use" maillist.
                          For more information, visit http://www.vim.org/maillist.php
                          -~----------~----~----~----~------~----~------~--~---
                        • Valery Kondakoff
                          ... As far as I know here is the updated patch for Vim 7.1:
                          Message 12 of 13 , Feb 2, 2009
                          • 0 Attachment
                            On 02.02.2009 21:42, Bram Moolenaar wrote:
                            >
                            > Valery Kondakoff wrote:
                            >
                            >> On 01.02.2009 21:13, Agathoklis D. Hatzimanikas wrote:
                            >>
                            >>>> Plea from a Russian Vim user: 'langmap' doesn't work with
                            >>>> encodig=utf8, and who is using 8-bit encodings today?
                            >>> There is patch for this, see the vim patches page.
                            >>> Hopefully will be integrated into mainline soon.
                            >> Please, Bram, include this patch: we really need it in the mainline! It
                            >> is much more convenient to use langmaps instead of keymaps, but it is
                            >> impossible currently if you have set Vim to use UTF-8. :(
                            > The remark for this patch had sunk in the todo list, which is as deep as
                            > the ocean. I'll float it upwards.
                            > This patch was originally made in 2006. Is there an updated version?

                            As far as I know here is the updated patch for Vim 7.1:

                            http://lostclus.linux.kiev.ua/%D0%94%D1%80%D1%83%D0%B3%D0%B8%D0%B5_%D1%80%D0%B0%D0%B1%D0%BE%D1%82%D1%8B/%D0%9F%D0%B0%D1%82%D1%87%D0%B8?action=AttachFile&do=get&target=vim71-langmapmb-4.patch

                            Should we ask the author to update the patch to Vim 7.2?

                            --
                            Best regards,
                            Valery Kondakoff

                            PGP key:
                            http://pool.sks-keyservers.net:11371/pks/lookup?op=get&search=0xEEDF8590
                            np: Bran Van 3000'1998 (Glee) - Cum On Feel The Noize

                            --~--~---------~--~----~------------~-------~--~----~
                            You received this message from the "vim_use" maillist.
                            For more information, visit http://www.vim.org/maillist.php
                            -~----------~----~----~----~------~----~------~--~---
                          • Agathoklis D. Hatzimanikas
                            ... Hi Bram and thanks for your interest. It s a usability issue and like such should have priority (in my opinion). As for the patch, there is a link to an
                            Message 13 of 13 , Feb 2, 2009
                            • 0 Attachment
                              On Mon, Feb 02, at 07:42 Bram Moolenaar wrote:
                              >
                              >
                              > Valery Kondakoff wrote:
                              >
                              > > On 01.02.2009 21:13, Agathoklis D. Hatzimanikas wrote:
                              > >
                              > > >> Plea from a Russian Vim user: 'langmap' doesn't work with
                              > > >> encodig=utf8, and who is using 8-bit encodings today?
                              > > >
                              > > > There is patch for this, see the vim patches page.
                              > > > Hopefully will be integrated into mainline soon.
                              > >
                              > > Please, Bram, include this patch: we really need it in the mainline! It
                              > > is much more convenient to use langmaps instead of keymaps, but it is
                              > > impossible currently if you have set Vim to use UTF-8. :(
                              >
                              > The remark for this patch had sunk in the todo list, which is as deep as
                              > the ocean. I'll float it upwards.
                              >
                              > This patch was originally made in 2006. Is there an updated version?
                              >

                              Hi Bram and thanks for your interest.
                              It's a usability issue and like such should have priority (in my
                              opinion).

                              As for the patch, there is a link to an updated version in the vim
                              patches page, which applies cleanly in 7.2 and with some offsets in
                              vim-7.2 patchlevel 65.

                              When we updated the vim patches page with John Becket, we've tried to
                              communicate with the author, but we've got no response; anyway I will try
                              again (in the next few days, since I am busy now). If it's not possible to
                              be in touch, I can re-diff it once more (if doesn't apply to the last
                              patchlevel) and I can send it to you.

                              I am using this patch from the day it was published and I didn't noticed
                              any (at least visible) misbehavior but some more testing is needed of
                              course.

                              Regards,
                              Ag.

                              --~--~---------~--~----~------------~-------~--~----~
                              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.