update last-modified, but record changes only if :w

"'sukolyn' via vim_use" <[email protected]>
Newsgroups gmane.editors.vim
Message-ID <[email protected]>


hi,

I catched this little code to update last-modified content in HTML files

: au FileType x*html
:    \ exe 
'g/http-equiv="last-modified"/s/content=".*/content="'.strftime("%Y-%m-%d 
%T").'">'

the problem is this happens even I don't record file (:w), and so date 
changes even there are no changes.
this doesn't make much sense, does it? :)

how could I make update recorded only if I write to file?

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

--- 
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/vim_use/fd90bf08-1c1d-4f20-a84e-7152407e5ac9%40rocketmail.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.