annotate runtime/doc/pi_spec.txt @ 7362:16c67ab8eafd v7.4.986

commit https://github.com/vim/vim/commit/da9888a3f0118ce1ce5acbdcf4720602c2de2a3b Author: Bram Moolenaar <Bram@vim.org> Date: Mon Dec 28 21:35:14 2015 +0100 patch 7.4.986 Problem: Test49 doesn't work on MS-Windows. test70 is listed twice. Solution: Move test49 to the group not used on Amiga and MS-Windows. Remove test70 from SCRIPTS_WIN32.
author Christian Brabandt <cb@256bit.org>
date Mon, 28 Dec 2015 21:45:04 +0100
parents 359743c1f59a
children 9f48eab77d62
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5294
359743c1f59a release version 7.4
Bram Moolenaar <bram@vim.org>
parents: 5247
diff changeset
1 *pi_spec.txt* For Vim version 7.4. 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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111 vim:tw=78:ts=8:ft=help:norl: