Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 8b640eab52
Fetching contributors…

Cannot retrieve contributors at this time

executable file 167 lines (123 sloc) 6.917 kb
*tmru.txt* Most Recently Used Files
Author: Tom Link, micathom at gmail com
This plugin allows users to open recently used files. Users can filter
the file list by typing a pattern. Users can open multiple files at
once. The list of recently used files is synchronized across multiple
instances of (g)vim running simultaneously.
: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']
-----------------------------------------------------------------------
Install~
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>
========================================================================
Contents~
g:tmruMenu ......................... |g:tmruMenu|
g:tmruMenuSize ..................... |g:tmruMenuSize|
g:tmru_sessions .................... |g:tmru_sessions|
g:tmru#display_relative_filename ... |g:tmru#display_relative_filename|
g:tmru_single_instance_mode ........ |g:tmru_single_instance_mode|
g:tmru_update_viminfo .............. |g:tmru_update_viminfo|
g:tmru_events ...................... |g:tmru_events|
g:tmru_file ........................ |g:tmru_file|
g:tmruSize ......................... |g:tmruSize|
g:tmruExclude ...................... |g:tmruExclude|
g:tmru_ignorecase .................. |g:tmru_ignorecase|
g:tmru_check_disk .................. |g:tmru_check_disk|
TmruObj ............................ |TmruObj()|
:TRecentlyUsedFiles ................ |:TRecentlyUsedFiles|
:TMRU .............................. |:TMRU|
:TRecentlyUsedFilesEdit ............ |:TRecentlyUsedFilesEdit|
:TRecentlyUsedFilesSessions ........ |:TRecentlyUsedFilesSessions|
========================================================================
plugin/tmru.vim~
*g:tmruMenu*
g:tmruMenu (default: 'File.M&RU.')
The menu's prefix. If the value is "", the menu will be disabled.
*g:tmruMenuSize*
g:tmruMenuSize (default: 20)
The number of recently edited files that are displayed in the
menu.
*g:tmru_sessions*
g:tmru_sessions (default: 9)
If greater than zero, make tmru to save the file list opened when
closing vim. Save at most information for N sessions.
Setting this variable to 0, disables this feature.
This variable must be set before starting vim.
*g:tmru#display_relative_filename*
g:tmru#display_relative_filename (default: 0)
If true, display the relative filename. This requires
|g:tlib#input#format_filename| to be set to "r".
*g:tmru_single_instance_mode*
g:tmru_single_instance_mode (default: 0)
If true, work as if only one instance of vim is running. This
results in reading and writing the mru list less frequently
from/to disk. The list won't be synchronized across multiple
instances of vim running in parallel.
*g:tmru_update_viminfo*
g:tmru_update_viminfo (default: !g:tmru_single_instance_mode)
If true, load and save the viminfo file on certain events -- see
|g:tmru_events|.
This is useful if 'viminfo' includes '!' and |g:tmru_file| is
empty and you run multiple instances of vim.
*g:tmru_events*
g:tmru_events (default: {...})
A dictionary of {EVENT: ACTION = BOOL, ...}, where ACTION is one
of the following:
load ....... Load the external representation from disk
register ... Register the current buffer
save ....... Save mru list to disk (currently ignored)
*g:tmru_file*
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:tmruSize*
g:tmruSize (default: empty(g:tmru_file) ? 50 : 500)
The number of recently edited files that are registered.
The size is smaller if viminfo is used (see |g:tmru_file|).
*g:tmruExclude*
g:tmruExclude (default: '/te\?mp/\|vim.\{-}/\(doc\|cache\)/\|__.\{-}__$')
Ignore files matching this regexp.
*g:tmru_ignorecase*
g:tmru_ignorecase (default: !has('fname_case'))
If true, ignore case when comparing filenames.
*g:tmru_check_disk*
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.
*TmruObj()*
TmruObj(...)
*:TRecentlyUsedFiles*
:TRecentlyUsedFiles
Display the MRU list.
*:TMRU*
:TMRU
Alias for |:TRecentlyUsedFiles|.
*:TRecentlyUsedFilesEdit*
:TRecentlyUsedFilesEdit
Edit the MRU list.
*:TRecentlyUsedFilesSessions*
:TRecentlyUsedFilesSessions
Open files from a previous session (see |g:tmru_sessions|).
This command is only available if g:tmru_sessions > 0.
vim:tw=78:fo=tcq2:isk=!-~,^*,^|,^":ts=8:ft=help:norl:
Jump to Line
Something went wrong with that request. Please try again.