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.

This entry was posted in rpm, vim. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

2 Comments

  1. Yury V. Zaytsev
    Posted 13 October 2011 at 14:49 | Permalink

    There is a plugin for it:

    http://www.vim.org/scripts/script.php?script_id=98

    older version comes together with vim.

  2. David Hrbáč
    Posted 13 October 2011 at 14:58 | Permalink

    Thanks, did not know.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">