Permalink
Browse files

Version 0.33

- tlib#agent#Exit: explicitly return empty value (as a consequence,
pressing <esc> when browsing an index-list, returns 0 and not "")
- tlib#signs
- tlib#input#List: set local statusline
- Don't reset statusline
- Don't use fnamemodify() to split filenames (for performance reasons)
- scratch: Set ft after setting up scratch options
- tlib#map#PumAccept(key)
  • Loading branch information...
1 parent f886285 commit 3654b700277b62d36a7471ce334567b3299cd714 @tomtom tomtom committed with Oct 11, 2009
View
73 autoload/tlib/World.vim
@@ -3,8 +3,8 @@
" @Website: http://members.a1.net/t.link/
" @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
" @Created: 2007-05-01.
-" @Last Change: 2009-02-25.
-" @Revision: 0.1.696
+" @Last Change: 2009-08-23.
+" @Revision: 0.1.738
" :filedoc:
" A prototype used by |tlib#input#List|.
@@ -103,16 +103,25 @@ endf
" :nodoc:
function! s:prototype.FormatFilename(file) dict "{{{3
- let fname = fnamemodify(a:file, ":p:t")
- " let fname = fnamemodify(a:file, ":t")
- " if isdirectory(a:file)
- " let fname .='/'
- " endif
- let dname = fnamemodify(a:file, ":h")
+ let width = eval(g:tlib_inputlist_width_filename)
+ let split = match(a:file, '[/\\]\zs[^/\\]\+$')
+ if split == -1
+ let fname = ''
+ let dname = a:file
+ else
+ let fname = strpart(a:file, split)
+ let dname = strpart(a:file, 0, split - 1)
+ endif
+ " let fname = fnamemodify(a:file, ":p:t")
+ " " let fname = fnamemodify(a:file, ":t")
+ " " if isdirectory(a:file)
+ " " let fname .='/'
+ " " endif
+ " let dname = fnamemodify(a:file, ":h")
" let dname = pathshorten(fnamemodify(a:file, ":h"))
- let dnmax = &co - max([eval(g:tlib_inputlist_width_filename), len(fname)]) - 11 - self.index_width - &fdc
+ let dnmax = &co - max([width, len(fname)]) - 11 - self.index_width - &fdc
if len(dname) > dnmax
- let dname = '...'. strpart(fnamemodify(a:file, ":h"), len(dname) - dnmax)
+ let dname = '...'. strpart(dname, len(dname) - dnmax)
endif
let marker = []
if g:tlib_inputlist_filename_indicators
@@ -525,6 +534,7 @@ function! s:prototype.CloseScratch(...) dict "{{{3
return 0
else
let rv = tlib#scratch#CloseScratch(self, reset_scratch)
+ " TLogVAR rv
if rv
call self.SwitchWindow('win')
endif
@@ -677,6 +687,7 @@ function! s:prototype.DisplayList(query, ...) dict "{{{3
elseif self.state == 'help'
call self.DisplayHelp()
else
+ " TLogVAR query
" let ll = len(list)
let ll = self.llen
" let x = len(ll) + 1
@@ -713,15 +724,16 @@ function! s:prototype.DisplayList(query, ...) dict "{{{3
call add(b:tlibDisplayListMarks, base_pref)
call self.DisplayListMark(x, base_pref, '*')
call self.SetOffset()
+ call self.SetStatusline(a:query)
" TLogVAR self.offset
" TLogDBG winheight('.')
" if self.prefidx > winheight(0)
- " let lt = len(list) - winheight('.') + 1
- " if self.offset > lt
- " exec 'norm! '. lt .'zt'
- " else
- exec 'norm! '. self.offset .'zt'
- " endif
+ " let lt = len(list) - winheight('.') + 1
+ " if self.offset > lt
+ " exec 'norm! '. lt .'zt'
+ " else
+ exec 'norm! '. self.offset .'zt'
+ " endif
" else
" norm! 1zt
" endif
@@ -734,21 +746,30 @@ function! s:prototype.DisplayList(query, ...) dict "{{{3
exec 'match '. g:tlib_inputlist_higroup .' /\c'. escape(rx0, '/') .'/'
endif
endif
- let query = a:query
- let options = [self.matcher.name]
- if self.sticky
- call add(options, '#')
- endif
- if !empty(options)
- let query .= printf('%%=[%s] ', join(options, ', '))
- endif
- " TLogVAR query
- let &statusline = query
endif
redraw
endf
+function! s:prototype.SetStatusline(query) dict "{{{3
+ let query = a:query
+ let options = [self.matcher.name]
+ if self.sticky
+ call add(options, '#')
+ endif
+ if !empty(options)
+ let sopts = printf('[%s]', join(options, ', '))
+ " let echo = query . repeat(' ', &columns - len(sopts) - len(query) - 20) . sopts
+ let echo = query . ' ' . sopts
+ " let query .= '%%='. sopts .' '
+ endif
+ " TLogVAR &l:statusline, query
+ " let &l:statusline = query
+ echo
+ echo echo
+endf
+
+
" :nodoc:
function! s:prototype.SetOffset() dict "{{{3
" TLogVAR self.prefidx, self.offset
View
12 autoload/tlib/agent.vim
@@ -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: 2009-02-25.
-" @Revision: 0.1.168
+" @Last Change: 2009-08-04.
+" @Revision: 0.1.172
if &cp || exists("loaded_tlib_agent_autoload") "{{{2
finish
@@ -18,7 +18,7 @@ let loaded_tlib_agent_autoload = 1
function! tlib#agent#Exit(world, selected) "{{{3
call a:world.CloseScratch()
- let a:world.state = 'exit escape'
+ let a:world.state = 'exit empty escape'
let a:world.list = []
" let a:world.base = []
call a:world.ResetSelected()
@@ -475,12 +475,14 @@ function! tlib#agent#DoAtLine(world, selected) "{{{3
let cmd = input('Command: ', '', 'command')
if !empty(cmd)
call a:world.SwitchWindow('win')
- let pos = getpos('.')
+ " let pos = getpos('.')
+ let view = winsaveview()
for l in a:selected
call tlib#buffer#ViewLine(l, '')
exec cmd
endfor
- call setpos('.', pos)
+ " call setpos('.', pos)
+ call winrestview(view)
endif
endif
call a:world.ResetSelected()
View
60 autoload/tlib/buffer.vim
@@ -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.268
+" @Last Change: 2009-08-17.
+" @Revision: 0.0.283
if &cp || exists("loaded_tlib_buffer_autoload")
finish
@@ -238,9 +238,11 @@ endf
" Insert text (a string) in the buffer.
function! tlib#buffer#InsertText(text, ...) "{{{3
TVarArg ['keyargs', {}]
+ " TLogVAR a:text, keyargs
TKeyArg keyargs, ['shift', 0], ['col', col('.')], ['lineno', line('.')], ['pos', 'e'],
\ ['indent', 0]
" TLogVAR shift, col, lineno, pos, indent
+ let grow = 0
let post_del_last_line = line('$') == 1
let line = getline(lineno)
if col + shift > 0
@@ -259,24 +261,29 @@ function! tlib#buffer#InsertText(text, ...) "{{{3
call cursor(lineno, col)
if indent && col > 1
if &fo =~# '[or]'
- " This doesn't work because it's not guaranteed that the
- " cursor is set.
- let cline = getline('.')
- norm! a
- "norm! o
- " TAssertExec redraw | sleep 3
- let idt = strpart(getline('.'), 0, col('.') + shift)
- " TLogVAR idt
- let idtl = len(idt)
- -1,.delete
- " TAssertExec redraw | sleep 3
- call append(lineno - 1, cline)
- call cursor(lineno, col)
- " TAssertExec redraw | sleep 3
- if idtl == 0 && icol != 0
- let idt = matchstr(pre, '^\s\+')
- let idtl = len(idt)
- endif
+ " FIXME: Is the simple version sufficient?
+ " VERSION 1
+ " " This doesn't work because it's not guaranteed that the
+ " " cursor is set.
+ " let cline = getline('.')
+ " norm! a
+ " "norm! o
+ " " TAssertExec redraw | sleep 3
+ " let idt = strpart(getline('.'), 0, col('.') + shift)
+ " " TLogVAR idt
+ " let idtl = len(idt)
+ " -1,.delete
+ " " TAssertExec redraw | sleep 3
+ " call append(lineno - 1, cline)
+ " call cursor(lineno, col)
+ " " TAssertExec redraw | sleep 3
+ " if idtl == 0 && icol != 0
+ " let idt = matchstr(pre, '^\s\+')
+ " let idtl = len(idt)
+ " endif
+ " VERSION 2
+ let idt = matchstr(pre, '^\s\+')
+ let idtl = len(idt)
else
let [m_0, idt, iline; rest] = matchlist(pre, '^\(\s*\)\(.*\)$')
let idtl = len(idt)
@@ -285,11 +292,13 @@ function! tlib#buffer#InsertText(text, ...) "{{{3
let idt .= repeat(' ', icol - idtl)
endif
" TLogVAR idt
+ let idtl1 = len(idt)
for i in range(1, len(text) - 1)
let text[i] = idt . text[i]
+ let grow += idtl1
endfor
- " TLogVAR text
endif
+ " TLogVAR text
" exec 'norm! '. lineno .'Gdd'
call tlib#normal#WithRegister('"tdd', 't')
call append(lineno - 1, text)
@@ -298,17 +307,20 @@ function! tlib#buffer#InsertText(text, ...) "{{{3
endif
let tlen = len(text)
let posshift = matchstr(pos, '\d\+')
+ " TLogVAR pos
if pos =~ '^e'
exec lineno + tlen - 1
exec 'norm! 0'. (len(text[-1]) - len(post) + posshift - 1) .'l'
elseif pos =~ '^s'
+ " TLogVAR lineno, pre, posshift
exec lineno
exec 'norm! '. len(pre) .'|'
if !empty(posshift)
exec 'norm! '. posshift .'h'
endif
endif
" TLogDBG string(getline(1, '$'))
+ return grow
endf
@@ -338,11 +350,13 @@ endf
" Evaluate cmd while maintaining the cursor position and jump registers.
function! tlib#buffer#KeepCursorPosition(cmd) "{{{3
- let pos = getpos('.')
+ " let pos = getpos('.')
+ let view = winsaveview()
try
keepjumps exec a:cmd
finally
- call setpos('.', pos)
+ " call setpos('.', pos)
+ call winrestview(view)
endtry
endf
View
8 autoload/tlib/dir.vim
@@ -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.29
+" @Last Change: 2009-08-04.
+" @Revision: 0.0.32
if &cp || exists("loaded_tlib_dir_autoload")
finish
@@ -29,7 +29,7 @@ endf
" => 'foo/bar'
function! tlib#dir#PlainName(dirname) "{{{3
let dirname = a:dirname
- while dirname[-1 : -1] == g:tlib_filename_sep
+ while index(['/', '\'], dirname[-1 : -1]) != -1
let dirname = dirname[0 : -2]
endwh
return dirname
@@ -59,7 +59,7 @@ function! tlib#dir#CD(dir, ...) "{{{3
let cmd = locally ? 'lcd ' : 'cd '
" let cwd = getcwd()
let cmd .= tlib#arg#Ex(a:dir)
- " TLogVAR cmd
+ " TLogVAR a:dir, locally, cmd
exec cmd
" return cwd
return getcwd()
View
7 autoload/tlib/file.vim
@@ -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-25.
-" @Revision: 0.0.65
+" @Last Change: 2009-03-13.
+" @Revision: 0.0.67
if &cp || exists("loaded_tlib_file_autoload")
finish
@@ -43,7 +43,8 @@ endf
function! tlib#file#Join(filename_parts, ...) "{{{3
TVarArg 'strip_slashes'
if strip_slashes
- let rx = tlib#rx#Escape(g:tlib_filename_sep) .'$'
+ " let rx = tlib#rx#Escape(g:tlib_filename_sep) .'$'
+ let rx = '[/\\]$'
let parts = map(copy(a:filename_parts), 'substitute(v:val, rx, "", "")')
return join(parts, g:tlib_filename_sep)
else
View
31 autoload/tlib/input.vim
@@ -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-25.
-" @Revision: 0.0.637
+" @Last Change: 2009-08-23.
+" @Revision: 0.0.648
if &cp || exists("loaded_tlib_input_autoload")
finish
@@ -132,11 +132,11 @@ function! tlib#input#ListW(world, ...) "{{{3
let key_agents[k] = handler.agent
endif
endfor
- let statusline = &statusline
- let laststatus = &laststatus
+ " let statusline = &l:statusline
+ " let laststatus = &laststatus
let lastsearch = @/
let @/ = ''
- let &laststatus = 2
+ " let &laststatus = 2
let world.initial_display = 1
try
@@ -277,7 +277,12 @@ function! tlib#input#ListW(world, ...) "{{{3
" TLogDBG 8
if world.initial_display || !tlib#char#IsAvailable()
" TLogDBG len(dlist)
- call world.DisplayList(world.query .' (filter: '. world.DisplayFilter() .'; press "?" for help)', dlist)
+ if g:tlib_inputlist_shortmessage
+ let query = 'Filter: '. world.DisplayFilter()
+ else
+ let query = world.query .' (filter: '. world.DisplayFilter() .'; press "?" for help)'
+ endif
+ call world.DisplayList(query, dlist)
call world.FollowCursor()
let world.initial_display = 0
" TLogDBG 9
@@ -432,7 +437,14 @@ function! tlib#input#ListW(world, ...) "{{{3
elseif world.state =~ '\<empty\>'
" TLog "empty"
" TLogDBG 'return empty'
- return stridx(world.type, 'm') != -1 ? [] : stridx(world.type, 'i') != -1 ? 0 : ''
+ " TLogVAR world.type
+ if stridx(world.type, 'm') != -1
+ return []
+ elseif stridx(world.type, 'i') != -1
+ return 0
+ else
+ return ''
+ endif
elseif !empty(world.return_agent)
" TLog "return_agent"
" TLogDBG 'return agent'
@@ -464,8 +476,9 @@ function! tlib#input#ListW(world, ...) "{{{3
endif
finally
- let &statusline = statusline
- let &laststatus = laststatus
+ " TLogVAR statusline
+ " let &l:statusline = statusline
+ " let &laststatus = laststatus
silent! let @/ = lastsearch
" TLogDBG 'finally 2'
" TLogDBG string(world.Methods())
View
8 autoload/tlib/list.vim
@@ -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.31
+" @Last Change: 2009-08-09.
+" @Revision: 0.0.32
if &cp || exists("loaded_tlib_list_autoload")
finish
@@ -159,9 +159,9 @@ endf
function! s:UniqValue(value) "{{{3
if index(s:uniq_values, a:value) == -1
call add(s:uniq_values, a:value)
- return true
+ return 1
else
- return false
+ return 0
endif
endf
View
18 autoload/tlib/scratch.vim
@@ -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: 2009-02-15.
-" @Revision: 0.0.128
+" @Last Change: 2009-08-04.
+" @Revision: 0.0.144
if &cp || exists("loaded_tlib_scratch_autoload")
finish
@@ -29,6 +29,8 @@ function! tlib#scratch#UseScratch(...) "{{{3
if bufnr('%') != id
exec 'buffer! '. id
endif
+ " let ft = &ft
+ let ft = '*'
else
let bn = bufnr(id)
let wpos = g:tlib_scratch_pos
@@ -56,23 +58,25 @@ function! tlib#scratch#UseScratch(...) "{{{3
endif
let ft = get(keyargs, 'scratch_filetype', '')
" TLogVAR ft
- " if !empty(ft)
- let &ft=ft
- " end
endif
setlocal buftype=nofile
setlocal bufhidden=hide
setlocal noswapfile
setlocal nobuflisted
- setlocal modifiable
setlocal foldmethod=manual
setlocal foldcolumn=0
+ setlocal modifiable
+ if &ft != '*'
+ let &ft = ft
+ endif
let keyargs.scratch = bufnr('%')
return keyargs.scratch
endf
" Close a scratch buffer as defined in keyargs (usually a World).
+" Return 1 if the scratch buffer is closed (or if it already was
+" closed).
function! tlib#scratch#CloseScratch(keyargs, ...) "{{{3
TVarArg ['reset_scratch', 1]
let scratch = get(a:keyargs, 'scratch', '')
@@ -89,8 +93,8 @@ function! tlib#scratch#CloseScratch(keyargs, ...) "{{{3
" exec wb
" redraw
" TLogVAR winnr()
- return 1
endif
+ return 1
finally
if reset_scratch
let a:keyargs.scratch = ''
View
5 autoload/tlib/tag.vim
@@ -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-11-01.
-" @Last Change: 2009-02-15.
-" @Revision: 0.0.45
+" @Last Change: 2009-04-11.
+" @Revision: 0.0.48
if &cp || exists("loaded_tlib_tag_autoload")
finish
@@ -95,6 +95,7 @@ function! tlib#tag#Collect(constraints, ...) "{{{3
endif
endif
endfor
+ " TLogVAR tags
return tags
endf
View
16 autoload/tlib/win.vim
@@ -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-08-24.
-" @Last Change: 2009-02-15.
-" @Revision: 0.0.47
+" @Last Change: 2009-08-04.
+" @Revision: 0.0.51
if &cp || exists("loaded_tlib_win_autoload")
finish
@@ -36,13 +36,14 @@ function! tlib#win#GetLayout(...) "{{{3
let views = {}
if save_view
let winnr = winnr()
- for w in range(1, winnr('$'))
- call tlib#win#Set(w)
- let views[w] = winsaveview()
- endfor
+ windo let views[winnr()] = winsaveview()
+ " for w in range(1, winnr('$'))
+ " call tlib#win#Set(w)
+ " let views[w] = winsaveview()
+ " endfor
call tlib#win#Set(winnr)
endif
- return {'winnr': winnr('$'), 'winrestcmd': winrestcmd(), 'views': views, 'cmdheight': &cmdheight}
+ return {'winnr': winnr('$'), 'winrestcmd': winrestcmd(), 'views': views, 'cmdheight': &cmdheight, 'guioptions': &guioptions}
endf
@@ -55,6 +56,7 @@ function! tlib#win#SetLayout(layout) "{{{3
let winnr = winnr()
" TLogVAR winnr
for [w, v] in items(a:layout.views)
+ " TLogVAR w, v
call tlib#win#Set(w)
call winrestview(v)
endfor
View
53 doc/tlib.txt
@@ -43,6 +43,7 @@ Contents~
g:tlib_inputlist_livesearch_threshold ... |g:tlib_inputlist_livesearch_threshold|
g:tlib_inputlist_filename_indicators .... |g:tlib_inputlist_filename_indicators|
g:tlib_inputlist_match .................. |g:tlib_inputlist_match|
+ g:tlib_inputlist_shortmessage ........... |g:tlib_inputlist_shortmessage|
g:tlib_tags_extra ....................... |g:tlib_tags_extra|
g:tlib_tag_substitute ................... |g:tlib_tag_substitute|
g:tlib_filename_sep ..................... |g:tlib_filename_sep|
@@ -70,6 +71,7 @@ Contents~
prototype.Super
prototype.Methods
tlib#World#New .......................... |tlib#World#New()|
+ prototype.DisplayList
tlib#agent#Exit ......................... |tlib#agent#Exit()|
tlib#agent#CopyItems .................... |tlib#agent#CopyItems()|
tlib#agent#PageUp ....................... |tlib#agent#PageUp()|
@@ -176,6 +178,7 @@ Contents~
tlib#list#RemoveAll ..................... |tlib#list#RemoveAll()|
tlib#list#Zip ........................... |tlib#list#Zip()|
tlib#list#Uniq .......................... |tlib#list#Uniq()|
+ tlib#map#PumAccept ...................... |tlib#map#PumAccept()|
tlib#normal#WithRegister ................ |tlib#normal#WithRegister()|
tlib#notify#Echo ........................ |tlib#notify#Echo()|
tlib#notify#TrimMessage ................. |tlib#notify#TrimMessage()|
@@ -187,6 +190,9 @@ Contents~
tlib#rx#Suffixes ........................ |tlib#rx#Suffixes()|
tlib#scratch#UseScratch ................. |tlib#scratch#UseScratch()|
tlib#scratch#CloseScratch ............... |tlib#scratch#CloseScratch()|
+ tlib#signs#ClearAll ..................... |tlib#signs#ClearAll()|
+ tlib#signs#ClearBuffer .................. |tlib#signs#ClearBuffer()|
+ tlib#signs#Mark ......................... |tlib#signs#Mark()|
tlib#string#RemoveBackslashes ........... |tlib#string#RemoveBackslashes()|
tlib#string#Chomp ....................... |tlib#string#Chomp()|
tlib#string#Format ...................... |tlib#string#Format()|
@@ -341,6 +347,10 @@ g:tlib_inputlist_match (default: 'cnf')
cnf :: substrings
fuzzy :: match characters
+ *g:tlib_inputlist_shortmessage*
+g:tlib_inputlist_shortmessage (default: 0)
+ If non null, display only a short info about the filter.
+
*g:tlib_tags_extra*
g:tlib_tags_extra (default: '')
Extra tags for |tlib#tag#Retrieve()| (see there). Can also be buffer-local.
@@ -355,7 +365,11 @@ g:tlib_filename_sep (default: '/')
*g:tlib_cache*
g:tlib_cache (default: '')
- The cache directory. If empty, use |tlib#dir#MyRuntime|.'/cache'
+ The cache directory. If empty, use |tlib#dir#MyRuntime|.'/cache'.
+ You might want to delete old files from this directory from time to
+ time with a command like: >
+ find ~/vimfiles/cache/ -atime +31 -type f -print -delete
+<
*g:tlib_viewline_position*
g:tlib_viewline_position (default: 'zz')
@@ -522,6 +536,9 @@ Inherits from |tlib#Object#New|.
tlib#World#New(...)
+prototype.DisplayList
+
+
========================================================================
autoload/tlib/agent.vim~
Various agents for use as key handlers in tlib#input#List()
@@ -1086,6 +1103,17 @@ tlib#list#Uniq(list, ...)
========================================================================
+autoload/tlib/map.vim~
+
+ *tlib#map#PumAccept()*
+tlib#map#PumAccept(key)
+ If |pumvisible()| is true, return "\<c-y>". Otherwise return a:key.
+ For use in maps like: >
+ imap <expr> <cr> tlib#map#PumAccept("\<cr>")
+<
+
+
+========================================================================
autoload/tlib/normal.vim~
*tlib#normal#WithRegister()*
@@ -1163,6 +1191,29 @@ tlib#scratch#UseScratch(?keyargs={})
*tlib#scratch#CloseScratch()*
tlib#scratch#CloseScratch(keyargs, ...)
Close a scratch buffer as defined in keyargs (usually a World).
+ Return 1 if the scratch buffer is closed (or if it already was
+ closed).
+
+
+========================================================================
+autoload/tlib/signs.vim~
+
+ *tlib#signs#ClearAll()*
+tlib#signs#ClearAll(sign)
+ Clear all signs with name SIGN.
+
+ *tlib#signs#ClearBuffer()*
+tlib#signs#ClearBuffer(sign, bufnr)
+ Clear all signs with name SIGN in buffer BUFNR.
+
+ *tlib#signs#Mark()*
+tlib#signs#Mark(sign, list)
+ Add signs for all locations in LIST. LIST must confirm with the
+ quickfix list format (see |getqflist()|; only the fields lnum and
+ bufnr are required).
+
+ list:: a quickfix or location list
+ sign:: a sign defined with |:sign-define|
========================================================================
View
49 plugin/02tlib.vim
@@ -3,24 +3,24 @@
" @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: 2009-02-25.
-" @Revision: 561
+" @Last Change: 2009-08-23.
+" @Revision: 581
" GetLatestVimScripts: 1863 1 tlib.vim
"
" Please see also ../test/tlib.vim for usage examples.
"
-" TODO:
-" - tlib#input#List(): RightMouse -> Make commands accessible via
-" popup-menu
-" - List isn't updated on some occassions (eg tselectfiles + pick file
-" per mouse) when resetting the state from an post-process agent
-" - tlib#agent#SwitchLayout(): switch between horizontal and vertical
-" layout for the list
-" - tlib#cache#Purge(): delete old cache files (for the moment use find)
-" - tlib#file#Relative(): currently relies on cwd to be set
-" - tlib#input#EditList(): Disable selection by index number
-" - tlib#input#List(): Some kind of command line to edit some
-" preferences (sort etc.) on the fly
+" TODO: tlib#input#List(): RightMouse -> Make commands accessible via
+" popup-menu
+" TODO: List isn't updated on some occassions (eg tselectfiles + pick
+" file per mouse) when resetting the state from an post-process agent
+" TODO: tlib#agent#SwitchLayout(): switch between horizontal and
+" vertical layout for the list
+" TODO: tlib#cache#Purge(): delete old cache files (for the moment use
+" find)
+" TODO: tlib#file#Relative(): currently relies on cwd to be set
+" TODO: tlib#input#EditList(): Disable selection by index number
+" TODO: tlib#input#List(): Some kind of command line to edit some
+" preferences (sort etc.) on the fly
if &cp || exists("loaded_tlib")
finish
@@ -29,7 +29,7 @@ if v:version < 700 "{{{2
echoerr "tlib requires Vim >= 7"
finish
endif
-let loaded_tlib = 30
+let loaded_tlib = 32
let s:save_cpo = &cpo
set cpo&vim
@@ -149,6 +149,9 @@ TLet g:tlib_inputlist_filename_indicators = 0
" fuzzy :: match characters
TLet g:tlib_inputlist_match = 'cnf'
+" If non null, display only a short info about the filter.
+TLet g:tlib_inputlist_shortmessage = 0
+
" Extra tags for |tlib#tag#Retrieve()| (see there). Can also be buffer-local.
TLet g:tlib_tags_extra = ''
@@ -174,7 +177,10 @@ TLet g:tlib_tag_substitute = {
TLet g:tlib_filename_sep = '/'
" TLet g:tlib_filename_sep = exists('+shellslash') && !&shellslash ? '\' : '/' " {{{2
-" The cache directory. If empty, use |tlib#dir#MyRuntime|.'/cache'
+" The cache directory. If empty, use |tlib#dir#MyRuntime|.'/cache'.
+" You might want to delete old files from this directory from time to
+" time with a command like: >
+" find ~/vimfiles/cache/ -atime +31 -type f -print -delete
TLet g:tlib_cache = ''
" Where to display the line when using |tlib#buffer#ViewLine|.
@@ -534,3 +540,14 @@ text to an empty buffer.
-tlib#input#List: For i-type list views, make sure agents are called
with the base indices.
+0.32
+- tlib#agent#Exit: explicitly return empty value (as a consequence,
+pressing <esc> when browsing an index-list, returns 0 and not "")
+- tlib#signs
+- tlib#input#List: set local statusline
+
+0.33
+- Don't reset statusline
+- Don't use fnamemodify() to split filenames (for performance reasons)
+- scratch: Set ft after setting up scratch options
+- tlib#map#PumAccept(key)

0 comments on commit 3654b70

Please sign in to comment.