bufexplorer.txt 59 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135
  1. *bufexplorer.txt* Buffer Explorer Last Change: 20 Mar 2025
  2. Buffer Explorer *buffer-explorer* *bufexplorer*
  3. Version 7.9.0
  4. Plugin for easily exploring (or browsing) Vim|:buffers|.
  5. |bufexplorer-installation| Installation
  6. |bufexplorer-usage| Usage
  7. |bufexplorer-windowlayout| Window Layout
  8. |bufexplorer-commands| Commands
  9. |bufexplorer-customization| Customization
  10. |bufexplorer-changelog| Change Log
  11. |bufexplorer-todo| Todo
  12. |bufexplorer-credits| Credits
  13. |bufexplorer-copyright| Copyright
  14. For Vim version 7.4 and above.
  15. This plugin is only available if 'compatible' is not set.
  16. {Vi does not have any of this}
  17. ==============================================================================
  18. INSTALLATION *bufexplorer-installation*
  19. To install:
  20. - Download the bufexplorer.zip from one of the following places:
  21. https://github.com/jlanzarotta/bufexplorer
  22. http://www.vim.org/scripts/script.php?script_id=42
  23. or use a package manager like vim-plug, Vundle, etc..
  24. - Extract the zip archive into your runtime directory.
  25. The archive contains plugin/bufexplorer.vim, and doc/bufexplorer.txt.
  26. - Start Vim or goto an existing instance of Vim.
  27. - Execute the following command:
  28. >
  29. :helptag <your runtime directory>/doc
  30. <
  31. This will generate all the help tags for any file located in the doc
  32. directory.
  33. ==============================================================================
  34. USAGE *bufexplorer-usage*
  35. To start exploring in the current window, use: >
  36. <Leader>be or :BufExplorer or Your custom key mapping
  37. To toggle bufexplorer on or off in the current window, use: >
  38. <Leader>bt or :ToggleBufExplorer or Your custom key mapping
  39. To start exploring in a newly split horizontal window, use: >
  40. <Leader>bs or :BufExplorerHorizontalSplit or Your custom key mapping
  41. To start exploring in a newly split vertical window, use: >
  42. <Leader>bv or :BufExplorerVerticalSplit or Your custom key mapping
  43. For full information on these flexible commands, see |bufexplorer-commands|.
  44. If you would like to use something other than the default leader key - '\' -
  45. you may simply change the leader (see |mapleader|).
  46. When <Leader>bs or <Leader>bv is issued, bufexplorer opens in either a
  47. horizontally or vertically split window. By issuing either of these commands,
  48. the user is telling bufexplorer that they want to split the window and have
  49. bufexplorer show the buffer they are about to select (from the bufexplorer
  50. windows) in the newly split window. When <Leader>be is issued, bufexplorer
  51. opens the bufexplorer contents in the current window and the buffer the user
  52. selects is opened in the current window.
  53. Commands to use once exploring:
  54. <F1> Toggle help information.
  55. <enter> Opens the buffer that is under the cursor into the current
  56. window.
  57. <leftmouse> Opens the buffer that is under the cursor into the current
  58. window.
  59. <shift-enter> Opens the buffer that is under the cursor in another tab.
  60. a Toggles whether you are taken to the active window when
  61. selecting a buffer or not.
  62. b Fast buffer switching with b<any bufnum>.
  63. B Works in association with the |ShowTabBuffer| option. If
  64. |ShowTabBuffer| is set to 1, this toggles if BufExplorer is to
  65. only store the most recent tab for this buffer or not.
  66. d |:delete| the buffer under the cursor from the list. The
  67. buffer's 'buflisted' is cleared. This allows for the buffer to
  68. be displayed again using the 'show unlisted' command.
  69. D |:wipeout| the buffer under the cursor from the list. When a
  70. buffer is wiped, it will not be shown when unlisted buffers are
  71. displayed.
  72. F Open selected buffer in another window above the current.
  73. f Open selected buffer in another window below the current.
  74. o Opens the buffer that is under the cursor into the current
  75. window.
  76. O Opens the buffer that is under the cursor into the window where
  77. BufExplorer was originally launched.
  78. p Toggles the showing of a split filename/pathname.
  79. q Exit/Close bufexplorer.
  80. r Reverses the order the buffers are listed in.
  81. R Toggles relative path/absolute path.
  82. s Cycle thru how the buffers are listed. Either by buffer
  83. number, file name, file extension, most recently used (MRU), or
  84. full path.
  85. S Cycle thru how the buffers are listed, in reverse order.
  86. Either by buffer number, file name, file extension, most
  87. recently used (MRU), or full path.
  88. t Opens the buffer that is under the cursor in another tab.
  89. T Toggles to show only buffers for this tab or not.
  90. u Toggles the showing of "unlisted" buffers.
  91. V Open the selected buffer in another window on the left of the current.
  92. v Open the selected buffer in another window on the right of the current.
  93. X Toggles the showing of terminal buffers.
  94. Once invoked, Buffer Explorer displays a sorted list (MRU is the default
  95. sort method) of all the buffers that are currently opened. You are then
  96. able to move the cursor to the line containing the buffer's name you are
  97. wanting to act upon. Once you have selected the buffer you would like,
  98. you can then either open it, close it (delete), resort the list, reverse
  99. the sort, quit exploring and so on...
  100. ===============================================================================
  101. COMMANDS *bufexplorer-commands*
  102. :BufExplorer [action] *:BufExplorer*
  103. Open or close BufExplorer.
  104. `:BufExplorer` accepts an optional "action" argument as follows:
  105. current Open BufExplorer in the current window
  106. split Open BufExplorer in a new horizontal split
  107. vsplit Open BufExplorer in a new vertical split
  108. above Open BufExplorer in a new horizontal split above the current window
  109. below Open BufExplorer in a new horizontal split below the current window
  110. left Open BufExplorer in a new vertical split left of the current window
  111. right Open BufExplorer in a new vertical split right of the current window
  112. close Close BufExplorer
  113. If the action argument is not provided, then the value of
  114. |g:bufExplorerDefaultAction| will be used; by default, this variable contains
  115. `current` and thus `:Bufexplorer` is the same as `:BufExplorer current`.
  116. Note that this means the behavior of the default mapping <Leader>be (which maps
  117. to `:BufExplorer`) is determined by |g:bufExplorerDefaultAction|.
  118. The `close` action will close BufExplorer regardless of the tab page or window
  119. where it was left running.
  120. For actions other than `close`, the `:BufExplorer` command will switch to any
  121. existing BufExplorer window instead of launching a new instance of BufExplorer.
  122. The actions `above`, `below`, `left`, and `right` specify the type of split
  123. (horizontal or vertical) to create and where the new window should be placed
  124. relative to the current window.
  125. The `split` action makes a horizontal split; the position of the split is
  126. controlled by |g:bufExplorerSplitBelow| (true means `below`, false means
  127. `above`).
  128. The `vsplit` action makes a vertical split; the position of the split is
  129. controlled by |g:bufExplorerSplitRight| (true means `right`, false means
  130. `left`).
  131. Tab completion is provided. For example, typing `:BufExplorer v` and then
  132. pressing the <Tab> key will complete the action argument to become `vsplit`.
  133. :ToggleBufExplorer [action] *:ToggleBufExplorer*
  134. Toggle open/closed BufExplorer.
  135. In most ways, this command is identical to |:BufExplorer|, and the invocation
  136. `:ToggleBufExplorer action` is equivalent to `:BufExplorer action`; however, if
  137. BufExplorer is already running in the current window, `action` is converted to
  138. `close` before chaining to `:BufExplorer action`. If BufExplorer is running in
  139. a different window and the action is not `close`, switch to that already-running
  140. BufExplorer window.
  141. Note that the behavior of the default mapping <Leader>bt (which maps to
  142. `:ToggleBufExplorer`) is determined by |g:bufExplorerDefaultAction|.
  143. :BufExplorerHorizontalSplit *:BufExplorerHorizontalSplit*
  144. Open BufExplorer in a new horizontal split.
  145. This is equivalent to `:BufExplorer split`.
  146. :BufExplorerVerticalSplit *:BufExplorerVerticalSplit*
  147. Open BufExplorer in a new vertical split.
  148. This is equivalent to `:BufExplorer vsplit`.
  149. ===============================================================================
  150. WINDOW LAYOUT *bufexplorer-windowlayout*
  151. -------------------------------------------------------------------------------
  152. " Press <F1> for Help
  153. " Sorted by mru | Locate buffer | Absolute Split path
  154. "=
  155. 1 %a bufexplorer.txt C:\Vim\vimfiles\doc line 87
  156. 2 # bufexplorer.vim c:\Vim\vimfiles\plugin line 1
  157. -------------------------------------------------------------------------------
  158. | | | | |
  159. | | | | +-- Current Line #.
  160. | | | +-- Relative/Full Path
  161. | | +-- Buffer Name.
  162. | +-- Buffer Attributes. See |:buffers| for more information.
  163. +-- Buffer Number. See |:buffers| for more information.
  164. ===============================================================================
  165. CUSTOMIZATION *bufexplorer-customization*
  166. If you do not like the default key mappings of <Leader>be, <Leader>bs, and
  167. <Leader>bv, you can override bufexplorer's default mappings by setting up
  168. something like the following in your vimrc file:
  169. nnoremap <silent> <F11> :BufExplorer<CR>
  170. nnoremap <silent> <s-F11> :ToggleBufExplorer<CR>
  171. nnoremap <silent> <m-F11> :BufExplorerHorizontalSplit<CR>
  172. nnoremap <silent> <c-F11> :BufExplorerVerticalSplit<CR>
  173. BufExplorer provides the following <Plug> mappings for the operations it
  174. provides. The mappings are buffer-local to BufExplorer:
  175. <Plug>(BufExplorer_BufferDelete) Delete buffer with confirmation
  176. <Plug>(BufExplorer_BufferDeleteForced) Delete buffer w/o confirmation
  177. <Plug>(BufExplorer_BufferWipe) Wipe buffer with confirmation
  178. <Plug>(BufExplorer_BufferWipeForced) Wipe buffer w/o confirmation
  179. <Plug>(BufExplorer_Close) Close BufExplorer window
  180. <Plug>(BufExplorer_OpenBuffer) Open buffer
  181. <Plug>(BufExplorer_OpenBufferAsk) Prompt for buffer & open
  182. <Plug>(BufExplorer_OpenBufferOriginalWindow) Open buffer in original window
  183. <Plug>(BufExplorer_OpenBufferSplitAbove) Horizontal split & open above
  184. <Plug>(BufExplorer_OpenBufferSplitBelow) Horizontal split & open below
  185. <Plug>(BufExplorer_OpenBufferSplitLeft) Vertical split & open left
  186. <Plug>(BufExplorer_OpenBufferSplitRight) Vertical split & open right
  187. <Plug>(BufExplorer_OpenBufferTab) Open buffer in new tab
  188. <Plug>(BufExplorer_SortByNext) Select next sort order
  189. <Plug>(BufExplorer_SortByPrev) Select previous sort order
  190. <Plug>(BufExplorer_ToggleFindActive) Toggle finding active buffer
  191. <Plug>(BufExplorer_ToggleHelp) Toggle help information
  192. <Plug>(BufExplorer_ToggleOnlyOneTab) Toggle showing only on MRU tab
  193. <Plug>(BufExplorer_ToggleReverseSort) Reverse current sort order
  194. <Plug>(BufExplorer_ToggleShowRelativePath) Toggle showing relative path
  195. <Plug>(BufExplorer_ToggleShowTabBuffer) Toggle "only this tab" bufs
  196. <Plug>(BufExplorer_ToggleShowTerminal) Toggle showing terminal bufs
  197. <Plug>(BufExplorer_ToggleShowUnlisted) Toggle showing unlisted bufs
  198. <Plug>(BufExplorer_ToggleSplitOutPathName) Toggle splitting out path name
  199. At BufExplorer startup, the following buffer-local mappings are made in
  200. BufExplorer's buffer:
  201. nmap <nowait> <buffer> <2-leftmouse> <Plug>(BufExplorer_OpenBuffer)
  202. nmap <nowait> <buffer> <CR> <Plug>(BufExplorer_OpenBuffer)
  203. nmap <nowait> <buffer> <F1> <Plug>(BufExplorer_ToggleHelp)
  204. nmap <nowait> <buffer> <s-cr> <Plug>(BufExplorer_OpenBufferTab)
  205. nmap <nowait> <buffer> a <Plug>(BufExplorer_ToggleFindActive)
  206. nmap <nowait> <buffer> b <Plug>(BufExplorer_OpenBufferAsk)
  207. nmap <nowait> <buffer> B <Plug>(BufExplorer_ToggleOnlyOneTab)
  208. nmap <nowait> <buffer> d <Plug>(BufExplorer_BufferDelete)
  209. nmap <nowait> <buffer> D <Plug>(BufExplorer_BufferWipe)
  210. nmap <nowait> <buffer> f <Plug>(BufExplorer_OpenBufferSplitBelow)
  211. nmap <nowait> <buffer> F <Plug>(BufExplorer_OpenBufferSplitAbove)
  212. nmap <nowait> <buffer> o <Plug>(BufExplorer_OpenBuffer)
  213. nmap <nowait> <buffer> O <Plug>(BufExplorer_OpenBufferOriginalWindow)
  214. nmap <nowait> <buffer> p <Plug>(BufExplorer_ToggleSplitOutPathName)
  215. nmap <nowait> <buffer> q <Plug>(BufExplorer_Close)
  216. nmap <nowait> <buffer> r <Plug>(BufExplorer_ToggleReverseSort)
  217. nmap <nowait> <buffer> R <Plug>(BufExplorer_ToggleShowRelativePath)
  218. nmap <nowait> <buffer> s <Plug>(BufExplorer_SortByNext)
  219. nmap <nowait> <buffer> S <Plug>(BufExplorer_SortByPrev)
  220. nmap <nowait> <buffer> t <Plug>(BufExplorer_OpenBufferTab)
  221. nmap <nowait> <buffer> T <Plug>(BufExplorer_ToggleShowTabBuffer)
  222. nmap <nowait> <buffer> u <Plug>(BufExplorer_ToggleShowUnlisted)
  223. nmap <nowait> <buffer> v <Plug>(BufExplorer_OpenBufferSplitRight)
  224. nmap <nowait> <buffer> V <Plug>(BufExplorer_OpenBufferSplitLeft)
  225. nmap <nowait> <buffer> X <Plug>(BufExplorer_ToggleShowTerminal)
  226. These buffer-local mappings may be adjusted as desired after BufExplorer has
  227. been launched, typically by use of an autocommand. At BufExplorer startup, a
  228. |User| autocommand will be sent with an autocommand pattern of
  229. `BufExplorer_Started`. This event may be caught via an |:autocmd|, allowing
  230. customization of mappings when BufExplorer launches.
  231. Below is an example showing of some of the possibilites. `UserPrefix_` is an
  232. arbitrary user-chosen prefix to avoid naming collisions. When the
  233. `BufExplorer_Started` event is detected, `UserPrefix_setupBufExplorer()` will
  234. be called to adjust BufExplorer's mappings: >
  235. augroup UserPrefix_BufExplorerGroup
  236. autocmd!
  237. autocmd User BufExplorer_Started call UserPrefix_setupBufExplorer()
  238. augroup END
  239. function! UserPrefix_setupBufExplorer()
  240. " Example: Make `d` force-delete (`:bd!`) and `D` force-wipe (`:bw!`),
  241. " bypassing the confirmation prompt that BufExplorer normally provides
  242. " for modified buffers and terminal buffers:
  243. nmap <nowait> <buffer> d <Plug>(BufExplorer_BufferDeleteForced)
  244. nmap <nowait> <buffer> D <Plug>(BufExplorer_BufferWipeForced)
  245. " Example: Map the `<Space>` key to close BufExplorer (like `q`).
  246. nmap <nowait> <buffer> <Space> <Plug>(BufExplorer_Close)
  247. " Example: Map the `<Esc>` key to close BufExplorer (like `q`).
  248. " Note: Mapping `<Esc>` works badly in console Vim because `<Esc>` sends
  249. " an escape byte, which is also used as the first byte in a number of
  250. " multi-byte key codes (e.g., arrow keys). Vim must wait for
  251. " 'ttimeoutlen` to expire to guess whether the escape byte came from
  252. " pressing the `<Esc>` key or from some multi-byte key code. Gvim and
  253. " Neovim do not have this issue.
  254. nmap <nowait> <buffer> <Esc> q
  255. " Example: Map `l` key to open the buffer (like `<Enter>`).
  256. nmap <nowait> <buffer> l <Plug>(BufExplorer_OpenBuffer)
  257. " Example: Map the `t` key to `<Nop>` to prevent opening in a tab.
  258. nmap <nowait> <buffer> t <Nop>
  259. endfunction
  260. <
  261. *g:bufExplorerChgWin*
  262. If set, bufexplorer will bring up the selected buffer in the window specified
  263. by g:bufExplorerChgWin.
  264. *g:bufExplorerDefaultAction*
  265. Specify the default action for |:BufExplorer| and |:ToggleBufExplorer|. For
  266. example: >
  267. let g:bufExplorerDefaultAction = 'current' " Open in current window.
  268. let g:bufExplorerDefaultAction = 'split' " Open in new horizontal split.
  269. let g:bufExplorerDefaultAction = 'vsplit' " Open in new vertical split.
  270. let g:bufExplorerDefaultAction = 'above' " Open in horizontal split above.
  271. let g:bufExplorerDefaultAction = 'below' " Open in horizontal split below.
  272. let g:bufExplorerDefaultAction = 'left' " Open in vertical split to left.
  273. let g:bufExplorerDefaultAction = 'right' " Open in vertical split to right.
  274. The default is `current` (open in current window). See |:BufExplorer| for more
  275. details.
  276. *g:bufExplorerDefaultHelp*
  277. To control whether the default help is displayed or not, use: >
  278. let g:bufExplorerDefaultHelp=0 " Do not show default help.
  279. let g:bufExplorerDefaultHelp=1 " Show default help.
  280. The default is to show the default help.
  281. *g:bufExplorerDisableDefaultKeyMapping*
  282. To control whether the default key mappings are enabled or not, use: >
  283. let g:bufExplorerDisableDefaultKeyMapping=0 " Do not disable mapping.
  284. let g:bufExplorerDisableDefaultKeyMapping=1 " Disable mapping.
  285. The default is NOT to disable the default key mapping.
  286. *g:bufExplorerDetailedHelp*
  287. To control whether detailed help is display by, use: >
  288. let g:bufExplorerDetailedHelp=0 " Do not show detailed help.
  289. let g:bufExplorerDetailedHelp=1 " Show detailed help.
  290. The default is NOT to show detailed help.
  291. *g:bufExplorerFindActive*
  292. To control whether you are taken to the active window when selecting a buffer,
  293. use: >
  294. let g:bufExplorerFindActive=0 " Do not go to active window.
  295. let g:bufExplorerFindActive=1 " Go to active window.
  296. The default is to be taken to the active window.
  297. *g:bufExplorerFuncRef*
  298. When a buffer is selected, the functions specified either singly or as a list
  299. will be called.
  300. *g:bufExplorerOnlyOneTab*
  301. To control whether a buffer should be shown on any tab where it has ever been
  302. used or only on the most-recently-used (MRU) tab (i.e., the tab where the buffer
  303. was most recently used), use: >
  304. let g:bufExplorerOnlyOneTab=0 " Show in all tabs where buffer was used.
  305. let g:bufExplorerOnlyOneTab=1 " Show buffer only in MRU tab.
  306. The default is `1` (show a buffer only on the MRU tab).
  307. This setting applies only when |g:bufExplorerShowTabBuffer| is true (i.e., when
  308. BufExplorer shows only those buffers used in the current tab instead of showing
  309. all buffers).
  310. *g:bufExplorerReverseSort*
  311. To control whether to sort the buffer in reverse order or not, use: >
  312. let g:bufExplorerReverseSort=0 " Do not sort in reverse order.
  313. let g:bufExplorerReverseSort=1 " Sort in reverse order.
  314. The default is NOT to sort in reverse order.
  315. *g:bufExplorerShowDirectories*
  316. Directories usually show up in the list from using a command like ":e .".
  317. To control whether to show directories in the buffer list or not, use: >
  318. let g:bufExplorerShowDirectories=0 " Do not show directories.
  319. let g:bufExplorerShowDirectories=1 " Show directories.
  320. The default is to show directories.
  321. *g:bufExplorerShowNoName*
  322. To control whether to show "No Name" buffers or not, use: >
  323. let g:bufExplorerShowNoName=0 " Do not "No Name" buffers.
  324. let g:bufExplorerShowNoName=1 " Show "No Name" buffers.
  325. The default is to NOT show "No Name buffers.
  326. *g:bufExplorerShowRelativePath*
  327. To control whether to show absolute paths or relative to the current
  328. directory, use: >
  329. let g:bufExplorerShowRelativePath=0 " Show absolute paths.
  330. let g:bufExplorerShowRelativePath=1 " Show relative paths.
  331. The default is to show absolute paths.
  332. *g:bufExplorerShowTabBuffer*
  333. To control whether or not to show buffers on for the specific tab or not, use: >
  334. let g:bufExplorerShowTabBuffer=0 " No.
  335. let g:bufExplorerShowTabBuffer=1 " Yes.
  336. The default is not to show.
  337. *g:bufExplorerShowUnlisted*
  338. To control whether to show unlisted buffers or not, use: >
  339. let g:bufExplorerShowUnlisted=0 " Do not show unlisted buffers.
  340. let g:bufExplorerShowUnlisted=1 " Show unlisted buffers.
  341. The default is to NOT show unlisted buffers.
  342. *g:bufExplorerSortBy*
  343. To control what field the buffers are sorted by, use: >
  344. let g:bufExplorerSortBy='extension' " Sort by file extension.
  345. let g:bufExplorerSortBy='fullpath' " Sort by full file path name.
  346. let g:bufExplorerSortBy='mru' " Sort by most recently used.
  347. let g:bufExplorerSortBy='name' " Sort by the buffer's name.
  348. let g:bufExplorerSortBy='number' " Sort by the buffer's number.
  349. The default is to sort by mru.
  350. *g:bufExplorerSplitBelow*
  351. To control where the new split window will be placed above or below the
  352. current window, use: >
  353. let g:bufExplorerSplitBelow=1 " Split new window below current.
  354. let g:bufExplorerSplitBelow=0 " Split new window above current.
  355. The default is to use whatever is set by the global &splitbelow
  356. variable.
  357. *g:bufExplorerSplitHorzSize*
  358. To control the size of the new horizontal split window. use: >
  359. let g:bufExplorerSplitHorzSize=n " New split window is n rows high.
  360. let g:bufExplorerSplitHorzSize=0 " New split window size set by Vim.
  361. The default is 0, so that the size is set by Vim.
  362. *g:bufExplorerSplitOutPathName*
  363. To control whether to split out the path and file name or not, use: >
  364. let g:bufExplorerSplitOutPathName=1 " Split the path and file name.
  365. let g:bufExplorerSplitOutPathName=0 " Don't split the path and file
  366. " name.
  367. The default is to split the path and file name.
  368. *g:bufExplorerSplitRight*
  369. To control where the new vsplit window will be placed to the left or right of
  370. current window, use: >
  371. let g:bufExplorerSplitRight=0 " Split left.
  372. let g:bufExplorerSplitRight=1 " Split right.
  373. The default is to use the global &splitright.
  374. *g:bufExplorerSplitVertSize*
  375. To control the size of the new vertical split window, use: >
  376. let g:bufExplorerSplitVertSize=n " New split window is n columns wide.
  377. let g:bufExplorerSplitVertSize=0 " New split windows size set by Vim.
  378. The default is 0, so that the size is set by Vim.
  379. *g:bufExplorerShowTerminal*
  380. To control whether terminal buffers are displayed in BufExplorer, use: >
  381. let g:bufExplorerShowTerminal=1 " Show terminal buffers.
  382. let g:bufExplorerShowTerminal=0 " Don't show terminal buffers.
  383. The default is 1, to show the terminal buffers.
  384. *g:bufExplorerVersionWarn*
  385. To control whether to warning about Vim version or not, use: >
  386. let g:bufExplorerVersionWarn=1 " Warn if version conflict.
  387. let g:bufExplorerVersionWarn=0 " Do not warn if version conflict.
  388. The default is 1.
  389. ===============================================================================
  390. CHANGE LOG *bufexplorer-changelog*
  391. 7.9.0 March 20, 2025
  392. What's Changed
  393. - Another major patch implemented by Dr. Michael Henry.
  394. * Improve terminal buffer display and toggling ability.
  395. https://github.com/jlanzarotta/bufexplorer/pull/123
  396. - Improve the display of terminal buffers to be a uniform
  397. /current/working/directory/!PID:shellName on Vim and Neovim.
  398. - Enable the ability to toggle the showing of terminal buffers
  399. (via the X command).
  400. * Buffer removal enhancements.
  401. https://github.com/jlanzarotta/bufexplorer/pull/124
  402. - Allow deletion/wiping of Neovim terminal buffers (addresses Feature
  403. Request: Add an option to do :bd! #69).
  404. - Retain buffer until it has been fully wiped.
  405. - Improve error message when deleting an unlisted buffer.
  406. * Allow customized mappings.
  407. https://github.com/jlanzarotta/bufexplorer/pull/125
  408. - Provide a mechanism for users to adjust BufExplorer command mappings.
  409. This addresses Exit on 'Esc' press #73 and Add l as an additional
  410. key to select a buffer #113.
  411. - Expose new "forced" delete and wipe actions that may be optionally
  412. mapped by the user. This removes confirmation for modified buffers
  413. and terminal buffers.
  414. - Remove incomplete visual-mode d/D mappings.
  415. 7.8.0 March 05, 2025
  416. After all these many years, bufexplorer now requires Vim version 7.4 or
  417. greater.
  418. 7.7.0 March 05, 2025
  419. What's Changed
  420. - Another Major patch implemented by Dr. Michael Henry.
  421. https://github.com/jlanzarotta/bufexplorer/pull/121
  422. * Fix issue Bufexplorer MRU sort doesn't work properly if using
  423. restore_session.vim #8 "Bufexplorer MRU sort doesn't work properly if
  424. using restore_session.vim".
  425. * Fix issue Bufexplorer interferes with the startinsert! command #87
  426. "Bufexplorer interferes with the startinsert! command".
  427. * Treat unlisted buffers as least-recently-used instead of
  428. most-recently-used in the MRU sort order.
  429. * Replace the undocumented m key (intended for debugging MRU logic)
  430. with the BufExplorer_eval() and BufExplorer_execute() general
  431. debugging features.
  432. * Improve speed of MRU tracking.
  433. 7.6.0 February 17, 2025
  434. What's Changed
  435. - Another Major patch implemented by Dr. Michael Henry.
  436. https://github.com/jlanzarotta/bufexplorer/pull/119
  437. * Sorting by fullname now depends only on the buffer's absolute path
  438. using a new sorting mechanism. Other sort modes have been converted to
  439. use this mechanism as well.
  440. * Display of directory buffers is now suppressed when
  441. g:bufExplorerShowDirectories == 0 as described in the BufExplorer
  442. documentation.
  443. * Path calculations for the elements in s:types have been normalized.
  444. fullpath now has simplify() applied to normalize paths like
  445. dir/../file. Trailing path separators for directories have been
  446. removed. The shortname <DIRECTORY> for directories has been
  447. eliminated; instead, the directory's basename is used as is done for
  448. files (except for root directories, where the trailing path separator
  449. cannot be removed; a shortname of . is used for this case). A new
  450. element, homepath, has been added to s.types; this is fullpath
  451. shortened for paths in $HOME and without the trailing path separator.
  452. Other displayable paths (path, relativepath, relativename) are
  453. similarly shortened for paths in $HOME.
  454. * Textual substitution of $HOME -> ~ in paths has been eliminated. This
  455. substitution could occur anywhere in the path, not just at the start,
  456. causing undesirable anomalies. Shortening for paths in $HOME is now
  457. done via homename and associated variables from s:types.
  458. * If the devicons plugin is installed, a buffer's buf.isdir status has
  459. been added as a parameter passed to that plugin, allowing the plugin
  460. to supply a directory icon for buffer directories.
  461. * Avoid calculating buffer details until they are needed for display.
  462. Users who don't want to see unlisted buffers shouldn't have to pay
  463. for the expensive work of calculating buffer details for unlisted
  464. buffers, only to have that information ignored. This resolves
  465. bufexplorer is slow to open with many unlisted buffers.
  466. https://github.com/jlanzarotta/bufexplorer/issues/20
  467. 7.5.0 February 16, 2025
  468. What's Changed
  469. - Major patch implemented by Dr. Michael Henry.
  470. https://github.com/jlanzarotta/bufexplorer/pull/118
  471. Significant rework and restructuring of the s:SelectBuffer() method to
  472. demonstrate behaviors described in Github issue #117.
  473. https://github.com/jlanzarotta/bufexplorer/issues/117
  474. This patch includes fixes which also resolves:
  475. - Github issue #81. Previous buffer duplicated in split after openning
  476. new buffer in tab.
  477. https://github.com/jlanzarotta/bufexplorer/issues/81
  478. - Github issue #65. bv plus t does weird things.
  479. https://github.com/jlanzarotta/bufexplorer/issues/65
  480. - Github issue #52. Find Active Window not working as expected.
  481. https://github.com/jlanzarotta/bufexplorer/issues/52
  482. 7.4.28 November 5, 2024
  483. - Thanks to GitHub user jsvia, for the addition of the new
  484. bufExplorerShowTerminal feature. Please refer to the documentation
  485. for complete information.
  486. 7.4.27 May 30, 2024
  487. - Thanks to GitHub user NotNormallyAGitUser, for the recommendation to
  488. change the display of the relative path to replace $HOME with "~".
  489. This save valuable screen real estate.
  490. 7.4.26 May 01, 2023
  491. What's Changed
  492. - wipe explorer buffer on hide by @basharh in
  493. https://github.com/jlanzarotta/bufexplorer/pull/111
  494. New Contributors
  495. - @basharh made their first contribution in
  496. https://github.com/jlanzarotta/bufexplorer/pull/111
  497. Full Changelog
  498. https://github.com/jlanzarotta/bufexplorer/compare/v.7.4.25...v7.4.26
  499. 7.4.25 September 20, 2022
  500. What's Changed
  501. - Fix MRU sort order after loading vim session by @mmrwoods in
  502. https://github.com/jlanzarotta/bufexplorer/pull/107
  503. New Contributors
  504. - @mmrwoods made their first contribution in
  505. https://github.com/jlanzarotta/bufexplorer/pull/107
  506. Full Changelog
  507. https://github.com/jlanzarotta/bufexplorer/compare/v7.4.24...v.7.4.25
  508. 7.4.24 May 03, 2022
  509. Updated copyright notice.
  510. 7.4.23 January 23, 2022
  511. Merged in changes from benoit-pierre that fixes an error thrown when vim
  512. is in read-only mode.
  513. Merged in changes from tartansandal that implements the use of an
  514. independent variable to track window splitting since s:splitMode != ''
  515. no longer implies that a split was triggered.
  516. 7.4.22 January 5,2022
  517. - Merged in change from nadean that fixed an issue that if you use either
  518. split mode, you could no longer use the regular non-split mode. This was
  519. because the split mode set s:splitMode and that variable was never reset
  520. to "" to allow you run without split mode.
  521. 7.4.21 December 8, 2018
  522. - Merged in changes from adelarsq that introduced ryanoasis/vim-devicons
  523. support. If the global g:loaded_webdevicons has been set, bufexplorer
  524. will now load the associated dev icons for each buffer.
  525. 7.4.20 January 18, 2017
  526. - Thanks to jpflouret for supplying code that can remove the warning
  527. messages if you using this plugin on an older version of Vim. The
  528. global variable is g:bufExplorerVersionWarn.
  529. 7.4.19 September 18, 2017
  530. - Merged all changes from github back into this version and tried to sync
  531. to the correct version number.
  532. 7.4.18 - Github.
  533. 7.4.17 - Github.
  534. 7.4.16 August 14, 2017
  535. - Thanks to Yubo Su for the patch that adds 'f, F, V, and v' commands.
  536. With this change, the original 'f' command was remapped to 'a'.
  537. The set of commands that can be used during exploring are:
  538. F - Open selected buffer in another window above the current.
  539. f - Open selected buffer in another window below the current.
  540. V - Open the selected buffer in another window on the left of the
  541. current.
  542. v - Open the selected buffer in another window on the right of the
  543. current.
  544. 7.4.15 May 01, 2017
  545. - Finally applied the patch submitted by justfalter. This patch is a
  546. backward-compatible fix for the "invalid tab range" bug.
  547. 7.4.14 April 10, 2017
  548. - As suggested by adelarsq way back on January 5th, 2016, a filetype has
  549. been added. There is now 'filetype=bufexplorer'.
  550. 7.4.13 March 08, 2017
  551. - Thanks to devakivamsi for pointing out that even though bufexplorer
  552. turns off line numbers by default within its own window, this did not
  553. work correctly when using WinManager. This has now been corrected.
  554. 7.4.12 September 30, 2016
  555. - Thanks again to Martin Vuille for several more fixes related to making
  556. bufexplorer more tab-friendly.
  557. 7.4.11 September, 20, 2016
  558. - Thanks to Martin Vuille for reworking the per-tab buffer listing code.
  559. Fix for g:bufExplorerShowTabBuffer is not working correctly and other
  560. "gliches" when the ShotTabBuffer option is enabled. For example old
  561. code would not correctly handle adding/deleting a tab that wasn't the
  562. highest-numbered tab.
  563. 7.4.10 August 26, 2016
  564. - Thanks to buddylindsey for fixing a misspelling in the docs.
  565. 7.4.9 April 01, 2016
  566. - Thanks to ivegotasthma for supplying a patch to fix a major issue with
  567. plugin performance when lots of buffers are open.
  568. - Thanks to ershov for the patch to fix grouping of files in ambiguous
  569. sort modes.
  570. - Thanks to PhilRunninger for changing documentation to use <Leader>, in
  571. place of '\'.
  572. 7.4.8 January 27, 2015
  573. - Thanks to Marius Gedminas for fixing up the documentation and correcting
  574. various typos.
  575. 7.4.7 January 20, 2015
  576. - Thanks goes out to Phil Runninger for added the ability to toggle the
  577. bufexplorer list on and off using the :ToggleBufExplorer command, the
  578. map <Leader>bt, and the function ToggleBufExplorer().
  579. 7.4.6 November 03, 2014
  580. - Not sure how, but the file format was converted to Dos instead of Unix.
  581. I converted the file back to Unix.
  582. 7.4.5 October 24, 2014
  583. - Dr Michael Henry suggested to change all noremap commands to nnoremap.
  584. Using noremap is unnecessarily broad and can cause problems, especially
  585. for select mode.
  586. 7.4.4 August 19, 2014
  587. - Revert change where bufexplorer windows was closed even if the target
  588. buffer has not been loaded yet.
  589. 7.4.3 August 13, 2014
  590. - Ivan Ukhov fixed issue with deleting the last window. This update also
  591. fixes as well as another. If you have say, NERDtree open on the left
  592. side and bufexplorer on the right, that bufexplorer would close NERDtree
  593. erroneously thinking that it is closing itself.
  594. - Radoslaw Burny fixed a few bugs that surfaced when bufexplorer is used
  595. within winmanager.
  596. 7.4.2 October 22, 2013
  597. - Added global option g:bufExplorerDisableDefaultKeyMapping. This option
  598. controls weather the default key mappings (\be, \bs, and \bv) are
  599. enabled or not. See documentation for more information.
  600. 7.4.1 October 11, 2013
  601. - First update related to Vim 7.4.
  602. - Changed license text.
  603. - Fixed issue with 'hidden'. If 'hidden' is set, make sure that
  604. g:bufExplorerFindActive is set to 0. Otherwise, when using \bs or \bv,
  605. and selecting a buffer, the original buffer will be switched to instead
  606. of being opened in the newly created windows.
  607. - Added new 'b' mapping when the bufExplorer window is opened. When 'b'
  608. is pressed, the user is prompted for the buffer number to switch to, and
  609. is is then switched to when <CR> is pressed. This allows for somewhat
  610. faster buffer switching instead of using the j and k keys or the mouse
  611. to select the buffer to switch to.
  612. - Removed 'set nolist' from the Initialize() function as well as the
  613. restore of the 'list' setting in the CleanUp() function. These were
  614. causing issues when multiple new files were opened from the command
  615. line. Furthermore, there was really no reason, that I can remember, to
  616. why the 'list' setting was saved, modified, and restored anyways.
  617. - Fixed issue with WinManager integration code not working correctly
  618. anymore.
  619. - Brought back the xnoremap setup for the 'd' and 'D' keys. These were
  620. removed for some reason after version 7.2.8.
  621. - Thanks to all the contributors and testers.
  622. 7.3.6 May 06, 2013
  623. - Removed the 'drop' window command that was causing issue with the
  624. argument-list being modified after the BufExplorer windows was
  625. displayed.
  626. 7.3.5 February 08, 2013
  627. - Michael Henry added the ability to view "No Name" buffers. This
  628. functionality was lost since version 7.3.0. He also did some removal of
  629. "dead" code and cleaned up the code to handle filenames with embedded
  630. '"'.
  631. 7.3.4 January 28, 2013
  632. - Thanks go out to John Szakmeister for finding and fixing a bug in the
  633. RebuildBufferList method. The keepjumps line that clears the list could
  634. potentially reference a backwards range.
  635. 7.3.3 January 14, 2013
  636. - Major cleanup and reorganization of the change log.
  637. - We welcome the return of g:bufExplorerSplitHorzSize and
  638. g:bufExplorerSplitVertSize. When setting these values, anything less
  639. than or equal to 0 causes the split windows size to be determined by
  640. Vim. If for example you want your new horizontal split window 10 rows
  641. high, set g:bufExplorerSplitHorzSize = 10 in your .vimrc. Similar would
  642. be done if wanting a vertical split except you would use the
  643. g:bufExplorerSplitVertSize variable instead.
  644. 7.3.2 December 24, 2012
  645. - Thanks go out to Michael Henry for pointing out that I completely
  646. missed yet another function, ReverseSortSelect(), during the
  647. refactoring. This function has now returned.
  648. 7.3.1 December 06, 2012
  649. - Thanks go out to Brett Rasmussen for pointing out that the feature
  650. added way back in version 7.2.3 by Yuriy Ershov to automatically
  651. reposition the cursor to the line containing the active buffer, was
  652. no longer in the plugin. That bit of code has been re-added and
  653. all is well.
  654. 7.3.0 October 09, 2012
  655. - It has been quite a while since I published a new version and this
  656. is the first version since Vim 7.3 was released. I have put some
  657. time into reworking and cleaning up the code as well as various bug
  658. fixes. Overall, I am hopeful that I not forgotten or lost a feature.
  659. - Thanks to Tim Johnson for testing out this new version.
  660. - I have hopefully allowed for better mapping of the main public
  661. methods as is explained in the |bufexplorer-customization| section
  662. of the documentation.
  663. - Add new 'B', 'o', and 'S' key mappings.
  664. 7.2.8 November 08, 2010
  665. - Thanks to Charles Campbell for integrating bufexplorer with GDBMGR.
  666. http://mysite.verizon.net/astronaut/vim/index.html#GDBMGR
  667. 7.2.7 April 26, 2010
  668. - My 1st attempt to fix the "cache" issue where buffers information
  669. has changed but the cache/display does not reflect those changes.
  670. More work still needs to be done.
  671. 7.2.6 February 12, 2010
  672. - Thanks to Michael Henry for pointing out that I totally forgot to
  673. update the inline help to reflect the previous change to the 'd'
  674. and 'D' keys. Opps!
  675. 7.2.5 February 10, 2010
  676. - Philip Morant suggested switching the command (bwipe) associated
  677. with the 'd' key with the command (bdelete) associated with the 'D'
  678. key. This made sense since the 'd' key is more likely to be used
  679. compared to the 'D' key.
  680. 7.2.4 January 14, 2010
  681. - I did not implement the patch provided by Godefroid Chapelle
  682. correctly. I missed one line which happened to be the most important
  683. one :)
  684. 7.2.3 December 15, 2009
  685. - Hopefully I have not left anyone or anything out :)
  686. - Thanks to David Fishburn for helping me out with a much needed
  687. code overhaul as well as some awesome performance enhancements.
  688. - David also reworked the handling of tabs.
  689. - Thanks to Vladimir Dobriakov for making the suggestions on
  690. enhancing the documentation to include a better explaination of
  691. what is contained in the main bufexplorer window.
  692. - Thanks to Yuriy Ershov for added code that when the bufexplorer
  693. window is opened, the cursor is now positioned at the line with the
  694. active buffer (useful in non-MRU sort modes).
  695. - Yuriy also added the abiltiy to cycle through the sort fields in
  696. reverse order.
  697. - Thanks to Michael Henry for supplying a patch that allows
  698. bufexplorer to be opened even when there is one buffer or less.
  699. - Thanks to Godefroid Chapelle for supplying a patch that fixed
  700. MRU sort order after loading a session.
  701. 7.2.2 November 19, 2008
  702. - Thanks to David L. Dight for spotting and fixing an issue when using
  703. ctrl^. bufexplorer would incorrectly handle the previous buffer so
  704. that when ctrl^ was pressed the incorrect file was opened.
  705. 7.2.1 September 03, 2008
  706. - Thanks to Dimitar for spotting and fixing a feature that was
  707. inadvertently left out of the previous version. The feature was when
  708. bufexplorer was used together with WinManager, you could use the tab
  709. key to open a buffer in a split window.
  710. 7.2.0 August 15, 2008
  711. - For all those missing the \bs and \bv commands, these have now
  712. returned. Thanks to Phil O'Connell for asking for the return of
  713. these missing features and helping test out this version.
  714. - Fixed problem with the bufExplorerFindActive code not working
  715. correctly.
  716. - Fixed an incompatibility between bufexplorer and netrw that caused
  717. buffers to be incorrectly removed from the MRU list.
  718. 7.1.7 December 21, 2007
  719. - TaCahiroy fixed several issues related to opening a buffer in a tab.
  720. 7.1.6 December 01, 2007
  721. - Removed ff=unix from modeline in bufexplorer.txt. Found by Bill
  722. McCarthy.
  723. 7.1.5 November 30, 2007
  724. - Could not open unnamed buffers. Fixed by TaCahiroy.
  725. 7.1.4 November 16, 2007
  726. - Sometimes when a file's path has 'white space' in it, extra buffers
  727. would be created containing each piece of the path. i.e:
  728. opening c:\document and settings\test.txt would create a buffer
  729. named "and" and a buffer named "Documents". This was reported and
  730. fixed by TaCa Yoss.
  731. 7.1.3 November 15, 2007
  732. - Added code to allow only one instance of the plugin to run at a time.
  733. Thanks Dennis Hostetler.
  734. 7.1.2 November 07, 2007
  735. - Dave Larson added handling of tabs.
  736. - Dave Larson removed \bs and \bv commands because these are easier for
  737. the used to create horizontal and vertical windows.
  738. - Fixed a jumplist issue spotted by JiangJun. I overlooked the
  739. 'jumplist' and with a couple calls to 'keepjumps', everything is fine
  740. again.
  741. - Went back to using just a plugin file, instead of both an autoload
  742. and plugin file. The splitting of the file caused issues with other
  743. plugins. So if you have a prior version of bufexplorer that has an
  744. autoload file, please remove autoload\bufexplorer and
  745. plugin\bufexplorer before installing this new version.
  746. - Fixed E493 error spotted by Thomas Arendsen Hein.
  747. - Minor cosmetic changes.
  748. - Minor help file changes.
  749. 7.1.1 August 02, 2007
  750. - A problem spotted by Thomas Arendsen Hein. When running Vim
  751. (7.1.94), error E493 was being thrown.
  752. * Added 'D' for 'delete' buffer as the 'd' command was a 'wipe' buffer.
  753. 7.1.0 August 01, 2007
  754. - Another 'major' update, some by Dave Larson, some by me.
  755. - Making use of 'autoload' now to make the plugin load quicker.
  756. - Removed '\bs' and '\bv'. These are now controlled by the user. The
  757. user can issue a ':sp' or ':vs' to create a horizontal or vertical
  758. split window and then issue a '\be'
  759. - Added handling of tabs.
  760. 7.0.17 July 24, 2007
  761. - Fixed issue with 'drop' command.
  762. - Various enhancements and improvements.
  763. 7.0.16 May 15, 2007
  764. - Fixed issue reported by Liu Jiaping on non Windows systems, which was
  765. ...
  766. Open file1, open file2, modify file1, open bufexplorer, you get the
  767. following error:
  768. --------8<--------
  769. Error detected while processing function
  770. <SNR>14_StartBufExplorer..<SNR>14_SplitOpen:
  771. line 4:
  772. E37: No write since last change (add ! to override)
  773. But the worse thing is, when I want to save the current buffer and
  774. type ':w', I get another error message:
  775. E382: Cannot write, 'buftype' option is set
  776. --------8<--------
  777. 7.0.15 April 27, 2007
  778. - Thanks to Mark Smithfield for suggesting bufexplorer needed to handle
  779. the ':args' command.
  780. 7.0.14 March 23, 2007
  781. - Thanks to Randall Hansen for removing the requirement of terminal
  782. versions to be recompiled with 'gui' support so the 'drop' command
  783. would work. The 'drop' command is really not needed in terminal
  784. versions.
  785. 7.0.13 February 23, 2007
  786. - Fixed integration with WinManager.
  787. - Thanks to Dave Eggum for another update.
  788. * Fix: The detailed help didn't display the mapping for toggling
  789. the split type, even though the split type is displayed.
  790. * Fixed incorrect description in the detailed help for toggling
  791. relative or full paths.
  792. * Deprecated s:ExtractBufferNbr(). Vim's str2nr() does the same
  793. thing.
  794. * Created a s:Set() function that sets a variable only if it hasn't
  795. already been defined. It's useful for initializing all those
  796. default settings.
  797. * Removed checks for repetitive command definitions. They were
  798. unnecessary.
  799. * Made the help highlighting a little more fancy.
  800. * Minor reverse compatibility issue: Changed ambiguous setting
  801. names to be more descriptive of what they do (also makes the code
  802. easier to follow):
  803. Changed bufExplorerSortDirection to bufExplorerReverseSort
  804. Changed bufExplorerSplitType to bufExplorerSplitVertical
  805. Changed bufExplorerOpenMode to bufExplorerUseCurrentWindow
  806. * When the BufExplorer window closes, all the file-local marks are
  807. now deleted. This may have the benefit of cleaning up some of the
  808. jumplist.
  809. * Changed the name of the parameter for StartBufExplorer from
  810. "split" to "open". The parameter is a string which specifies how
  811. the buffer will be open, not if it is split or not.
  812. * Deprecated DoAnyMoreBuffersExist() - it is a one line function
  813. only used in one spot.
  814. * Created four functions (SplitOpen(), RebuildBufferList(),
  815. UpdateHelpStatus() and ReSortListing()) all with one purpose - to
  816. reduce repeated code.
  817. * Changed the name of AddHeader() to CreateHelp() to be more
  818. descriptive of what it does. It now returns an array instead of
  819. updating the window directly. This has the benefit of making the
  820. code more efficient since the text the function returns is used a
  821. little differently in the two places the function is called.
  822. * Other minor simplifications.
  823. 7.0.12 November 30, 2006
  824. - MAJOR Update. This version will ONLY run with Vim version 7.0 or
  825. greater.
  826. - Dave Eggum has made some 'significant' updates to this latest
  827. version:
  828. * Added BufExplorerGetAltBuf() global function to be used in the
  829. user's rulerformat.
  830. * Added g:bufExplorerSplitRight option.
  831. * Added g:bufExplorerShowRelativePath option with mapping.
  832. * Added current line highlighting.
  833. * The split type can now be changed whether bufexplorer is opened
  834. in split mode or not.
  835. * Various major and minor bug fixes and speed improvements.
  836. * Sort by extension.
  837. - Other improvements/changes:
  838. * Changed the help key from '?' to <F1> to be more 'standard'.
  839. * Fixed splitting of vertical bufexplorer window.
  840. - Hopefully I have not forgot something :)
  841. 7.0.11 March 10, 2006
  842. - Fixed a couple of highlighting bugs, reported by David Eggum.
  843. - Dave Eggum also changed passive voice to active on a couple of
  844. warning messages.
  845. 7.0.10 March 02, 2006
  846. - Fixed bug report by Xiangjiang Ma. If the 'ssl' option is set,
  847. the slash character used when displaying the path was incorrect.
  848. 7.0.9 February 28, 2006
  849. - Martin Grenfell found and eliminated an annoying bug in the
  850. bufexplorer/winmanager integration. The bug was were an
  851. annoying message would be displayed when a window was split or
  852. a new file was opened in a new window. Thanks Martin!
  853. 7.0.8 January 18, 2006
  854. - Thanks to Mike Li for catching a bug in the WinManager integration.
  855. The bug was related to the incorrect displaying of the buffer
  856. explorer's window title.
  857. 7.0.7 December 19, 2005
  858. - Thanks to Jeremy Cowgar for adding a new enhancement. This
  859. enhancement allows the user to press 'S', that is capital S, which
  860. will open the buffer under the cursor in a newly created split
  861. window.
  862. 7.0.6 November 18, 2005
  863. - Thanks to Larry Zhang for finding a bug in the "split" buffer code.
  864. If you force set g:bufExplorerSplitType='v' in your vimrc, and if you
  865. tried to do a \bs to split the bufexplorer window, it would always
  866. split horizontal, not vertical.
  867. - Larry Zhang also found that I had a typeo in that the variable
  868. g:bufExplorerSplitVertSize was all lower case in the documentation
  869. which was incorrect.
  870. 7.0.5 October 18, 2005
  871. - Thanks to Mun Johl for pointing out a bug that if a buffer was
  872. modified, the '+' was not showing up correctly.
  873. 7.0.4 October 03, 2005
  874. - Fixed a problem discovered first by Xiangjiang Ma. Well since I've
  875. been using vim 7.0 and not 6.3, I started using a function (getftype)
  876. that is not in 6.3. So for backward compatibility, I conditionaly use
  877. this function now. Thus, the g:bufExplorerShowDirectories feature is
  878. only available when using vim 7.0 and above.
  879. 7.0.3 September 30, 2005
  880. - Thanks to Erwin Waterlander for finding a problem when the last
  881. buffer was deleted. This issue got me to rewrite the buffer display
  882. logic (which I've wanted to do for sometime now).
  883. - Also great thanks to Dave Eggum for coming up with idea for
  884. g:bufExplorerShowDirectories. Read the above information about this
  885. feature.
  886. 7.0.2 March 25, 2005
  887. - Thanks to Thomas Arendsen Hein for finding a problem when a user
  888. has the default help turned off and then brought up the explorer. An
  889. E493 would be displayed.
  890. 7.0.1 March 10, 2005
  891. - Thanks to Erwin Waterlander for finding a couple problems.
  892. The first problem allowed a modified buffer to be deleted. Opps! The
  893. second problem occurred when several files were opened, BufExplorer
  894. was started, the current buffer was deleted using the 'd' option, and
  895. then BufExplorer was exited. The deleted buffer was still visible
  896. while it is not in the buffers list. Opps again!
  897. 7.0.0 March 10, 205
  898. - Thanks to Shankar R. for suggesting to add the ability to set
  899. the fixed width (g:bufExplorerSplitVertSize) of a new window
  900. when opening bufexplorer vertically and fixed height
  901. (g:bufExplorerSplitHorzSize) of a new window when opening
  902. bufexplorer horizontally. By default, the windows are normally
  903. split to use half the existing width or height.
  904. 6.3.0 July 23, 2004
  905. - Added keepjumps so that the jumps list would not get cluttered with
  906. bufexplorer related stuff.
  907. 6.2.3 April 15, 2004
  908. - Thanks to Jay Logan for finding a bug in the vertical split position
  909. of the code. When selecting that the window was to be split
  910. vertically by doing a '\bv', from then on, all splits, i.e. '\bs',
  911. were split vertically, even though g:bufExplorerSplitType was not set
  912. to 'v'.
  913. 6.2.2 January 09, 2004
  914. - Thanks to Patrik Modesto for adding a small improvement. For some
  915. reason his bufexplorer window was always showing up folded. He added
  916. 'setlocal nofoldenable' and it was fixed.
  917. 6.2.1 October 09, 2003
  918. - Thanks goes out to Takashi Matsuo for added the 'fullPath' sorting
  919. logic and option.
  920. 6.2.0 June 13, 2003
  921. - Thanks goes out to Simon Johann-Ganter for spotting and fixing a
  922. problem in that the last search pattern is overridden by the search
  923. pattern for blank lines.
  924. 6.1.6 May 05, 2003
  925. - Thanks to Artem Chuprina for finding a pesky bug that has been around
  926. for sometime now. The <esc> key mapping was causing the buffer
  927. explored to close prematurely when vim was run in an xterm. The <esc>
  928. key mapping is now removed.
  929. 6.1.5 April 28, 2003
  930. - Thanks to Khorev Sergey. Added option to show default help or not.
  931. 6.1.4 March 18, 2003
  932. - Thanks goes out to Valery Kondakoff for suggesting the addition of
  933. setlocal nonumber and foldcolumn=0. This allows for line numbering
  934. and folding to be turned off temporarily while in the explorer.
  935. 6.1.3 March 11, 2003
  936. - Added folding.
  937. - Did some code cleanup.
  938. - Added the ability to force the newly split window to be temporarily
  939. vertical, which was suggested by Thomas Glanzmann.
  940. 6.1.2 November 05, 2002
  941. - Now pressing the <esc> key will quit, just like 'q'.
  942. - Added folds to hide winmanager configuration.
  943. - If anyone had the 'C' option in their cpoptions they would receive
  944. a E10 error on startup of BufExplorer. cpo is now saved, updated and
  945. restored. Thanks to Charles E Campbell, Jr.
  946. - Attempted to make sure there can only be one BufExplorer window open
  947. at a time.
  948. 6.1.1 March 28, 2002
  949. - Thanks to Brian D. Goodwin for adding toupper to FileNameCmp. This
  950. way buffers sorted by name will be in the correct order regardless of
  951. case.
  952. 6.0.16 March 14, 2002
  953. - Thanks to Andre Pang for the original patch/idea to get bufexplorer
  954. to work in insertmode/modeless mode (evim).
  955. - Added Initialize and Cleanup autocommands to handle commands that
  956. need to be performed when starting or leaving bufexplorer.
  957. 6.0.15 February 20, 2002
  958. - Srinath Avadhanulax added a patch for winmanager.vim.
  959. 6.0.14 February 19, 2002
  960. - Fix a few more bug that I thought I already had fixed.
  961. - Thanks to Eric Bloodworth for adding 'Open Mode/Edit in Place'.
  962. - Added vertical splitting.
  963. 6.0.13 February 05, 2002
  964. - Thanks to Charles E Campbell, Jr. for pointing out some embarrassing
  965. typos that I had in the documentation. I guess I need to run the
  966. spell checker more :o)
  967. 6.0.12 February 04, 2002
  968. - Thanks to Madoka Machitani, for the tip on adding the augroup command
  969. around the MRUList autocommands.
  970. 6.0.11 January 26, 2002
  971. - Fixed bug report by Xiangjiang Ma. '"=' was being added to the search
  972. history which messed up hlsearch.
  973. 6.0.10 January 14, 2002
  974. - Added the necessary hooks so that the Srinath Avadhanula's
  975. winmanager.vim script could more easily integrate with this script.
  976. - Tried to improve performance.
  977. 6.0.9 December 17, 2001
  978. - Added MRU (Most Recently Used) sort ordering.
  979. 6.0.8 December 03, 2001
  980. - Was not resetting the showcmd command correctly.
  981. - Added nifty help file.
  982. 6.0.7 November 19, 2001
  983. - Thanks to Brett Carlane for some great enhancements. Some are added,
  984. some are not, yet. Added highlighting of current and alternate
  985. filenames. Added splitting of path/filename toggle. Reworked
  986. ShowBuffers().
  987. - Changed my email address.
  988. 6.0.6 September 05, 2001
  989. - Copyright notice added. Needed this so that it could be distributed
  990. with Debian Linux.
  991. - Fixed problem with the SortListing() function failing when there was
  992. only one buffer to display.
  993. 6.0.5 August 10, 2001
  994. - Fixed problems reported by David Pascoe, in that you where unable to
  995. hit 'd' on a buffer that belonged to a files that no longer existed
  996. and that the 'yank' buffer was being overridden by the help text when
  997. the bufexplorer was opened.
  998. 6.0.4 July, 31, 2001
  999. - Thanks to Charles Campbell, Jr. for making this plugin more plugin
  1000. *compliant*, adding default keymappings of <Leader>be and <Leader>bs
  1001. as well as fixing the 'w:sortDirLabel not being defined' bug.
  1002. 6.0.3 July 30, 2001
  1003. - Added sorting capabilities. Sort taken from explorer.vim.
  1004. 6.0.2 July 25, 2001
  1005. - Can't remember.
  1006. 6.0.1 Sometime before July 25, 2001
  1007. - Initial release.
  1008. ===============================================================================
  1009. TODO *bufexplorer-todo*
  1010. - Add ability to open a buffer in a horizontal or vertical split after the
  1011. initial bufexplorer window is opened.
  1012. ===============================================================================
  1013. CREDITS *bufexplorer-credits*
  1014. Author: Jeff Lanzarotta <my name at gmail dot com>
  1015. Credit must go out to Bram Moolenaar (RIP) and all the Vim developers for
  1016. making the world's best editor (IMHO). I also want to thank everyone who
  1017. helped and gave me suggestions. I wouldn't want to leave anyone out so I
  1018. won't list names.
  1019. ===============================================================================
  1020. COPYRIGHT *bufexplorer-copyright*
  1021. Copyright (c) 2001-2025, Jeff Lanzarotta
  1022. All rights reserved.
  1023. Redistribution and use in source and binary forms, with or without
  1024. modification, are permitted provided that the following conditions are met:
  1025. * Redistributions of source code must retain the above copyright notice, this
  1026. list of conditions and the following disclaimer.
  1027. * Redistributions in binary form must reproduce the above copyright notice,
  1028. this list of conditions and the following disclaimer in the documentation
  1029. and/or other materials provided with the distribution.
  1030. * Neither the name of the {organization} nor the names of its contributors may
  1031. be used to endorse or promote products derived from this software without
  1032. specific prior written permission.
  1033. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  1034. AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1035. IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  1036. DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
  1037. FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1038. DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  1039. SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  1040. CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  1041. OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  1042. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  1043. ===============================================================================
  1044. vim:tw=78:noet:wrap:ts=4:ft=help:norl: