Saturday, October 30, 2010

Why does smap and vmap behave different then imap and map

Hi

I have mapping like

:map <F9> :w<CR>:make<CR>:clist<CR>


With set makeprog set correctly
(which is ":set makeprg=vcom\ -work\
C:\\projects\\iic_slave_pa_top_a0\\modelsim\\work\
-2002\ -explicit\ %")

this show my compiler output, and at the end vim says:
Press Enter to continue (in green colors)

This is the way I want it in normal mode.
When I'm in insert mode I have the mapping:
:imap <F9> <esc><F9>
Same correct behaviour.

Now I want to make this also work when I'm in select-mode or visual-mode.
I thouht that this would then work, but it doesn't
:smap <F9> <esc><F9>
:vmap <F9> <esc><F9>

The compiler output is then shown very quickly in the clist window, it
show the "Press enter to continue" message but it doens't wait on a
Enter. In stead, the clist window is closed again.

Removing the last <CR> on the original mapping after the clist is also
not correct, because then it waits on a enter to start clist.

Why?

Rgds,
Jeri

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

No comments: