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.


Comments:

Yury V. Zaytsev - Oct 4, 2011

There is a plugin for it: http://www.vim.org/scripts/script.php?script_id=98 older version comes together with vim.

David Hrbáč - Oct 4, 2011

Thanks, did not know.

rpm  vim