Home Explore Blog CI



neovim

1st chunk of `runtime/doc/pi_spec.txt`
0360d9f43b3de0d7f1e2d69c953fc72146765f0fe814747d00000001000008b7
*pi_spec.txt*   Nvim

by Gustavo Niemeyer ~

This is a filetype plugin to work with rpm spec files.

Currently, this Vim plugin allows you to easily update the %changelog
section in RPM spec files.  It will even create a section for you if it
doesn't exist yet.  If you've already inserted an entry today, it will
give you the opportunity to just add a new item in today's entry.  If you
don't provide a format string (|spec_chglog_format|), it'll ask you an
email address and build a format string by itself.

1. How to use it	|spec-how-to-use-it|
2. Customizing		|spec-customizing|

==============================================================================
1. How to use it				*spec-how-to-use-it*

The spec_chglog plugin provides a map like the following:

	:map <buffer> <LocalLeader>c <Plug>SpecChangelog

It means that you may run the plugin inside a spec file by pressing
your maplocalleader key (default is '\') plus 'c'.  If you do not have
|spec_chglog_format| set, the plugin will ask you for an email address
to use in this edit session.

Every time you run the plugin, it will check to see if the last entry in the
changelog has been written today and by you.  If the entry matches, it will
just insert a new changelog item, otherwise it will create a new changelog
entry.  If you are running with |spec_chglog_release_info| enabled, it will
also check if the name, version and release matches.  The plugin is smart
enough to ask you if it should update the package release, if you have not
done so.

------------------------------------------------------------------------------
Setting a map					*spec-setting-a-map*

As you should know, you can easily set a map to access any Vim command (or
anything, for that matter).  If you don't like the default map of
<LocalLeader>c, you may just set up your own key.  The following line
shows you how you could do this in your vimrc file, mapping the plugin to
the <F5> key:

	au FileType spec map <buffer> <F5> <Plug>SpecChangelog

Note: the plugin will respect your desire to change the default mapping
      and won't set it.

This command will add a map only in the spec file buffers.


==============================================================================

Title: RPM Spec File Plugin for Vim: Changelog Management and Usage
Summary
This Vim plugin simplifies updating the %changelog section in RPM spec files. It automatically creates the section if it's missing, and smartly adds new items to existing entries or creates new entries based on the date and author. The plugin is invoked using a map, defaulting to `<LocalLeader>c`, and can be customized. If `spec_chglog_format` is not set, the plugin prompts for an email address to build the format string. The plugin respects custom key mappings set by the user.