From 9ca92fb813845f24774ddd9453621a1ac499aba1 Mon Sep 17 00:00:00 2001 From: Doug McInnes Date: Thu, 10 Jan 2013 17:47:31 -0800 Subject: [PATCH] add g:buffetbareview to disable hint text --- plugin/buffet.vim | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/plugin/buffet.vim b/plugin/buffet.vim index 0a9573b..0e0aeb2 100644 --- a/plugin/buffet.vim +++ b/plugin/buffet.vim @@ -64,6 +64,9 @@ let s:buffet_version = '2.60' " You can now set youe own maps to the commands given at the end of this file " instead. " +" You can disable the help text in the Buffet window by seting this variable: +" let g:buffetbareview = 1 +" " Last Change: 2012 Nov " Maintainer: Sandeep.c.r " @@ -182,7 +185,9 @@ function! s:display_buffer_list(gotolastbuffer) call add(s:bufrecent,l:i) endif endfor - call setline(1,"Buffet-".s:buffet_version." ( Enter Number to search for a buffer number )") + if (!exists("g:buffetbareview")) + call setline(1,"Buffet-".s:buffet_version." ( Enter Number to search for a buffer number )") + endif let s:displayed = [] let s:last_buffer_line = 0 let l:columns = [] @@ -234,14 +239,17 @@ function! s:display_buffer_list(gotolastbuffer) if(s:last_buffer_line == 0) let s:last_buffer_line = l:line+1 endif - exe "resize ".(len(s:displayed)+4) + let l:size = (exists("g:buffetbareview")) ? 2 : 4 + exe "resize ".(len(s:displayed) + l:size) call setline(l:line,"") let l:line+=1 - if(!exists("g:buffetdisabledefaultmaps") || g:buffetdisabledefaultmaps == 0) - call setline(l:line,"Enter(Load buffer) | hh/v/-/c (Horizontal/Vertical/Vertical Diff Split/Clear Diff) | o(Maximize) | t(New tab) | a(Toggle detail) | m(Toggle buffer mark) | M(clear all marks) | g(Go to window) | d(Delete buffer) | x(Close window) ") - else - call setline(l:line,"Default mappings disabled.") - endif + if (!exists("g:buffetbareview")) + if (!exists("g:buffetdisabledefaultmaps") || g:buffetdisabledefaultmaps == 0) + call setline(l:line,"Enter(Load buffer) | hh/v/-/c (Horizontal/Vertical/Vertical Diff Split/Clear Diff) | o(Maximize) | t(New tab) | a(Toggle detail) | m(Toggle buffer mark) | M(clear all marks) | g(Go to window) | d(Delete buffer) | x(Close window) ") + else + call setline(l:line,"Default mappings disabled.") + endif + end let l:fg = synIDattr(hlID('Statement'),'fg','Question') exe 'highlight buffethelpline guibg=black' exe 'highlight buffethelpline guifg=orange'