1
0
mirror of https://github.com/amix/vimrc synced 2025-06-16 01:25:00 +08:00

Updated plugins. Switched to Ack as standard search tool (much better than grep/vimgrep)

This commit is contained in:
amix
2014-02-07 10:41:15 +00:00
parent e62adb8084
commit 8265dca5d5
76 changed files with 3855 additions and 143 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: 2007-05-01.
" @Last Change: 2013-09-26.
" @Revision: 0.1.1297
" @Last Change: 2013-12-03.
" @Revision: 0.1.1310
" :filedoc:
" A prototype used by |tlib#input#List|.
@ -161,12 +161,14 @@ else
let self.width_filename = min([
\ get(self, 'width_filename', &co),
\ empty(g:tlib#input#filename_max_width) ? &co : eval(g:tlib#input#filename_max_width),
\ max(map(copy(self.base), 'strwidth(fnamemodify(v:val, ":t"))'))
\ max(map(copy(self.base), 'strwidth(matchstr(v:val, "[^\\/]*$"))'))
\ ])
" TLogVAR self.width_filename
" TLogVAR self.width_filename
exec 'syntax match TLibDir /\%>'. (1 + self.width_filename) .'c \(|\|\[[^]]*\]\) \zs\(\(\a:\|\.\.\|\.\.\..\{-}\)\?[\/][^&<>*|]\{-}\)\?[^\/]\+$/ contained containedin=TLibMarker contains=TLibFilename'
exec 'syntax match TLibMarker /\%>'. (1 + self.width_filename) .'c \(|\|\[[^]]*\]\) \S.*$/ contains=TLibDir'
" exec 'syntax match TLibDir /\(|\|\[.\{-}\]\) \zs\(\(\a:\|\.\.\|\.\.\..\{-}\)\?[\/][^&<>*|]\{-}\)\?[^\/]\+$/ contained containedin=TLibMarker contains=TLibFilename'
" exec 'syntax match TLibMarker /\(|\|\[.\{-}\]\) \S.*$/ contains=TLibDir'
exec 'syntax match TLibFilename /[^\/]\+$/ contained containedin=TLibDir'
exec 'syntax match TLibDir /\%>'. (1 + self.width_filename) .'c \(|\|\[[^]]*\]\) \zs\(\(\a:\|\.\.\|\.\.\..\{-}\)\?[\/][^&<>*|]\{-}\)\?[^\/]\+$/ contained containedin=TLibMarker contains=TLibFilename'
exec 'syntax match TLibMarker /\%>'. (1 + self.width_filename) .'c \(|\|\[[^]]*\]\) \S.*$/ contains=TLibDir'
hi def link TLibMarker Special
hi def link TLibDir Directory
hi def link TLibFilename NonText
@ -206,24 +208,26 @@ else
" TLogVAR use_indicators
if use_indicators
call insert(marker, '[')
let bnr = bufnr(a:file)
" TLogVAR a:file, bnr, self.bufnr
if bnr != -1
if bnr == self.bufnr
call add(marker, '%')
else
call add(marker, bnr)
if g:tlib_inputlist_filename_indicators
let bnr = bufnr(a:file)
TLogVAR a:file, bnr, self.bufnr
if bnr != -1
if bnr == self.bufnr
call add(marker, '%')
else
call add(marker, bnr)
endif
if getbufvar(bnr, '&modified')
call add(marker, '+')
endif
if getbufvar(bnr, '&bufhidden') == 'hide'
call add(marker, 'h')
endif
" if !buflisted(bnr)
" call add(marker, 'u')
" endif
" echom "DBG" a:file string(get(self,'filename_indicators'))
endif
if getbufvar(bnr, '&modified')
call add(marker, '+')
endif
if getbufvar(bnr, '&bufhidden') == 'hide'
call add(marker, 'h')
endif
" if !buflisted(bnr)
" call add(marker, 'u')
" endif
" echom "DBG" a:file string(get(self,'filename_indicators'))
endif
if has_key(self, 'filename_indicators') && has_key(self.filename_indicators, a:file)
if len(marker) > 1

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-24.
" @Last Change: 2013-09-26.
" @Revision: 0.1.240
" @Last Change: 2013-11-05.
" @Revision: 0.1.242
" :filedoc:
@ -444,6 +444,7 @@ endf
function! tlib#agent#EditFileInTab(world, selected) "{{{3
" TLogVAR a:selected
call a:world.CloseScratch()
call tlib#file#With('tabedit', 'tab sbuffer', a:selected, a:world)
return tlib#agent#Exit(a:world, a:selected)

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.0.141
" @Revision: 0.0.142
if &cp || exists("loaded_tlib_file_autoload")
finish
@ -36,12 +36,12 @@ function! tlib#file#Split(filename) "{{{3
endf
" :display: tlib#file#Join(filename_parts, ?strip_slashes=0)
" :display: tlib#file#Join(filename_parts, ?strip_slashes=1)
" EXAMPLES: >
" tlib#file#Join(['foo', 'bar', 'filename.txt'])
" => 'foo/bar/filename.txt'
function! tlib#file#Join(filename_parts, ...) "{{{3
TVarArg 'strip_slashes'
TVarArg ['strip_slashes', 1]
" TLogVAR a:filename_parts, strip_slashes
if strip_slashes
" let rx = tlib#rx#Escape(g:tlib#dir#sep) .'$'

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-07-18.
" @Last Change: 2013-10-16.
" @Revision: 0.0.242
" @Last Change: 2013-11-11.
" @Revision: 0.0.251
if &cp || exists("loaded_tlib_scratch_autoload")
finish
@ -65,7 +65,7 @@ function! tlib#scratch#UseScratch(...) "{{{3
else
let cmd = 'buffer!'
endif
" TLogVAR cmd
" TLogVAR cmd, bn
silent exec 'noautocmd keepalt keepj' cmd bn
endif
else
@ -77,7 +77,7 @@ function! tlib#scratch#UseScratch(...) "{{{3
else
let cmd = 'edit'
endif
" TLogVAR cmd
" TLogVAR cmd, id
silent exec 'noautocmd keepalt keepj' cmd escape(id, '%#\ ')
" silent exec 'split '. id
endif
@ -100,7 +100,7 @@ function! tlib#scratch#UseScratch(...) "{{{3
endif
endif
let keyargs.scratch = bufnr('%')
" TLogVAR 2, winnr(), bufnr('%'), bufname("%")
" TLogVAR 2, winnr(), bufnr('%'), bufname("%"), keyargs.scratch
return keyargs.scratch
endf