Permalink
Browse files

Changed :function endings: :endfun instead of :endf/:endfu

Changed :if endings: :endif always, no :end
  • Loading branch information...
1 parent 5781f5d commit f147736a00f26802de34a1222d491f7be7884646 @ZyX-I ZyX-I committed Oct 28, 2012
@@ -124,7 +124,7 @@ fun! FastGlob(glob)
" let exclude = a:exclude_pattern == ''? '' : ' | grep -v -e '.shellescape(a:exclude_pattern)
" let cmd .= exclude
return system(cmd)
-endf
+endfun
noremap \go :exec 'e '. fnameescape(tlib#input#List('s','select file', split(FastGlob(input('glob pattern, curr dir:','**/*')),"\n") ))<cr>
" sometimes when using tags the list is too long. filtering it by library or
@@ -133,7 +133,7 @@ noremap \go :exec 'e '. fnameescape(tlib#input#List('s','select file', split(Fas
let tag = eval(tlib#input#List('s','select tag', map(taglist(a:regex), 'string([v:val.kind, v:val.filename, v:val.cmd])')))
exec 'e '.fnameescape(tag[1])
exec tag[2]
- endf
+ endfun
command!-nargs=1 TJump call SelectTag(<f-args>)
" }}}
@@ -147,7 +147,7 @@ fun! sample_vimrc_for_new_users#Load()
" no code. If this function is called this file is sourced
" As alternative this can be used:
" runtime autoload/sample_vimrc_for_new_users.vim
-endf
+endfun
" create directory for files before Vim tries writing them:
augroup CREATE_MISSING_DIR_ON_BUF_WRITE
@@ -24,11 +24,11 @@ fun! scriptmanager#Activate(...) abort
let g:vim_addon_manager=g:vim_script_manager
endif
call call(function('vam#ActivateAddons'),a:000)
-endf
+endfun
fun! scriptmanager#DefineAndBind(...)
echoe "fix your code!, scriptmanager#DefineAndBind was renamed to vam#DefineAndBind(. Drop this function to find the usage location faster!"
return call(function('vam#DefineAndBind'),a:000)
-endf
+endfun
" vim: sts=2 et sw=2
View
@@ -8,7 +8,7 @@
" anyway
fun! vam#DefineAndBind(local,global,default)
return 'if !exists('.string(a:global).') | let '.a:global.' = '.a:default.' | endif | let '.a:local.' = '.a:global
-endf
+endfun
" assign g:os
@@ -90,7 +90,7 @@ fun! vam#VerifyIsJSON(s)
" adds missing addon information to work
let scalarless_body = substitute(a:s, '\v\"%(\\.|[^"\\])*\"|\''%(\''{2}|[^''])*\''|true|false|null|[+-]?\d+%(\.\d+%([Ee][+-]?\d+)?)?', '', 'g')
return scalarless_body !~# "[^,:{}[\\] \t]"
-endf
+endfun
" use join so that you can break the dict into multiple lines. This makes
" reading it much easier
@@ -114,7 +114,7 @@ fun! vam#ReadAddonInfo(path)
return {}
endif
-endf
+endfun
fun! vam#DefaultPluginDirFromName(name)
" this function maps addon names to their storage location. \/: are replaced
@@ -123,11 +123,11 @@ fun! vam#DefaultPluginDirFromName(name)
endfun
fun! vam#PluginDirFromName(...)
return call(s:c.plugin_dir_by_name, a:000, {})
-endf
+endfun
fun! vam#PluginRuntimePath(name)
let info = vam#AddonInfo(a:name)
return vam#PluginDirFromName(a:name).(has_key(info, 'runtimepath') ? '/'.info['runtimepath'] : '')
-endf
+endfun
" adding VAM, so that its contained in list passed to :UpdateActivatedAddons
if filewritable(vam#PluginDirFromName('vim-addon-manager'))==2
@@ -151,15 +151,15 @@ fun! vam#IsPluginInstalled(name)
return isdirectory(d)
\ && (!isdirectory(d.'/archive')
\ || !empty(glob(fnameescape(d).'/archive/*', 1)))
-endf
+endfun
" {} if file doesn't exist
fun! vam#AddonInfo(name)
let infoFile = vam#AddonInfoFile(a:name)
return filereadable(infoFile)
\ ? vam#ReadAddonInfo(infoFile)
\ : {}
-endf
+endfun
" opts: {
@@ -211,10 +211,10 @@ fun! vam#ActivateRecursively(list_of_names, ...)
\ (' as it was specified by user.'):
\ ("\n as it was requested by ".
\ join(opts.requested_by, "\n which was requested by ").'.')))
- end
+ endif
endif
endfor
-endf
+endfun
let s:top_level = 0
" see also ActivateRecursively
@@ -278,7 +278,7 @@ fun! vam#ActivateAddons(...) abort
call filter(to_be_activated, 'index(g:vam_plugin_whitelist, v:key) != -1 || has_key(are_dependencies, v:key)')
call filter(path_plugins, 'has_key(to_be_activated, v:val)')
call filter(new_runtime_paths, 'has_key(path_plugins, v:val)')
- end
+ endif
" deferred tasks:
" - add addons to runtimepath
" - add source plugin/**/*.vim files in case Activate was called long
@@ -351,7 +351,7 @@ fun! vam#DisplayAddonInfoLines(name, repository)
call add(lines, key.': '.string(repository[key]))
endfor
return lines
-endf
+endfun
fun! vam#DisplayAddonInfo(name)
let repository = get(g:vim_addon_manager['plugin_sources'], a:name, {})
@@ -365,7 +365,7 @@ fun! vam#DisplayAddonInfo(name)
let repository = get(values(dict), 0, {})
let name = keys(dict)[0]
endif
- end
+ endif
if empty(repository)
echo "Invalid plugin name: " . a:name
return
@@ -380,13 +380,13 @@ fun! vam#DisplayAddonsInfo(names)
for name in a:names
call vam#DisplayAddonInfo(name)
endfor
-endf
+endfun
fun! vam#SourceFiles(fs)
for file in a:fs
exec 'source '.fnameescape(file)
endfor
-endf
+endfun
" FIXME won't list hidden files as well
if v:version>703 || (v:version==703 && has('patch465'))
@@ -405,11 +405,11 @@ endfun
fun! vam#GlobThenSource(glob)
if s:c.dont_source | return | endif
call vam#SourceFiles(vam#GlobList(a:glob))
-endf
+endfun
augroup VIM_PLUGIN_MANAGER
autocmd VimEnter * call vam#SourceMissingPlugins()
-augroup end
+augroup END
" taken from tlib
fun! vam#OutputAsList(command) "{{{3
@@ -418,7 +418,7 @@ fun! vam#OutputAsList(command) "{{{3
silent! exec a:command
redir END
return split(lines, '\n')
-endf
+endfun
" hack: Vim sources plugin files after sourcing .vimrc
" Vim doesn't source the after/plugin/*.vim files in other runtime
@@ -438,7 +438,7 @@ fun! vam#SourceMissingPlugins()
let scriptnames = map(vam#OutputAsList('scriptnames'), 'v:val[(stridx(v:val,":")+2):-1]')
call filter(fs, 'index(scriptnames, v:val) == -1')
call vam#SourceFiles(fs)
-endf
+endfun
fun! vam#AddonInfoFile(name)
" history:
@@ -517,11 +517,11 @@ command! -nargs=* -bar -complete=customlist,vam#install#UninstallCompletion Unin
command! -nargs=* -complete=customlist,vam#bisect#BisectCompletion AddonsBisect :call vam#bisect#Bisect(<f-args>)
-function! s:RunInstallHooks(plugins)
+fun! s:RunInstallHooks(plugins)
for name in a:plugins
call vam#install#RunHook('post-install', vam#AddonInfo(name), vam#install#GetRepo(name, {}), vam#PluginDirFromName(name), {})
endfor
-endfunction
+endfun
command! -nargs=+ -complete=customlist,vam#install#InstalledAddonCompletion RunInstallHooks :call s:RunInstallHooks([<f-args>])
View
@@ -30,7 +30,7 @@ fun! vam#bisect#StepBad(vim, plain, addons, vimrc_tmp) abort
else
throw "You used neither OKVAMBisect nor BADVAMBisect to exit vim!"
endif
-endf
+endfun
" ... must be cache
fun! vam#bisect#List(vim_executable, skip_initial, addons, force_addons, ...) abort
@@ -67,7 +67,7 @@ fun! vam#bisect#List(vim_executable, skip_initial, addons, force_addons, ...) ab
else
let cache.bisect_plain_result = {'problem_found': 0, 'message': 'Problem was not found - nothing left to test. Are you sure you have a problem?'}
return cache.bisect_plain_result
- end
+ endif
endif
if len(addons) == 1
@@ -116,7 +116,7 @@ fun! vam#bisect#List(vim_executable, skip_initial, addons, force_addons, ...) ab
" let r = vam#bisect#Bisect(a:vim_executable, left_half, right_half)
endif
endif
-endf
+endfun
" argument1: ['vim'] or ['gvim','--nofork']
" rerun vim bisecting the plugin list to find out which plugin might be
@@ -135,11 +135,11 @@ fun! vam#bisect#Bisect(...)
endtry
let g:vim_addon_bisect_result = r
call vam#Log(r.message)
-endf
+endfun
fun! vam#bisect#BisectCompletion(A, L, P, ...)
let list = ['vim','gvim']
return list
-endf
+endfun
" vim: et ts=8 sts=2 sw=2
View
@@ -53,7 +53,7 @@ fun! vam#install#CheckPoolItem(key, i)
if url =~ '^http' | call vam#Log("pool item ".url.": should not be using http:// for consistency. If you need http see MyGitCheckout example") | endif
if url =~ '\.git$' | call vam#Log('pool item '.url.': github urls also work without .git suffix. Drop if for copy paste and consistency reasons') | endif
endif
-endf
+endfun
fun! vam#install#RewriteName(name)
if a:name[:6]==#'github:'
@@ -155,7 +155,7 @@ fun! vam#install#RunHook(hook, info, repository, pluginDir, opts)
\'%i', 'a:info', 'g'),
\'%o', 'a:opts', 'g')
endif
-endfu
+endfun
" opts: same as ActivateAddons
fun! vam#install#Install(toBeInstalledList, ...)
@@ -233,7 +233,7 @@ fun! vam#install#Install(toBeInstalledList, ...)
let installed += [name]
endfor
return installed
-endf
+endfun
fun! vam#install#CreatePatch(info, repository, pluginDir, hook_opts)
let a:hook_opts.diff_do_diff=(s:c.do_diff && executable('diff'))
@@ -378,7 +378,7 @@ fun! vam#install#UpdateAddon(name)
call vam#Log( "Not updating plugin ".a:name." because there is no version according to version key")
endif
return 'up-to-date'
-endf
+endfun
fun! vam#install#Update(list)
let list = a:list
@@ -412,7 +412,7 @@ fun! vam#install#Update(list)
for [k,v] in items(by_reply)
call vam#Log(get(labels,k,k).' '.string(by_reply[k]).".", k is# 'failed' ? 'WarningMsg' : 'Type')
endfor
-endf
+endfun
" completion {{{
@@ -434,7 +434,7 @@ fun! vam#install#KnownAddons(type)
endfor
endif
return sort(keys(k))
-endf
+endfun
" Filters:
" 1. Start of the name must be the same as completed name
@@ -523,23 +523,23 @@ endfun
fun! vam#install#AddonCompletion(...)
return call('vam#install#DoCompletion',a:000)
-endf
+endfun
fun! vam#install#NotInstalledAddonCompletion(...)
return call('vam#install#DoCompletion',a:000+["notinstalled"])
-endf
+endfun
fun! vam#install#InstalledAddonCompletion(...)
return call('vam#install#DoCompletion',a:000+["installed"])
-endf
+endfun
fun! vam#install#UninstallCompletion(...)
return call('vam#install#DoCompletion',a:000+["notloaded"])
-endf
+endfun
fun! vam#install#UpdateCompletion(...)
return call('vam#install#DoCompletion',a:000+["installed"])
-endf
+endfun
"}}}
fun! vam#install#UninstallAddons(list)
@@ -552,12 +552,12 @@ fun! vam#install#UninstallAddons(list)
if s:confirm('Will now remove '.join(list, ', ').'. Confirm?')
call map(list, 'vam#utils#RmFR(v:val)')
endif
-endf
+endfun
fun! vam#install#HelpTags(name)
let d=vam#PluginDirFromName(a:name).'/doc'
if isdirectory(d) | exec 'helptags '.fnameescape(d) | endif
-endf
+endfun
" basename of url. if archive_name is given use that instead
fun! vam#install#ArchiveNameFromDict(repository)
@@ -566,7 +566,7 @@ fun! vam#install#ArchiveNameFromDict(repository)
let archiveName = fnamemodify(a:repository['url'],':t')
endif
return archiveName
-endf
+endfun
" may throw EXCEPTION_UNPACK
@@ -615,7 +615,7 @@ endfun
fun! vam#install#MergeTarget()
return split(&runtimepath,",")[0].'/after/plugin/vim-addon-manager-merged.vim'
-endf
+endfun
" if you machine is under IO load starting up Vim can take some time
" This function tries to optimize this by reading all the plugin/*.vim
@@ -737,7 +737,7 @@ fun! vam#install#MergePluginFiles(plugins, skip_pattern)
if !isdirectory(d) | call mkdir(d,'p') | endif
call writefile(split(all_contents,"\n"), target)
-endf
+endfun
fun! vam#install#UnmergePluginFiles()
let path = fnamemodify(vam#PluginRuntimePath('vim-addon-manager'),':h')
@@ -804,7 +804,7 @@ fun! vam#install#LoadPool(...)
let s:c.pool_loaded = 1
endif
-endf
+endfun
"}}}1
@@ -858,7 +858,7 @@ if g:is_win
"let _7zurl = 'mirror://sourceforge/sevenzip/7-Zip/4.65/7z465.exe'
"call vam#utils#DownloadFromMirrors(_7zurl, s:c['binary_utils'].'/7z.exe')
- endf
+ endfun
endif
fun! vam#install#ShowShortLog(info, repository, pluginDir, hook_opts)
@@ -873,6 +873,6 @@ fun! vam#install#ShowShortLog(info, repository, pluginDir, hook_opts)
\matchstr(a:hook_opts.newVersion, "[^ \t\r\n]*")], get(c, 2, {})),
\'Normal')
endif
-endf
+endfun
" vim: et ts=8 sts=2 sw=2
Oops, something went wrong.

0 comments on commit f147736

Please sign in to comment.