sponsor Vim development Vim logo Vim Book Ad

bufexplorer.zip : Buffer Explorer / Browser

 script karma  Rating 3384/1111, Downloaded by 115403    Comments, bugs, improvements  Vim wiki

created by
jeff lanzarotta
script type
With bufexplorer, you can quickly and easily switch between buffers by using the one of the default public interfaces:

  '\be' (normal open)  or
  '\bs' (force horizontal split open)  or
  '\bv' (force vertical split open)

Once the bufexplorer window is open you can use the normal movement keys (hjkl) to move around and then use <Enter> or <Left-Mouse-Click> to select the buffer you would like to open. If you would like to have the selected buffer opened in a new tab, simply press either <Shift-Enter> or 't'. Please note that when opening a buffer in a tab, that if the buffer is already in another tab, bufexplorer can switch to that tab automatically for you if you would like. More about that in the supplied VIM help.

Bufexplorer also offers various options including:
- Display the list of buffers in various sort orders including:
    - Most Recently Used (MRU) which is the default
    - Buffer number
    - File name
    - File extension
    - Full file path name
- Delete buffer from list

For more about options, sort orders, configuration options, etc. please see the supplied VIM help.
install details
Simply unzip bufexplorer.zip into a directory in your 'runtimepath', usually ~/.vim or c:\vimfiles, and restart Vim. This zip file contains plugin\bufexplorer.vim, and doc\bufexplorer.txt.  See ':help add-local-help' on how to add bufexplorer.txt to vim's help system.

NOTE: Version 7.0.12 and above will ONLY work with 7.0 and above of Vim.
NOTE NOTE NOTE: If you have a version prior to 7.1.2 that contains an autoload\bufexplorer.vim file, please REMOVE the autoload\bufexlorer.vim AND the plugin\bufexplorer.vim files before installing a new version.

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
bufexplorer-7.4.12.zip 7.4.12 2016-11-17 7.4 jeff lanzarotta Forgot to update vim.org with the version on github!  Opps...
Changes include:
    - Thanks again to Martin Vuille for several more fixes related to making bufexplorer more tab-friendly.
    - Thanks to Martin Vuille for reworking the per-tab buffer listing code.  Fix for g:bufExplorerShowTabBuffer is not working correctly and other "glitches" when the ShotTabBuffer option is enabled.  For example old code would not correctly handle adding/deleting a tab that wasn't the highest-numbered tab.
    - Thanks to buddylindsey for fixing a misspelling in the docs.
