Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

弱问buffer跳转时的颜色怎么配? #20

Closed
athom opened this issue Jul 27, 2013 · 12 comments
Closed

弱问buffer跳转时的颜色怎么配? #20

athom opened this issue Jul 27, 2013 · 12 comments

Comments

@athom
Copy link

athom commented Jul 27, 2013

非常感谢你把minibuffer改得这么好用,基本上非常易用且满足绝大多需求.

然而我个人使用的时候还有点小小的纠结
我现在跳转的时候[bufferX]只会高亮最左边的中括号,期待的情况是[bufferX]都被高亮

http://screencast.com/t/LUukQ4MJ

你示例的图看起来确实我期待的结果,不知道你是怎么设置的.

@weynhamz
Copy link
Owner

你只是在 Minibuffer 窗口中移动光标,是没有颜色区分的( fholgado/issues/23 是关于这个特性的一个 Request,只是我个人不是很急需这个特性,一直没有去实现而已)。

图示的情况是在通过 bnbp 或者 MBEbnMBEbp 等命令改变 buffer。

@athom
Copy link
Author

athom commented Jul 27, 2013

哈哈,原来如此.

图示看来是隐藏魔法的效果

单独一个光标在闪屏幕远了的情况不容易看见.

我看看能不能提个pull request

@6thfdwp
Copy link

6thfdwp commented Apr 17, 2014

Hi thanks for your dedicated work. I tried to integrate it and had some problem with buffer highlighting and find this issue is the most relevant. I have no option but only put my question here. Hope someone will see and offer a help.
I follow the instruction to put these lines in my .vimrc file
hi link MBEVisibleChanged Title
hi link MBEVisibleActiveNormal StatusLine
hi link MBEVisibleActiveChanged Error

It does not work, all buffers are displayed as white, no difference when switching. I also tried in .vimrc
hi MBENormal guifg=#808080 guibg=fg
hi MBEChanged guifg=#CD5907 guibg=fg
hi MBEVisibleNormal guifg=#5DC2D6 guibg=fg
hi MBEVisibleChanged guifg=#F1266F guibg=fg
hi MBEVisibleActiveNormal guifg=#A6DB29 guibg=fg
hi MBEVisibleActiveChanged guifg=#F1266F guibg=fg

still no effect. I cannot figure it out. Did I put in the wrong place or some other problems? Thanks in advance.

@athom
Copy link
Author

athom commented Apr 17, 2014

hi, you can try this option in you .vimrc

 hi MBESelecting            guifg=#BEEF13 guibg=fg

check your plugin source, make sure you have the changes like this

athom@27b5f94

let me know if it still blocks you.

@6thfdwp
Copy link

6thfdwp commented Apr 18, 2014

Thanks. But still blocks me after making changes of what you told.

@6thfdwp
Copy link

6thfdwp commented Apr 18, 2014

Maybe leave it for a while, sometimes answer shows up when you don't want it. Thanks anyway.

@athom
Copy link
Author

athom commented Apr 18, 2014

hi @6thfdwp

It does not work, all buffers are displayed as white, no difference when switching. I also tried in .vimrc

according your description, maybe you just failed to load the plugin.

I can not help much due to the lacking of necessary info.

But you can try to debug in your local, with simple print info in some break points.

go the the plugin directory and edit the plugin/minibufexpl.vim file like this, hope it helps, good luck!

" Startup Check
"
" Has this plugin already been loaded? {{{
"
if exists('loaded_minibufexplorer')
  echo "ooops!!"
  finish
endif
let loaded_minibufexplorer = 1
echo "go on!"

" }}}

@6thfdwp
Copy link

6thfdwp commented Apr 18, 2014

@athom
It is strange that it did not echo anything after adding these. I am thinking if this plugin is not loaded properly, how is it possible to display buffer on the top and I can still use :bp :bn to switch between different buffers?

I can give you how my environment looks like. I just follow some guide to use pathogen to manage plugins. So minibuf is put in ~/.vim/bundle/minibufexpl. And I put some mapping in the .vimrc

nnoremap <D-u> :bp<cr>
inoremap <D-u> <esc>:bp<cr>
nnoremap <D-i> :bn<cr>
inoremap <D-i> <esc>:bn<cr>
nnoremap <D-y> :bw<cr>

let g:miniBufExplUseSingleClick = 1
let g:did_minibufexplorer_syntax_inits = 1
let g:miniBufExplAutoStart = 1
let g:miniBufExplDebugMode  = 1
" MiniBufExpl Colors
hi MBENormal               guifg=#808080 guibg=fg
hi MBESelecting            guifg=#BEEF13 guibg=fg
hi MBEChanged              guifg=#CD5907 guibg=fg
hi MBEVisibleNormal        guifg=#5DC2D6 guibg=fg
hi MBEVisibleChanged       guifg=#F1266F guibg=fg
hi MBEVisibleActiveNormal  guifg=#A6DB29 guibg=fg

@athom
Copy link
Author

athom commented Apr 18, 2014

how is it possible to display buffer on the top and I can still use :bp :bn to switch between different buffers?

:bp :bn is one of default settings, you can :h bp to see the usage in the doc.

So I am 90% sure your problem is loading issue.

Sorry I am not familiar with the pathogen, can you use other plugin via pathogen successfully? or just maybe this plugin not support pathogen?

BTW, I am using Vundle for plugin management, one of the possible issue of failed to loading is I forgot to set the Vundle trigger in my .vimrc.

filetype off
set runtimepath+=~/.vim/bundle/vundle/
call vundle#rc()
source ~/.vim/VundleFile
filetype plugin indent on

@6thfdwp
Copy link

6thfdwp commented Apr 18, 2014

Thanks for pointing out, but other plugins (nerdtree, commenter etc) work just fine. For pathogen, I know it is an alternative for vundle. I do not fully know every details about it, just follow their document guide to set up. And I had similar commands to set pathogen trigger at the beginning of my .vimrc.

I will double check it and probably seek more help from you. Thanks!

@weynhamz
Copy link
Owner

You probably need to set 'g:did_minibufexplorer_syntax_inits = 1' so that MBE does not overwrite your settings, see 'MiniBufExplHighlighting' section in the doc.

@6thfdwp
Copy link

6thfdwp commented Apr 22, 2014

I have already set it. I also set the debugmode=1 and got some messages showed in the screenshot below:
image

Still not sure whether the minibuf is loaded correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants