From a126be38ef262f391d9bcbe883b0f742cf28635d Mon Sep 17 00:00:00 2001 From: Kien N Date: Thu, 26 Jan 2012 17:11:07 +0700 Subject: [PATCH] Hide line prefix in terminal Close #113 --- autoload/ctrlp.vim | 12 ++++++++---- doc/ctrlp.txt | 1 + 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/autoload/ctrlp.vim b/autoload/ctrlp.vim index c1d9f15..82a5030 100644 --- a/autoload/ctrlp.vim +++ b/autoload/ctrlp.vim @@ -1123,23 +1123,27 @@ endf " Highlighting {{{2 fu! s:syntax() sy match CtrlPNoEntries '^ == NO ENTRIES ==$' - sy match CtrlPLineMarker '^>' + sy match CtrlPLinePre '^>' hi link CtrlPNoEntries Error - hi CtrlPLineMarker guifg=bg + if exists('g:colors_name') + exe 'hi CtrlPLinePre '.( has("gui_running") ? 'gui' : 'cterm' ).'fg=bg' + en endf fu! s:highlight(pat, grp, bfn) cal clearmatches() if !empty(a:pat) && s:ispathitem() let pat = substitute(a:pat, '\~', '\\~', 'g') - let pat = s:regexp ? pat : escape(pat, '.') + let pat = s:regexp + \ ? substitute(pat, '\\\@ \\zs', 'g') + \ : escape(pat, '.') " Match only filename if s:byfname && a:bfn let pat = substitute(pat, '\[\^\(.\{-}\)\]\\{-}', '[^\\/\1]\\{-}', 'g') let pat = substitute(pat, '$', '\\ze[^\\/]*$', 'g') en cal matchadd(a:grp, '\c'.pat) - cal matchadd('CtrlPLineMarker', '^>') + cal matchadd('CtrlPLinePre', '^>') en endf diff --git a/doc/ctrlp.txt b/doc/ctrlp.txt index 0c4cbef..98989c8 100644 --- a/doc/ctrlp.txt +++ b/doc/ctrlp.txt @@ -741,6 +741,7 @@ Special thanks:~ * Ken Earley * Zak Johnson * Diego Viola + * Thibault Duplessis Bugfixes/Corrections. ===============================================================================