On Wed 6-Dec-06 12:55am -0600, Peter Hodge wrote: > --- 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.
> 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] I repeated this starting with a file name "file": gvim -u NONE -i NONE -N file Here I see what appears to be a cosmetic bug. I am seeing: i iiii @IIII <buffer> v vvvv @VVVV The line was not first cleared. > :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.) Here I see: No mapping found No mapping found -- Best regards, Bill