annotate runtime/ftplugin/debchangelog.vim @ 258:f93df7322443

updated for version 7.0070
author vimboss
date Sat, 23 Apr 2005 20:52:00 +0000
parents 3fc0f57ecb91
children 66080ac5dab7
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim filetype plugin file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: Debian Changelog
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Michael Piefel <piefel@informatik.hu-berlin.de>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " Last Change: 23 March 2004
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 if exists("g:did_changelog_ftplugin")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 " Don't load another plugin (this is global)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 let g:did_changelog_ftplugin = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 " Helper functions returning various data.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 " Returns full name, either from $DEBFULLNAME or debianfullname.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 " TODO Is there a way to determine name from anywhere else?
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 function <SID>FullName()
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 if exists("$DEBFULLNAME")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 return $DEBFULLNAME
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 elseif exists("g:debianfullname")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 return g:debianfullname
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 return "Your Name"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 endfunction
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 " Returns email address, from $DEBEMAIL, $EMAIL or debianemail.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 function <SID>Email()
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 if exists("$DEBEMAIL")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 return $DEBEMAIL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 elseif exists("$EMAIL")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 return $EMAIL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 elseif exists("g:debianemail")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 return g:debianfullemail
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 return "your@email.address"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 endfunction
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 " Returns date in RFC822 format.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 function <SID>Date()
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 let savelang = v:lc_time
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 execute "language time C"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 let dateandtime = strftime("%a, %d %b %Y %X %z")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 execute "language time " . savelang
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 return dateandtime
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 endfunction
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 function <SID>WarnIfNotUnfinalised()
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 if match(getline("."), " -- [[:alpha:]][[:alnum:].]")!=-1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 echohl WarningMsg
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 echo "The entry has not been unfinalised before editing."
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 echohl None
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 return 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 return 0
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 endfunction
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 function <SID>Finalised()
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 let savelinenum = line(".")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 normal 1G
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 call search("^ -- ")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 if match(getline("."), " -- [[:alpha:]][[:alnum:].]")!=-1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 let returnvalue = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 let returnvalue = 0
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 execute savelinenum
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 return returnvalue
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 endfunction
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 " These functions implement the menus
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 function NewVersion()
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 " The new entry is unfinalised and shall be changed
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 amenu disable Changelog.New\ Version
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 amenu enable Changelog.Add\ Entry
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 amenu enable Changelog.Close\ Bug
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 amenu enable Changelog.Set\ Distribution
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 amenu enable Changelog.Set\ Urgency
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 amenu disable Changelog.Unfinalise
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 amenu enable Changelog.Finalise
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 call append(0, substitute(getline(1),'-\([[:digit:]]\+\))', '-Ü\1)', ''))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 call append(1, "")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 call append(2, "")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 call append(3, " -- ")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 call append(4, "")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 call Distribution("unstable")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 call Urgency("low")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 normal 1G
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 call search(")")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 normal h
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 normal 
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 call setline(1, substitute(getline(1),'-Ü\([[:digit:]]\+\))', '-\1)', ''))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 call AddEntry()
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 endfunction
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 function AddEntry()
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 normal 1G
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 call search("^ -- ")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 normal kk
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 call append(".", " * ")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 normal jjj
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 let warn=<SID>WarnIfNotUnfinalised()
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 normal kk
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104 if warn
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 echohl MoreMsg
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106 call input("Hit ENTER")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107 echohl None
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109 startinsert!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110 endfunction
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112 function CloseBug()
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113 normal 1G
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114 call search("^ -- ")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115 let warn=<SID>WarnIfNotUnfinalised()
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116 normal kk
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
117 call append(".", " * (closes: #" . input("Bug number to close: ") . ")")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118 normal j^ll
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119 startinsert
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120 endfunction
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
121
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122 function Distribution(dist)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
123 call setline(1, substitute(getline(1), ") [[:lower:] ]*;", ") " . a:dist . ";", ""))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
124 endfunction
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
125
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
126 function Urgency(urg)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
127 call setline(1, substitute(getline(1), "urgency=.*$", "urgency=" . a:urg, ""))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
128 endfunction
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
129
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
130 function <SID>UnfinaliseMenu()
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
131 " This means the entry shall be changed
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
132 amenu disable Changelog.New\ Version
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
133 amenu enable Changelog.Add\ Entry
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
134 amenu enable Changelog.Close\ Bug
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
135 amenu enable Changelog.Set\ Distribution
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
136 amenu enable Changelog.Set\ Urgency
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
137 amenu disable Changelog.Unfinalise
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
138 amenu enable Changelog.Finalise
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
139 endfunction
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
140
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
141 function Unfinalise()
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
142 call <SID>UnfinaliseMenu()
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
143 normal 1G
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
144 call search("^ -- ")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
145 call setline(".", " -- ")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
146 endfunction
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
147
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
148 function <SID>FinaliseMenu()
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
149 " This means the entry should not be changed anymore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
150 amenu enable Changelog.New\ Version
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
151 amenu disable Changelog.Add\ Entry
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
152 amenu disable Changelog.Close\ Bug
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
153 amenu disable Changelog.Set\ Distribution
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
154 amenu disable Changelog.Set\ Urgency
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
155 amenu enable Changelog.Unfinalise
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
156 amenu disable Changelog.Finalise
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
157 endfunction
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
158
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
159 function Finalise()
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
160 call <SID>FinaliseMenu()
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
161 normal 1G
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
162 call search("^ -- ")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
163 call setline(".", " -- " . <SID>FullName() . " <" . <SID>Email() . "> " . <SID>Date())
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
164 endfunction
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
165
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
166
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
167 function <SID>MakeMenu()
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
168 amenu &Changelog.&New\ Version :call NewVersion()<CR>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
169 amenu Changelog.&Add\ Entry :call AddEntry()<CR>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
170 amenu Changelog.&Close\ Bug :call CloseBug()<CR>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
171 menu Changelog.-sep- <nul>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
172
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
173 amenu Changelog.Set\ &Distribution.&unstable :call Distribution("unstable")<CR>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
174 amenu Changelog.Set\ Distribution.&frozen :call Distribution("frozen")<CR>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
175 amenu Changelog.Set\ Distribution.&stable :call Distribution("stable")<CR>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
176 menu Changelog.Set\ Distribution.-sep- <nul>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
177 amenu Changelog.Set\ Distribution.frozen\ unstable :call Distribution("frozen unstable")<CR>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
178 amenu Changelog.Set\ Distribution.stable\ unstable :call Distribution("stable unstable")<CR>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
179 amenu Changelog.Set\ Distribution.stable\ frozen :call Distribution("stable frozen")<CR>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
180 amenu Changelog.Set\ Distribution.stable\ frozen\ unstable :call Distribution("stable frozen unstable")<CR>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
181
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
182 amenu Changelog.Set\ &Urgency.&low :call Urgency("low")<CR>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
183 amenu Changelog.Set\ Urgency.&medium :call Urgency("medium")<CR>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
184 amenu Changelog.Set\ Urgency.&high :call Urgency("high")<CR>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
185
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
186 menu Changelog.-sep- <nul>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
187 amenu Changelog.U&nfinalise :call Unfinalise()<CR>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
188 amenu Changelog.&Finalise :call Finalise()<CR>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
189
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
190 if <SID>Finalised()
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
191 call <SID>FinaliseMenu()
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
192 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
193 call <SID>UnfinaliseMenu()
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
194 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
195 endfunction
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
196
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
197 augroup changelogMenu
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
198 au BufEnter * if &filetype == "debchangelog" | call <SID>MakeMenu() | endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
199 au BufLeave * if &filetype == "debchangelog" | aunmenu Changelog | endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
200 augroup END
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
201
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
202 " Debian changelogs are not supposed to have any other text width,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
203 " so the user cannot override this setting
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
204 setlocal tw=78
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
205 setlocal comments=f:*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
206 let b:undo_ftplugin = "setlocal tw< comments<"