Skip to content

Commit

Permalink
Add syntax highlighting for file names
Browse files Browse the repository at this point in the history
  • Loading branch information
yegappan committed Mar 6, 2014
1 parent 3a60c91 commit 14fe330
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion plugin/mru.vim
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 14fe330

Please sign in to comment.