bufexplorer-7.4.9.zip 7.4.9 2016-04-27 7.4 jeff lanzarotta - Thanks to ivegotasthma for supplying a patch to fix a major issue with plugin performance when lots of buffers are open.
- Thanks to ershov for the patch to fix grouping of files in ambiguous sort modes.
- Thanks to PhilRunninger for changing documentation to use <Leader>, in place of ''.
- Converted files to Unix format.
bufexplorer-7.4.6.zip v7.4.6 2014-11-04 7.4 jeff lanzarotta Converted files back to Unix format.  It looks like I had git setup incorrectly and the files got converted to Dos format...
bufexplorer-7.4.5.zip 7.4.5 2014-10-25 7.3 jeff lanzarotta - Dr Michael Henry suggested to change all noremap commands to nnoremap.  Using noremap is unnecessarily broad and can cause problems, especially for select mode.
- Revert change where bufexplorer windows was closed even if the target buffer has not been loaded yet.
- Ivan Ukhov fixed issue with deleting the last window.  This update also fixes as well as another.  If you have say, NERDtree open on the left side and bufexplorer on the right, that bufexplorer would close NERDtree erroneously thinking that it is closing itself.
- Radoslaw Burny fixed a few bugs that surfaced when bufexplorer is used within winmanager.
bufexplorer-7.4.2.zip 7.4.2 2013-10-25 7.0 jeff lanzarotta Added global option g:bufExplorerDisableDefaultKeyMapping.  This option controls weather the default key mappings (\be, \bs, and \bv) are enabled or not.  See documentation for more information.
bufexplorer-7.4.1.zip 7.4.1 2013-10-16 7.3 jeff lanzarotta - First update related to Vim 7.4.
- I have been asked by several bufexplorer users to put the code on github so that the Vundle plugin could be used to make updates easier.  The code can now be found on github at https://github.com/jlanzarotta/bufexplorer.  For those that use the Vundle plugin, you can add 'Bundle 'jlanzarotta/bufexplorer' to your _vimrc or .vimrc file to get the latest version.
- Changed license text.
- Fixed issue with 'hidden'.  If 'hidden' is set, make sure that g:bufExplorerFindActive is set to 0.  Otherwise, when using /bs or /bv, and selecting a buffer, the original buffer will be switched to instead of being opened in the newly created windows.
- Added new 'b' mapping when the bufExplorer window is opened.  When 'b' is pressed, the user is prompted for the buffer number to switch to, and is is then switched to when <CR> is pressed.  This allows for somewhat faster buffer switching instead of using the j and k keys or the mouse to select the buffer to switch to.
- Removed 'set nolist' from the Initialize() function as well as the restore of the 'list' setting in the CleanUp() function.  These were causing issues when multiple new files were opened from the command line.  Furthermore, there was really no reason, that I can remember, to why the 'list' setting was saved, modified, and restored anyways.
- Fixed issue with WinManager integration code not working correctly anymore.
- Brought back the xnoremap setup for the 'd' and 'D' keys.  These were removed for some reason after version 7.2.8.
- Thanks to all the contributors and testers.
- If there are any issues you find or enhancements you would like, let me know.
bufexplorer-7.3.6.zip 7.3.6 2013-05-06 7.0 jeff lanzarotta Removed the 'drop' window command that was causing issue with the argument-list being modified after the BufExplorer windows was displayed.
bufexplorer-7.3.5.zip 7.3.5 2013-02-08 7.0 jeff lanzarotta Michael Henry added the ability to view "No Name" buffers.  This functionality was lost since version 7.3.0.  He also did some removal of "dead" code and cleaned up the code to handle filenames with embedded '"'.
bufexplorer-7.3.4.zip 7.3.4 2013-01-28 7.0 jeff lanzarotta Thanks go out to John Szakmeister for finding and fixing a bug in the RebuildBufferList method.  The keepjumps line that clears the list could potentially reference a backwards range.
bufexplorer-7.3.3.zip 7.3.3 2013-01-14 7.0 jeff lanzarotta * Major cleanup and reorganization of the change log.
* We welcome the return of g:bufExplorerSplitHorzSize and g:bufExplorerSplitVertSize.  When setting these values, anything less than or equal to 0 causes the split windows size to be determined by Vim.  If for example you want your new horizontal split window 10 rows high, set g:bufExplorerSplitHorzSize = 10 in your .vimrc.  Similar would be done if wanting a vertical split except you would use the g:bufExplorerSplitVertSize variable instead.
bufexplorer-7.3.2.zip 7.2.3 2012-12-24 7.0 jeff lanzarotta Thanks go out to Michael Henry for pointing out that I completely missed yet another function, ReverseSortSelect(), during the refactoring.  This function has now returned.
bufexplorer-7.3.1.zip 7.3.1 2012-12-06 7.0 jeff lanzarotta Thanks go out to Brett Rasmussen for pointing out that the feature added way back in version 7.2.3 by Yuriy Ershov to automatically reposition the cursor to the line containing the active buffer, was no longer in the plugin.  That bit of code has been re-added and all is well.
bufexplorer-7.3.0.zip 7.3.0 2012-10-09 7.0 jeff lanzarotta It has been quite a while since I published a new version and this is the first version since Vim 7.3 was released.
    * Thanks to Tim Johnson for testing out this new version.
    * I have put some time into reworking and cleaning up the code as
    * well as various bug fixes.
    * I have hopefully allowed for better mapping of the main public methods as is explained in the
      bufexplorer-  customization section of the documentation.
    * Add new 'B', 'o', and 'S' key mappings.
    * Overall, I am hopeful that I not forgotten or lost a feature :)
