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

"'sukolyn' via vim_use" <[email protected]>
Newsgroups gmane.editors.vim
Message-ID <[email protected]>
Le 09/03/2025 à 09:49, Christian Brabandt a écrit :
> On Sun, 09 Mar 2025, 'sukolyn' via vim_use wrote:
>
>> how could I make update recorded only if I write to file?
> You may want to use a BufWritePre autocommand instead.
>
> Thanks,
> Christian

that's it. thank you.

: au BufWritePre * if (&ft == "html" || &ft=="xhtml") | exe 
'g/http-equiv="last-modified"/s/content=".*/content="'.strftime("%Y-%m-%d 
%T").'">' | endif

-- 
-- 
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/6658f9f8-5c4c-425d-a461-d8ba24a1c336%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.