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

2424Re: Keymap problem, toggle back to default keymap doesn't work for /search

Expand Messages
  • Tony Mechelynck
    Dec 12, 2007
      Ken Beesley wrote:
      > Subject: Keymap problem, toggle back to default keymap doesn't work
      > for /search
      >
      >
      > Background:
      > Using MacVim snapshot 0711A on OS X 10.5 ("Leopard")
      > Using my own keymap files to type in Unicode (supplementary
      > characters)
      >
      > Good News:
      > In general, the new MacVim is working marvelously well, allowing me to
      > :set keymap=myownkeymap
      > and type in exotic supplementary Unicode characters the way I want
      > to. Thanks again to all
      > who contributed to this new MacVim version. Because of this
      > functionality, I have finally
      > become a Vim convert (from emacs).
      >
      > Bad News:
      > But I've got a little problem toggling out of my keymap. The
      > following is reproduceable:
      >
      > 1. I launch MacVim and type a bit of English (ASCII range). OK
      > 2. I do :set keymap=myownkeymap
      > and type in exotic supplementary characters (currently
      > Deseret Alphabet). OK
      > (I had to modify a mono font to include the desired Deseret
      > Alphabet glyphs.)
      > 3. I then do Ctrl-^ to toggle back to the default keymap. I
      > type some English (ASCII range). OK
      > 4. Then I type Esc (going into command-mode) and start a search
      > using the slash operator
      > /whatever
      >
      > Problem: After the slash operator, the "whatever" comes out in
      > Deseret Alphabet, as if "myownkeymap"
      > were still active.
      >
      > Looks like a bug to me, but correct me as necessary.
      >
      > Thanks,
      >
      > Ken

      1) Does your status line show the current keymap when active? I think it ought
      to, but if it doesn't, you may want to add a custom status line with %k in it.
      Mine is

      if has("statusline")
      set statusline=%<%f\ %h%m%r%=%k[%{(&fenc\ ==\
      \"\"?&enc:&fenc).(&bomb?\",BOM\":\"\")}]\ %-12.(%l,%c%V%)\ %P
      endif

      (in case your mailer or mine added a spurious line break, this is 3 lines: if,
      set, endif)

      2) Setting the lCursor highlight in your homemade keymap (before the
      "loadkeymap" line) may help you see when keymaps are active (by default, the
      cursor uses the Cursor highlights when keymaps aren't active, lCursor when
      they are).

      3) If keymaps are active in Normal mode, you can toggle them by means of the
      'iminsert' option (which is a Number, not a Boolean option):

      :nmap <F8> :let &imi = ! &imi<CR>
      :map! <F8> <C-^>

      (I originally set up the above mappings for my own use because I don't know
      if, and by which key, my Belgian keyboard can produce a Ctrl-^ keycode. I
      added the nmap because of the argument of Normal-mode r etc.)


      Best regards,
      Tony.
      --
      The Soviet pre-eminence in chess can be traced to the average Russian's
      readiness to brood obsessively over anything, even the arrangement of
      some pieces of wood. Indeed, the Russians' predisposition for quiet
      reflection followed by sudden preventive action explains why they led
      the field for many years in both chess and ax murders. It is well
      known that as early as 1970, the U.S.S.R., aware of what a defeat at
      Reykjavik would do to national prestige, implemented a vigorous program
      of preparation and incentive. Every day for an entire year, a team of
      psychologists, chess analysts and coaches met with the top three
      Russian grand masters and threatened them with a pointy stick. That
      these tactics proved fruitless is now a part of chess history and a
      further testament to the American way, which provides that if you want
      something badly enough, you can always go to Iceland and get it from
      the Russians.
      -- Marshall Brickman, Playboy, April, 1973


      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_multibyte" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Show all 4 messages in this topic