annotate runtime/doc/pi_spec.txt @ 14543:e716a0dc84f2

Added tag v8.1.0284 for changeset 116a01c73fd81f7054aeb99a7bc6798a3a368444
author Christian Brabandt <cb@256bit.org>
date Tue, 14 Aug 2018 18:30:06 +0200
parents 2f7e67dd088c
children af69c9335223
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
13963
1174611ad715 Vim 8.1 release
Christian Brabandt <cb@256bit.org>
parents: 10198
diff changeset
1 *pi_spec.txt* For Vim version 8.1. Last change: 2006 Apr 24
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 by Gustavo Niemeyer ~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 This is a filetype plugin to work with rpm spec files.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 Currently, this Vim plugin allows you to easily update the %changelog
237
73354c21f1e4 updated for version 7.0066
vimboss
parents: 7
diff changeset
8 section in RPM spec files. It will even create a section for you if it
73354c21f1e4 updated for version 7.0066
vimboss
parents: 7
diff changeset
9 doesn't exist yet. If you've already inserted an entry today, it will
73354c21f1e4 updated for version 7.0066
vimboss
parents: 7
diff changeset
10 give you the opportunity to just add a new item in today's entry. If you
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 don't provide a format string (|spec_chglog_format|), it'll ask you an
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 email address and build a format string by itself.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 1. How to use it |spec-how-to-use-it|
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 2. Customizing |spec-customizing|
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 ==============================================================================
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 1. How to use it *spec-how-to-use-it*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 The spec_chglog plugin provides a map like the following:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 :map <buffer> <LocalLeader>c <Plug>SpecChangelog
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 It means that you may run the plugin inside a spec file by pressing
237
73354c21f1e4 updated for version 7.0066
vimboss
parents: 7
diff changeset
25 your maplocalleader key (default is '\') plus 'c'. If you do not have
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 |spec_chglog_format| set, the plugin will ask you for an email address
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 to use in this edit session.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28
541
3e19ea54eb07 updated for version 7.0153
vimboss
parents: 237
diff changeset
29 Every time you run the plugin, it will check to see if the last entry in the
3e19ea54eb07 updated for version 7.0153
vimboss
parents: 237
diff changeset
30 changelog has been written today and by you. If the entry matches, it will
3e19ea54eb07 updated for version 7.0153
vimboss
parents: 237
diff changeset
31 just insert a new changelog item, otherwise it will create a new changelog
3e19ea54eb07 updated for version 7.0153
vimboss
parents: 237
diff changeset
32 entry. If you are running with |spec_chglog_release_info| enabled, it will
3e19ea54eb07 updated for version 7.0153
vimboss
parents: 237
diff changeset
33 also check if the name, version and release matches. The plugin is smart
3e19ea54eb07 updated for version 7.0153
vimboss
parents: 237
diff changeset
34 enough to ask you if it should update the package release, if you have not
3e19ea54eb07 updated for version 7.0153
vimboss
parents: 237
diff changeset
35 done so.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 Setting a map *spec-setting-a-map*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 -------------
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 As you should know, you can easily set a map to access any Vim command (or
237
73354c21f1e4 updated for version 7.0066
vimboss
parents: 7
diff changeset
41 anything, for that matter). If you don't like the default map of
73354c21f1e4 updated for version 7.0066
vimboss
parents: 7
diff changeset
42 <LocalLeader>c, you may just set up your own key. The following line
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 shows you how you could do this in your .vimrc file, mapping the plugin to
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 the <F5> key:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 au FileType spec map <buffer> <F5> <Plug>SpecChangelog
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 Note: the plugin will respect your desire to change the default mapping
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 and won't set it.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 This command will add a map only in the spec file buffers.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 ==============================================================================
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 2. Customizing *spec-customizing*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 The format string *spec_chglog_format*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 -----------------
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59
237
73354c21f1e4 updated for version 7.0066
vimboss
parents: 7
diff changeset
60 You can easily customize how your spec file entry will look like. To do
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 this just set the variable "spec_chglog_format" in your .vimrc file like
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 this: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 let spec_chglog_format = "%a %b %d %Y My Name <my@email.com>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65
237
73354c21f1e4 updated for version 7.0066
vimboss
parents: 7
diff changeset
66 Note that "%a %b %d %Y" is the most used time format. If you don't provide
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 a format string, when you run the SpecChangelog command for the first
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 time, it will ask you an email address and build the |spec_chglog_format|
237
73354c21f1e4 updated for version 7.0066
vimboss
parents: 7
diff changeset
69 variable for you. This way, you will only need to provide your email
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 address once.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 To discover which format options you can use, take a look at the strftime()
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 function man page.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 Where to insert new items *spec_chglog_prepend*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 -------------------------
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 The plugin will usually insert new %changelog entry items (note that it's
237
73354c21f1e4 updated for version 7.0066
vimboss
parents: 7
diff changeset
79 not the entry itself) after the existing ones. If you set the
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 spec_chglog_prepend variable >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 let spec_chglog_prepend = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 it will insert new items before the existing ones.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 Inserting release info *spec_chglog_release_info*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 ----------------------
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 If you want, the plugin may automatically insert release information
237
73354c21f1e4 updated for version 7.0066
vimboss
parents: 7
diff changeset
90 on each changelog entry. One advantage of turning this feature on is
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 that it may control if the release has been updated after the last
237
73354c21f1e4 updated for version 7.0066
vimboss
parents: 7
diff changeset
92 change in the package or not. If you have not updated the package
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 version or release, it will ask you if it should update the package
237
73354c21f1e4 updated for version 7.0066
vimboss
parents: 7
diff changeset
94 release for you. To turn this feature on, just insert the following
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 code in your .vimrc: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 let spec_chglog_release_info = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 Then, the first item in your changelog entry will be something like: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 + name-1.0-1cl
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 If you don't like the release updating feature and don't want to answer
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104 "No" each time it detects an old release, you may disable it with >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106 let spec_chglog_never_increase_release = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109 Good luck!!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110
14421
2f7e67dd088c Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13963
diff changeset
111 vim:tw=78:ts=8:noet:ft=help:norl: