@@ -183,7 +183,7 @@ function! s:GetGlobalSetting ( varname, ... )
183183 let { ' s:' .a: varname } = { ' g:' .a: varname }
184184 endif
185185 "
186- let s: Templates_AllSettings [ a: varname ] = { ' s:' .a: varname }
186+ let s: Templates_AllSettings [a: varname ] = { ' s:' .a: varname }
187187endfunction " ---------- end of function s:GetGlobalSetting ----------
188188"
189189" }}}2
@@ -309,11 +309,11 @@ let s:StandardProperties = {
309309"
310310let s: TypeNames = [ ' ' , ' ' , ' ' , ' ' , ' ' , ' ' ]
311311"
312- let s: TypeNames [ type (0 ) ] = ' i' " integer
313- let s: TypeNames [ type (" " ) ] = ' s' " string
314- let s: TypeNames [ type ([]) ] = ' l' " list
315- let s: TypeNames [ type ({}) ] = ' d' " dict
316- " let s:TypeNames[ type(0.0) ] = 'n' " number
312+ let s: TypeNames [type (0 )] = ' i' " integer
313+ let s: TypeNames [type (" " )] = ' s' " string
314+ let s: TypeNames [type ([])] = ' l' " list
315+ let s: TypeNames [type ({})] = ' d' " dict
316+ " let s:TypeNames[type(0.0)] = 'n' " number
317317" TODO: why does float not work in some cases?
318318" not important right now.
319319"
@@ -958,7 +958,7 @@ function! s:AddList ( type, name, settings, lines )
958958 end
959959 endif
960960 "
961- let s: library .resources[ ' list!' .a: name ] = list
961+ let s: library .resources[' list!' .a: name ] = list
962962 "
963963endfunction " ---------- end of function s:AddList ----------
964964"
@@ -991,7 +991,7 @@ function! s:AddTemplate ( type, name, settings, lines )
991991 "
992992 if has_key ( s: library .templates, name.' !!type' )
993993 let my_type = a: type
994- let other_type = s: library .templates[ name.' !!type' ].type
994+ let other_type = s: library .templates[name.' !!type' ].type
995995 "
996996 if my_type != other_type
997997 if my_type == ' t'
@@ -1006,12 +1006,12 @@ function! s:AddTemplate ( type, name, settings, lines )
10061006 " --------------------------------------------------
10071007 " new template
10081008 " --------------------------------------------------
1009- let s: library .templates[ name.' !!type' ] = {
1009+ let s: library .templates[name.' !!type' ] = {
10101010 \ ' type' : a: type ,
10111011 \ ' placement' : ' below' ,
10121012 \ ' indentation' : 1 ,
10131013 \ }
1014- let s: library .templates[ name.' !!menu' ] = {
1014+ let s: library .templates[name.' !!menu' ] = {
10151015 \ ' filetypes' : s: t_runtime .use_filetypes,
10161016 \ ' visual' : match ( a: lines , ' <SPLIT>\|<SHIFT>' ) >= 0 ,
10171017 \ ' map' : ' ' ,
@@ -1026,7 +1026,7 @@ function! s:AddTemplate ( type, name, settings, lines )
10261026 "
10271027 " TODO: review this
10281028 if a: type == ' help'
1029- let s: library .templates[ name.' !!type' ].placement = ' help'
1029+ let s: library .templates[name.' !!type' ].placement = ' help'
10301030 endif
10311031 "
10321032 call add ( s: library .menu_order, name )
@@ -1037,8 +1037,8 @@ function! s:AddTemplate ( type, name, settings, lines )
10371037 " settings
10381038 " --------------------------------------------------
10391039 "
1040- let templ_type = s: library .templates[ name.' !!type' ]
1041- let templ_menu = s: library .templates[ name.' !!menu' ]
1040+ let templ_type = s: library .templates[name.' !!type' ]
1041+ let templ_menu = s: library .templates[name.' !!menu' ]
10421042 "
10431043 for s in a: settings
10441044 "
@@ -1117,10 +1117,10 @@ function! s:AddTemplate ( type, name, settings, lines )
11171117 if s: t_runtime .overwrite_warning && has_key ( s: library .templates, name.' !default' )
11181118 call s: ErrorMsg ( ' Warning: Overwriting a help template: "' .name.' "' )
11191119 endif
1120- let s: library .templates[ name.' !default' ] = a: lines
1120+ let s: library .templates[name.' !default' ] = a: lines
11211121 return
11221122 elseif empty ( s: t_runtime .use_styles )
1123- let styles = [ ' default' ]
1123+ let styles = [' default' ]
11241124 else
11251125 let styles = s: t_runtime .use_styles
11261126 endif
@@ -1133,7 +1133,7 @@ function! s:AddTemplate ( type, name, settings, lines )
11331133 call s: ErrorMsg ( ' Warning: Overwriting style in template "' .name.' ": "' .s .' "' )
11341134 endif
11351135 "
1136- let s: library .templates[ name.' !' .s ] = a: lines
1136+ let s: library .templates[name.' !' .s ] = a: lines
11371137 "
11381138 endfor
11391139 "
@@ -1172,8 +1172,8 @@ function! s:AddSeparator ( type, name, settings )
11721172 endif
11731173 else
11741174 "
1175- let s: library .templates[ name.' !!type' ] = { ' type' : ' sep' , }
1176- let s: library .templates[ name.' !!menu' ] = { ' entry' : 11 , }
1175+ let s: library .templates[name.' !!type' ] = { ' type' : ' sep' , }
1176+ let s: library .templates[name.' !!menu' ] = { ' entry' : 11 , }
11771177 "
11781178 call add ( s: library .menu_order, name )
11791179 "
@@ -1468,7 +1468,7 @@ function! s:SetFormat ( name, replacement )
14681468 endtry
14691469 endif
14701470
1471- let s: library .macros[ a: name ] = a: replacement
1471+ let s: library .macros[a: name ] = a: replacement
14721472
14731473endfunction " ---------- end of function s:SetFormat ----------
14741474"
@@ -1487,7 +1487,7 @@ function! s:SetMacro ( name, replacement )
14871487 return
14881488 endif
14891489 "
1490- let s: library .macros[ a: name ] = a: replacement
1490+ let s: library .macros[a: name ] = a: replacement
14911491 "
14921492endfunction " ---------- end of function s:SetMacro ----------
14931493"
@@ -1537,7 +1537,7 @@ function! s:MenuShortcut ( name, shortcut )
15371537 "
15381538 let name = substitute ( a: name , ' \.$' , ' ' , ' ' )
15391539 "
1540- let s: library .menu_shortcuts[ name ] = a: shortcut
1540+ let s: library .menu_shortcuts[name] = a: shortcut
15411541 "
15421542endfunction " ---------- end of function s:MenuShortcut ----------
15431543"
@@ -2532,7 +2532,7 @@ function! s:CheckStdTempl ( cmds, text, calls )
25322532 call s: ErrorMsg ( ' The special macro "' .m_name.' " can not be replaced via |?' .m_name.' |.' )
25332533 elseif ! has_key ( prompted, m_name )
25342534 let cmds .= " Prompt(" .string (m_name)." ," .string (m_flag[1 :])." )\n "
2535- let prompted[ m_name ] = 1
2535+ let prompted[m_name] = 1
25362536 endif
25372537 "
25382538 endwhile
@@ -2642,7 +2642,7 @@ function! s:CheckTemplate ( template, type )
26422642 let mlist = matchlist ( a: template [ idx : idx_n ], regex.FunctionLine )
26432643 "
26442644 " no match or 'Comment' or 'Insert' function?
2645- if empty ( mlist ) || mlist[ 2 ] = ~ regex.TextBlockFunctions
2645+ if empty ( mlist ) || mlist[2 ] = ~ regex.TextBlockFunctions
26462646 break
26472647 endif
26482648 "
@@ -2731,7 +2731,7 @@ function! s:GetTemplate ( name, style )
27312731 else
27322732 let template = " |C()|\n " .cmds." |T()|\n " .text
27332733 end
2734- let s: library .templates[ a: name .' !' .style ] = template
2734+ let s: library .templates[a: name .' !' .style] = template
27352735 "
27362736 end
27372737 "
@@ -2957,7 +2957,7 @@ function! s:PrepareStdTempl ( cmds, text, name )
29572957 "
29582958 if ! has_key ( m_local, m_name )
29592959 let revert = ' call remove ( m_local, "' .m_name.' " ) | ' .revert
2960- let m_local[ m_name ] = m_text
2960+ let m_local[m_name] = m_text
29612961 endif
29622962 "
29632963 elseif f_name == ' PickFile'
@@ -3097,8 +3097,8 @@ function! s:PrepareStdTempl ( cmds, text, name )
30973097 let m_text = s: ApplyFlag ( m_text, m_flag, ' ' , 0 )
30983098 "
30993099 " save the result
3100- let m_global[ m_name ] = m_text
3101- let prompted[ m_name ] = 1
3100+ let m_global[m_name] = m_text
3101+ let prompted[m_name] = 1
31023102 endif
31033103 else
31043104 break
@@ -3311,7 +3311,7 @@ function! s:PrepareTemplate ( name, ... )
33113311 else
33123312 let revert = ' call remove ( m_local, "' .m_name.' " ) | ' .revert
33133313 endif
3314- let m_local[ m_name ] = a: [i + 1 ]
3314+ let m_local[m_name] = a: [i + 1 ]
33153315 let i += 2
33163316 elseif a: [i ] = ~ ' <CURSOR>\|{CURSOR}'
33173317 let remove_cursor = 0
@@ -3399,25 +3399,25 @@ endfunction " ---------- end of function s:PrepareTemplate ----------
33993399
34003400function ! s: RenewStdMacros ( to_list, from_list )
34013401
3402- let a: to_list [ ' BASENAME' ] = expand ( ' %:t:r' )
3403- let a: to_list [ ' FILENAME' ] = expand ( ' %:t' )
3404- let a: to_list [ ' PATH' ] = expand ( ' %:p:h' )
3405- let a: to_list [ ' SUFFIX' ] = expand ( ' %:e' )
3402+ let a: to_list [' BASENAME' ] = expand ( ' %:t:r' )
3403+ let a: to_list [' FILENAME' ] = expand ( ' %:t' )
3404+ let a: to_list [' PATH' ] = expand ( ' %:p:h' )
3405+ let a: to_list [' SUFFIX' ] = expand ( ' %:e' )
34063406
34073407 if a: from_list [ ' TIME_LOCALE' ] != ' '
34083408 let save_time_lang = v: lc_time
34093409 silent exe ' language time ' .a: from_list [ ' TIME_LOCALE' ]
34103410 endif
34113411
3412- let a: to_list [ ' DATE' ] = strftime ( a: from_list [ ' DATE' ] )
3413- let a: to_list [ ' DATE_PRETTY' ] = strftime ( a: from_list [ ' DATE_PRETTY' ] )
3414- let a: to_list [ ' DATE_PRETTY1' ] = strftime ( a: from_list [ ' DATE_PRETTY1' ] )
3415- let a: to_list [ ' DATE_PRETTY2' ] = strftime ( a: from_list [ ' DATE_PRETTY2' ] )
3416- let a: to_list [ ' DATE_PRETTY3' ] = strftime ( a: from_list [ ' DATE_PRETTY3' ] )
3417- let a: to_list [ ' TIME' ] = strftime ( a: from_list [ ' TIME' ] )
3418- let a: to_list [ ' TIME_PRETTY' ] = strftime ( a: from_list [ ' TIME_PRETTY' ] )
3419- let a: to_list [ ' YEAR' ] = strftime ( a: from_list [ ' YEAR' ] )
3420- let a: to_list [ ' YEAR_PRETTY' ] = strftime ( a: from_list [ ' YEAR_PRETTY' ] )
3412+ let a: to_list [' DATE' ] = strftime ( a: from_list [ ' DATE' ] )
3413+ let a: to_list [' DATE_PRETTY' ] = strftime ( a: from_list [ ' DATE_PRETTY' ] )
3414+ let a: to_list [' DATE_PRETTY1' ] = strftime ( a: from_list [ ' DATE_PRETTY1' ] )
3415+ let a: to_list [' DATE_PRETTY2' ] = strftime ( a: from_list [ ' DATE_PRETTY2' ] )
3416+ let a: to_list [' DATE_PRETTY3' ] = strftime ( a: from_list [ ' DATE_PRETTY3' ] )
3417+ let a: to_list [' TIME' ] = strftime ( a: from_list [ ' TIME' ] )
3418+ let a: to_list [' TIME_PRETTY' ] = strftime ( a: from_list [ ' TIME_PRETTY' ] )
3419+ let a: to_list [' YEAR' ] = strftime ( a: from_list [ ' YEAR' ] )
3420+ let a: to_list [' YEAR_PRETTY' ] = strftime ( a: from_list [ ' YEAR_PRETTY' ] )
34213421
34223422 if a: from_list [ ' TIME_LOCALE' ] != ' '
34233423 silent exe ' language time ' .save_time_lang
@@ -3778,7 +3778,7 @@ function! mmtemplates#core#InsertTemplate ( library, t_name, ... ) range
37783778 let i += 3
37793779 elseif a: [i ] = ~ regex.MacroMatch && i + 1 <= a: 0
37803780 let name = matchlist ( a: [i ], regex.MacroNameC )[1 ]
3781- let s: t_runtime .macros[ name ] = a: [i + 1 ]
3781+ let s: t_runtime .macros[name] = a: [i + 1 ]
37823782 let i += 2
37833783 elseif a: [i ] == ' pick' && i + 1 <= a: 0
37843784 call add ( options , ' pick' )
@@ -4015,7 +4015,7 @@ function! mmtemplates#core#CreateMaps ( library, localleader, ... )
40154015 if has_key ( g: CheckedFiletypes , &filetype )
40164016 let echo_warning = 0
40174017 else
4018- let g: CheckedFiletypes [ &filetype ] = 1
4018+ let g: CheckedFiletypes [&filetype ] = 1
40194019 let echo_warning = s: Templates_MapInUseWarn == ' yes'
40204020 endif
40214021 "
@@ -4200,7 +4200,7 @@ function! s:CreateSubmenu ( menu, priority )
42004200 if ! has_key ( s: library .menu_existing, submenu.clean )
42014201 " a new menu!
42024202 " (the key is the menu name, it has to be correctly escaped)
4203- let s: library .menu_existing[ submenu.clean ] = 0
4203+ let s: library .menu_existing[submenu.clean] = 0
42044204 "
42054205 " shortcut and menu entry
42064206 let tname = substitute ( submenu.clean, ' \\\(.\)' , ' \1' , ' g' )
@@ -4355,7 +4355,7 @@ function! s:CreateTemplateMenus ( )
43554355 endif
43564356 "
43574357 let sep_nr = s: library .menu_existing[ m_key ] + 1
4358- let s: library .menu_existing[ m_key ] = sep_nr
4358+ let s: library .menu_existing[m_key] = sep_nr
43594359 "
43604360 exe ' anoremenu ' .s: t_runtime .root_menu.escape ( t_menu, ' ' ).' -TSep' .sep_nr.' - :'
43614361 "
@@ -4609,7 +4609,7 @@ function! mmtemplates#core#CreateMenus ( library, root_menu, ... )
46094609 if t_lib.api_version < 1000000
46104610 let t_lib.menu_existing[ escape ( name, ' ' ) ] = 0
46114611 else
4612- let t_lib.menu_existing[ name ] = 0
4612+ let t_lib.menu_existing[name] = 0
46134613 endif
46144614 endfor
46154615 "
@@ -4847,7 +4847,7 @@ function! mmtemplates#core#Resource ( library, mode, ... )
48474847 if type ( value ) != type ( ' ' )
48484848 return [ ' ' , ' Argument "value" must be given as a string.' ]
48494849 else
4850- let t_lib.properties[ key ] = value
4850+ let t_lib.properties[key ] = value
48514851 return [ ' ' , ' ' ]
48524852 endif
48534853 "
@@ -4896,19 +4896,19 @@ function! mmtemplates#core#Resource ( library, mode, ... )
48964896 let value = a: 3
48974897 "
48984898 " check type and set
4899- if types[ resource ] == ' '
4899+ if types[resource] == ' '
49004900 return [ ' ' , ' Resource "' .a: 1 .' " can not be set.' ]
49014901 elseif s: TypeNames [ type ( value ) ] !~ types[ resource ]
49024902 return [ ' ' , ' Argument "value" has the wrong type.' ]
49034903 elseif resource == ' list'
4904- let t_lib.resources[ ' list!' .key ] = value
4904+ let t_lib.resources[' list!' .key ] = value
49054905 elseif resource == ' macro'
4906- let t_lib.macros[ key ] = value
4906+ let t_lib.macros[key ] = value
49074907 elseif resource == ' path'
4908- let t_lib.resources[ ' path!' .key ] = fnamemodify ( expand ( value ), " :p" )
4908+ let t_lib.resources[' path!' .key ] = fnamemodify ( expand ( value ), " :p" )
49094909 elseif resource == ' property'
49104910 if has_key ( t_lib.properties, key )
4911- let t_lib.properties[ key ] = value
4911+ let t_lib.properties[key ] = value
49124912 return [ ' ' , ' ' ]
49134913 else
49144914 return [ ' ' , ' Property "' .key .' " does not exist.' ]
@@ -5179,7 +5179,7 @@ function! mmtemplates#core#FindPersonalizationFile ( library )
51795179 " do the job
51805180 " ==================================================
51815181 "
5182- if t_lib.properties[ ' Templates::UsePersonalizationFile' ] == ' no'
5182+ if t_lib.properties[' Templates::UsePersonalizationFile' ] == ' no'
51835183 return ' '
51845184 endif
51855185 "
0 commit comments