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

Re: mlterm blocking Alt+I in vim-latex-suite

Expand Messages
  • zhengquan
    On Jan 2, 4:32 pm, Tony Mechelynck ... yes I did issue the commands with my latex file, and the output show no mappings. I am
    Message 1 of 9 , Jan 2, 2009
    • 0 Attachment
      On Jan 2, 4:32 pm, Tony Mechelynck <antoine.mechely...@...>
      wrote:
      > On 02/01/09 23:05, zhengquan wrote:
      >
      > > Thanks Tony,
      > > the output of the two verbose commands shows no mappings.
      >
      > You did issue them with your latex file current didn't you?
      >
      > What are you hoping that this Alt-I should do?

      yes I did issue the commands with my latex file, and the output show
      no mappings.
      I am hoping that in an itemize environment, when I type alt-i in the
      environment, it will automatically insert a \item

      \begin
      {itemize}
      \item (\item is inserted as the result of alt-
      i)

      \end{itemize}

      >
      > > It is quite
      > > possible that the mlterm does not pass the alt-i combo to vim... I am
      > > wondering how to make alt-i passable to vim in mlterm.
      >
      > As I said, if I were you I'd use a different key. You can even map F7
      > (or anything that Vim does see) to Alt-I and from then on when you hit
      > F7 Vim will interpret it as Alt-I.
      I know this a workaround but I would like to pass alt-i to vim in
      mlterm. what I am doing now is that I am switching to some tasks to
      xterm. but the support for multibyte characters of xterm is feeble.

      >
      > Note that Vim cannot distinguish Alt-i from é (small-e-acute), or Alt-I
      > (Alt-Shift-i) from É (capital-E-acute). If you can type é (e.g. as e2 in
      > pinyin), Vim will see it as synonymous to Alt-i. This also means that
      this is confusing me because if I type alt-i in under mlterm with my
      latex file, it will be a small-e-acute.
      but if I use xterm, it will insert a correct \item. So this makes me
      feel that the problem is with mlterm. It seems like an off topic issue
      now...

      Thank you for your help.

      Regards,
      Zhang
      > you should not map Alt-i in Insert mode if you want to be able to type
      > e-acute into your text.
      >
      >
      >
      > > Regards,
      > > Zhang
      >
      > Best regards,
      > Tony.
      > --
      > Old soldiers never die.  Young ones do.
      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Charles E. Campbell, Jr.
      ... I suggest that you find out what s being delivered to vim when you press Alt-i. What is being delivered is a) likely to be different between vim and gvim
      Message 2 of 9 , Jan 2, 2009
      • 0 Attachment
        zhengquan wrote:
        >
        > On Jan 2, 4:32 pm, Tony Mechelynck <antoine.mechely...@...>
        > wrote:
        >
        >> On 02/01/09 23:05, zhengquan wrote:
        >>
        >>
        >>> Thanks Tony,
        >>> the output of the two verbose commands shows no mappings.
        >>>
        >> You did issue them with your latex file current didn't you?
        >>
        >> What are you hoping that this Alt-I should do?
        >>
        >
        > yes I did issue the commands with my latex file, and the output show
        > no mappings.
        > I am hoping that in an itemize environment, when I type alt-i in the
        > environment, it will automatically insert a \item
        >
        > \begin
        > {itemize}
        > \item (\item is inserted as the result of alt-
        > i)
        >
        > \end{itemize}
        >
        I suggest that you find out what's being delivered to vim when you press
        Alt-i. What is being delivered is

        a) likely to be different between vim and gvim
        b) likely not to be what vim/gvim thinks <m-i> is

        I constructed the following two maps by pressing ctrl-v and then alt-i
        after typing "nmap ". They "work for me"; that's not to say that the
        email won't mutilate it nor that your terminal interface will deliver
        the same thing in vim's case.

        if has("gui_running")
        nmap é :echo "gvim's alt-i"<cr>
        else
        nmap i :echo "vim's alt-i"<cr>
        endif

        Of course, you can modify the maps' payload to suit your needs.

        Regards,
        Chip Campbell


        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_use" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • zhengquan
        Hi Charles, I think we are close to the solution to the problem. On Jan 2, 7:12 pm, Charles E. Campbell, Jr. ... I copied this code snippet to my .vimrc and
        Message 3 of 9 , Jan 11, 2009
        • 0 Attachment
          Hi Charles, I think we are close to the solution to the problem.

          On Jan 2, 7:12 pm, "Charles E. Campbell, Jr."
          <drc...@...> wrote:
          > zhengquan wrote:
          >
          > > On Jan 2, 4:32 pm, Tony Mechelynck <antoine.mechely...@...>
          > > wrote:
          >
          > >> On 02/01/09 23:05, zhengquan wrote:
          >
          > >>> Thanks Tony,
          > >>> the output of the two verbose commands shows no mappings.
          >
          > >> You did issue them with your latex file current didn't you?
          >
          > >> What are you hoping that this Alt-I should do?
          >
          > > yes I did issue the commands with my latex file, and the output show
          > > no mappings.
          > > I am hoping that in  an itemize environment, when I type alt-i in the
          > > environment, it  will automatically insert a \item
          >
          > > \begin
          > > {itemize}
          > > \item   (\item is inserted as the result of alt-
          > > i)
          >
          > > \end{itemize}
          >
          > I suggest that you find out what's being delivered to vim when you press
          > Alt-i.  What is being delivered is
          >
          >   a) likely to be different between vim and gvim
          >   b) likely not to be what vim/gvim thinks <m-i> is
          >
          > I constructed the following two maps by pressing ctrl-v and then alt-i
          > after typing "nmap ".  They "work for me"; that's not to say that the
          > email won't mutilate it nor that your terminal interface will deliver
          > the same thing in vim's case.
          >
          > if has("gui_running")
          >  nmap é :echo "gvim's alt-i"<cr>
          > else
          >  nmap  i :echo "vim's alt-i"<cr>
          > endif
          >
          I copied this code snippet to my .vimrc and tried in mlterm, but alt-i
          still inserts a small e acute... in gvim alt-i inserts correctly,
          Could you tell how can I debug the mappings?

          Thank you very much, I am pretty headstrong and don't want to use
          another mapping for the insertion.

          Zhang


          > Of course, you can modify the maps' payload to suit your needs.
          >
          > Regards,
          > Chip Campbell
          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_use" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        • Tony Mechelynck
          ... [...] ... Small e-acute is the value internally used by Vim to represent Alt-i. If, without any mappings, Ctrl-V Alt-i inserts the same é for you on both
          Message 4 of 9 , Jan 11, 2009
          • 0 Attachment
            On 12/01/09 03:28, zhengquan wrote:
            > Hi Charles, I think we are close to the solution to the problem.
            >
            > On Jan 2, 7:12 pm, "Charles E. Campbell, Jr."
            > <drc...@...> wrote:
            [...]
            >> I constructed the following two maps by pressing ctrl-v and then alt-i
            >> after typing "nmap ". They "work for me"; that's not to say that the
            >> email won't mutilate it nor that your terminal interface will deliver
            >> the same thing in vim's case.
            >>
            >> if has("gui_running")
            >> nmap é :echo "gvim's alt-i"<cr>
            >> else
            >> nmap i :echo "vim's alt-i"<cr>
            >> endif
            >>
            > I copied this code snippet to my .vimrc and tried in mlterm, but alt-i
            > still inserts a small e acute... in gvim alt-i inserts correctly,
            > Could you tell how can I debug the mappings?
            >
            > Thank you very much, I am pretty headstrong and don't want to use
            > another mapping for the insertion.
            >
            > Zhang

            Small e-acute is the value internally used by Vim to represent Alt-i.
            If, without any mappings, Ctrl-V Alt-i inserts the same é for you on
            both gvim and Console Vim, it means it is recognized correctly.

            You could try

            :nmap <M-i> :echo 'Alt-i'<CR>

            If it works (in Normal mode), Vim sees alt-i correctly. However, it is
            never able to distinguish between Alt-i and small-é-acute, which means
            you should avoid using Alt-i for an Insert-mode {lhs} if you use
            languages like French, Spanish or Hungarian (all of which make heavy use
            of that letter), Chinese pinyin with tone marks, or even the English
            language with loanwords like /risqué jokes/ or /rosé wine/.

            I notice (by the Ctrl-V prefix trick) that on my system, Alt-i generates
            Esc i in Console Vim in both the KDE konsole and the Linux terminal. So
            I might use

            :if has('gui_running')
            : nmap <M-i> :echo "gvim's Alt-i"<CR>
            :else
            : nmap <Esc>i :echo "vim's Alt-i"<CR>
            :endif
            or even
            :nmap <M-i> :echo "gvim's Alt-i"<CR>
            :nmap <Esc>i :echo "vim's Alt-i"<CR>

            for a test similar to Dr. Chip's.


            Best regards,
            Tony.
            --
            No letters of the alphabet were harmed in the creation of this message.

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