From 14fe33067de27a6a982725514acbd85318c4b1d8 Mon Sep 17 00:00:00 2001 From: Yegappan Lakshmanan Date: Wed, 5 Mar 2014 19:13:52 -0800 Subject: [PATCH] Add syntax highlighting for file names --- plugin/mru.vim | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/plugin/mru.vim b/plugin/mru.vim index a122357..f18f611 100644 --- a/plugin/mru.vim +++ b/plugin/mru.vim @@ -1,7 +1,7 @@ " File: mru.vim " Author: Yegappan Lakshmanan (yegappan AT yahoo DOT com) " Version: 3.8 -" Last Modified: January 22, 2014 +" Last Modified: March 5, 2014 " Copyright: Copyright (C) 2003-2014 Yegappan Lakshmanan " License: Permission is hereby granted to use and distribute this code, " with or without modifications, provided that this copyright @@ -124,6 +124,16 @@ " list. When you have multiple instances of Vim running at the same time, the " latest MRU list will show up in all the instances of Vim. " +" The MRUFilename syntax group is used to highlight the file names in the MRU +" window. By default, this syntax group is linked to the Identifier highlight +" group. You can change the highlight group by adding the following line in +" your .vimrc: +" +" highlight link MRUFileName LineNr +" +" The MRU buffer uses the 'mru file type. You can use this file type to add +" custom auto commands, syntax highlighting, etc. +" " Configuration " ------------- " By changing the following variables you can configure the behavior of this @@ -824,6 +834,10 @@ function! s:MRU_Open_Window(...) " Move the cursor to the beginning of the file normal! gg + " Add syntax highlighting for the file names + syntax match MRUFileName '^.\{-}\ze(' + highlight default link MRUFileName Identifier + setlocal nomodifiable endfunction