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

langmap & utf8 encoding

Expand Messages
  • Gour-Gadadhara Dasa
    Hello, after some years spent with Emacs (used it due to possibly better Haskell mode), I m back with here and my wrists are telling me: Thank you! . I want
    Message 1 of 7 , May 27, 2011
    • 0 Attachment
      Hello,

      after some years spent with Emacs (used it due to 'possibly' better Haskell
      mode), I'm back with here and my wrists are telling me: "Thank you!".

      I want to learn Vim and use it for all my writings which means native
      texts as well as (python+qt) programming. One problem is that Vim's
      command mode commands are suitable for US keyboard layout, but I use
      Croatian one which has the following mapping:

      š --> [
      Š --> {
      đ --> ]
      Đ --> }
      [ --> altgr+f
      ] --> altgr+g
      { --> altgr+b
      } --> altgr+n
      ....

      I can bear and use e.g. altgr+[ to get square bracket while doing Python
      programming, but using CTRL-altgr+g instead of CTRL-] is too much like Emacs
      and I do not want to go back there. :-)

      I read about 'langmap' option and tried to put the following in my .vimrc:

      set langmap=đ]

      in order to be able to use: CTRL-đ to simulate CTRL-].

      Have I misunderstood langmap feature or do I miss something?

      I've found the following tip:

      http://vim.wikia.com/wiki/VimTip1348

      but found some other info that langmap should work with utf-8 encoding in
      vim>=7.2.x.

      Any one can help?


      Sincerely,
      Gour

      --
      “In the material world, conceptions of good and bad are
      all mental speculations…” (Sri Caitanya Mahaprabhu)

      http://atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810
    • Tony Mechelynck
      ... On my Belgian keyboard, [ and ] are also obtained by some AltGr combination, see http://users.skynet.be/antoine.mechelynck/other/keybbe.htm I can bear
      Message 2 of 7 , May 27, 2011
      • 0 Attachment
        On 27/05/11 11:15, Gour-Gadadhara Dasa wrote:
        > Hello,
        >
        > after some years spent with Emacs (used it due to 'possibly' better Haskell
        > mode), I'm back with here and my wrists are telling me: "Thank you!".
        >
        > I want to learn Vim and use it for all my writings which means native
        > texts as well as (python+qt) programming. One problem is that Vim's
        > command mode commands are suitable for US keyboard layout, but I use
        > Croatian one which has the following mapping:
        >
        > š --> [
        > Š --> {
        > đ --> ]
        > Đ --> }
        > [ --> altgr+f
        > ] --> altgr+g
        > { --> altgr+b
        > } --> altgr+n
        > ....
        >
        > I can bear and use e.g. altgr+[ to get square bracket while doing Python
        > programming, but using CTRL-altgr+g instead of CTRL-] is too much like Emacs
        > and I do not want to go back there. :-)
        >
        > I read about 'langmap' option and tried to put the following in my .vimrc:
        >
        > set langmap=đ]
        >
        > in order to be able to use: CTRL-đ to simulate CTRL-].
        >
        > Have I misunderstood langmap feature or do I miss something?
        >
        > I've found the following tip:
        >
        > http://vim.wikia.com/wiki/VimTip1348
        >
        > but found some other info that langmap should work with utf-8 encoding in
        > vim>=7.2.x.
        >
        > Any one can help?
        >
        >
        > Sincerely,
        > Gour
        >

        On my Belgian keyboard, [ and ] are also obtained by some AltGr
        combination, see http://users.skynet.be/antoine.mechelynck/other/keybbe.htm

        I can bear using AltGr+dead-^ (which then stops being a dead key) and
        AltGr+$ to get square brackets, but to follow hotlinks in the help and
        stop abbreviations I use the following:

        :map <F9> <C-]>
        :map! <F9> <C-]>

        This is one of the first mappings I created (in Vim 6.0 or 6.1, when I
        didn't yet know that my keyboard could produce the Ctrl-] code), it
        worked then and it still works now.

        For help hotlinks (or jumping to tags), double-clicking can also be used
        (unless, of course, you want your hands manacled in front of ASDF [or
        QSDF depending on locale] and HJKL, and your mouse unplugged, like I've
        heard said that some Vim users do :-P ).


        Best regards,
        Tony.
        --
        When I heated my home with oil, I used an average of 800 gallons a
        year. I have found that I can keep comfortably warm for an entire
        winter with slightly over half that quantity of beer.
        -- Dave Barry, "Postpetroleum Guzzler"

        --
        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
      • Gour-Gadadhara Dasa
        On Fri, 27 May 2011 12:21:02 +0200 ... Thanks. Otoh, am I right that langmap=đ] does not work in a sense that CTRL-đ cannot create effect of CTRl-]?
        Message 3 of 7 , May 28, 2011
        • 0 Attachment
          On Fri, 27 May 2011 12:21:02 +0200
          Tony Mechelynck <antoine.mechelynck@...> wrote:

          > This is one of the first mappings I created (in Vim 6.0 or 6.1, when
          > I didn't yet know that my keyboard could produce the Ctrl-] code), it
          > worked then and it still works now.

          Thanks.

          Otoh, am I right that langmap=đ] does not work in a sense that CTRL-đ cannot
          create effect of CTRl-]?


          Sincerely,
          Gour

          --
          “In the material world, conceptions of good and bad are
          all mental speculations…” (Sri Caitanya Mahaprabhu)

          http://atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810
        • Tony Mechelynck
          ... I m not sure: I ve never used langmap myself; but I think that langmap=đ] maps đ to ] and nothing else, i.e., not Ð (which on keyboards for former
          Message 4 of 7 , May 28, 2011
          • 0 Attachment
            On 28/05/11 14:27, Gour-Gadadhara Dasa wrote:
            > On Fri, 27 May 2011 12:21:02 +0200
            > Tony Mechelynck<antoine.mechelynck@...> wrote:
            >
            >> This is one of the first mappings I created (in Vim 6.0 or 6.1, when
            >> I didn't yet know that my keyboard could produce the Ctrl-] code), it
            >> worked then and it still works now.
            >
            > Thanks.
            >
            > Otoh, am I right that langmap=đ] does not work in a sense that CTRL-đ cannot
            > create effect of CTRl-]?
            >
            >
            > Sincerely,
            > Gour
            >

            I'm not sure: I've never used 'langmap' myself; but I think that
            langmap=đ] maps đ to ] and nothing else, i.e., not Ð (which on keyboards
            for former Yugoslav countries would probably be Shift-đ) and not Ctrl-đ.

            Best regards,
            Tony.
            --
            COMMENT

            Oh, life is a glorious cycle of song,
            A medley of extemporanea;
            And love is a thing that can never go wrong;
            And I am Marie of Roumania.
            -- Dorothy Parker

            --
            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
          • Gour-Gadadhara Dasa
            On Sun, 29 May 2011 05:42:12 +0200 ... Well, on my Croatian keyboard which has the same layout as former YU-countries, ] is on the place of đ , while Đ
            Message 5 of 7 , May 28, 2011
            • 0 Attachment
              On Sun, 29 May 2011 05:42:12 +0200
              Tony Mechelynck <antoine.mechelynck@...> wrote:

              > I'm not sure: I've never used 'langmap' myself; but I think that
              > langmap=đ] maps đ to ] and nothing else, i.e., not Ð (which on
              > keyboards for former Yugoslav countries would probably be Shift-đ)
              > and not Ctrl-đ.

              Well, on my Croatian keyboard which has the same layout as former YU-countries,
              ']' is on the place of 'đ', while Đ' is at the place of of '}'. So, I want that
              CTRL-đ acts as CTRL-] (Đ is upper case of đ).

              My understanding is that having: langmap=zy, should enable one to use CTRL-z
              and have effect of CTRl-y, or do I miss something?


              Sincerely,
              Gour

              --
              “In the material world, conceptions of good and bad are
              all mental speculations…” (Sri Caitanya Mahaprabhu)

              http://atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810
            • Tony Mechelynck
              ... My understanding was that it would map z to y but have no effect on anything else, and in particular Shift-z, Ctrl-z, Alt-z, etc., wouldn t be affected.
              Message 6 of 7 , May 29, 2011
              • 0 Attachment
                On 29/05/11 08:12, Gour-Gadadhara Dasa wrote:
                > On Sun, 29 May 2011 05:42:12 +0200
                > Tony Mechelynck<antoine.mechelynck@...> wrote:
                >
                >> I'm not sure: I've never used 'langmap' myself; but I think that
                >> langmap=đ] maps đ to ] and nothing else, i.e., not Ð (which on
                >> keyboards for former Yugoslav countries would probably be Shift-đ)
                >> and not Ctrl-đ.
                >
                > Well, on my Croatian keyboard which has the same layout as former YU-countries,
                > ']' is on the place of 'đ', while Đ' is at the place of of '}'. So, I want that
                > CTRL-đ acts as CTRL-] (Đ is upper case of đ).
                >
                > My understanding is that having: langmap=zy, should enable one to use CTRL-z
                > and have effect of CTRl-y, or do I miss something?

                My understanding was that it would map z to y but have no effect on
                anything else, and in particular Shift-z, Ctrl-z, Alt-z, etc., wouldn't
                be affected. But maybe I'm wrong, so let's see if someone chimes in who
                knows the 'langmap' option better than I do.

                >
                >
                > Sincerely,
                > Gour
                >

                Best regards,
                Tony.
                --
                Quick, sing me the BUDAPEST NATIONAL ANTHEM!!

                --
                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
              • Gour-Gadadhara Dasa
                On Sun, 29 May 2011 18:40:17 +0200 ... I was helped in #vim and the following works: set langmap=đ^V^],ž^V^ iow, CTRL-đ works as CTRL-] :-) Sincerely, Gour
                Message 7 of 7 , Jun 2, 2011
                • 0 Attachment
                  On Sun, 29 May 2011 18:40:17 +0200
                  Tony Mechelynck <antoine.mechelynck@...> wrote:

                  > My understanding was that it would map z to y but have no effect on
                  > anything else, and in particular Shift-z, Ctrl-z, Alt-z, etc.,
                  > wouldn't be affected. But maybe I'm wrong, so let's see if someone
                  > chimes in who knows the 'langmap' option better than I do.

                  I was helped in #vim and the following works:

                  set langmap=đ^V^],ž^V^\

                  iow, CTRL-đ works as CTRL-] :-)


                  Sincerely,
                  Gour


                  --
                  “In the material world, conceptions of good and bad are
                  all mental speculations…” (Sri Caitanya Mahaprabhu)

                  http://atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810
                Your message has been successfully submitted and would be delivered to recipients shortly.