On Thu, 03 Sep 2009, Hari Krishna Dara wrote:
> 
> On Thu, Sep 3, 2009 at 8:41 PM, bill lam<[email protected]> wrote:
> >
> > This is supposed to remove trailing spaces using autocmd
> >
> >  autocmd BufRead,BufWrite * if ! &bin | silent! %s/\s\+$//ge | endif
> >
> > However if I changed it into
> >
> >  autocmd BufWrite * if ! &bin | silent! %s/\s\+$//ge | endif
> >
> > adding some trailing spaces and then :w or :x
> > it appeared that those trailing spaces are still there. Any idea
> > what's going wrong?

I can't spot any mistake, but then I haven't tried it myself. I

I found that BufWrite event is triggered when press :w or :x but
BufWriteCmd event is triggered instead. Not sure what is the
difference of these 2 events.

-- 
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to