:help FileWritePre
дает подсказку:
FileWritePre Before writing to a file, when not writing the whole buffer.
Правильное событие autocmd для обычных :write
s BufWritePre
:
BufWrite or BufWritePre Before writing the whole buffer to a file.
Вот мой файл vimrc:
set nocompatible filetype on function Dateinsert() $read !date endfunction :autocmd FileWritePre * :call Dateinsert()
Я ожидал вставить метку времени каждый раз при записи в файл. Но это никогда не работает. Как я могу это исправить?
:help FileWritePre
дает подсказку:
FileWritePre Before writing to a file, when not writing the whole buffer.
Правильное событие autocmd для обычных :write
s BufWritePre
:
BufWrite or BufWritePre Before writing the whole buffer to a file.