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

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

Expand Messages
  • 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 1 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 2 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 3 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.