|
@@ -2,7 +2,7 @@
|
|
|
|
|
|
|
|
Author: Yegappan Lakshmanan (yegappan AT yahoo DOT com)
|
|
Author: Yegappan Lakshmanan (yegappan AT yahoo DOT com)
|
|
|
For Vim version 7.0 and above
|
|
For Vim version 7.0 and above
|
|
|
-Last change: Feb 1, 2021
|
|
|
|
|
|
|
+Last change: Feb 2, 2021
|
|
|
|
|
|
|
|
==============================================================================
|
|
==============================================================================
|
|
|
*mru-license*
|
|
*mru-license*
|
|
@@ -44,15 +44,14 @@ file names as you open/edit them in Vim.
|
|
|
|
|
|
|
|
This plugin will work on all the platforms where Vim is supported. This
|
|
This plugin will work on all the platforms where Vim is supported. This
|
|
|
plugin will work in both console and GUI Vim. This version of the MRU
|
|
plugin will work in both console and GUI Vim. This version of the MRU
|
|
|
-plugin needs Vim 7.0 and above. If you are using an earlier version of
|
|
|
|
|
-Vim, then you should use an older version of the MRU plugin.
|
|
|
|
|
|
|
+plugin needs Vim 7.0 and above.
|
|
|
|
|
|
|
|
The recently used filenames are stored in a file specified by the Vim
|
|
The recently used filenames are stored in a file specified by the Vim
|
|
|
MRU_File variable.
|
|
MRU_File variable.
|
|
|
|
|
|
|
|
The Github repository for the MRU plugin is available at:
|
|
The Github repository for the MRU plugin is available at:
|
|
|
|
|
|
|
|
- http://github.com/yegappan/mru
|
|
|
|
|
|
|
+ https://github.com/yegappan/mru
|
|
|
|
|
|
|
|
==============================================================================
|
|
==============================================================================
|
|
|
2. Installation *mru-installation*
|
|
2. Installation *mru-installation*
|
|
@@ -84,6 +83,13 @@ To uninstall the MRU plugin, either use the uninstall command provided by the
|
|
|
plugin manager or manually remove the plugin/mru.vim, and doc/mru.txt
|
|
plugin manager or manually remove the plugin/mru.vim, and doc/mru.txt
|
|
|
files from either the $HOME/.vim or $HOME/vimfiles directory.
|
|
files from either the $HOME/.vim or $HOME/vimfiles directory.
|
|
|
|
|
|
|
|
|
|
+You can also install the latest version of the plugin directly from github
|
|
|
|
|
+using the following steps (in Vim 8.0 and above): >
|
|
|
|
|
+
|
|
|
|
|
+ $ mkdir -p $HOME/.vim/pack/downloads/start/mru
|
|
|
|
|
+ $ cd $HOME/.vim/pack/downloads/start/mru
|
|
|
|
|
+ $ git clone https://github.com/yegappan/mru
|
|
|
|
|
+<
|
|
|
==============================================================================
|
|
==============================================================================
|
|
|
3. Usage *mru-usage* *:MRU*
|
|
3. Usage *mru-usage* *:MRU*
|
|
|
|
|
|
|
@@ -212,11 +218,11 @@ to exclude file names matching a pattern, then you can set the
|
|
|
MRU_Exclude_Files variable to a Vim regular expression. If any part of a
|
|
MRU_Exclude_Files variable to a Vim regular expression. If any part of a
|
|
|
file name matches the regular expression, then it is not added to the MRU
|
|
file name matches the regular expression, then it is not added to the MRU
|
|
|
list. By default, this variable is set to an empty string. For example, to
|
|
list. By default, this variable is set to an empty string. For example, to
|
|
|
-not include files in the temporary (/tmp, /var/tmp and d:\temp) directories,
|
|
|
|
|
|
|
+not include files in the temporary (/tmp, /var/tmp and D:\temp) directories,
|
|
|
you can set the MRU_Exclude_Files variable to
|
|
you can set the MRU_Exclude_Files variable to
|
|
|
>
|
|
>
|
|
|
let MRU_Exclude_Files = '^/tmp/.*\|^/var/tmp/.*' " For Unix
|
|
let MRU_Exclude_Files = '^/tmp/.*\|^/var/tmp/.*' " For Unix
|
|
|
- let MRU_Exclude_Files = '^c:\\temp\\.*' " For MS-Windows
|
|
|
|
|
|
|
+ let MRU_Exclude_Files = '^D:\\temp\\.*' " For MS-Windows
|
|
|
<
|
|
<
|
|
|
The specified pattern should be a Vim regular expression pattern. Note that
|
|
The specified pattern should be a Vim regular expression pattern. Note that
|
|
|
you can specify multiple patterns using '\|'.
|
|
you can specify multiple patterns using '\|'.
|
|
@@ -255,6 +261,13 @@ window open.
|
|
|
>
|
|
>
|
|
|
let MRU_Auto_Close = 0
|
|
let MRU_Auto_Close = 0
|
|
|
<
|
|
<
|
|
|
|
|
+When opening a file from the MRU list, the file is opened in the current
|
|
|
|
|
+tab. If the selected file has to be opened in a tab always, then set the
|
|
|
|
|
+following variable to 1. If the file is already opened in a tab, then the
|
|
|
|
|
+cursor will be moved to that tab.
|
|
|
|
|
+>
|
|
|
|
|
+ let MRU_Open_File_Use_Tabs = 1
|
|
|
|
|
+<
|
|
|
If you don't use the "File->Recent Files" menu and want to disable it,
|
|
If you don't use the "File->Recent Files" menu and want to disable it,
|
|
|
then you can set the 'MRU_Add_Menu' variable to zero. By default, the
|
|
then you can set the 'MRU_Add_Menu' variable to zero. By default, the
|
|
|
menu is enabled.
|
|
menu is enabled.
|
|
@@ -276,16 +289,38 @@ number of file names displayed in a single sub-menu:
|
|
|
>
|
|
>
|
|
|
let MRU_Max_Submenu_Entries = 15
|
|
let MRU_Max_Submenu_Entries = 15
|
|
|
<
|
|
<
|
|
|
|
|
+The :MRU command accepts a string that is used to filter the file names
|
|
|
|
|
+displayed in the MRU window. The MRU command also supports command-line
|
|
|
|
|
+completion using the supplied string. If Vim supports fuzzy matching
|
|
|
|
|
+(supported from Vim 8.2.1665), then the :MRU command will fuzzy match the
|
|
|
|
|
+supplied string against the file names. Otherwise it will use regular
|
|
|
|
|
+expression matching. To always use regular expression matching, you can set
|
|
|
|
|
+the MRU_FuzzyMatch variable to 0:
|
|
|
|
|
+>
|
|
|
|
|
+ let MRU_FuzzyMatch = 0
|
|
|
|
|
+<
|
|
|
In the MRU window, the filenames are displayed in two parts. The first part
|
|
In the MRU window, the filenames are displayed in two parts. The first part
|
|
|
contains the file name without the path and the second part contains the
|
|
contains the file name without the path and the second part contains the
|
|
|
full path to the file in parenthesis. This format is controlled by the
|
|
full path to the file in parenthesis. This format is controlled by the
|
|
|
MRU_Filename_Format variable. If you prefer to change this to some other
|
|
MRU_Filename_Format variable. If you prefer to change this to some other
|
|
|
-format, then you can modify the MRU_Filename_Format variable. For example,
|
|
|
|
|
-to display the full path without splitting it, you can set this variable
|
|
|
|
|
-as shown below:
|
|
|
|
|
|
|
+format, then you can modify the MRU_Filename_Format variable.
|
|
|
|
|
+
|
|
|
|
|
+The MRU_Filename_Format variable contains a |Dict| with the following keys:
|
|
|
|
|
+ formatter: a string value containing an expression that specifies how to
|
|
|
|
|
+ split/format the filename. In the expression v:val refers to the
|
|
|
|
|
+ complete path to a file in the MRU list.
|
|
|
|
|
+ parser : a string value containing an regular expression that specifies
|
|
|
|
|
+ how to read the filename back from a line in the MRU window.
|
|
|
|
|
+ syntax : a string value with a regular expression that matches the part to
|
|
|
|
|
+ be highlighted in the MRU window.
|
|
|
|
|
+
|
|
|
|
|
+For example, to display the full path of the files without splitting it, you
|
|
|
|
|
+can set this variable as shown below:
|
|
|
>
|
|
>
|
|
|
- let MRU_Filename_Format =
|
|
|
|
|
- \ {'formatter':'v:val', 'parser':'.*', 'syntax': '[^/\\]\+$'}
|
|
|
|
|
|
|
+ let MRU_Filename_Format = {
|
|
|
|
|
+ \ 'formatter':'v:val',
|
|
|
|
|
+ \ 'parser':'.*',
|
|
|
|
|
+ \ 'syntax': '[^/\\]\+$'}
|
|
|
<
|
|
<
|
|
|
==============================================================================
|
|
==============================================================================
|
|
|
5. FZF Integration *mru-fzf*
|
|
5. FZF Integration *mru-fzf*
|