11
11
" Organization:
12
12
" Version: see variable g:Templates_Version below
13
13
" Created: 30.08.2011
14
- " Revision: 14.04.2017
15
- " License: Copyright (c) 2012-2016 , Wolfgang Mehner
14
+ " Revision: 06.08.2020
15
+ " License: Copyright (c) 2012-2020 , Wolfgang Mehner
16
16
" This program is free software; you can redistribute it and/or
17
17
" modify it under the terms of the GNU General Public License as
18
18
" published by the Free Software Foundation, version 2 of the
23
23
" PURPOSE.
24
24
" See the GNU General Public License version 2 for more details.
25
25
" ===============================================================================
26
- "
26
+
27
27
" -------------------------------------------------------------------------------
28
28
" === Basic Checks === {{{1
29
29
" -------------------------------------------------------------------------------
30
- "
30
+
31
31
" need at least 7.0
32
32
if v: version < 700
33
33
echohl WarningMsg
34
34
echo ' The plugin templates.vim needs Vim version >= 7.'
35
35
echohl None
36
36
finish
37
37
endif
38
- "
38
+
39
39
" prevent duplicate loading
40
40
" need compatible
41
41
if &cp || ( exists (' g:Templates_Version' ) && g: Templates_Version != ' searching' && ! exists (' g:Templates_DevelopmentOverwrite' ) )
42
42
finish
43
43
endif
44
- "
45
- let s: Templates_Version = ' 1.1alpha ' " version number of this script; do not change
46
- "
44
+
45
+ let s: Templates_Version = ' 1.1beta ' " version number of this script; do not change
46
+
47
47
" ----------------------------------------------------------------------
48
48
" --- Find Newest Version --- {{{2
49
49
" ----------------------------------------------------------------------
@@ -133,13 +133,13 @@ else
133
133
endif
134
134
" }}}2
135
135
" -------------------------------------------------------------------------------
136
- "
136
+
137
137
let g: Templates_Version = s: Templates_Version " version number of this script; do not change
138
- "
138
+
139
139
" ----------------------------------------------------------------------
140
140
" === Modul Setup === {{{1
141
141
" ----------------------------------------------------------------------
142
- "
142
+
143
143
" -------------------------------------------------------------------------------
144
144
" s:ApplyDefaultSetting : Write default setting to a global variable. {{{2
145
145
"
@@ -152,13 +152,13 @@ let g:Templates_Version = s:Templates_Version " version number of this scrip
152
152
" If g:<varname> does not exists, assign:
153
153
" g:<varname> = value
154
154
" -------------------------------------------------------------------------------
155
- "
155
+
156
156
function ! s: ApplyDefaultSetting ( varname, value )
157
- if ! exists ( ' g:' .a: varname )
158
- let { ' g:' .a: varname } = a: value
157
+ if ! exists ( ' g:' .a: varname )
158
+ let {' g:' .a: varname } = a: value
159
159
endif
160
- endfunction " ---------- end of function s:ApplyDefaultSetting ----------
161
- "
160
+ endfunction
161
+
162
162
" -------------------------------------------------------------------------------
163
163
" s:GetGlobalSetting : Get a setting from a global variable. {{{2
164
164
"
@@ -175,20 +175,20 @@ endfunction " ---------- end of function s:ApplyDefaultSetting ----------
175
175
" g:<varname> == 0 -> s:<varname> = "no"
176
176
" otherwise -> s:<varname> = "yes"
177
177
" -------------------------------------------------------------------------------
178
- "
178
+
179
179
function ! s: GetGlobalSetting ( varname, ... )
180
- if a: 0 > 0 && a: 1 == ' bin' && exists ( ' g:' .a: varname ) && type ( 0 ) == type ( { ' g:' .a: varname } )
181
- let { ' s:' .a: varname } = { ' g:' .a: varname } == 0 ? ' no' : ' yes'
182
- elseif exists ( ' g:' .a: varname )
183
- let { ' s:' .a: varname } = { ' g:' .a: varname }
180
+ if a: 0 > 0 && a: 1 == ' bin' && exists ( ' g:' .a: varname ) && type ( 0 ) == type ( {' g:' .a: varname } )
181
+ let {' s:' .a: varname } = {' g:' .a: varname } == 0 ? ' no' : ' yes'
182
+ elseif exists ( ' g:' .a: varname )
183
+ let {' s:' .a: varname } = {' g:' .a: varname }
184
184
endif
185
- "
186
- let s: Templates_AllSettings [ a: varname ] = { ' s:' .a: varname }
187
- endfunction " ---------- end of function s:GetGlobalSetting ----------
188
- "
185
+
186
+ let s: Templates_AllSettings [ a: varname ] = {' s:' .a: varname }
187
+ endfunction
188
+
189
189
" }}}2
190
190
" -------------------------------------------------------------------------------
191
- "
191
+
192
192
" platform specifics
193
193
let s: MSWIN = has (" win16" ) || has (" win32" ) || has (" win64" ) || has (" win95" )
194
194
let s: UNIX = has (" unix" ) || has (" macunix" ) || has (" win32unix" )
0 commit comments