will, i have maped key <a-d> in a script like this:
map <a-d> <c-\><c-n>a<c-r>=func()<cr>
and func will change text in the buffer, and change the mode, i want
it change to normal mode, so i return "\<c-\>\<c-n>" in func, but the
action is very strange: when i'm in normal mode, it's very good, but i
mustly use it in select mode, in select mode, this map didn't exit the
select mode. some times it just in select mode, and some times it will
make Vim suspend, if i press any key, will see this in cmdline:
=\\^\
and, if i change the map to:
map <a-d> <c-\><c-n>a<c-r>="\<lt>c-\>\<lt>c-n>"<cr>
it won't suspend the Vim, but can't exit select mode, neither.

i just want to know how can i change the map, or the return value,
makes func can control the mode affer invoke mapping.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to