Am 04.08.2013 05:29, schrieb Ron Aaron:
On Saturday, August 3, 2013 10:57:29 PM UTC+3, Bram Moolenaar wrote:

It appears you expect lmap's to be remappable.  If you look at the output of
":lmap" you can see they are listed with a star, which means they are not
remappable.

No, I expect that if I map "'" to something, then that mapping will be
in effect even if I change the keymap.

I expect that an insert-mode mapping operates on the inserted
character, in this case "'".  It does not (or rather it does but not
when an lmap is active), which is counter-intuitive.  I think I am not
alone in being surprised by this (and I've been using vim for a
really, really long time... I just rarely use "imap")

At the least, it seems to me that there needs to be a way to have
"imap" work as expected when there is an active "lmap".

Yes.  Old discussion comes up again.
Try attached patch.
(note ff=dos)
(not sure if it can be applied to current sources, but it's very short).

It makes :loadkeymap use :lmap instead of :lnoremap.  For over a year I
didn't get an endless loop with it.  And I don't expect endless loops,
because lmaps are remapped to imaps (rather than lmaps).

--
Andy

--
--
You received this message from the "vim_dev" 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_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


*** vim-7.3.393\src\digraph.c	Wed Jan 04 16:37:58 2012
--- src\digraph.c	Sat Jan 07 12:57:13 2012
***************
*** 2481,2494 ****
      }
  
      /*
!      * setup ":lnoremap" to map the keys
       */
      for (i = 0; i < curbuf->b_kmap_ga.ga_len; ++i)
      {
  	vim_snprintf((char *)buf, sizeof(buf), "<buffer> %s %s",
  				((kmap_T *)curbuf->b_kmap_ga.ga_data)[i].from,
  				 ((kmap_T *)curbuf->b_kmap_ga.ga_data)[i].to);
! 	(void)do_map(2, buf, LANGMAP, FALSE);
      }
  
      p_cpo = save_cpo;
--- 2481,2494 ----
      }
  
      /*
!      * setup ":lmap" to map the keys
       */
      for (i = 0; i < curbuf->b_kmap_ga.ga_len; ++i)
      {
  	vim_snprintf((char *)buf, sizeof(buf), "<buffer> %s %s",
  				((kmap_T *)curbuf->b_kmap_ga.ga_data)[i].from,
  				 ((kmap_T *)curbuf->b_kmap_ga.ga_data)[i].to);
! 	(void)do_map(0, buf, LANGMAP, FALSE);
      }
  
      p_cpo = save_cpo;

Raspunde prin e-mail lui