I should add that I know it's possible to do maps based on the CmdwinEnter 
autocommand, but here's an example where this is useful. I have a map to delete 
a history entry from the command line window. The way to do that now is to have 
several autocommands to modify the map with which type of history it should 
delete from like this:

    autocmd CmdwinEnter : nnoremap DD :call histdel(':', ...
    autocmd CmdwinEnter / nnoremap DD :call histdel('/', ...
    autocmd CmdwinEnter @ nnoremap DD :call histdel('@', ...
    etc.


 This function removes the need for that autocommand completely in this case, 
allowing:

    nnoremap DD :call histdel(getcmdwintype(), ...

-- 
-- 
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/d/optout.

Raspunde prin e-mail lui