--- Alan G Isaac <[EMAIL PROTECTED]> wrote: > > Quoting from :h :bd :: > > Actually, the buffer isn't completely deleted, it is > removed from the buffer list |unlisted-buffer| and > option values, variables and mappings/abbreviations > for the buffer are cleared. >
Hello, I can confirm that using ':bd' on a buffer *will* remove a buffer-local 'imap' but *will not* remove a buffer-local 'vmap' for that buffer. To test, open any file in Vim, and execute these commands: :imap <buffer> iiii IIII :vmap <buffer> vvvv VVVV :imap <buffer> | vmap <buffer> [you should see that two mappings are defined for the buffer] :bd :b1 you have just 'deleted' the buffer and reloaded it, which should have cleared both the imap and the vmap for that buffer. :imap <buffer> | vmap <buffer> You will see that the 'vmap' still remains. (I haven't checked what other types of mappings might also survive a ':bd' command.) regards, Peter Send instant messages to your online friends http://au.messenger.yahoo.com
