tlib is a Vim plugin library that provides some utility functions. There isn't much need to install it unless another plugin requires you to do so.
The most useful functions provided by this library probably are:
- Display a list
- Dynamically filter items matching a pattern (somethat like google) - e.g. you filter for "foo -bar": show all entries containing foo but not bar.
- Select items from a list
- Do stuff
- Developers can define keys that trigger some action with the selected items
+ Edit a list (copy, cut, paste, delete, edit ...)
:TLet VAR = VALUE
Set a variable only if it doesn't already exist.
Open a scratch buffer (a buffer without a file).
:TVarArg VAR1, [VAR2, DEFAULT2] ...
Handle "rest" (variable) arguments in functions.
TVarArg ['a', 1], 'b'
echo 'a='. a
echo 'b='. b
Ever wondered how to efficiently browse the output of a command without redirecting it to a file? This command takes a command as argument and presents the output via |tlib#input#List()| so that you can easily search for a keyword (e.g. the name of a variable or function) and the like.
If you press enter, the selected line will be copied to the command line. Press ESC to cancel browsing.
TBrowseOutput 20verb TeaseTheCulprit
When installing tlib for the first time, it might be necessary that you create the directory ~/.vim/autoload/tlib before sourcing the vimball. If you have difficulties to install this plugin, please make sure to use the current version of vimball (vimscript #1502). The vimball that comes with vim 7.0 is most likely not recent enough.
Open the file and type
see :help vimball for details.
What's New in This Release:
· FIX: very magic mode for tlib#rx#Escape()
· FIX: tlib#arg#Ex: escape "!"
· Respect the setting of g:tlib_inputlist_filename_indicators
· tlib#input#List(): Reset syntax on resume; option to make list window "sticky"
· Simplified tlib#url#Decode()
· tlib#arg#Ex(): use fnameescape() if available