Quantcast
Channel: CakePHP, CodeIgniter and Web Scaling
Viewing all articles
Browse latest Browse all 10

Solve double minibufexplorer opened in VIM

$
0
0

When using Minibufexplorer in VIM, I usually use Fuzzfinder for opening files. But, somehow, I see double minibufexplorer window every open more than 2 files. To solve this issue :

1
let g:miniBufExplorerMoreThanOne = 0

This will for miniBufExplorer into single window only. Another VIM configuration that may useful, taken from http://dotfiles.org/~joaoTrindade/.vimrc

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
" Plugin related {{{1
"#########################################

" Minibuffer{{{
""""""""""""""""""""""""""""""
"Show the miniBufExplorer from the start
let g:miniBufExplorerMoreThanOne = 0

"Not using because I don't use the vertival window
"Use a vertical windows
"let g:miniBufExplVSplit = 5

"Put the miniBufExplorer windows at the right
"let g:miniBufExplSplitBelow=1

"Maximum size of the mini buffer explorer window
"let g:miniBufExplMaxSize = 15

"Still haven't discovered what it does
"let g:miniBufExplMapWindowNavArrows = 1
"let g:miniBufExplMapCTabSwitchBufs = 1
"let g:miniBufExplUseSingleClick = 1
"let g:miniBufExplMapWindowNavVim = 1
"
" make tabs show complete (no broken on two lines)
let g:miniBufExplTabWrap = 1

" If you use other explorers like TagList you can (As of 6.2.8) set it at 1:
let g:miniBufExplModSelTarget = 1

" If you would like to single click on tabs rather than double clicking on them to goto the selected buffer.
let g:miniBufExplUseSingleClick = 1

"for buffers that have NOT CHANGED and are NOT VISIBLE.
highlight MBENormal guifg=LightBlue

" for buffers that HAVE CHANGED and are NOT VISIBLE
highlight MBEChanged guifg=Red

" buffers that have NOT CHANGED and are VISIBLE
highlight MBEVisibleNormal term=bold cterm=bold gui=bold guifg=Green

" buffers that have CHANGED and are VISIBLE
highlight MBEVisibleChanged term=bold cterm=bold gui=bold guifg=Green

let g:bufExplorerSortBy = "name"

autocmd BufRead,BufNew :call UMiniBufExplorer

"""""""""""""""""""""""""""""""""""
" Stolen from http://dev.gentoo.org/~bass/configs/vimrc.html
"
" Adapt the status line accourding to the window
"""""""""""""""""""""""""""""""""""
if has("autocmd")
    au FileType qf
                \ if &buftype == "quickfix" |
                \     setlocal statusline=%2*%-3.3n%0* |
                \     setlocal statusline+=\ \[Compiler\ Messages\] |
                \     setlocal statusline+=%=%2*\ %<%P |
                \ endif

    fun! FixMiniBufExplorerTitle()
        if "-MiniBufExplorer-" == bufname("%")
            setlocal statusline=%2*%-3.3n%0*
            setlocal statusline+=\[Buffers\]
            setlocal statusline+=%=%2*\ %<%P
        endif
    endfun

    au BufWinEnter *
                \ let oldwinnr=winnr() |
                \ windo call FixMiniBufExplorerTitle() |
                \ exec oldwinnr . " wincmd w"
endif
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""}}}

" Showmarks {{{
""""""""""""""""""""""""""""""
if has("gui_running")
    let g:showmarks_enable=1
else
    let g:showmarks_enable=0
    let loaded_showmarks=1
endif

let g:showmarks_include="abcdefghijklmnopqrstuvwxyz"

if has("autocmd")
    fun! FixShowmarksColours()
        if has('gui')
            hi ShowMarksHLl gui=bold guifg=#a0a0e0 guibg=#2e2e2e
            hi ShowMarksHLu gui=none guifg=#a0a0e0 guibg=#2e2e2e
            hi ShowMarksHLo gui=none guifg=#a0a0e0 guibg=#2e2e2e
            hi ShowMarksHLm gui=none guifg=#a0a0e0 guibg=#2e2e2e
            hi SignColumn   gui=none guifg=#f0f0f8 guibg=#2e2e2e
        endif
    endfun
    if v:version >= 700
        autocmd VimEnter,Syntax,ColorScheme * call FixShowmarksColours()
    else
        autocmd VimEnter,Syntax * call FixShowmarksColours()
    endif
endif
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""}}}

Viewing all articles
Browse latest Browse all 10

Trending Articles