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

Re: special keymap depending on language

Expand Messages
  • Steve
    Dear Tony and linth, Thank you for your answers. ... I think that this is the easier solution for me. I ll try that and see if it fits my needs. The hardest
    Message 1 of 7 , Nov 27, 2012
      Dear Tony and linth,

      Thank you for your answers.

      > >This works great when writing in French, I don't have to manually put a nb
      > >space. But when writing in English, the same happens which I obviously don't
      > >want. So my question is rather simple: can I load this file only when editing
      > >in French?
      > >
      > >Thank you,
      > >best regards,
      > >steve
      > >
      >
      > Well, it would be possible if there is some computer-readable
      > criterion to tell French-language and English-language email apart
      > from each other.
      >
      > One possibility would be to set different keymaps and load them
      > manually when opening the message for editing.

      I think that this is the easier solution for me. I'll try that and see
      if it fits my needs. The hardest part will be to not forget to load the
      keymap :)

      Thank you,
      steve

      --
      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
    • Tony Mechelynck
      ... In order not to forget that a keymap (and which one) is loaded and active, I display it on my statusline , it s the %k field after the %= (%= means
      Message 2 of 7 , Nov 27, 2012
        On 27/11/12 13:53, Steve wrote:
        > Dear Tony and linth,
        >
        > Thank you for your answers.
        >
        >>> This works great when writing in French, I don't have to manually put a nb
        >>> space. But when writing in English, the same happens which I obviously don't
        >>> want. So my question is rather simple: can I load this file only when editing
        >>> in French?
        >>>
        >>> Thank you,
        >>> best regards,
        >>> steve
        >>>
        >>
        >> Well, it would be possible if there is some computer-readable
        >> criterion to tell French-language and English-language email apart
        >> from each other.
        >>
        >> One possibility would be to set different keymaps and load them
        >> manually when opening the message for editing.
        >
        > I think that this is the easier solution for me. I'll try that and see
        > if it fits my needs. The hardest part will be to not forget to load the
        > keymap :)
        >
        > Thank you,
        > steve
        >

        In order not to forget that a keymap (and which one) is loaded and
        active, I display it on my 'statusline', it's the %k field after the %=
        (%= means "flexible space"):

        " custom status line, see :help 'statusline' for details
        if has("statusline")
        set statusline=%<%f\ %h%m%r%=%k[%{(&fenc\ ==\
        \"\"?&enc:&fenc).(&bomb?\",BOM\":\"\")}][U+%04B]\ %-12.(%l,%c%V%)\ %P
        endif


        Best regards,
        Tony.
        --
        As the trials of life continue to take their toll, remember that there
        is always a future in Computer Maintenance.
        -- National Lampoon, "Deteriorata"



        --
        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
      • Tony Mechelynck
        ... P.S. I also set the lCursor highlight (cursor with keymap active) to a different colour than Cursor (cursor when neither keymap nor IM are active) see
        Message 3 of 7 , Nov 27, 2012
          On 27/11/12 16:33, Tony Mechelynck wrote:
          > On 27/11/12 13:53, Steve wrote:
          >> Dear Tony and linth,
          >>
          >> Thank you for your answers.
          >>
          >>>> This works great when writing in French, I don't have to manually
          >>>> put a nb
          >>>> space. But when writing in English, the same happens which I
          >>>> obviously don't
          >>>> want. So my question is rather simple: can I load this file only
          >>>> when editing
          >>>> in French?
          >>>>
          >>>> Thank you,
          >>>> best regards,
          >>>> steve
          >>>>
          >>>
          >>> Well, it would be possible if there is some computer-readable
          >>> criterion to tell French-language and English-language email apart
          >>> from each other.
          >>>
          >>> One possibility would be to set different keymaps and load them
          >>> manually when opening the message for editing.
          >>
          >> I think that this is the easier solution for me. I'll try that and see
          >> if it fits my needs. The hardest part will be to not forget to load the
          >> keymap :)
          >>
          >> Thank you,
          >> steve
          >>
          >
          > In order not to forget that a keymap (and which one) is loaded and
          > active, I display it on my 'statusline', it's the %k field after the %=
          > (%= means "flexible space"):
          >
          > " custom status line, see :help 'statusline' for details
          > if has("statusline")
          > set statusline=%<%f\ %h%m%r%=%k[%{(&fenc\ ==\
          > \"\"?&enc:&fenc).(&bomb?\",BOM\":\"\")}][U+%04B]\ %-12.(%l,%c%V%)\ %P
          > endif

          P.S. I also set the lCursor highlight (cursor with keymap active) to a
          different colour than Cursor (cursor when neither keymap nor IM are active)

          see :help 'guicursor'

          >
          >
          > Best regards,
          > Tony.
          --
          Q: Why does Helen Keller masturbate with one hand?
          A: So she can moan with the other!

          --
          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
        • Steve
          ... Great tip Tony, many thanksĀ ! Have a nice day, steve -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the
          Message 4 of 7 , Nov 27, 2012
            > >>One possibility would be to set different keymaps and load them
            > >>manually when opening the message for editing.
            > >
            > >I think that this is the easier solution for me. I'll try that and see
            > >if it fits my needs. The hardest part will be to not forget to load the
            > >keymap :)
            > >
            > >Thank you,
            > >steve
            > >
            >
            > In order not to forget that a keymap (and which one) is loaded and
            > active, I display it on my 'statusline', it's the %k field after the
            > %= (%= means "flexible space"):
            >
            > " custom status line, see :help 'statusline' for details
            > if has("statusline")
            > set statusline=%<%f\ %h%m%r%=%k[%{(&fenc\ ==\
            > \"\"?&enc:&fenc).(&bomb?\",BOM\":\"\")}][U+%04B]\ %-12.(%l,%c%V%)\
            > %P
            > endif


            Great tip Tony, many thanksĀ !

            Have a nice day,
            steve

            --
            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
          Your message has been successfully submitted and would be delivered to recipients shortly.