Втр, 06 Июл 2010, Jürgen Krämer писал(а):
>
> Hi,
>
> bill lam wrote:
> > Not sure if this is related to updating vim this morning
> > I used to have this (simplified) setting in ~/.vimrc
> >
> > if has("autocmd")
> > augroup misc_autocmd
> > au!
> > "Automatically remove trailing whitespace.
> > autocmd BufWriteCmd *.txt,*.h,*.c :if ! &bin | silent! %s/\s\+$//ge |
> > endif
> > augroup END
> > endif
> >
> > it works until this morning, that open any *.txt file , make some
> > changes, then w! , it appears works but e! will bring back the old
> > content, and it keep complaining when attemp to switch to another
> > buffer because content is not saved.
>
> are you sure this really worked? If you set up a BufWriteCmd autocommand
> it's the responsibility of this command to do the writing of the file
> (see :help BufWriteCmd). In your simplified example I don't see code for
> saving the file.
>
Yes, it worked until yesterday before upgrading vim. IIRC previously
bufwritepre did not work so that I used bufwritecmd instead, Now the
behaviour reversed. May be the developer who fixed this vim bug can
pin point the patch number.
--
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.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php