Ⅰ. 插件描述
Most Recently Used Files in VimⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'tomtom/tmru'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'tomtom/tmru'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'tomtom/tmru'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/tomtom/tmru_vim
Ⅳ. 文档说明
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
- The list of recently used files is synchronized across multiple
- of (g)vim running simultaneously.
By default, tmru will remember 500 files (see |g:tmruSize|) accessible
via the :Tmru command. The list can be easily filtered. Users can
optionally use fuzzy patterns, which is not enabled by default though
(see |g:tlib#input#filter_mode|).
Files can be grouped in sessions:
- Use named sessions to group files that are frequently edited
together
- Use numbered sessions to open files you edited during one of the
latest editing sessions
Files can be marked as "sticky" -- they will never be removed from the
list.
:Tmru ... open one or more recently used file(s):Tmruedit ... 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 your |.vimrc|
file: >
let g:tmru_world = {}
let g:tmru_world.filter_format = 'fnamemodify(%s, ":t")'
If you want to retain the last filter between calls of :Tmru, 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> :Tmru<cr>
Dependencies:
tlib (>= 1.27) :: http://github.com/tomtom/tlib_vim
License: GPLv3 or later