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.

Regards,
Jürgen

-- 
Sometimes I think the surest sign that intelligent life exists elsewhere
in the universe is that none of it has tried to contact us.     (Calvin)

-- 
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

Reply via email to