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

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

Expand Messages
  • Tony Mechelynck
    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>
      : nmap <Esc>i :echo "vim's Alt-i"<CR>
      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,
      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
    • Show all 9 messages in this topic