Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Tree: 91874569d1
Fetching contributors…

Cannot retrieve contributors at this time

executable file 134 lines (97 sloc) 5.219 kB
*tmru.txt* Most Recently Used Files
Author: Tom Link, micathom at gmail com
This plugin provides a simple most recently used files facility. Users
can use patterns to filter the file list. Users can open multiple files
at once.
:TRecentlyUsedFiles ... open one or more recently used file(s)
:TRecentlyUsedFilesEdit ... edit the mru list
If viminfo contains "!", the data is stored as global variable. Otherwise,
tlib#cache is used -- which saves the data in ${vimfiles}/cache/tmru/files
by default.
By default tmru matches the search pattern on the full filename. If
you want to match on the basename, add the following to
~/vimfiles/after/plugin/tmru.vim: >
let g:tmru_world.filter_format = 'fnamemodify(%s, ":t")'
If you want to retain the last filter between calls of :TRecentlyUsedFiles, you
could also add the following lines: >
let g:tmru_world.cache_var = 'g:tmru_cache'
let g:tmru_world.restore_from_cache = ['filter']
Edit the vba file and type: >
:so %
See :help vimball for details. If you have difficulties or use vim 7.0,
please make sure, you have the current version of vimball
(vimscript #1502) installed or update your runtime.
This script requires tlib (vimscript #1863) to be installed.
Suggested maps (to be set in ~/.vimrc): >
noremap <m-r> :TRecentlyUsedFiles<cr>
g:tmruSize ................ |g:tmruSize|
g:tmruMenu ................ |g:tmruMenu|
g:tmruMenuSize ............ |g:tmruMenuSize|
g:tmru_events ............. |g:tmru_events|
g:tmru_update_viminfo ..... |g:tmru_update_viminfo|
g:tmru_file ............... |g:tmru_file|
g:tmruExclude ............. |g:tmruExclude|
g:tmru_ignorecase ......... |g:tmru_ignorecase|
g:tmru_check_disk ......... |g:tmru_check_disk|
TmruEdit .................. |TmruEdit()|
:TRecentlyUsedFiles ....... |:TRecentlyUsedFiles|
:TRecentlyUsedFilesEdit ... |:TRecentlyUsedFilesEdit|
g:tmruSize (default: 50)
The number of recently edited files that are registered.
g:tmruMenu (default: 'File.M&RU.')
The menu's prefix. If the value is "", the menu will be disabled.
g:tmruMenuSize (default: 20)
The number of recently edited files that are displayed in the
g:tmru_events (default: {...})
A dictionary of {EVENT: [LOAD, SAVE]}. If LOAD or SAVE evaluates
to true, the mru list is load/saved for the respective |{event}|.
LOAD = 1: Load the external representation of the mru list
LOAD = 0: Use the internal representation of the mru list
SAVE = 1: Save the mru list to its external representation
SAVE = 0: Save the mru list to its internal representation
SAVE = -1: Ignore this event for saving.
g:tmru_update_viminfo (default: 0)
If true, load and save the viminfo file on certain events -- see
This is useful if 'viminfo' includes '!' and |g:tmru_file| is
empty and you run multiple instances of vim.
g:tmru_file (default: tlib#persistent#Filename('tmru', 'files', 1))
Where to save the file list. The default value is only
effective, if 'viminfo' doesn't contain '!' -- in which case
the 'viminfo' will be used.
g:tmruExclude (default: '/te\?mp/\|vim.\{-}/\(doc\|cache\)/\|__.\{-}__$')
Ignore files matching this regexp.
g:tmru_ignorecase (default: !has('fname_case'))
If true, ignore case when comparing filenames.
g:tmru_check_disk (default: 1)
If TRUE, allow disk checks when adding files to the list by
means of a registered event (see |g:tmru_events|).
This may cause annoying slow-downs in certain settings. In this
case, set this variable to 0 in your |vimrc| file.
Return 0 if the file isn't readable/doesn't exist.
Otherwise return 1.
Display the MRU list.
Edit the MRU list.
Jump to Line
Something went wrong with that request. Please try again.