1
0
mirror of https://github.com/amix/vimrc synced 2025-07-13 14:46:48 +08:00

Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Mirosław Pragłowski
2014-10-13 21:54:40 +02:00
266 changed files with 11284 additions and 3954 deletions

View File

@ -3,8 +3,8 @@
" @Website: http://www.vim.org/account/profile.php?user_id=4037
" @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
" @Created: 2008-11-25.
" @Last Change: 2014-01-23.
" @Revision: 0.0.108
" @Last Change: 2014-06-02.
" @Revision: 0.0.109
let s:prototype = tlib#Object#New({'_class': ['Filter_cnf'], 'name': 'cnf'}) "{{{2
let s:prototype.highlight = g:tlib#input#higroup
@ -57,28 +57,6 @@ function! s:prototype.AssessName(world, name) dict "{{{3
elseif a:name =~ '\A'. flt .'\|'. flt .'\A'
let xa += 1
endif
" if a:name =~ '\^'. flt .'\|'. flt .'\$'
" let xa += 4
" elseif a:name =~ '\<'. flt .'\|'. flt .'\>'
" let xa += 3
" " elseif a:name =~ flt .'\>'
" " let xa += 2
" elseif a:name =~ '\A'. flt .'\|'. flt .'\A'
" let xa += 1
" endif
" if flt[0] =~# '\u' && matchstr(a:name, '\V\.\ze'. flt) =~# '\U'
" let xa += 1
" endif
" if flt[0] =~# '\U' && matchstr(a:name, '\V\.\ze'. flt) =~# '\u'
" let xa += 1
" endif
" if flt[-1] =~# '\u' && matchstr(a:name, '\V'. flt .'\zs\.') =~# '\U'
" let xa += 1
" endif
" if flt[-1] =~# '\U' && matchstr(a:name, '\V'. flt .'\zs\.') =~# '\u'
" let xa += 1
" endif
endfor
" TLogVAR a:name, xa
return xa

View File

@ -1,7 +1,7 @@
" @Author: Tom Link (micathom AT gmail com?subject=[vim])
" @Website: http://www.vim.org/account/profile.php?user_id=4037
" @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
" @Revision: 1389
" @Revision: 1393
" :filedoc:
" A prototype used by |tlib#input#List|.
@ -500,6 +500,7 @@ function! s:prototype.SetPrefIdx() dict "{{{3
let pref_idx = -1
let pref_weight = -1
" TLogVAR self.filter_pos, self.filter_neg
" let t0 = localtime() " DBG
for idx in range(1, self.llen)
let item = self.GetItem(idx)
let weight = self.matcher.AssessName(self, item)
@ -509,6 +510,7 @@ function! s:prototype.SetPrefIdx() dict "{{{3
let pref_weight = weight
endif
endfor
" TLogVAR localtime() - t0
" TLogVAR pref_idx
" TLogDBG self.GetItem(pref_idx)
if pref_idx == -1
@ -985,7 +987,7 @@ function! s:prototype.DisplayHelp() dict "{{{3
endif
if stridx(self.type, 'm') != -1
call self.PushHelp('<S-Up/Down>', '(Un)Select items')
call self.PushHelp('#, <C-Space>', '(Un)Select the current item')
call self.PushHelp('#', '(Un)Select the current item')
call self.PushHelp('<C|M-a>', '(Un)Select all items')
call self.PushHelp('<F9>', '(Un)Restrict view to selection')
" \ '<c-\> ... Show only selected',

View File

