Permalink
Browse files

Version 7.2.8

Thanks to Charles Campbell for integrating bufexplorer with GDBMGR.
(http://mysite.verizon.net/astronaut/vim/index.html#GDBMGR)
  • Loading branch information...
1 parent b6b694c commit 8c75e65b647238febd0257658b150f717a136359 jeff lanzarotta committed with Nov 4, 2010
Showing with 260 additions and 227 deletions.
  1. +18 −7 doc/bufexplorer.txt
  2. +242 −220 plugin/bufexplorer.vim
View
25 doc/bufexplorer.txt
@@ -1,7 +1,7 @@
*bufexplorer.txt* Buffer Explorer Last Change: 16 Feb 2010
Buffer Explorer *buffer-explorer* *bufexplorer*
- Version 7.2.7
+ Version 7.2.8
Plugin for easily exploring (or browsing) Vim |:buffers|.
@@ -106,6 +106,10 @@ WINDOW LAYOUT *bufexplorer-windowlayout*
===============================================================================
CUSTOMIZATION *bufexplorer-customization*
+ *g:bufExplorerChgWin*
+If set, bufexplorer will bring up the selected buffer in the window specified
+by g:bufExplorerChgWin.
+
*g:bufExplorerDefaultHelp*
To control whether the default help is displayed or not, use: >
let g:bufExplorerDefaultHelp=0 " Do not show default help.
@@ -125,6 +129,10 @@ use: >
let g:bufExplorerFindActive=1 " Go to active window.
The default is to be taken to the active window.
+ *g:bufExplorerFuncRef*
+When a buffer is selected, the functions specified either singly or as a list
+will be called.
+
*g:bufExplorerReverseSort*
To control whether to sort the buffer in reverse order or not, use: >
let g:bufExplorerReverseSort=0 " Do not sort in reverse order.
@@ -145,6 +153,12 @@ directory, use: >
let g:bufExplorerShowRelativePath=1 " Show relative paths.
The default is to show absolute paths.
+ *g:bufExplorerShowTabBuffer*
+To control weither or not to show buffers on for the specific tab or not, use: >
+ let g:bufExplorerShowTabBuffer=0 " No.
+ let g:bufExplorerShowTabBuffer=1 " Yes.
+The default is not to show.
+
*g:bufExplorerShowUnlisted*
To control whether to show unlisted buffer or not, use: >
let g:bufExplorerShowUnlisted=0 " Do not show unlisted buffers.
@@ -182,15 +196,12 @@ current window, use: >
let g:bufExplorerSplitRight=1 " Split right.
The default is to use the global &splitright.
- *g:bufExplorerShowTabBuffer*
-To control weither or not to show buffers on for the specific tab or not, use: >
- let g:bufExplorerShowTabBuffer=0 " No.
- let g:bufExplorerShowTabBuffer=1 " Yes.
-The default is not to show.
-
===============================================================================
CHANGE LOG *bufexplorer-changelog*
+7.2.8 - Enhancements:
+ * Thanks to Charles Campbell for integrating bufexplorer with GDBMGR.
+ http://mysite.verizon.net/astronaut/vim/index.html#GDBMGR
7.2.7 - Fix:
* My 1st attempt to fix the "cache" issue where buffers information
has changed but the cache/display does not reflect those changes.
View
462 plugin/bufexplorer.vim
@@ -38,7 +38,7 @@ endif
"1}}}
" Version number
-let g:bufexplorer_version = "7.2.7"
+let g:bufexplorer_version = "7.2.8"
" Check for Vim version 700 or greater {{{1
if v:version < 700
@@ -300,6 +300,7 @@ function! s:BEIgnoreBuffer(buf)
" Do not add the BufExplorer window to the list.
if fnamemodify(bufname(a:buf), ":t") == s:name
+ call s:BEError("The buffer name was [".s:name."] so it was skipped.")
return 1
endif
@@ -312,12 +313,12 @@ endfunction
" BECleanup {{{1
function! s:BECleanup()
- let &insertmode = s:_insertmode
- let &showcmd = s:_showcmd
- let &cpo = s:_cpo
- let &report = s:_report
- let &list = s:_list
- let s:running = 0
+ if exists("s:_insertmode")|let &insertmode = s:_insertmode|endif
+ if exists("s:_showcmd") |let &showcmd = s:_showcmd |endif
+ if exists("s:_cpo") |let &cpo = s:_cpo |endif
+ if exists("s:_report") |let &report = s:_report |endif
+ if exists("s:_list") |let &list = s:_list |endif
+ let s:running = 0
let s:splitMode = ""
delmarks!
@@ -337,38 +338,42 @@ endfunction
" StartBufExplorer {{{1
function! StartBufExplorer(open)
- let name = s:name
+ let name = s:name
- if !has("win32")
- " On non-Windows boxes, escape the name so that is shows up correctly.
- let name = escape(name, "[]")
- endif
-
- " Make sure there is only one explorer open at a time.
- if s:running == 1
- " Go to the open buffer.
- if has("gui")
- exec "drop" name
+ if !has("win32")
+ " On non-Windows boxes, escape the name so that is shows up correctly.
+ let name = escape(name, "[]")
+ call s:BEError("Escaped")
endif
- return
- endif
+ " Make sure there is only one explorer open at a time.
+ if s:running == 1
+ call s:BEError("WHAT THE 1")
+ " Go to the open buffer.
+ if has("gui")
+ call s:BEError("WHAT THE 2")
+ call s:BEError(name)
+ exec "drop" name
+ endif
+
+ return
+ endif
- " Add zero to ensure the variable is treated as a Number.
- let s:originBuffer = bufnr("%") + 0
+ " Add zero to ensure the variable is treated as a Number.
+ let s:originBuffer = bufnr("%") + 0
- " Create or rebuild the raw buffer list if necessary.
- if !exists('s:raw_buffer_listing') ||
- \ empty(s:raw_buffer_listing) ||
- \ s:refreshBufferList == 1
- silent let s:raw_buffer_listing = s:BEGetBufferInfo(0)
- endif
+ " Create or rebuild the raw buffer list if necessary.
+ if !exists('s:raw_buffer_listing') ||
+ \ empty(s:raw_buffer_listing) ||
+ \ s:refreshBufferList == 1
+ silent let s:raw_buffer_listing = s:BEGetBufferInfo(0)
+ endif
- let copy = copy(s:raw_buffer_listing)
+ let copy = copy(s:raw_buffer_listing)
- if (g:bufExplorerShowUnlisted == 0)
- call filter(copy, 'v:val.attributes !~ "u"')
- endif
+ if (g:bufExplorerShowUnlisted == 0)
+ call filter(copy, 'v:val.attributes !~ "u"')
+ endif
" We may have to split the current window.
if (s:splitMode != "")
@@ -633,58 +638,58 @@ endfunction
" BEBuildBufferList {{{1
function! s:BEBuildBufferList()
- let lines = []
+ let lines = []
- " Loop through every buffer.
- for buf in s:raw_buffer_listing
- if (!g:bufExplorerShowUnlisted && buf.attributes =~ "u")
- " Skip unlisted buffers if we are not to show them.
- continue
- endif
+ " Loop through every buffer.
+ for buf in s:raw_buffer_listing
+ " Skip unlisted buffers if we are not to show them.
+ if (!g:bufExplorerShowUnlisted && buf.attributes =~ "u")
+ continue
+ endif
- if (g:bufExplorerShowTabBuffer)
- let show_buffer = 0
+ if (g:bufExplorerShowTabBuffer)
+ let show_buffer = 0
- for bufnr in s:tabSpace[tabpagenr()]
- if (buf.attributes =~ '^\s*'.bufnr.'\>')
- " Only buffers shown on the current tabpagenr
- let show_buffer = 1
- break
- endif
- endfor
+ for bufnr in s:tabSpace[tabpagenr()]
+ if (buf.attributes =~ '^\s*'.bufnr.'\>')
+ " Only buffers shown on the current tabpagenr
+ let show_buffer = 1
+ break
+ endif
+ endfor
- if show_buffer == 0
- continue
- endif
- endif
+ if show_buffer == 0
+ continue
+ endif
+ endif
- let line = buf.attributes." "
+ let line = buf.attributes." "
- if g:bufExplorerSplitOutPathName
- let type = (g:bufExplorerShowRelativePath) ? "relativepath" : "path"
- let path = buf[type]
- let pad = (g:bufExplorerShowUnlisted) ? s:allpads.shortname : s:listedpads.shortname
- let line .= buf.shortname." ".strpart(pad.path, len(buf.shortname))
- else
- let type = (g:bufExplorerShowRelativePath) ? "relativename" : "fullname"
- let path = buf[type]
- let line .= path
- endif
+ if g:bufExplorerSplitOutPathName
+ let type = (g:bufExplorerShowRelativePath) ? "relativepath" : "path"
+ let path = buf[type]
+ let pad = (g:bufExplorerShowUnlisted) ? s:allpads.shortname : s:listedpads.shortname
+ let line .= buf.shortname." ".strpart(pad.path, len(buf.shortname))
+ else
+ let type = (g:bufExplorerShowRelativePath) ? "relativename" : "fullname"
+ let path = buf[type]
+ let line .= path
+ endif
- let pads = (g:bufExplorerShowUnlisted) ? s:allpads : s:listedpads
+ let pads = (g:bufExplorerShowUnlisted) ? s:allpads : s:listedpads
- if !empty(pads[type])
- let line .= strpart(pads[type], len(path))." "
- endif
+ if !empty(pads[type])
+ let line .= strpart(pads[type], len(path))." "
+ endif
- let line .= buf.line
+ let line .= buf.line
- call add(lines, line)
- endfor
+ call add(lines, line)
+ endfor
- call setline(s:firstBufferLine, lines)
+ call setline(s:firstBufferLine, lines)
- call s:BESortListing()
+ call s:BESortListing()
endfunction
" BESelectBuffer {{{1
@@ -715,7 +720,7 @@ function! s:BESelectBuffer(...)
endif
if bufexists(_bufNbr)
- if bufnr("#") == _bufNbr
+ if bufnr("#") == _bufNbr && !exists("g:bufExplorerChgWin")
return s:BEClose("")
endif
@@ -741,12 +746,14 @@ function! s:BESelectBuffer(...)
exec s:BEGetWinNbr(tabNbr, _bufNbr) . "wincmd w"
endif
else
- "No, the use did not ask to open the selected buffer in a tab.
+ "No, the use did not ask to open the selected buffer in a tab.
- " Are we suppose to move to the tab where this active buffer is?
- if bufloaded(_bufNbr) && g:bufExplorerFindActive
- " Close the BE window.
- call s:BEClose("")
+ " Are we suppose to move to the tab where this active buffer is?
+ if exists("g:bufExplorerChgWin")
+ exe g:bufExplorerChgWin."wincmd w"
+ elseif bufloaded(_bufNbr) && g:bufExplorerFindActive
+ " Close the BE window.
+ call s:BEClose("")
" Get the tab number where this buffer is located at.
let tabNbr = s:BEGetTabNbr(_bufNbr)
@@ -768,6 +775,23 @@ function! s:BESelectBuffer(...)
" Make the buffer 'listed' again.
call setbufvar(_bufNbr, "&buflisted", "1")
+
+ " call any associated function references
+ " g:bufExplorerFuncRef may be an individual function reference
+ " or it may be a list containing function references.
+ " It will ignore anything that's not a function reference.
+ " See :help FuncRef for more on function references.
+ if exists("g:BufExplorerFuncRef")
+ if type(g:BufExplorerFuncRef) == 2
+ keepj call g:BufExplorerFuncRef()
+ elseif type(g:BufExplorerFuncRef) == 3
+ for FncRef in g:BufExplorerFuncRef
+ if type(FncRef) == 2
+ keepj call FncRef()
+ endif
+ endfor
+ endif
+ endif
else
call s:BEError("Sorry, that buffer no longer exists, please select another")
call s:BEDeleteBuffer(_bufNbr, "wipe")
@@ -776,219 +800,217 @@ endfunction
" BEDeleteBufferListing {{{1
function! s:BEDeleteBufferListing(buf)
- if exists('s:raw_buffer_listing') && !empty(s:raw_buffer_listing)
- " Delete the buffer from the raw buffer list.
- " Careful use of ' and " so we do not have to escape all the \'s
- " Regex: ^\s*\(10\|20\)\>
- " ^ - Starting at the beginning of the string
- " \s* - optional whitespace
- " \(10\|20\) - either a 10 or a 20
- " \> - end of word (so it can't make 100 or 201)
- call filter(s:raw_buffer_listing, "v:val.attributes !~ '".'^\s*\('.substitute(a:buf, ' ', '\\|', 'g').'\)\>'."'")
- endif
+ if exists('s:raw_buffer_listing') && !empty(s:raw_buffer_listing)
+ " Delete the buffer from the raw buffer list.
+ " Careful use of ' and " so we do not have to escape all the \'s
+ " Regex: ^\s*\(10\|20\)\>
+ " ^ - Starting at the beginning of the string
+ " \s* - optional whitespace
+ " \(10\|20\) - either a 10 or a 20
+ " \> - end of word (so it can't make 100 or 201)
+ call filter(s:raw_buffer_listing, "v:val.attributes !~ '".'^\s*\('.substitute(a:buf, ' ', '\\|', 'g').'\)\>'."'")
+ endif
endfunction
" BERemoveBuffer {{{1
function! s:BERemoveBuffer(type, mode) range
- " Are we on a line with a file name?
- if line('.') < s:firstBufferLine
- return
- endif
-
- " These commands are to temporarily suspend the activity of winmanager.
- if exists("b:displayMode") && b:displayMode == "winmanager"
- call WinManagerSuspendAUs()
- endif
+ " Are we on a line with a file name?
+ if line('.') < s:firstBufferLine
+ return
+ endif
- let _bufNbrs = ''
+ " These commands are to temporarily suspend the activity of winmanager.
+ if exists("b:displayMode") && b:displayMode == "winmanager"
+ call WinManagerSuspendAUs()
+ endif
- for lineNum in range(a:firstline, a:lastline)
- let line = getline(lineNum)
+ let _bufNbrs = ''
+
+ for lineNum in range(a:firstline, a:lastline)
+ let line = getline(lineNum)
+
+ if line =~ '^\s*\(\d\+\)'
+ " Regex: ^\s*\(10\|20\)\>
+ " ^ - Starting at the beginning of the string
+ " \s* - optional whitespace
+ " \zs - start the match here
+ " \d\+ - any digits
+ " \> - end of word (so it can't make 100 or 201)
+ let bufNbr = matchstr(line, '^\s*\zs\d\+\>')
+
+ " Add 0 to bufNbr to ensure Vim treats it as a Number
+ " for use with the getbufvar() function
+ if bufNbr !~ '^\d\+$' || getbufvar(bufNbr+0, '&modified') != 0
+ call s:BEError("Sorry, no write since last change for buffer ".bufNbr.", unable to delete")
+ else
+ let _bufNbrs = _bufNbrs . (_bufNbrs==''?'':' '). bufNbr
+ endif
+ endif
+ endfor
- if line =~ '^\s*\(\d\+\)'
- " Regex: ^\s*\(10\|20\)\>
- " ^ - Starting at the beginning of the string
- " \s* - optional whitespace
- " \zs - start the match here
- " \d\+ - any digits
- " \> - end of word (so it can't make 100 or 201)
- let bufNbr = matchstr(line, '^\s*\zs\d\+\>')
+ " Okay, everything is good, delete or wipe the buffers.
+ call s:BEDeleteBuffer(_bufNbrs, a:type)
- " Add 0 to bufNbr to ensure Vim treats it as a Number
- " for use with the getbufvar() function
- if bufNbr !~ '^\d\+$' || getbufvar(bufNbr+0, '&modified') != 0
- call s:BEError("Sorry, no write since last change for buffer ".bufNbr.", unable to delete")
- else
- let _bufNbrs = _bufNbrs . (_bufNbrs==''?'':' '). bufNbr
- endif
+ " Reactivate winmanager autocommand activity.
+ if exists("b:displayMode") && b:displayMode == "winmanager"
+ call WinManagerForceReSize("BufExplorer")
+ call WinManagerResumeAUs()
endif
- endfor
-
- " Okay, everything is good, delete or wipe the buffers.
- call s:BEDeleteBuffer(_bufNbrs, a:type)
-
- " Reactivate winmanager autocommand activity.
- if exists("b:displayMode") && b:displayMode == "winmanager"
- call WinManagerForceReSize("BufExplorer")
- call WinManagerResumeAUs()
- endif
endfunction
" BEDeleteBuffer {{{1
function! s:BEDeleteBuffer(bufNbr, mode)
- " This routine assumes that the buffer to be removed is on the current line.
- try
- if a:mode == "wipe"
- exe "bwipe" a:bufNbr
- else
- exe "bdelete" a:bufNbr
- endif
+ " This routine assumes that the buffer to be removed is on the current line.
+ try
+ if a:mode == "wipe"
+ exe "bwipe" a:bufNbr
+ else
+ exe "bdelete" a:bufNbr
+ endif
- setlocal modifiable
+ setlocal modifiable
- " Remove each of the lines beginning with the buffer numbers we are removing
- " Regex: ^\s*\(10\|20\)\>
- " ^ - Starting at the beginning of the string
- " \s* - optional whitespace
- " \(10\|20\) - either a 10 or a 20
- " \> - end of word (so it can't make 100 or 201)
- exec 'silent! g/^\s*\('.substitute(a:bufNbr, ' ', '\\|', 'g').'\)\>/d_'
+ " Remove each of the lines beginning with the buffer numbers we are removing
+ " Regex: ^\s*\(10\|20\)\>
+ " ^ - Starting at the beginning of the string
+ " \s* - optional whitespace
+ " \(10\|20\) - either a 10 or a 20
+ " \> - end of word (so it can't make 100 or 201)
+ exec 'silent! g/^\s*\('.substitute(a:bufNbr, ' ', '\\|', 'g').'\)\>/d_'
- setlocal nomodifiable
+ setlocal nomodifiable
- call s:BEDeleteBufferListing(a:bufNbr)
- catch
- call s:BEError(v:exception)
- endtry
+ call s:BEDeleteBufferListing(a:bufNbr)
+ catch
+ call s:BEError(v:exception)
+ endtry
endfunction
" BEClose {{{1
function! s:BEClose(mode)
- " Get only the listed buffers.
- let listed = filter(copy(s:MRUList), "buflisted(v:val)")
+ " Get only the listed buffers.
+ let listed = filter(copy(s:MRUList), "buflisted(v:val)")
- " If we needed to split the main window, close the split one.
+ " If we needed to split the main window, close the split one.
" if (s:splitMode)
- if (s:splitMode != "" && a:mode == "quit")
- exec "wincmd c"
- endif
+" if (s:splitMode != "")
+ if (s:splitMode != "" && a:mode == "quit")
+ exec "wincmd c"
+ endif
- if len(listed) == 0
- exe "enew"
- else
- for b in reverse(listed[0:1])
- exec "keepjumps silent b ".b
- endfor
- endif
+ if len(listed) == 0
+ exe "enew"
+ else
+ for b in reverse(listed[0:1])
+ exec "keepjumps silent b ".b
+ endfor
+ endif
endfunction
" BEToggleSplitOutPathName {{{1
function! s:BEToggleSplitOutPathName()
- let g:bufExplorerSplitOutPathName = !g:bufExplorerSplitOutPathName
- call s:BERebuildBufferList()
- call s:BEUpdateHelpStatus()
+ let g:bufExplorerSplitOutPathName = !g:bufExplorerSplitOutPathName
+ call s:BERebuildBufferList()
+ call s:BEUpdateHelpStatus()
endfunction
" BEToggleShowRelativePath {{{1
function! s:BEToggleShowRelativePath()
- let g:bufExplorerShowRelativePath = !g:bufExplorerShowRelativePath
- call s:BERebuildBufferList()
- call s:BEUpdateHelpStatus()
+ let g:bufExplorerShowRelativePath = !g:bufExplorerShowRelativePath
+ call s:BERebuildBufferList()
+ call s:BEUpdateHelpStatus()
endfunction
" BEToggleShowUnlisted {{{1
function! s:BEToggleShowUnlisted()
- let g:bufExplorerShowUnlisted = !g:bufExplorerShowUnlisted
- let num_bufs = s:BERebuildBufferList(g:bufExplorerShowUnlisted == 0)
- call s:BEUpdateHelpStatus()
+ let g:bufExplorerShowUnlisted = !g:bufExplorerShowUnlisted
+ let num_bufs = s:BERebuildBufferList(g:bufExplorerShowUnlisted == 0)
+ call s:BEUpdateHelpStatus()
endfunction
" BEToggleFindActive {{{1
function! s:BEToggleFindActive()
- let g:bufExplorerFindActive = !g:bufExplorerFindActive
- call s:BEUpdateHelpStatus()
+ let g:bufExplorerFindActive = !g:bufExplorerFindActive
+ call s:BEUpdateHelpStatus()
endfunction
" BEToggleShowTabBuffer {{{1
function! s:BEToggleShowTabBuffer()
- let g:bufExplorerShowTabBuffer = !g:bufExplorerShowTabBuffer
- call s:BEDisplayBufferList()
+ let g:bufExplorerShowTabBuffer = !g:bufExplorerShowTabBuffer
+ call s:BEDisplayBufferList()
endfunction
" BEToggleOnlyOneTab {{{1
function! s:BEToggleOnlyOneTab()
- let g:bufExplorerOnlyOneTab = !g:bufExplorerOnlyOneTab
- call s:BEDisplayBufferList()
+ let g:bufExplorerOnlyOneTab = !g:bufExplorerOnlyOneTab
+ call s:BEDisplayBufferList()
endfunction
" BERebuildBufferList {{{1
function! s:BERebuildBufferList(...)
- setlocal modifiable
+ setlocal modifiable
- let curPos = getpos('.')
+ let curPos = getpos('.')
- if a:0
- " Clear the list first.
- exec "keepjumps ".s:firstBufferLine.',$d "_'
- endif
+ if a:0
+ " Clear the list first.
+ exec "keepjumps ".s:firstBufferLine.',$d "_'
+ endif
- let num_bufs = s:BEBuildBufferList()
+ let num_bufs = s:BEBuildBufferList()
- call setpos('.', curPos)
+ call setpos('.', curPos)
- setlocal nomodifiable
+ setlocal nomodifiable
- return num_bufs
+ return num_bufs
endfunction
" BEUpdateHelpStatus {{{1
function! s:BEUpdateHelpStatus()
- setlocal modifiable
+ setlocal modifiable
- let text = s:BEGetHelpStatus()
- call setline(s:firstBufferLine - 2, text)
+ let text = s:BEGetHelpStatus()
+ call setline(s:firstBufferLine - 2, text)
- setlocal nomodifiable
+ setlocal nomodifiable
endfunction
" BEMRUCmp {{{1
function! s:BEMRUCmp(line1, line2)
- return index(s:MRUList, str2nr(a:line1)) - index(s:MRUList, str2nr(a:line2))
+ return index(s:MRUList, str2nr(a:line1)) - index(s:MRUList, str2nr(a:line2))
endfunction
" BESortReverse {{{1
function! s:BESortReverse()
- let g:bufExplorerReverseSort = !g:bufExplorerReverseSort
-
- call s:BEReSortListing()
+ let g:bufExplorerReverseSort = !g:bufExplorerReverseSort
+ call s:BEReSortListing()
endfunction
" BESortSelect {{{1
function! s:BESortSelect()
- let g:bufExplorerSortBy = get(s:sort_by, index(s:sort_by, g:bufExplorerSortBy) + 1, s:sort_by[0])
-
- call s:BEReSortListing()
+ let g:bufExplorerSortBy = get(s:sort_by, index(s:sort_by, g:bufExplorerSortBy) + 1, s:sort_by[0])
+ call s:BEReSortListing()
endfunction
" BEReverseSortSelect {{{1
function! s:BEReverseSortSelect()
- let g:bufExplorerSortBy = get(s:sort_by, (index(s:sort_by, g:bufExplorerSortBy) + len(s:sort_by) - 1) % len(s:sort_by), s:sort_by[0])
-
- call s:BEReSortListing()
+ let g:bufExplorerSortBy = get(s:sort_by, (index(s:sort_by, g:bufExplorerSortBy) + len(s:sort_by) - 1) % len(s:sort_by), s:sort_by[0])
+ call s:BEReSortListing()
endfunction
" BEReSortListing {{{1
function! s:BEReSortListing()
- setlocal modifiable
+ setlocal modifiable
- let curPos = getpos('.')
+ let curPos = getpos('.')
- call s:BESortListing()
- call s:BEUpdateHelpStatus()
+ call s:BESortListing()
+ call s:BEUpdateHelpStatus()
- call setpos('.', curPos)
+ call setpos('.', curPos)
- setlocal nomodifiable
+ setlocal nomodifiable
endfunction
" BESortListing {{{1
@@ -1028,35 +1050,35 @@ endfunction
" BEMRUListShow {{{1
function! s:BEMRUListShow()
- echomsg "MRUList=".string(s:MRUList)
+ echomsg "MRUList=".string(s:MRUList)
endfunction
" BEError {{{1
function! s:BEError(msg)
- echohl ErrorMsg | echo a:msg | echohl none
+ echohl ErrorMsg | echo a:msg | echohl none
endfunction
" BEWarning {{{1
function! s:BEWarning(msg)
- echohl WarningMsg | echo a:msg | echohl none
+ echohl WarningMsg | echo a:msg | echohl none
endfunction
" GetTabNbr {{{1
function! s:BEGetTabNbr(bufNbr)
- " Searching buffer bufno, in tabs.
- for i in range(tabpagenr("$"))
- if index(tabpagebuflist(i + 1), a:bufNbr) != -1
- return i + 1
- endif
- endfor
+ " Searching buffer bufno, in tabs.
+ for i in range(tabpagenr("$"))
+ if index(tabpagebuflist(i + 1), a:bufNbr) != -1
+ return i + 1
+ endif
+ endfor
- return 0
+ return 0
endfunction
" GetWinNbr" {{{1
function! s:BEGetWinNbr(tabNbr, bufNbr)
- " window number in tabpage.
- return index(tabpagebuflist(a:tabNbr), a:bufNbr) + 1
+ " window number in tabpage.
+ return index(tabpagebuflist(a:tabNbr), a:bufNbr) + 1
endfunction
" Winmanager Integration {{{1
@@ -1068,19 +1090,19 @@ call s:BESet("g:bufExplorerMaxHeight", 25) " Handles dynamic resizing of the win
" This is to figure out how this plugin was called. In a standalone fashion
" or by winmanager.
function! BufExplorer_Start()
- let b:displayMode = "winmanager"
- call StartBufExplorer("e")
+ let b:displayMode = "winmanager"
+ call StartBufExplorer("e")
endfunction
" Returns whether the display is okay or not.
function! BufExplorer_IsValid()
- return 0
+ return 0
endfunction
" Handles dynamic refreshing of the window.
function! BufExplorer_Refresh()
- let b:displayMode = "winmanager"
- call StartBufExplorer("e")
+ let b:displayMode = "winmanager"
+ call StartBufExplorer("e")
endfunction
function! BufExplorer_ReSize()

0 comments on commit 8c75e65

Please sign in to comment.