bufexplorer.zip 7.2.8 2010-11-08 7.0 jeff lanzarotta Thanks to Charles Campbell for integrating bufexplorer with GDBMGR.
* Fixed update date.
bufexplorer.zip 7.2.7 2010-04-26 7.0 jeff lanzarotta This is my first attempt to fix the "cache" issue where buffer information has changed but the cache/display does not reflect those changes. More work still needs to be done. More or less the cache has been disabled.
bufexplorer.zip 7.2.6 2010-02-12 7.0 jeff lanzarotta Thanks to Michael Henry for pointing out that I totally forgot to update the inline help to reflect the previous change to the 'd' and 'D' keys. Opps!
bufexplorer.zip 7.2.5 2010-02-10 6.0 jeff lanzarotta Philip Morant suggested switching the command (bwipe) associated with the 'd' key with the command (bdelete) associated with the 'D' key. This made sense since the 'd' key is more likely to be used compared to the 'D' key.
bufexplorer.zip 7.2.4 2010-01-14 7.0 jeff lanzarotta Fix: I did not implement the patch provided by Godefroid Chapelle correctly. I missed one line which happened to be the most important one :)
bufexplorer.zip 7.2.3 2009-12-15 7.0 jeff lanzarotta Hopefully I have not let anyone or anything out :)
- Enhancements:
    * Thanks to David Fishburn for helping me out with a much needed
       code overhaul as well as some awesome performance enhancements.
       He also reworked the handling of tabs.
    * Thanks to Vladimir Dobriakov for making the suggestions on
       enhancing the documentation to include a better explaination of
       what is contained in the main bufexplorer window.
    * Thanks to Yuriy Ershov for added code that when the bufexplorer
       window is opened, the cursor is now positioned at the line with the
       active buffer (useful in non-MRU sort modes).
    * Yuriy also added the abiltiy to cycle through the sort fields in
       reverse order.
- Fixes:
    * Thanks to Michael Henry for supplying a patch that allows
       bufexplorer to be opened even when there is one buffer or less.
    * Thanks to Godefroid Chapelle for supplying a patch that fixed
       MRU sort order after loading a session.
bufexplorer.zip 7.2.2 2008-11-19 7.0 jeff lanzarotta Thanks to David L. Dight for spotting and fixing an issue when using ctrl^. bufexplorer would incorrectly handle the previous buffer so that when ctrl^ was pressed the incorrect file was opened.
bufexplorer.zip 7.2.1 2008-09-03 7.0 jeff lanzarotta 7.2.1  - Fix: * Thanks to Dimitar for spotting and fixing a feature that was inadvertently left out of the previous version. The feature was when bufexplorer was used together with WinManager, you could use the tab key to open a buffer in a split window.
bufexplorer.zip 7.2.0 2008-08-15 6.0 jeff lanzarotta - Enhancements:
  * For all those missing the \bs and \bv commands, these have now returned. Thanks to Phil O'Connell for asking for the return of these missing features and helping test out this version.
- Fixes:
  * Fixed problem with the bufExplorerFindActive code not working correctly.
  * Fixed an incompatibility between bufexplorer and netrw that caused buffers to be incorrectly removed from the MRU list.
bufexplorer.zip 7.1.7 2007-12-21 6.0 jeff lanzarotta TaCahiroy fixed several issues related to opening a buffer in a tab.
bufexplorer.zip 7.1.6 2007-12-01 6.0 jeff lanzarotta Fixes:
  * Removed ff=unix from modeline in bufexplorer.txt. Found by Bill McCarthy.
bufexplorer.zip 7.1.5 2007-11-30 6.0 jeff lanzarotta Fixed: Could not open unnamed buffers. Fixed by TaCahiroy.
bufexplorer.zip 7.1.4 2007-11-16 6.0 jeff lanzarotta Fixes:
  * Sometimes when a file's path has 'white space' in it, extra buffers would be created containing each piece of the path. i.e: opening c:\document and settings\test.txt would create a buffer named "and" and a buffer named "Documents". This was reported and fixed by TaCa Yoss.
bufexplorer.zip 7.1.3 2007-11-15 6.0 jeff lanzarotta Added code to allow only one instance of the plugin to run at a time. Thanks Dennis Hostetler.
bufexplorer.zip 7.1.2 2007-11-07 6.0 jeff lanzarotta This is a MAJOR update.
* Added handling of tabs. (Dave Larson)
* Removed \bs and \bv commands because these are easier for the user to create horizontal and vertical windows. (Dave Larson)
* Fixed jumplist issue spotted by JiangJun.
* Went back to using just a plugin file, instead of both an autoload and plugin file. The splitting of the file caused issues with other plugins. So if you have a prior version of bufexplorer that has an autoload file, please remove autoload\bufexplorer and plugin\bufexplorer before installing this new version.
* Fixed E493 error spotted by Thomas Arendsen Hein.
* Minor cosmetic changes.
* Minor help file changes.
bufexplorer.zip 7.0.17 2007-07-24 7.0 jeff lanzarotta Fixed issue with 'drop' command. Various enhancements and improvements.
bufexplorer.zip 7.0.15 2007-04-27 7.0 jeff lanzarotta Thanks to Mark Smithfield for suggesting bufexplorer needed to handle the ':args' command.
Fixed issue reported by Liu Jiaping on non Windows systems, which was
Open file1, open file2, modify file1, open bufexplorer, you get the following error:
Error detected while processing function
line    4:
E37: No write since last change (add ! to override)

But the worse thing is, when I want to save the current buffer and type ':w', I get another error message:

E382: Cannot write, 'buftype' option is set
bufexplorer.zip 7.0.14 2007-03-23 7.0 jeff lanzarotta Thanks to Randall Hansen for removing the requirement of terminal versions to be recompiled with 'gui' support so the 'drop' command would work. The 'drop' command is really not needed in terminal versions.
bufexplorer.zip 7.0.13 2007-02-23 7.0 jeff lanzarotta Fixed Winmanager integration. Thanks to Dave Eggum for another major update. Most notable changes are, improved speed and code clean up. Please see the bufexplorer help for a full list of changes and updates.
bufexplorer.zip 7.0.12 2006-11-30 7.0 jeff lanzarotta MAJOR Update. Please Note that this version will ONLY run with Vim version 7.0 or greater.

Dave Eggum has made some 'significant' updates to this latest version:
  - Added BufExplorerGetAltBuf() global function to be used in the user’s rulerformat.
  - Added g:bufExplorerSplitRight option.
  - Added g:bufExplorerShowRelativePath option with mapping.
  - Added current line highlighting.
  - The split type can now be changed whether bufexplorer is opened in split mode or not.
  - Various major and minor bug fixes and speed improvements.
  - Sort by extension.
  Other improvements/changes:
  - Changed the help key from '?' to <F1> to be more 'standard'.
  - Fixed splitting of vertical bufexplorer window.
bufexplorer.zip 7.0.11 2006-03-10 6.0 jeff lanzarotta Fixed a couple of highlighting bugs, reported by David Eggum. He also changed passive voice to active on a couple of warning messages.
bufexplorer.zip 7.0.10 2006-03-02 6.0 jeff lanzarotta Fixed bug report by Xiangjiang Ma. If the 'ssl' option is set, the slash character used when displaying the path was incorrect. Thanks Xiangjiang!
bufexplorer.zip 7.0.9 2006-02-28 6.0 jeff lanzarotta Martin Grenfell found and eliminated an annoying bug in the bufexplorer/winmanager integration. The bug was were an annoying message would be displayed when a window was split or a new file was opened in a new window. Thanks Martin!
bufexplorer.zip 7.0.8 2006-01-18 6.0 jeff lanzarotta Thanks to Mike Li for catching a bug in the WinManager integration. The bug was related to the incorrect displaying of the buffer explorer's window title.
bufexplorer.zip 7.0.7 2005-12-19 6.0 jeff lanzarotta Thanks to Jeremy Cowgar for adding a new enhancement. This enhancement allows the user to press 'S', that is capital S, which will open the buffer under the cursor in a newly created split window.
bufexplorer.zip 7.0.6 2005-11-18 6.0 jeff lanzarotta Thanks to Larry Zhang for finding a bug in the "split" buffer code. If you force set g:bufExplorerSplitType='v' in your vimrc, and if you tried to do a \bs to split the bufexplorer window, it would always split horizontal, not vertical. He also found that I had a typeo in that the variable g:bufExplorerSplitVertSize was all lower case in the documentation which was incorrect.
bufexplorer.zip 7.0.5 2005-10-18 6.0 jeff lanzarotta Thanks to Mun Johl for pointing out a bug that if a buffer was modified, the '+' was not showing up correctly.
bufexplorer.zip 7.0.4 2005-10-03 6.0 jeff lanzarotta Fixed a problem discovered first by Xiangjiang Ma. Well since I've been using vim 7.0 and not 6.3, I started using a function (getftype) that is not in 6.3. So for backward compatibility, I conditionaly use this function now.  Thus, the g:bufExplorerShowDirectories feature is only available when using vim 7.0 and above.
bufexplorer.zip 7.0.3 2005-09-30 6.0 jeff lanzarotta Thanks to Erwin Waterlander for finding a problem when the last buffer was deleted. This issue got me to rewrite the buffer display logic (which I've wanted to do for sometime now).
Also great thanks to Dave Eggum for coming up with idea for g:bufExplorerShowDirectories. Directories usually show up in the list from using a command like ":e .", this controls how those are displayed.
bufexplorer.zip 7.0.2 2005-03-25 6.0 jeff lanzarotta Thanks to Thomas Arendsen Hein for finding a problem when a user has the default help turned off and then brought up the explorer. An E493 would be displayed.
bufexplorer.zip 7.0.1 2005-03-10 6.0 jeff lanzarotta Thanks to Erwin Waterlander for finding a couple problems. The first problem allowed a modified buffer to be deleted.  Opps! The second problem occured when several files were opened, BufExplorer was started, the current buffer was deleted using the 'd' option, and then BufExplorer was exited. The deleted buffer was still visible while it is not in the buffers list. Opps again!
bufexplorer.zip 7.0.0 2005-02-28 6.0 jeff lanzarotta Thanks to Shankar R. for suggesting to add the ability to set the fixed width (g:bufExplorerSplitVertSize) of a new window when opening bufexplorer vertically and fixed height (g:bufExplorerSplitHorzSize) of a new window when opening bufexplorer horizontally. By default, the windows are normally split to use half the existing width or height.
bufexplorer.zip 6.3.0 2004-07-23 6.0 jeff lanzarotta Added keepjumps so that the jumps list would not get clutered with bufexplorer related stuff.
bufexplorer.zip 6.2.3 2004-04-15 6.0 jeff lanzarotta Thanks to Jay Logan for finding  a bug in the vertical split postion of the code. When selecting that the window was to be split vertically by doing a '\bv', from then on, all splits, i.e. '\bs', were split vertically, even though g:bufExplorerSplitType was not set to 'v'.
bufexplorer.zip 6.2.2 2004-01-09 6.0 jeff lanzarotta Thanks to Patrik Modesto for adding a small improvement. For some reason his bufexplorer window was always showing up folded. He added 'setlocal nofoldenable' and it was fixed. If you are having the same problem, this version is for you...
bufexplorer.zip 6.2.1 2003-10-09 6.0 jeff lanzarotta Thanks goes out to Takashi Matsuo for added the 'fullPath' sorting logic and option.
bufexplorer.zip 6.2.0 2003-06-13 6.0 jeff lanzarotta Thanks goes out to Simon Johann-Günter for spotting and fixing a problem in that the last search pattern is overriden by the search pattern for blank lines.
bufexplorer.zip 6.1.6 2003-05-05 6.0 jeff lanzarotta Thanks to Artem Chuprina for finding a pesky bug that has been around for sometime now. The <esc> key mapping was causing the buffer explored to close prematurely when vim was run in an xterm. The <esc> key mapping is now removed.
bufexplorer.zip 6.1.5 2003-04-28 6.0 jeff lanzarotta Thanks to Khorev Sergey. Added option to show default help or not.
bufexplorer.zip 6.1.4 2003-03-18 6.0 jeff lanzarotta Thanks goes out to Valery Kondakoff for suggesting the addition of setlocal nonumber and foldcolumn=0. This allows for line numbering and folding to be turned off temporarily while in the explorer.
bufexplorer.zip 6.1.3 2003-03-11 6.0 jeff lanzarotta Added the ability to force the newly split window to be temporarily vertical, which was suggested by Thomas Glanzmann. Added folding. Did some code cleanup.
bufexplorer.zip 6.1.2 2002-11-05 6.0 jeff lanzarotta Now pressing the <esc> key will quit, just like 'q'. Added folds to hide winmanager configuration. If anyone had the 'C' option in their cpoptions they would receive a E10 error on startup of BufExplorer. cpo is now saved, updated and restored. Thanks to Charles E Campbell, Jr. Attempted to make sure there can only be one BufExplorer window open at a time.
bufexplorer.zip 6.1.1 2002-03-28 6.0 jeff lanzarotta Thanks to Brian D. Goodwin for adding toupper to FileNameCmp. This way buffers sorted by name will be in the correct order regardless of case.
bufexplorer.zip 6.0.16 2002-03-14 6.0 jeff lanzarotta Thanks to Andre Pang for the original patch/idea to get bufexplorer to work in insertmode/modeless mode (evim). Added Initialize and Cleanup autocommands to handle commands that need to be performed when starting or leaving bufexplorer.
bufexplorer.zip 6.0.15 2002-02-20 6.0 jeff lanzarotta Srinath Avadhanulax added a patch for winmanager.vim.
bufexplorer.zip 6.0.14 2002-02-19 6.0 jeff lanzarotta Fix a yew more bug that I thought I already had fixed. Thanks to Eric Bloodworth for adding 'Open Mode/Edit in Place'. Added vertical splitting.
bufexplorer.zip 6.0.13 2002-02-05 6.0 jeff lanzarotta Thanks to Charles E Campbell, Jr. for pointing out some embarrassing typos that I had in the documentation. I guess I need to run the spell checker more :o)
bufexplorer.zip 6.0.12 2002-02-04 6.0 jeff lanzarotta Thanks to Madoka Machitani, for the tip on adding the augroup command around the MRUList autocommands.
bufexplorer.zip 6.0.11 2002-01-26 6.0 jeff lanzarotta Fixed bug report by Xiangjiang Ma. '"=' was being added to the search history which messed up hlsearch.
bufexplorer.zip 6.0.10 2002-01-14 6.0 jeff lanzarotta Added the necessary hooks so that the winmanager.vim script could more easily integrate with this script. Now the winmanager.vim script should not have to have it's own version of bufexplorer.vim.
Tried to improve performance.
Remember to look at 'help: add-local-help' on how to add the help file into the vim help system.
bufexplorer.zip 6.0.9 2001-12-17 6.0 jeff lanzarotta Now you can sort the buffer list by most recently used (MRU). Please note that this is now a .zip file. Please unzip in your vimfiles, ~/.vim or whatever directory you store your vim stuff in. This file contains \plugin\bufexplorer.vim and \doc\bufexplorer.txt. To add the nifty help to vim look under ':help add-local-help' for more information.
bufexplorer.zip 6.0.8 2001-12-03 6.0 jeff lanzarotta Was not resetting the showcmd command correctly.
Added nifty help file.
bufexplorer.zip 6.0.7 2001-11-19 6.0 jeff lanzarotta Thanks to Brett Carlane for some great enhancements. Some are added, some are not, yet. Added highlighting of current and alternate filenames. Added spliting of path/filename toggle. Reworked ShowBuffers(). Changed my email address.
bufexplorer.zip 6.0.6 2001-09-05 6.0 jeff lanzarotta Fixed problem with the SortListing() function failing when there was only one buffer to display.
bufexplorer.zip 6.0.5 2001-08-10 6.0 jeff lanzarotta Fixed problems reported by David Pascoe, in that you where unable to hit 'd' on a buffer that belonged to a files that nolonger existed and that the 'yank' buffer was being overridden by the help text when the bufexplorer was opened.
bufexplorer.zip 6.0.4 2001-07-31 6.0 jeff lanzarotta Thanks to Charles Campbell for making this plugin more plugin *compliant*, adding default keymappings of <Leader>be and <Leader>bs as well as fixing the 'w:sortDirLabel not being defined' bug.
bufexplorer.zip 6.0.3 2001-07-30 6.0 jeff lanzarotta Added ability to sort buffers by 'buffer number' or 'name' in forward and reverse order.
bufexplorer.zip 6.0.2 2001-07-25 6.0 jeff lanzarotta Initial upload
ip used for rating:

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
SourceForge.net Logo