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

136775Re: gVim: Non-breaking space strangely triggers :simalt~

Expand Messages
  • Ben Fritz
    Mar 16, 2013
    • 0 Attachment
      On Saturday, March 16, 2013 3:21:10 AM UTC-5, Sylvia Ganush wrote:
      > On 15 Mar 2013, at 21:58, Ben Fritz <fritzophrenic@...> wrote:
      >
      >
      >
      > > Can you still get this issue to occur? You said it only affects one instance of Vim and the rest are fine.
      >
      >
      >
      > I think I've tracked the bug. I've compared the 'ill' and 'healthy' gVim sessions and spotted the offending lines:
      >
      >
      >
      > Ill session Healthy session
      >
      > ==================== ====================
      >
      > cnoremap :simalt ~ cnoremap :simalt ~
      >
      > inoremap :simalt ~ inoremap :simalt ~
      >
      > cnoremap  :simalt ~ ...
      >
      > inoremap  :simalt ~ ...
      >
      > noremap :simalt ~ noremap :simalt ~
      >
      > noremap  :simalt ~ ...
      >
      >
      >
      > It's those lines with 'Â' that were giving me the trouble. I've removed them from the ill session, and things are good again. Now the questions remain, of course, what those lines mean, where they came from, and how to prevent them from reappearing.
      >
      >
      >
      > I have the following two lines in my _vimrc that I think have something to do with 'simalt':
      >
      >
      >
      > au GUIEnter * simalt ~x "Maximize the window on startup
      >
      > source $VIMRUNTIME/mswin.vim "Enable Windows-style copypasting
      >
      >
      >
      > Can they be the culprit?

      Yes, they can. I'm not sure what exact mapping is interfering. If you think you've found the mapping, try (for example):

      :verbose map Â
      :verbose map! Â

      This should tell you any existing mappings starting with 'Â' and also what file defined them. Then it should be pretty easy to remove from that file.

      I don't actually think Vim will properly process an ALT+Number keycode though, if that's what your autohotkeys script is sending, unless you define your own mapping for it. Try it manually. If it doesn't work, then something like:

      :inoremap <A-1><A-2><A-3><A-4> TextToInsert

      should work, but it will require a mapping for every such key sequence.

      It sounds like autohotkey is sending an Alt+Space keysequence to Vim, and naturally Vim responds by brining up the menu as if you had manually typed Alt+Space explicitly.

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

      ---
      You received this message because you are subscribed to the Google Groups "vim_use" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Show all 9 messages in this topic