bufexplorer.txt 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727
  1. *bufexplorer.txt* Buffer Explorer Last Change: 19 Aug 2014
  2. Buffer Explorer *buffer-explorer* *bufexplorer*
  3. Version 7.4.4
  4. Plugin for easily exploring (or browsing) Vim|:buffers|.
  5. |bufexplorer-installation| Installation
  6. |bufexplorer-usage| Usage
  7. |bufexplorer-windowlayout| Window Layout
  8. |bufexplorer-customization| Customization
  9. |bufexplorer-changelog| Change Log
  10. |bufexplorer-todo| Todo
  11. |bufexplorer-credits| Credits
  12. |bufexplorer-copyright| Copyright
  13. For Vim version 7.0 and above.
  14. This plugin is only available if 'compatible' is not set.
  15. {Vi does not have any of this}
  16. ==============================================================================
  17. INSTALLATION *bufexplorer-installation*
  18. To install:
  19. - Download the bufexplorer.zip from one of the following places:
  20. https://github.com/jlanzarotta/bufexplorer
  21. http://www.vim.org/scripts/script.php?script_id=42
  22. or use a package manager like Vundle.
  23. - Extract the zip archive into your runtime directory.
  24. The archive contains plugin/bufexplorer.vim, and doc/bufexplorer.txt.
  25. - Start Vim or goto an existing instance of Vim.
  26. - Execute the following command:
  27. >
  28. :helptag <your runtime directory>/doc
  29. <
  30. This will generate all the help tags for any file located in the doc
  31. directory.
  32. ==============================================================================
  33. USAGE *bufexplorer-usage*
  34. To start exploring in the current window, use: >
  35. \be or :BufExplorer or Your custom key mapping
  36. To start exploring in a newly split horizontal window, use: >
  37. \bs or :BufExplorerHorizontalSplit or Your custom key mapping
  38. To start exploring in a newly split vertical window, use: >
  39. \bv or :BufExplorerVerticalSplit or Your custom key mapping
  40. If you would like to use something other than '\', you may simply change the
  41. leader (see |mapleader|).
  42. When \bs or \bv is issued, bufexplorer opens in either a horizonally or
  43. vertically split window. By issusing either of these commands, the user is
  44. telling bufexplorer that they want to split the window and have bufexplorer
  45. show the buffer they are about to select (from the bufexplorer windows) in the
  46. newly split window. When \be is issued, bufexplorer opens the bufexplorer
  47. contents in the current window and the buffer the user selects is opened in
  48. the current window.
  49. Note: If the current buffer is modified when bufexplorer started, the current
  50. window is always split and the new bufexplorer is displayed in that new
  51. window.
  52. Commands to use once exploring:
  53. <F1> Toggle help information.
  54. <enter> Opens the buffer that is under the cursor into the current
  55. window.
  56. <leftmouse> Opens the buffer that is under the cursor into the current
  57. window.
  58. <shift-enter> Opens the buffer that is under the cursor in another tab.
  59. b Fast buffer switching with b<any bufnum>.
  60. B Works in association with the|ShowTabBuffer|option. If
  61. |ShowTabBuffer|is set to 1, this toggles if BufExplorer is to
  62. only store the most recent tab for this buffer or not.
  63. d |:delete|the buffer under the cursor from the list. The
  64. buffer's 'buflisted' is cleared. This allows for the buffer to
  65. be displayed again using the 'show unlisted' command.
  66. D |:wipeout|the buffer under the cursor from the list. When a
  67. buffers is wiped, it will not be shown when unlisted buffer are
  68. displayed.
  69. f Toggles whether you are taken to the active window when
  70. selecting a buffer or not.
  71. o Opens the buffer that is under the cursor into the current
  72. window.
  73. p Toggles the showing of a split filename/pathname.
  74. q Exit/Close bufexplorer.
  75. r Reverses the order the buffers are listed in.
  76. R Toggles relative path/absolute path.
  77. s Cycle thru how the buffers are listed. Either by buffer
  78. number, file name, file extension, most recently used (MRU), or
  79. full path.
  80. S Cycle thru how the buffers are listed, in reverse order.
  81. Either by buffer number, file name, file extension, most
  82. recently used (MRU), or full path.
  83. t Opens the buffer that is under the cursor in another tab.
  84. T Toggles to show only buffers for this tab or not.
  85. u Toggles the showing of "unlisted" buffers.
  86. Once invoked, Buffer Explorer displays a sorted list (MRU is the default
  87. sort method) of all the buffers that are currently opened. You are then
  88. able to move the cursor to the line containing the buffer's name you are
  89. wanting to act upon. Once you have selected the buffer you would like,
  90. you can then either open it, close it(delete), resort the list, reverse
  91. the sort, quit exploring and so on...
  92. ===============================================================================
  93. WINDOW LAYOUT *bufexplorer-windowlayout*
  94. -------------------------------------------------------------------------------
  95. " Press <F1> for Help
  96. " Sorted by mru | Locate buffer | Absolute Split path
  97. "=
  98. 1 %a bufexplorer.txt C:\Vim\vimfiles\doc line 87
  99. 2 # bufexplorer.vim c:\Vim\vimfiles\plugin line 1
  100. -------------------------------------------------------------------------------
  101. | | | | |
  102. | | | | +-- Current Line #.
  103. | | | +-- Relative/Full Path
  104. | | +-- Buffer Name.
  105. | +-- Buffer Attributes. See|:buffers|for more information.
  106. +-- Buffer Number. See|:buffers|for more information.
  107. ===============================================================================
  108. CUSTOMIZATION *bufexplorer-customization*
  109. If you do not like the default key mappings of \be, \bs, and \bv, you can
  110. override bufexplorer's default mappings by setting up something like the
  111. following in your vimrc file:
  112. noremap <silent> <F11> :BufExplorer<CR>
  113. noremap <silent> <m-F11> :BufExplorerHorizontalSplit<CR>
  114. noremap <silent> <c-F11> :BufExplorerVerticalSplit<CR>
  115. *g:bufExplorerChgWin*
  116. If set, bufexplorer will bring up the selected buffer in the window specified
  117. by g:bufExplorerChgWin.
  118. *g:bufExplorerDefaultHelp*
  119. To control whether the default help is displayed or not, use: >
  120. let g:bufExplorerDefaultHelp=0 " Do not show default help.
  121. let g:bufExplorerDefaultHelp=1 " Show default help.
  122. The default is to show the default help.
  123. *g:bufExplorerDisableDefaultKeyMapping*
  124. To control whether the default key mappings are enabled or not, use: >
  125. let g:bufExplorerDisableDefaultKeyMapping=0 " Do not disable mapping.
  126. let g:bufExplorerDisableDefaultKeyMapping=1 " Disable mapping.
  127. The default is NOT to disable the default key mapping.
  128. *g:bufExplorerDetailedHelp*
  129. To control whether detailed help is display by, use: >
  130. let g:bufExplorerDetailedHelp=0 " Do not show detailed help.
  131. let g:bufExplorerDetailedHelp=1 " Show detailed help.
  132. The default is NOT to show detailed help.
  133. *g:bufExplorerFindActive*
  134. To control whether you are taken to the active window when selecting a buffer,
  135. use: >
  136. let g:bufExplorerFindActive=0 " Do not go to active window.
  137. let g:bufExplorerFindActive=1 " Go to active window.
  138. The default is to be taken to the active window.
  139. *g:bufExplorerFuncRef*
  140. When a buffer is selected, the functions specified either singly or as a list
  141. will be called.
  142. *g:bufExplorerReverseSort*
  143. To control whether to sort the buffer in reverse order or not, use: >
  144. let g:bufExplorerReverseSort=0 " Do not sort in reverse order.
  145. let g:bufExplorerReverseSort=1 " Sort in reverse order.
  146. The default is NOT to sort in reverse order.
  147. *g:bufExplorerShowDirectories*
  148. Directories usually show up in the list from using a command like ":e .".
  149. To control whether to show directories in the buffer list or not, use: >
  150. let g:bufExplorerShowDirectories=0 " Do not show directories.
  151. let g:bufExplorerShowDirectories=1 " Show directories.
  152. The default is to show directories.
  153. *g:bufExplorerShowNoName*
  154. To control whether to show "No Name" buffers or not, use: >
  155. let g:bufExplorerShowNoName=0 " Do not "No Name" buffers.
  156. let g:bufExplorerShowNoName=1 " Show "No Name" buffers.
  157. The default is to NOT show "No Name buffers.
  158. *g:bufExplorerShowRelativePath*
  159. To control whether to show absolute paths or relative to the current
  160. directory, use: >
  161. let g:bufExplorerShowRelativePath=0 " Show absolute paths.
  162. let g:bufExplorerShowRelativePath=1 " Show relative paths.
  163. The default is to show absolute paths.
  164. *g:bufExplorerShowTabBuffer*
  165. To control weither or not to show buffers on for the specific tab or not, use: >
  166. let g:bufExplorerShowTabBuffer=0 " No.
  167. let g:bufExplorerShowTabBuffer=1 " Yes.
  168. The default is not to show.
  169. *g:bufExplorerShowUnlisted*
  170. To control whether to show unlisted buffer or not, use: >
  171. let g:bufExplorerShowUnlisted=0 " Do not show unlisted buffers.
  172. let g:bufExplorerShowUnlisted=1 " Show unlisted buffers.
  173. The default is to NOT show unlisted buffers.
  174. *g:bufExplorerSortBy*
  175. To control what field the buffers are sorted by, use: >
  176. let g:bufExplorerSortBy='extension' " Sort by file extension.
  177. let g:bufExplorerSortBy='fullpath' " Sort by full file path name.
  178. let g:bufExplorerSortBy='mru' " Sort by most recently used.
  179. let g:bufExplorerSortBy='name' " Sort by the buffer's name.
  180. let g:bufExplorerSortBy='number' " Sort by the buffer's number.
  181. The default is to sort by mru.
  182. *g:bufExplorerSplitBelow*
  183. To control where the new split window will be placed above or below the
  184. current window, use: >
  185. let g:bufExplorerSplitBelow=1 " Split new window below current.
  186. let g:bufExplorerSplitBelow=0 " Split new window above current.
  187. The default is to use whatever is set by the global &splitbelow
  188. variable.
  189. *g:bufExplorerSplitHorzSize*
  190. To control the size of the new horizontal split window. use: >
  191. let g:bufExplorerSplitHorzSize=n " New split window is n rows high.
  192. let g:bufExplorerSplitHorzSize=0 " New split window size set by Vim.
  193. The default is 0, so that the size is set by Vim.
  194. *g:bufExplorerSplitOutPathName*
  195. To control whether to split out the path and file name or not, use: >
  196. let g:bufExplorerSplitOutPathName=1 " Split the path and file name.
  197. let g:bufExplorerSplitOutPathName=0 " Don't split the path and file
  198. " name.
  199. The default is to split the path and file name.
  200. *g:bufExplorerSplitRight*
  201. To control where the new vsplit window will be placed to the left or right of
  202. current window, use: >
  203. let g:bufExplorerSplitRight=0 " Split left.
  204. let g:bufExplorerSplitRight=1 " Split right.
  205. The default is to use the global &splitright.
  206. *g:bufExplorerSplitVertSize*
  207. To control the size of the new vertical split window. use: >
  208. let g:bufExplorerVertSize=n " New split window is n columns wide.
  209. let g:bufExplorerVertSize=0 " New split windows size set by Vim.
  210. The default is 0, so that the size is set by Vim.
  211. ===============================================================================
  212. CHANGE LOG *bufexplorer-changelog*
  213. 7.4.4 August 19, 2014
  214. - Revert change where bufexplorer windows was closed even if the target
  215. buffer has not been loaded yet.
  216. 7.4.3 August 13, 2014
  217. - Ivan Ukhov fixed issue with deleting the last window. This update also
  218. fixes as well as another. If you have say, NERDtree open on the left
  219. side and bufexplorer on the right, that bufexplorer would close NERDtree
  220. erroneously thinking that it is closing itself.
  221. - Radoslaw Burny fixed a few bugs that surfaced when bufexplorer is used
  222. within winmanager.
  223. 7.4.2 October 22, 2013
  224. - Added global option g:bufExplorerDisableDefaultKeyMapping. This option
  225. controls weather the default key mappings (\be, \bs, and \bv) are
  226. enabled or not. See documentation for more information.
  227. 7.4.1 October 11, 2013
  228. - First update related to Vim 7.4.
  229. - Changed license text.
  230. - Fixed issue with 'hidden'. If 'hidden' is set, make sure that
  231. g:bufExplorerFindActive is set to 0. Otherwise, when using /bs or /bv,
  232. and selecting a buffer, the original buffer will be switched to instead
  233. of being opened in the newly created windows.
  234. - Added new 'b' mapping when the bufExplorer window is opened. When 'b'
  235. is pressed, the user is prompted for the buffer number to switch to, and
  236. is is then switched to when <CR> is pressed. This allows for somewhat
  237. faster buffer switching instead of using the j and k keys or the mouse
  238. to select the buffer to switch to.
  239. - Removed 'set nolist' from the Initialize() function as well as the
  240. restore of the 'list' setting in the CleanUp() function. These were
  241. causing issues when multiple new files were opened from the command
  242. line. Furthermore, there was really no reason, that I can remember, to
  243. why the 'list' setting was saved, modified, and restored anyways.
  244. - Fixed issue with WinManager integration code not working correctly
  245. anymore.
  246. - Brought back the xnoremap setup for the 'd' and 'D' keys. These were
  247. removed for some reason after version 7.2.8.
  248. - Thanks to all the contributors and testers.
  249. 7.3.6 May 06, 2013
  250. - Removed the 'drop' window command that was causing issue with the
  251. argument-list being modified after the BufExplorer windows was
  252. displayed.
  253. 7.3.5 February 08, 2013
  254. - Michael Henry added the ability to view "No Name" buffers. This
  255. functionality was lost since version 7.3.0. He also did some removal of
  256. "dead" code and cleaned up the code to handle filenames with embedded
  257. '"'.
  258. 7.3.4 January 28, 2013
  259. - Thanks go out to John Szakmeister for finding and fixing a bug in the
  260. RebuildBufferList method. The keepjumps line that clears the list could
  261. potentially reference a backwards range.
  262. 7.3.3 January 14, 2013
  263. - Major cleanup and reorganization of the change log.
  264. - We welcome the return of g:bufExplorerSplitHorzSize and
  265. g:bufExplorerSplitVertSize. When setting these values, anything less
  266. than or equal to 0 causes the split windows size to be determined by
  267. Vim. If for example you want your new horizontal split window 10 rows
  268. high, set g:bufExplorerSplitHorzSize = 10 in your .vimrc. Similar would
  269. be done if wanting a vertical split except you would use the
  270. g:bufExplorerSplitVertSize variable instead.
  271. 7.3.2 December 24, 2012
  272. - Thanks go out to Michael Henry for pointing out that I completely
  273. missed yet another function, ReverseSortSelect(), during the
  274. refactoring. This function has now returned.
  275. 7.3.1 December 06, 2012
  276. - Thanks go out to Brett Rasmussen for pointing out that the feature
  277. added way back in version 7.2.3 by Yuriy Ershov to automatically
  278. reposition the cursor to the line containing the active buffer, was
  279. no longer in the plugin. That bit of code has been re-added and
  280. all is well.
  281. 7.3.0 October 09, 2012
  282. - It has been quite a while since I published a new version and this
  283. is the first version since Vim 7.3 was released. I have put some
  284. time into reworking and cleaning up the code as well as various bug
  285. fixes. Overall, I am hopeful that I not forgotten or lost a feature.
  286. - Thanks to Tim Johnson for testing out this new version.
  287. - I have hopefully allowed for better mapping of the main public
  288. methods as is explained in the|bufexplorer-customization|section
  289. of the documentation.
  290. - Add new 'B', 'o', and 'S' key mappings.
  291. 7.2.8 November 08, 2010
  292. - Thanks to Charles Campbell for integrating bufexplorer with GDBMGR.
  293. http://mysite.verizon.net/astronaut/vim/index.html#GDBMGR
  294. 7.2.7 April 26, 2010
  295. - My 1st attempt to fix the "cache" issue where buffers information
  296. has changed but the cache/display does not reflect those changes.
  297. More work still needs to be done.
  298. 7.2.6 February 12, 2010
  299. - Thanks to Michael Henry for pointing out that I totally forgot to
  300. update the inline help to reflect the previous change to the 'd'
  301. and 'D' keys. Opps!
  302. 7.2.5 February 10, 2010
  303. - Philip Morant suggested switching the command (bwipe) associated
  304. with the 'd' key with the command (bdelete) associated with the 'D'
  305. key. This made sense since the 'd' key is more likely to be used
  306. compared to the 'D' key.
  307. 7.2.4 January 14, 2010
  308. - I did not implement the patch provided by Godefroid Chapelle
  309. correctly. I missed one line which happened to be the most important
  310. one :)
  311. 7.2.3 December 15, 2009
  312. - Hopefully I have not left anyone or anything out :)
  313. - Thanks to David Fishburn for helping me out with a much needed
  314. code overhaul as well as some awesome performance enhancements.
  315. - David also reworked the handling of tabs.
  316. - Thanks to Vladimir Dobriakov for making the suggestions on
  317. enhancing the documentation to include a better explaination of
  318. what is contained in the main bufexplorer window.
  319. - Thanks to Yuriy Ershov for added code that when the bufexplorer
  320. window is opened, the cursor is now positioned at the line with the
  321. active buffer (useful in non-MRU sort modes).
  322. - Yuriy also added the abiltiy to cycle through the sort fields in
  323. reverse order.
  324. - Thanks to Michael Henry for supplying a patch that allows
  325. bufexplorer to be opened even when there is one buffer or less.
  326. - Thanks to Godefroid Chapelle for supplying a patch that fixed
  327. MRU sort order after loading a session.
  328. 7.2.2 November 19, 2008
  329. - Thanks to David L. Dight for spotting and fixing an issue when using
  330. ctrl^. bufexplorer would incorrectly handle the previous buffer so
  331. that when ctrl^ was pressed the incorrect file was opened.
  332. 7.2.1 September 03, 2008
  333. - Thanks to Dimitar for spotting and fixing a feature that was
  334. inadvertently left out of the previous version. The feature was when
  335. bufexplorer was used together with WinManager, you could use the tab
  336. key to open a buffer in a split window.
  337. 7.2.0 August 15, 2008
  338. - For all those missing the \bs and \bv commands, these have now
  339. returned. Thanks to Phil O'Connell for asking for the return of
  340. these missing features and helping test out this version.
  341. - Fixed problem with the bufExplorerFindActive code not working
  342. correctly.
  343. - Fixed an incompatibility between bufexplorer and netrw that caused
  344. buffers to be incorrectly removed from the MRU list.
  345. 7.1.7 December 21, 2007
  346. - TaCahiroy fixed several issues related to opening a buffer in a tab.
  347. 7.1.6 December 01, 2007
  348. - Removed ff=unix from modeline in bufexplorer.txt. Found by Bill
  349. McCarthy.
  350. 7.1.5 November 30, 2007
  351. - Could not open unnamed buffers. Fixed by TaCahiroy.
  352. 7.1.4 November 16, 2007
  353. - Sometimes when a file's path has 'white space' in it, extra buffers
  354. would be created containing each piece of the path. i.e:
  355. opening c:\document and settings\test.txt would create a buffer
  356. named "and" and a buffer named "Documents". This was reported and
  357. fixed by TaCa Yoss.
  358. 7.1.3 November 15, 2007
  359. - Added code to allow only one instance of the plugin to run at a time.
  360. Thanks Dennis Hostetler.
  361. 7.1.2 November 07, 2007
  362. - Dave Larson added handling of tabs.
  363. - Dave Larson removed \bs and \bv commands because these are easier for
  364. the used to create horizontal and vertical windows.
  365. - Fixed a jumplist issue spotted by JiangJun. I overlooked the
  366. 'jumplist' and with a couple calls to 'keepjumps', everything is fine
  367. again.
  368. - Went back to using just a plugin file, instead of both an autoload
  369. and plugin file. The splitting of the file caused issues with other
  370. plugins. So if you have a prior version of bufexplorer that has an
  371. autoload file, please remove autoload\bufexplorer and
  372. plugin\bufexplorer before installing this new version.
  373. - Fixed E493 error spotted by Thomas Arendsen Hein.
  374. - Minor cosmetic changes.
  375. - Minor help file changes.
  376. 7.1.1 August 02, 2007
  377. - A problem spotted by Thomas Arendsen Hein. When running Vim
  378. (7.1.94), error E493 was being thrown.
  379. * Added 'D' for 'delete' buffer as the 'd' command was a 'wipe' buffer.
  380. 7.1.0 August 01, 2007
  381. - Another 'major' update, some by Dave Larson, some by me.
  382. - Making use of 'autoload' now to make the plugin load quicker.
  383. - Removed '\bs' and '\bv'. These are now controlled by the user. The
  384. user can issue a ':sp' or ':vs' to create a horizontal or vertical
  385. split window and then issue a '\be'
  386. - Added handling of tabs.
  387. 7.0.17 July 24, 2007
  388. - Fixed issue with 'drop' command.
  389. - Various enhancements and improvements.
  390. 7.0.16 May 15, 2007
  391. - Fixed issue reported by Liu Jiaping on non Windows systems, which was
  392. ...
  393. Open file1, open file2, modify file1, open bufexplorer, you get the
  394. following error:
  395. --------8<--------
  396. Error detected while processing function
  397. <SNR>14_StartBufExplorer..<SNR>14_SplitOpen:
  398. line 4:
  399. E37: No write since last change (add ! to override)
  400. But the worse thing is, when I want to save the current buffer and
  401. type ':w', I get another error message:
  402. E382: Cannot write, 'buftype' option is set
  403. --------8<--------
  404. 7.0.15 April 27, 2007
  405. - Thanks to Mark Smithfield for suggesting bufexplorer needed to handle
  406. the ':args' command.
  407. 7.0.14 March 23, 2007
  408. - Thanks to Randall Hansen for removing the requirement of terminal
  409. versions to be recompiled with 'gui' support so the 'drop' command
  410. would work. The 'drop' command is really not needed in terminal
  411. versions.
  412. 7.0.13 February 23, 2007
  413. - Fixed integration with WinManager.
  414. - Thanks to Dave Eggum for another update.
  415. * Fix: The detailed help didn't display the mapping for toggling
  416. the split type, even though the split type is displayed.
  417. * Fixed incorrect description in the detailed help for toggling
  418. relative or full paths.
  419. * Deprecated s:ExtractBufferNbr(). Vim's str2nr() does the same
  420. thing.
  421. * Created a s:Set() function that sets a variable only if it hasn't
  422. already been defined. It's useful for initializing all those
  423. default settings.
  424. * Removed checks for repetitive command definitions. They were
  425. unnecessary.
  426. * Made the help highlighting a little more fancy.
  427. * Minor reverse compatibility issue: Changed ambiguous setting
  428. names to be more descriptive of what they do (also makes the code
  429. easier to follow):
  430. Changed bufExplorerSortDirection to bufExplorerReverseSort
  431. Changed bufExplorerSplitType to bufExplorerSplitVertical
  432. Changed bufExplorerOpenMode to bufExplorerUseCurrentWindow
  433. * When the BufExplorer window closes, all the file-local marks are
  434. now deleted. This may have the benefit of cleaning up some of the
  435. jumplist.
  436. * Changed the name of the parameter for StartBufExplorer from
  437. "split" to "open". The parameter is a string which specifies how
  438. the buffer will be open, not if it is split or not.
  439. * Deprecated DoAnyMoreBuffersExist() - it is a one line function
  440. only used in one spot.
  441. * Created four functions (SplitOpen(), RebuildBufferList(),
  442. UpdateHelpStatus() and ReSortListing()) all with one purpose - to
  443. reduce repeated code.
  444. * Changed the name of AddHeader() to CreateHelp() to be more
  445. descriptive of what it does. It now returns an array instead of
  446. updating the window directly. This has the benefit of making the
  447. code more efficient since the text the function returns is used a
  448. little differently in the two places the function is called.
  449. * Other minor simplifications.
  450. 7.0.12 November 30, 2006
  451. - MAJOR Update. This version will ONLY run with Vim version 7.0 or
  452. greater.
  453. - Dave Eggum has made some 'significant' updates to this latest
  454. version:
  455. * Added BufExplorerGetAltBuf() global function to be used in the
  456. user’s rulerformat.
  457. * Added g:bufExplorerSplitRight option.
  458. * Added g:bufExplorerShowRelativePath option with mapping.
  459. * Added current line highlighting.
  460. * The split type can now be changed whether bufexplorer is opened
  461. in split mode or not.
  462. * Various major and minor bug fixes and speed improvements.
  463. * Sort by extension.
  464. - Other improvements/changes:
  465. * Changed the help key from '?' to <F1> to be more 'standard'.
  466. * Fixed splitting of vertical bufexplorer window.
  467. - Hopefully I have not forgot something :)
  468. 7.0.11 March 10, 2006
  469. - Fixed a couple of highlighting bugs, reported by David Eggum.
  470. - Dave Eggum also changed passive voice to active on a couple of
  471. warning messages.
  472. 7.0.10 March 02, 2006
  473. - Fixed bug report by Xiangjiang Ma. If the 'ssl' option is set,
  474. the slash character used when displaying the path was incorrect.
  475. 7.0.9 February 28, 2006
  476. - Martin Grenfell found and eliminated an annoying bug in the
  477. bufexplorer/winmanager integration. The bug was were an
  478. annoying message would be displayed when a window was split or
  479. a new file was opened in a new window. Thanks Martin!
  480. 7.0.8 January 18, 2006
  481. - Thanks to Mike Li for catching a bug in the WinManager integration.
  482. The bug was related to the incorrect displaying of the buffer
  483. explorer's window title.
  484. 7.0.7 December 19, 2005
  485. - Thanks to Jeremy Cowgar for adding a new enhancement. This
  486. enhancement allows the user to press 'S', that is capital S, which
  487. will open the buffer under the cursor in a newly created split
  488. window.
  489. 7.0.6 November 18, 2005
  490. - Thanks to Larry Zhang for finding a bug in the "split" buffer code.
  491. If you force set g:bufExplorerSplitType='v' in your vimrc, and if you
  492. tried to do a \bs to split the bufexplorer window, it would always
  493. split horizontal, not vertical.
  494. - Larry Zhang also found that I had a typeo in that the variable
  495. g:bufExplorerSplitVertSize was all lower case in the documentation
  496. which was incorrect.
  497. 7.0.5 October 18, 2005
  498. - Thanks to Mun Johl for pointing out a bug that if a buffer was
  499. modified, the '+' was not showing up correctly.
  500. 7.0.4 October 03, 2005
  501. - Fixed a problem discovered first by Xiangjiang Ma. Well since I've
  502. been using vim 7.0 and not 6.3, I started using a function (getftype)
  503. that is not in 6.3. So for backward compatibility, I conditionaly use
  504. this function now. Thus, the g:bufExplorerShowDirectories feature is
  505. only available when using vim 7.0 and above.
  506. 7.0.3 September 30, 2005
  507. - Thanks to Erwin Waterlander for finding a problem when the last
  508. buffer was deleted. This issue got me to rewrite the buffer display
  509. logic (which I've wanted to do for sometime now).
  510. - Also great thanks to Dave Eggum for coming up with idea for
  511. g:bufExplorerShowDirectories. Read the above information about this
  512. feature.
  513. 7.0.2 March 25, 2005
  514. - Thanks to Thomas Arendsen Hein for finding a problem when a user
  515. has the default help turned off and then brought up the explorer. An
  516. E493 would be displayed.
  517. 7.0.1 March 10, 2005
  518. - Thanks to Erwin Waterlander for finding a couple problems.
  519. The first problem allowed a modified buffer to be deleted. Opps! The
  520. second problem occurred when several files were opened, BufExplorer
  521. was started, the current buffer was deleted using the 'd' option, and
  522. then BufExplorer was exited. The deleted buffer was still visible
  523. while it is not in the buffers list. Opps again!
  524. 7.0.0 March 10, 205
  525. - Thanks to Shankar R. for suggesting to add the ability to set
  526. the fixed width (g:bufExplorerSplitVertSize) of a new window
  527. when opening bufexplorer vertically and fixed height
  528. (g:bufExplorerSplitHorzSize) of a new window when opening
  529. bufexplorer horizontally. By default, the windows are normally
  530. split to use half the existing width or height.
  531. 6.3.0 July 23, 2004
  532. - Added keepjumps so that the jumps list would not get cluttered with
  533. bufexplorer related stuff.
  534. 6.2.3 April 15, 2004
  535. - Thanks to Jay Logan for finding a bug in the vertical split position
  536. of the code. When selecting that the window was to be split
  537. vertically by doing a '\bv', from then on, all splits, i.e. '\bs',
  538. were split vertically, even though g:bufExplorerSplitType was not set
  539. to 'v'.
  540. 6.2.2 January 09, 2004
  541. - Thanks to Patrik Modesto for adding a small improvement. For some
  542. reason his bufexplorer window was always showing up folded. He added
  543. 'setlocal nofoldenable' and it was fixed.
  544. 6.2.1 October 09, 2003
  545. - Thanks goes out to Takashi Matsuo for added the 'fullPath' sorting
  546. logic and option.
  547. 6.2.0 June 13, 2003
  548. - Thanks goes out to Simon Johann-Ganter for spotting and fixing a
  549. problem in that the last search pattern is overridden by the search
  550. pattern for blank lines.
  551. 6.1.6 May 05, 2003
  552. - Thanks to Artem Chuprina for finding a pesky bug that has been around
  553. for sometime now. The <esc> key mapping was causing the buffer
  554. explored to close prematurely when vim was run in an xterm. The <esc>
  555. key mapping is now removed.
  556. 6.1.5 April 28, 2003
  557. - Thanks to Khorev Sergey. Added option to show default help or not.
  558. 6.1.4 March 18, 2003
  559. - Thanks goes out to Valery Kondakoff for suggesting the addition of
  560. setlocal nonumber and foldcolumn=0. This allows for line numbering
  561. and folding to be turned off temporarily while in the explorer.
  562. 6.1.3 March 11, 2003
  563. - Added folding.
  564. - Did some code cleanup.
  565. - Added the ability to force the newly split window to be temporarily
  566. vertical, which was suggested by Thomas Glanzmann.
  567. 6.1.2 November 05, 2002
  568. - Now pressing the <esc> key will quit, just like 'q'.
  569. - Added folds to hide winmanager configuration.
  570. - If anyone had the 'C' option in their cpoptions they would receive
  571. a E10 error on startup of BufExplorer. cpo is now saved, updated and
  572. restored. Thanks to Charles E Campbell, Jr.
  573. - Attempted to make sure there can only be one BufExplorer window open
  574. at a time.
  575. 6.1.1 March 28, 2002
  576. - Thanks to Brian D. Goodwin for adding toupper to FileNameCmp. This
  577. way buffers sorted by name will be in the correct order regardless of
  578. case.
  579. 6.0.16 March 14, 2002
  580. - Thanks to Andre Pang for the original patch/idea to get bufexplorer
  581. to work in insertmode/modeless mode (evim).
  582. - Added Initialize and Cleanup autocommands to handle commands that
  583. need to be performed when starting or leaving bufexplorer.
  584. 6.0.15 February 20, 2002
  585. - Srinath Avadhanulax added a patch for winmanager.vim.
  586. 6.0.14 February 19, 2002
  587. - Fix a few more bug that I thought I already had fixed.
  588. - Thanks to Eric Bloodworth for adding 'Open Mode/Edit in Place'.
  589. - Added vertical splitting.
  590. 6.0.13 February 05, 2002
  591. - Thanks to Charles E Campbell, Jr. for pointing out some embarrassing
  592. typos that I had in the documentation. I guess I need to run the
  593. spell checker more :o)
  594. 6.0.12 February 04, 2002
  595. - Thanks to Madoka Machitani, for the tip on adding the augroup command
  596. around the MRUList autocommands.
  597. 6.0.11 January 26, 2002
  598. - Fixed bug report by Xiangjiang Ma. '"=' was being added to the search
  599. history which messed up hlsearch.
  600. 6.0.10 January 14, 2002
  601. - Added the necessary hooks so that the Srinath Avadhanula's
  602. winmanager.vim script could more easily integrate with this script.
  603. - Tried to improve performance.
  604. 6.0.9 December 17, 2001
  605. - Added MRU (Most Recently Used) sort ordering.
  606. 6.0.8 December 03, 2001
  607. - Was not resetting the showcmd command correctly.
  608. - Added nifty help file.
  609. 6.0.7 November 19, 2001
  610. - Thanks to Brett Carlane for some great enhancements. Some are added,
  611. some are not, yet. Added highlighting of current and alternate
  612. filenames. Added splitting of path/filename toggle. Reworked
  613. ShowBuffers().
  614. - Changed my email address.
  615. 6.0.6 September 05, 2001
  616. - Copyright notice added. Needed this so that it could be distributed
  617. with Debian Linux.
  618. - Fixed problem with the SortListing() function failing when there was
  619. only one buffer to display.
  620. 6.0.5 August 10, 2001
  621. - Fixed problems reported by David Pascoe, in that you where unable to
  622. hit 'd' on a buffer that belonged to a files that no longer existed
  623. and that the 'yank' buffer was being overridden by the help text when
  624. the bufexplorer was opened.
  625. 6.0.4 July, 31, 2001
  626. - Thanks to Charles Campbell, Jr. for making this plugin more plugin
  627. *compliant*, adding default keymappings of <Leader>be and <Leader>bs
  628. as well as fixing the 'w:sortDirLabel not being defined' bug.
  629. 6.0.3 July 30, 2001
  630. - Added sorting capabilities. Sort taken from explorer.vim.
  631. 6.0.2 July 25, 2001
  632. - Can't remember.
  633. 6.0.1 Sometime before July 25, 2001
  634. - Initial release.
  635. ===============================================================================
  636. TODO *bufexplorer-todo*
  637. - Add ability to open a buffer in a horizontal or vertical split after the
  638. initial bufexplorer window is opened.
  639. ===============================================================================
  640. CREDITS *bufexplorer-credits*
  641. Author: Jeff Lanzarotta <delux256-vim at yahoo dot com>
  642. Credit must go out to Bram Moolenaar and all the Vim developers for
  643. making the world's best editor (IMHO). I also want to thank everyone who
  644. helped and gave me suggestions. I wouldn't want to leave anyone out so I
  645. won't list names.
  646. ===============================================================================
  647. COPYRIGHT *bufexplorer-copyright*
  648. Copyright (c) 2001-2014, Jeff Lanzarotta
  649. All rights reserved.
  650. Redistribution and use in source and binary forms, with or without
  651. modification, are permitted provided that the following conditions are met:
  652. * Redistributions of source code must retain the above copyright notice, this
  653. list of conditions and the following disclaimer.
  654. * Redistributions in binary form must reproduce the above copyright notice,
  655. this list of conditions and the following disclaimer in the documentation
  656. and/or other materials provided with the distribution.
  657. * Neither the name of the {organization} nor the names of its contributors may
  658. be used to endorse or promote products derived from this software without
  659. specific prior written permission.
  660. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  661. AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  662. IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  663. DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
  664. FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  665. DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  666. SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  667. CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  668. OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  669. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  670. ===============================================================================
  671. vim:tw=78:noet:wrap:ts=4:ft=help:norl: