こうですか (> <)
au BufWritePre * call s:change_last_mod_date() function! s:change_last_mod_date() let lineno = line(".") let colno = col(".") :1 let language = v:lc_time execute ':silent! language time C' let time = '" Last Modified: ' . strftime("%d %b %Y") " 同じだったらなにもしない if !search(time , '' , 5) try execute '1,5s/" Last Modified:.*/' . time . '/' catch endtry endif execute ':silent! language time ' . language call cursor(lineno , colno) endfunction