Hide line prefix in terminal

Close #113
This commit is contained in:
Kien N 2012-01-26 17:11:07 +07:00
parent f170a5f9b0
commit a126be38ef
2 changed files with 9 additions and 4 deletions

View File

@ -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

View File

@ -741,6 +741,7 @@ Special thanks:~
* Ken Earley <github.com/kenearley>
* Zak Johnson <github.com/zakj>
* Diego Viola <github.com/diegoviola>
* Thibault Duplessis <github.com/ornicar>
Bugfixes/Corrections.
===============================================================================