VIM macro to add changelog entry within spec file

Editing spec files is somewhat time-consuming repetitive task. It’s good to add a change log entry every time you rebuild srpm package. One can do it typing it all over the times. Someone can use the maco. I do use this one:

nmap ,cl /%changelog<CR>:r!date +'\%a \%b \%d \%Y'<CR>0i* <ESC>$a David Hrbáč <my@email.tld> -

Simply add this line to you .vimrc file.


Yury V. Zaytsev - Oct 4, 2011

There is a plugin for it: older version comes together with vim.

David Hrbáč - Oct 4, 2011

Thanks, did not know.

rpm  vim