tselectfiles : A quick file selector/browser/explorer (sort of)
| script karma
Downloaded by 3719
Comments, bugs, improvements
script versions (upload new version)
|This plugin provides a simple file browser. It is not a full blown
explorer but can be nevertheless be useful for quickly selecting a few
files or renaming them.
As the plugin does some caching in the background, the filelist is only
generated once for each path or when called with [!]. In conjuncture
with the use of the [wbg]:tselectfile_filter_rx variable, this provides
for use as a simple ad-hoc project manager.
When I open a file under "~/vimfiles", I set b:tselectfiles_dir
to all the relevant directories under "~/vimfiles" and then set
b:tselectfile_filter_rx = expand('%:t:r'). Thus, when I open
"~/vimfiles/plugin/foo.vim", b:tselectfile_filter_rx is "foo", and
:TSelectFiles shows all the files under "~/vimfiles" matching "foo".
- list files (recursively or the in the current directory only),
dynamically select files matching a pattern
- open files
- preview files
- rename/move files
- batch rename/move files (using a regular expression)
- copy files
- delete files
- show file info
Related files: If you set |g:tselectfiles_filter_rx| to some appropriate
value, only files matching that regexp will be shown initially. This can
be used to restrict the list to "related" files. (The initial filter can
be removed by pressing <c-bs>.) See also |tselectfiles#BaseFilter()| and
Rolodex: If a filename matches an entry in
|g:tselectfiles_filedescription_rx| (a dictionnary patter => funcref),
funcref(filename) will be called to retrieve the file's description.
This function could be used to extract metadata or selected lines from
the file etc. By mapping one record onto one file, you would get some
sort of rolodex-like database. See
|tselectfiles#FormatVikiMetaDataOrFirstLine()| for an example for
viki/deplate (vimscript #861) formatted files.
|Edit the vba file and type: >
See :help vimball for details. If you have difficulties, please make
sure, you have the current version of vimball (vimscript #1502)
This script requires tlib (vimscript #1863) to be installed.
Also available via git
Click on the package to download.
ip used for rating: 22.214.171.124
||- tselectfiles#AgentPreviewFile(): redraw
- Convert encoding if the assumed &fenc != &enc
- tselectfiles#FormatVikiMetaDataOrFirstLine: Reversed argument order (world is optional)
- Renamed variables named g:tselectfiles_* to g:tselectfiles#*
MD5 checksum: 41885c7229478d59e37fd7a222767a61
||- :TSelectFiles, :TSelectFilesInSubdirs, tselectfiles#SelectFiles: take
an initial pattern as the second optional argument (i.e. if you pass a
directory as first optional argument, you'll have to escape blanks with
- tselectfiles#SelectFiles: if dir is &, search &path
- tselectfiles_filter_rx is always evaluated unless a pattern is
provided as extra argument
- tselectfiles_prefix is always evaluated
||- Don't assume s:select_files_pattern.limit is set
- Include .* in tselectfiles_hidden_rx
- FIX: Include .* files (but hide them by default; thanks to
- FIX: If 'splitbelow' is false, opening buffers in split view didn't
properly work (thanks to naquad/Daniil F.)
||- Require tlib 0.28
||- NEW: g:tselectfiles_part_subst* variables (for use with tselectfiles#BaseFilter())
- NEW: [bg]:tselectfiles_filter_basename variable (if true, match on basename only)
||- [gbw]tselectfiles_prefix: Remove prefix from filenames in list
- [gbw]tselectfiles_limit variable
- [wbg]:tselectfiles_filter_rx is used only when no directory is given on the command line.
- Require tlib >= 0.18
- If the filename matches an entry in g:tselectfiles_filedescription_rx, use the expression there to construct a file description (eg the file's first line)
- Option to run vimgrep on selected files.
- tselectfiles#BaseFilter(): Set b:tselectfiles_filter_rx to something useful.
- tselectfiles#BaseFilter(): takes 2 optional arguments to substitute a rx in the current buffer's filename.
- tselectfiles_filter_rx: Set as array
- Problem when browsing single directories
||- "Delete file" will ask whether to delete a corresponding buffer too.
- <c-w> ... View file in original window
- Disabled <c-o> Open dir
- Require tlib >= 0.13
- When renaming a file that's loaded, rename also the buffer.
- You can filter the list of selected files via setting the
- Renamed g:tselectfiles_no_cache to g:tselectfiles_no_cache_rx
- [bg]:tselectfiles_use_cache and [bg]:tselectfiles_no_cache_rx can now
also be set per buffer.
- Renamed some variables from tselectfile_* to tselectfiles_*.
- Can be "suspended" (i.e. you can switch back to the orignal window)
||- Require tlib 0.9
- "Delete file" will ask whether to delete a corresponding buffer too.