@ -1,15 +1,8 @@
" arg.vim
" @Author: Tom Link (micathom AT gmail com?subject=[vim])
" @Website: http://www.vim.org/account/profile.php?user_id=4037
" @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
" @Created: 2007-06-30.
" @Last Change: 2009-02-15.
" @Revision: 0.0.50
if &cp || exists("loaded_tlib_arg_autoload")
finish
endif
let loaded_tlib_arg_autoload = 1
" @Last Change: 2014-07-01.
" @Revision: 63
" :def: function! tlib#arg#Get(n, var, ?default="", ?test='')
@ -50,32 +43,40 @@ function! tlib#arg#Key(list, ...) "{{{3
endf
" :def: function! tlib#arg#StringAsKeyArgs(string, ?keys=[], ?evaluate=0)
" :def: function! tlib#arg#StringAsKeyArgs(string, ?keys=[], ?evaluate=0, ?sep=':')
function! tlib#arg#StringAsKeyArgs(string, ...) "{{{1
TVarArg ['keys', {}], ['evaluate', 0]
TVarArg ['keys', {}], ['evaluate', 0], ['sep', ':']
let keyargs = {}
let args = split(a:string, '\\\@<! ')
let arglist = map(args, 'matchlist(v:val, ''^\(\w\+\):\(.*\)$'')')
let arglist = map(args, 'matchlist(v:val, ''^\%(\(\w\+\)'. sep .'\(.*\)\|\(.*\)\)$'')')
" TLogVAR a:string, args, arglist
let pos = 0
for matchlist in arglist
if len(matchlist) < 3
throw 'Malformed key arguments: '. string(matchlist) .' in '. a:string
endif
let [match, key, val; rest] = matchlist
if empty(keys) || has_key(keys, key)
let val = substitute(val, '\\\\', '\\', 'g')
if evaluate
let val = eval(val)
endif
let keyargs[key] = val
if !empty(matchlist[3])
let keyargs[pos] = matchlist[3]
let pos += 1
else
echom 'Unknown key: '. key .'='. val
let [match, key, val; rest] = matchlist
if empty(keys) || has_key(keys, key)
let val = substitute(val, '\\\\', '\\', 'g')
if evaluate
let val = eval(val)
endif
let keyargs[key] = val
else
echom 'Unknown key: '. key .'='. val
endif
endif
endfor
return keyargs
endf
function! tlib#arg#StringAsKeyArgsEqual(string) "{{{1
return tlib#arg#StringAsKeyArgs(a:string, [], 0, '=')
endf
""" Command line {{{1

View File

@ -4,7 +4,7 @@
" @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
" @Created: 2007-06-30.
" @Last Change: 2013-09-25.
" @Revision: 0.1.230
" @Revision: 0.1.243
" The cache directory. If empty, use |tlib#dir#MyRuntime|.'/cache'.
@ -88,7 +88,11 @@ function! tlib#cache#Filename(type, ...) "{{{3
" TLogVAR file, dir, mkdir
let cache_file = tlib#file#Join([dir, file])
if len(cache_file) > g:tlib#cache#max_filename
let shortfilename = pathshorten(file) .'_'. tlib#hash#Adler32(file)
if v:version >= 704
let shortfilename = pathshorten(file) .'_'. sha256(file)
else
let shortfilename = pathshorten(file) .'_'. tlib#hash#Adler32(file)
endif
let cache_file = tlib#cache#Filename(a:type, shortfilename, mkdir, dir0)
else
if mkdir && !isdirectory(dir)
@ -108,9 +112,32 @@ function! tlib#cache#Filename(type, ...) "{{{3
endf
let s:timestamps = {}
function! s:SetTimestamp(cfile, type) "{{{3
if !has_key(s:timestamps, a:cfile)
let s:timestamps[a:cfile] = {}
endif
let s:timestamps[a:cfile].atime = getftime(a:cfile)
let s:timestamps[a:cfile][a:type] = s:timestamps[a:cfile].atime
endf
function! tlib#cache#Save(cfile, dictionary) "{{{3
" TLogVAR a:cfile, a:dictionary
call tlib#persistent#Save(a:cfile, a:dictionary)
if !empty(a:cfile)
" TLogVAR a:dictionary
call writefile([string(a:dictionary)], a:cfile, 'b')
call s:SetTimestamp(a:cfile, 'write')
endif
endf
function! tlib#cache#MTime(cfile) "{{{3
let mtime = {'mtime': getftime(a:cfile)}
let mtime = extend(mtime, get(s:timestamps, a:cfile, {}))
return mtime
endf
@ -118,6 +145,7 @@ function! tlib#cache#Get(cfile, ...) "{{{3
call tlib#cache#MaybePurge()
if !empty(a:cfile) && filereadable(a:cfile)
let val = readfile(a:cfile, 'b')
call s:SetTimestamp(a:cfile, 'read')
return eval(join(val, "\n"))
else
let default = a:0 >= 1 ? a:1 : {}
@ -130,14 +158,9 @@ endf
" or does not exist, create it calling a generator function.
function! tlib#cache#Value(cfile, generator, ftime, ...) "{{{3
if !filereadable(a:cfile) || (a:ftime != 0 && getftime(a:cfile) < a:ftime)
if empty(a:generator) && a:0 >= 1
" TLogVAR a:1
let val = a:1
else
let args = a:0 >= 1 ? a:1 : []
" TLogVAR a:generator, args
let val = call(a:generator, args)
endif
let args = a:0 >= 1 ? a:1 : []
" TLogVAR a:generator, args
let val = call(a:generator, args)
" TLogVAR val
let cval = {'val': val}
" TLogVAR cval

View File

@ -3,8 +3,8 @@
" @Website: http://www.vim.org/account/profile.php?user_id=4037
" @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
" @Created: 2007-06-30.
" @Last Change: 2013-09-25.
" @Revision: 0.0.37
" @Last Change: 2014-07-07.
" @Revision: 0.0.38
if &cp || exists("loaded_tlib_dir_autoload")
finish
@ -21,10 +21,11 @@ let s:dir_stack = []
" tlib#dir#CanonicName('foo/bar')
" => 'foo/bar/'
function! tlib#dir#CanonicName(dirname) "{{{3
if a:dirname !~ '[/\\]$'
return a:dirname . g:tlib#dir#sep
let dirname = tlib#file#Canonic(a:dirname)
if dirname !~ '[/\\]$'
return dirname . g:tlib#dir#sep
endif
return a:dirname
return dirname
endf

View File

@ -3,8 +3,8 @@
" @Website: http://www.vim.org/account/profile.php?user_id=4037
" @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
" @Created: 2007-06-30.
" @Last Change: 2013-09-25.
" @Revision: 0.0.142
" @Last Change: 2014-07-07.
" @Revision: 0.0.150
if &cp || exists("loaded_tlib_file_autoload")
finish
@ -103,6 +103,25 @@ function! tlib#file#Absolute(filename, ...) "{{{3
endf
function! tlib#file#Canonic(filename, ...) "{{{3
TVarArg ['mode', '']
if a:filename =~ '^\\\\'
let mode = 'windows'
elseif a:filename =~ '^\(file\|ftp\|http\)s\?:'
let mode = 'url'
elseif (empty(mode) && g:tlib#sys#windows)
let mode = 'windows'
endif
let filename = a:filename
if mode == 'windows'
let filename = substitute(filename, '/', '\\', 'g')
else
let filename = substitute(filename, '\\', '/', 'g')
endif
return filename
endf
function! s:SetScrollBind(world) "{{{3
let sb = get(a:world, 'scrollbind', &scrollbind)
if sb != &scrollbind

View File

@ -1,7 +1,7 @@
" @Author: Tom Link (micathom AT gmail com?subject=[vim])
" @Website: http://www.vim.org/account/profile.php?user_id=4037
" @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
" @Revision: 1315
" @Revision: 1317
" :filedoc:
@ -325,6 +325,8 @@ function! tlib#input#ListW(world, ...) "{{{3
" TLogVAR world.state, world.sticky, world.initial_index
" let statusline = &l:statusline
" let laststatus = &laststatus
let showmode = &showmode
set noshowmode
let lastsearch = @/
let scrolloff = &l:scrolloff
let &l:scrolloff = 0
@ -779,6 +781,9 @@ function! tlib#input#ListW(world, ...) "{{{3
" TLogVAR statusline
" let &l:statusline = statusline
" let &laststatus = laststatus
if &showmode != showmode
let &showmode = showmode
endif
silent! let @/ = lastsearch
let &l:scrolloff = scrolloff
if s:PopupmenuExists() == 1

View File

@ -4,7 +4,7 @@
" @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
" @Created: 2007-06-30.
" @Last Change: 2011-03-18.
" @Revision: 36
" @Revision: 57
""" List related functions {{{1
@ -140,25 +140,41 @@ endf
function! tlib#list#Uniq(list, ...) "{{{3
TVarArg ['get_value', '']
let s:uniq_values = {}
TVarArg ['get_value', ''], ['remove_empty', 0]
if remove_empty
call filter(a:list, 'type(v:val) == 0 || !empty(v:val)')
endif
" CREDITS: Based on syntastic#util#unique(list) by scrooloose
let seen = {}
let uniques = []
if empty(get_value)
call filter(a:list, 's:UniqValue(v:val)')
for e in a:list
if !has_key(seen, e)
let seen[e] = 1
call add(uniques, e)
endif
endfor
else
call filter(a:list, 's:UniqValue(eval(printf(get_value, string(v:val))))')
for e in a:list
let v = eval(printf(get_value, string(e)))
if !has_key(seen, v)
let seen[v] = 1
call add(uniques, e)
endif
endfor
endif
unlet s:uniq_values
return a:list
return uniques
endf
function! s:UniqValue(value) "{{{3
if get(s:uniq_values, a:value, 0)
return 0
else
let s:uniq_values[a:value] = 1
return 1
endif
function! tlib#list#ToDictionary(list, default, ...) "{{{3
TVarArg ['generator', '']
let dict = {}
for item in a:list
if !empty(item)
let dict[item] = empty(generator) ? a:default : call(generator, [item, a:default])
endif
endfor
return dict
endf

View File

@ -3,7 +3,7 @@
" @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
" @Created: 2012-05-11.
" @Last Change: 2012-05-11.
" @Revision: 9
" @Revision: 12
" The directory for persistent data files. If empty, use
" |tlib#dir#MyRuntime|.'/share'.
@ -33,14 +33,15 @@ function! tlib#persistent#Get(...) "{{{3
return call('tlib#cache#Get', a:000)
endf
function! tlib#persistent#MTime(cfile) "{{{3
return tlib#cache#MTime(a:cfile)
endf
function! tlib#persistent#Value(...) "{{{3
return call('tlib#cache#Value', a:000)
endf
function! tlib#persistent#Save(cfile, dictionary) "{{{3
if !empty(a:cfile)
" TLogVAR a:dictionary
call writefile([string(a:dictionary)], a:cfile, 'b')
endif
call tlib#cache#Save(a:cfile, a:dictionary)
endf

View File

@ -4,7 +4,7 @@
" @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
" @Created: 2007-06-30.
" @Last Change: 2009-02-15.
" @Revision: 0.0.110
" @Revision: 0.0.115
if &cp || exists("loaded_tlib_string_autoload")
finish
@ -23,8 +23,10 @@ function! tlib#string#RemoveBackslashes(text, ...) "{{{3
endf
function! tlib#string#Chomp(string) "{{{3
return substitute(a:string, '[[:cntrl:][:space:]]*$', '', '')
" :display: tlib#string#Chomp(string, ?max=0)
function! tlib#string#Chomp(string, ...) "{{{3
let quant = a:0 >= 1 ? '\{,'. a:1 .'}' : '\+'
return substitute(a:string, '[[:cntrl:][:space:]]'. quant .'$', '', '')
endf

View File

@ -3,8 +3,8 @@
" @Website: http://www.vim.org/account/profile.php?user_id=4037
" @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
" @Created: 2007-06-30.
" @Last Change: 2009-02-15.
" @Revision: 0.0.23
" @Last Change: 2014-07-03.
" @Revision: 0.0.26
if &cp || exists("loaded_tlib_var_autoload")
finish
@ -58,10 +58,12 @@ endf
" echo tlib#var#Get('foo', 'bg') => 2
" echo tlib#var#Get('foo', 'wbg') => 3
function! tlib#var#Get(var, namespace, ...) "{{{3
let var_ = substitute(a:var, '#', '_', 'g')
for namespace in split(a:namespace, '\zs')
let var = namespace .':'. a:var
let vname = namespace == 'g' ? a:var : var_
let var = namespace .':'. vname
if exists(var)
return eval(var)
return {var}
endif
endfor
return a:0 >= 1 ? a:1 : ''

View File

@ -2,8 +2,8 @@
" @Author: Tom Link (mailto:micathom AT gmail com?subject=[vim])
" @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
" @Created: 2012-03-08.
" @Last Change: 2012-09-10.
" @Revision: 122
" @Last Change: 2014-07-01.
" @Revision: 131
" A dictionarie of supported VCS (currently: git, hg, svn, bzr).
@ -49,16 +49,21 @@ if !empty(g:tlib#vcs#check)
let g:tlib#vcs#executables[s:cmd] = executable(s:cmd1) ? s:cmd1 : ''
endif
endfor
unlet! s:cmd s:def s:cmd1
endif
function! tlib#vcs#Executable(type) "{{{3
return get(g:tlib#vcs#executables, a:type, '')
endf
function! tlib#vcs#FindVCS(filename) "{{{3
let type = ''
let dir = ''
" let path = escape(fnamemodify(a:filename, ':p'), ',:') .';'
let filename = fnamemodify(a:filename, isdirectory(a:filename) ? ':p:h' : ':p')
let path = escape(filename, ';') .';'
" TLogVAR a:filename, path
let dirname = fnamemodify(a:filename, isdirectory(a:filename) ? ':p' : ':p:h')
let path = escape(dirname, ';') .';'
" TLogVAR a:filename, dirname, path
let depth = -1
for vcs in keys(g:tlib#vcs#def)
let subdir = g:tlib#vcs#def[vcs].dir

View File

@ -52,6 +52,7 @@ Contents~
tlib#persistent#Dir .................... |tlib#persistent#Dir()|
tlib#persistent#Filename ............... |tlib#persistent#Filename()|
tlib#persistent#Get .................... |tlib#persistent#Get()|
tlib#persistent#MTime .................. |tlib#persistent#MTime()|
tlib#persistent#Value .................. |tlib#persistent#Value()|
tlib#persistent#Save ................... |tlib#persistent#Save()|
g:tlib#vim#simalt_maximize ............. |g:tlib#vim#simalt_maximize|
@ -76,6 +77,7 @@ Contents~
tlib#list#RemoveAll .................... |tlib#list#RemoveAll()|
tlib#list#Zip .......................... |tlib#list#Zip()|
tlib#list#Uniq ......................... |tlib#list#Uniq()|
tlib#list#ToDictionary ................. |tlib#list#ToDictionary()|
tlib#cmd#OutputAsList .................. |tlib#cmd#OutputAsList()|
tlib#cmd#BrowseOutput .................. |tlib#cmd#BrowseOutput()|
tlib#cmd#BrowseOutputWithCallback ...... |tlib#cmd#BrowseOutputWithCallback()|
@ -91,6 +93,7 @@ Contents~
g:tlib#vcs#def ......................... |g:tlib#vcs#def|
g:tlib#vcs#executables ................. |g:tlib#vcs#executables|
g:tlib#vcs#check ....................... |g:tlib#vcs#check|
tlib#vcs#Executable .................... |tlib#vcs#Executable()|
tlib#vcs#FindVCS ....................... |tlib#vcs#FindVCS()|
tlib#vcs#Ls ............................ |tlib#vcs#Ls()|
tlib#vcs#Diff .......................... |tlib#vcs#Diff()|
@ -116,6 +119,7 @@ Contents~
tlib#cache#Dir ......................... |tlib#cache#Dir()|
tlib#cache#Filename .................... |tlib#cache#Filename()|
tlib#cache#Save ........................ |tlib#cache#Save()|
tlib#cache#MTime ....................... |tlib#cache#MTime()|
tlib#cache#Get ......................... |tlib#cache#Get()|
tlib#cache#Value ....................... |tlib#cache#Value()|
tlib#cache#MaybePurge .................. |tlib#cache#MaybePurge()|
@ -237,7 +241,19 @@ Contents~
tlib#file#Join ......................... |tlib#file#Join()|
tlib#file#Relative ..................... |tlib#file#Relative()|
tlib#file#Absolute ..................... |tlib#file#Absolute()|
tlib#file#Canonic ...................... |tlib#file#Canonic()|
tlib#file#With ......................... |tlib#file#With()|
g:tlib#sys#windows ..................... |g:tlib#sys#windows|
g:tlib#sys#null ........................ |g:tlib#sys#null|
tlib#sys#IsExecutable .................. |tlib#sys#IsExecutable()|
g:tlib#sys#check_cygpath ............... |g:tlib#sys#check_cygpath|
g:tlib#sys#cygwin_path_rx .............. |g:tlib#sys#cygwin_path_rx|
g:tlib#sys#cygwin_expr ................. |g:tlib#sys#cygwin_expr|
tlib#sys#IsCygwinBin ................... |tlib#sys#IsCygwinBin()|
tlib#sys#GetCmd ........................ |tlib#sys#GetCmd()|
tlib#sys#MaybeUseCygpath ............... |tlib#sys#MaybeUseCygpath()|
tlib#sys#ConvertPath ................... |tlib#sys#ConvertPath()|
tlib#sys#FileArgs ...................... |tlib#sys#FileArgs()|
tlib#paragraph#GetMetric ............... |tlib#paragraph#GetMetric()|
tlib#paragraph#Move .................... |tlib#paragraph#Move()|
g:tlib_inputlist_pct ................... |g:tlib_inputlist_pct|
@ -267,6 +283,7 @@ Contents~
tlib#arg#Let ........................... |tlib#arg#Let()|
tlib#arg#Key ........................... |tlib#arg#Key()|
tlib#arg#StringAsKeyArgs ............... |tlib#arg#StringAsKeyArgs()|
tlib#arg#StringAsKeyArgsEqual .......... |tlib#arg#StringAsKeyArgsEqual()|
tlib#arg#Ex ............................ |tlib#arg#Ex()|
tlib#fixes#Winpos ...................... |tlib#fixes#Winpos()|
g:tlib#dir#sep ......................... |g:tlib#dir#sep|
@ -492,6 +509,9 @@ tlib#persistent#Filename(type, ?file=%, ?mkdir=0)
*tlib#persistent#Get()*
tlib#persistent#Get(...)
*tlib#persistent#MTime()*
tlib#persistent#MTime(cfile)
*tlib#persistent#Value()*
tlib#persistent#Value(...)
@ -653,6 +673,9 @@ tlib#list#Zip(lists, ?default='')
*tlib#list#Uniq()*
tlib#list#Uniq(list, ...)
*tlib#list#ToDictionary()*
tlib#list#ToDictionary(list, default, ...)
========================================================================
autoload/tlib/cmd.vim~
@ -742,6 +765,9 @@ g:tlib#vcs#check (default: has('win16') || has('win32') || has('wi
If non-empty, use it as a format string to check whether a VCS is
installed on your computer.
*tlib#vcs#Executable()*
tlib#vcs#Executable(type)
*tlib#vcs#FindVCS()*
tlib#vcs#FindVCS(filename)
@ -889,6 +915,9 @@ tlib#cache#Filename(type, ?file=%, ?mkdir=0, ?dir='')
*tlib#cache#Save()*
tlib#cache#Save(cfile, dictionary)
*tlib#cache#MTime()*
tlib#cache#MTime(cfile)
*tlib#cache#Get()*
tlib#cache#Get(cfile, ...)
@ -1563,10 +1592,59 @@ tlib#file#Relative(filename, basedir)
*tlib#file#Absolute()*
tlib#file#Absolute(filename, ...)
*tlib#file#Canonic()*
tlib#file#Canonic(filename, ...)
*tlib#file#With()*
tlib#file#With(fcmd, bcmd, files, ?world={})
========================================================================
autoload/tlib/sys.vim~
*g:tlib#sys#windows*
g:tlib#sys#windows (default: &shell !~ 'sh' && (has('win16') || has('win32') || has('win64')))
*g:tlib#sys#null*
g:tlib#sys#null (default: g:tlib#sys#windows ? 'NUL' : (filereadable('/dev/null') ? '/dev/null' : ''))
*tlib#sys#IsExecutable()*
tlib#sys#IsExecutable(cmd, ...)
*g:tlib#sys#check_cygpath*
g:tlib#sys#check_cygpath (default: g:tlib#sys#windows && tlib#sys#IsExecutable('cygpath'))
If true, check whether we have to convert a path via cyppath --
see |tlib#sys#MaybeUseCygpath|
*g:tlib#sys#cygwin_path_rx*
g:tlib#sys#cygwin_path_rx (default: '/cygwin/')
If a full windows filename (with slashes instead of backslashes)
matches this |regexp|, it is assumed to be a cygwin executable.
*g:tlib#sys#cygwin_expr*
g:tlib#sys#cygwin_expr (default: '"bash -c ''". escape(%s, "''\\") ."''"')
For cygwin binaries, convert command calls using this vim
expression.
*tlib#sys#IsCygwinBin()*
tlib#sys#IsCygwinBin(cmd)
*tlib#sys#GetCmd()*
tlib#sys#GetCmd(cmd)
*tlib#sys#MaybeUseCygpath()*
tlib#sys#MaybeUseCygpath(cmd)
If cmd seems to be a cygwin executable, use cygpath to convert
filenames. This assumes that cygwin's which command returns full
filenames for non-cygwin executables.
*tlib#sys#ConvertPath()*
tlib#sys#ConvertPath(converter, filename)
*tlib#sys#FileArgs()*
tlib#sys#FileArgs(cmd, files)
========================================================================
autoload/tlib/paragraph.vim~
@ -1726,7 +1804,10 @@ tlib#arg#Key(dict, list, ?default='')
See |:TKeyArg|.
*tlib#arg#StringAsKeyArgs()*
tlib#arg#StringAsKeyArgs(string, ?keys=[], ?evaluate=0)
tlib#arg#StringAsKeyArgs(string, ?keys=[], ?evaluate=0, ?sep=':')
*tlib#arg#StringAsKeyArgsEqual()*
tlib#arg#StringAsKeyArgsEqual(string)
*tlib#arg#Ex()*
tlib#arg#Ex(arg, ?chars='%#! ')
@ -2058,7 +2139,7 @@ tlib#string#RemoveBackslashes(text, ?chars=' ')
chars).
*tlib#string#Chomp()*
tlib#string#Chomp(string)
tlib#string#Chomp(string, ?max=0)
*tlib#string#Format()*
tlib#string#Format(template, dict)
@ -2084,4 +2165,4 @@ tlib#string#Count(string, rx)
vim:tw=78:fo=tcq2:isk=!-~,^*,^|,^":ts=8:ft=help:norl:
vim:tw=78:fo=w2croql:isk=!-~,^*,^|,^":ts=8:ft=help:norl:

View File

@ -1,11 +1,11 @@
" tlib.vim -- Some utility functions
" @Author: Tom Link (micathom AT gmail com?subject=[vim])
" @Website: http://www.vim.org/account/profile.php?user_id=4037
" @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
" @Created: 2007-04-10.
" @Last Change: 2013-09-25.
" @Revision: 749
" @Last Change: 2014-07-03.
" @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
" @Revision: 753
" @Website: http://www.vim.org/account/profile.php?user_id=4037
" GetLatestVimScripts: 1863 1 tlib.vim
" tlib.vim -- Some utility functions
if &cp || exists("loaded_tlib")
finish
@ -14,7 +14,7 @@ if v:version < 700 "{{{2
echoerr "tlib requires Vim >= 7"
finish
endif
let loaded_tlib = 108
let loaded_tlib = 112
let s:save_cpo = &cpo
set cpo&vim