Before

1" Mini Buffer Explorer <minibufexpl.vim>
2"
3" HINT: Type zR if you don't know how to use folds
4"
5" Script Info and Documentation {{{
6"=============================================================================
7" Copyright: Copyright (C) 2002 & 2003 Bindu Wavell
8" Copyright (C) 2010 Oliver Uvman
9" Copyright (C) 2010 Danielle Church
10" Copyright (C) 2010 Stephan Sokolow
11" Copyright (C) 2010 & 2011 Federico Holgado
12" Permission is hereby granted to use and distribute this code,
13" with or without modifications, provided that this copyright
14" notice is copied with it. Like anything else that's free,
15" minibufexpl.vim is provided *as is* and comes with no
16" warranty of any kind, either expressed or implied. In no
17" event will the copyright holder be liable for any damamges
18" resulting from the use of this software.
19"
20" Name Of File: minibufexpl.vim
21" Description: Mini Buffer Explorer Vim Plugin
22" Maintainer: Federico Holgado <fholgado@gmail.com>
23" Last Updated: Federico Holgado <fholgado@gmail.com>
24" URL: http://vim.sourceforge.net/scripts/script.php?script_id=159
25" GitHub URL: https://github.com/fholgado/minibufexpl.vim
26" Last Change: Friday, October 21, 2011
27" Version: 6.4.3
28" Derived from Jeff Lanzarotta's bufexplorer.vim version 6.0.7
29" Jeff can be reached at (jefflanzarotta@yahoo.com) and the
30" original plugin can be found at:
31" http://lanzarotta.tripod.com/vim/plugin/6/bufexplorer.vim.zip
32" [NO LONGER AVAILABLE]
33"
34" Usage: Normally, this file should reside in the plugins
35" directory and be automatically sourced. If not, you must
36" manually source this file using ':source minibufexplorer.vim'.
37"
38" You may use the default keymappings of
39"
40" <Leader>mbe - Opens MiniBufExplorer
41"
42" or you may want to add something like the following
43" key mapping to your _vimrc/.vimrc file.
44"
45" map <Leader>b :MiniBufExplorer<cr>
46"
47" However, in most cases you won't need any key-bindings at all.
48"
49" <Leader> is usually backslash so type "\mbe" (quickly) to open
50" the -MiniBufExplorer- window.
51"
52" Other keymappings include: <Leader>mbc to close the Explorer
53" window, <Leader>mbu to force the Explorer to Update and
54" <Leader>mbt to toggle the Explorer window; it will open if
55" closed or close if open. Each of these key bindings can be
56" overridden (see the notes on <Leader>mbe above.)
57"
58" You can map these additional commands as follows:
59"
60" map <Leader>c :CMiniBufExplorer<cr>
61" map <Leader>u :UMiniBufExplorer<cr>
62" map <Leader>t :TMiniBufExplorer<cr>
63"
64" NOTE: you can change the key binding used in these mappings
65" so that they fit with your configuration of vim.
66"
67" You can also call each of these features by typing the
68" following in command mode:
69"
70" :MiniBufExplorer " Open and/or goto Explorer
71" :CMiniBufExplorer " Close the Explorer if it's open
72" :UMiniBufExplorer " Update Explorer without navigating
73" :TMiniBufExplorer " Toggle the Explorer window open and
74" closed.
75"
76" To control where the new split window goes relative to the
77" current window, use the setting:
78"
79" let g:miniBufExplSplitBelow=0 " Put new window above
80" " current or on the
81" " left for vertical split
82" let g:miniBufExplSplitBelow=1 " Put new window below
83" " current or on the
84" " right for vertical split
85"
86" The default for this is read from the &splitbelow VIM option.
87"
88" By default we are now (as of 6.0.2) forcing the -MiniBufExplorer-
89" window to open up at the edge of the screen. You can turn this
90" off by setting the following variable in your .vimrc:
91"
92" let g:miniBufExplSplitToEdge = 0
93"
94" If you would like a vertical explorer you can assign the column
95" width (in characters) you want for your explorer window with the
96" following .vimrc variable (this was introduced in 6.3.0):
97"
98" let g:miniBufExplVSplit = 20 " column width in chars
99"
100" IN HORIZONTAL MODE:
101" It is now (as of 6.1.1) possible to set a maximum height for
102" the -MiniBufExplorer- window. You can set the max height by
103" letting the following variable in your .vimrc:
104"
105" let g:miniBufExplMaxSize = <max lines: defualt 0>
106"
107" setting this to 0 will mean the window gets as big as
108" needed to fit all your buffers.
109"
110" NOTE: This was g:miniBufExplMaxHeight before 6.3.0; the old
111" setting is backwards compatible if you don't use MaxSize.
112"
113" As of 6.2.2 it is possible to set a minimum height for the
114" -MiniBufExplorer- window. You can set the min height by
115" letting the following variable in your .vimrc:
116"
117" let g:miniBufExplMinSize = <min height: default 1>
118"
119" NOTE: This was g:miniBufExplMinHeight before 6.3.0; the old
120" setting is backwards compatible if you don't use MinSize.
121"
122" IN VERTICAL MODE: (as of 6.3.0)
123" By default the vertical explorer has a fixed width. If you put:
124"
125" let g:miniBufExplMaxSize = <max width: default 0>
126"
127" into your .vimrc then MBE will attempt to set the width of the
128" MBE window to be as wide as your widest tab. The width will not
129" exceed MaxSize even if you have wider tabs.
130"
131" Accepting the default value of 0 for this will give you a fixed
132" width MBE window.
133"
134" You can specify a MinSize for the vertical explorer window by
135" putting the following in your .vimrc:
136"
137" let g:miniBufExplMinSize = <min width: default 1>
138"
139" This will have no effect unless you also specivy MaxSize.
140"
141" By default we are now (as of 6.0.1) turning on the MoreThanOne
142" option. This stops the -MiniBufExplorer- from opening
143" automatically until more than one eligible buffer is available.
144" You can turn this feature off by setting the following variable
145" in your .vimrc:
146"
147" let g:miniBufExplorerMoreThanOne=1
148"
149" (The following enhancement is as of 6.2.2)
150" Setting this to 0 will cause the MBE window to be loaded even
151" if no buffers are available. Setting it to 1 causes the MBE
152" window to be loaded as soon as an eligible buffer is read. You
153" can also set it to larger numbers. So if you set it to 4 for
154" example the MBE window wouldn't auto-open until 4 eligibles
155" buffers had been loaded. This is nice for folks that don't
156" want an MBE window unless they are editing more than two or
157" three buffers.
158"
159" To enable the optional mapping of Control + Vim Direction Keys
160" [hjkl] to window movement commands, you can put the following into
161" your .vimrc:
162"
163" let g:miniBufExplMapWindowNavVim = 1
164"
165" To enable the optional mapping of Control + Arrow Keys to window
166" movement commands, you can put the following into your .vimrc:
167"
168" let g:miniBufExplMapWindowNavArrows = 1
169"
170" To enable the optional mapping of <C-TAB> and <C-S-TAB> to a
171" function that will bring up the next or previous buffer in the
172" current window, you can put the following into your .vimrc:
173"
174" let g:miniBufExplMapCTabSwitchBufs = 1
175"
176" To enable the optional mapping of <C-TAB> and <C-S-TAB> to mappings
177" that will move to the next and previous (respectively) window, you
178" can put the following into your .vimrc:
179"
180" let g:miniBufExplMapCTabSwitchWindows = 1
181"
182"
183" NOTE: If you set the ...TabSwitchBufs AND ...TabSwitchWindows,
184" ...TabSwitchBufs will be enabled and ...TabSwitchWindows
185" will not.
186"
187" As of MBE 6.3.0, you can put the following into your .vimrc:
188"
189" let g:miniBufExplUseSingleClick = 1
190"
191" If you would like to single click on tabs rather than double
192" clicking on them to goto the selected buffer.
193"
194" NOTE: If you use the single click option in taglist.vim you may
195" need to get an updated version that includes a patch I
196" provided to allow both explorers to provide single click
197" buffer selection.
198"
199" It is possible to customize the the highlighting for the tabs in
200" the MBE by configuring the following highlighting groups:
201"
202" MBENormal - for buffers that have NOT CHANGED and
203" are NOT VISIBLE.
204" MBEChanged - for buffers that HAVE CHANGED and are
205" NOT VISIBLE
206" MBEVisibleNormal - buffers that have NOT CHANGED and are
207" VISIBLE
208" MBEVisibleNormalActive - buffers that have NOT CHANGED and are
209" VISIBLE and is the active buffer
210" MBEVisibleChanged - for buffers that have CHANGED and are
211" VISIBLE
212" MBEVisibleChangedActive - buffers that have CHANGED and are VISIBLE
213" and is the active buffer
214"
215" You can either link to an existing highlighting group by
216" adding a command like:
217"
218" hi link MBEVisibleChanged Error
219"
220" to your .vimrc or you can specify exact foreground and background
221" colors using the following syntax:
222"
223" hi MBEChanged guibg=darkblue ctermbg=darkblue termbg=white
224"
225" NOTE: If you set a colorscheme in your .vimrc you should do it
226" BEFORE updating the MBE highlighting groups.
227"
228" If you use other explorers like TagList you can (As of 6.2.8) put:
229"
230" let g:miniBufExplModSelTarget = 1
231"
232" If you would like MBE to close when you select a buffer, put:
233"
234" let g:miniBufExplCloseOnSelect = 1
235"
236" into your .vimrc in order to force MBE to try to place selected
237" buffers into a window that does not have a nonmodifiable buffer.
238" The upshot of this should be that if you go into MBE and select
239" a buffer, the buffer should not show up in a window that is
240" hosting an explorer.
241"
242" If you use Vim with many open buffers simultaneously (>15) and
243" you notice that switching buffers takes longer than usual, it
244" is because of MBE's duplicate buffer name checking feature. To
245" turn it off, you can add the following to your .vimrc:
246"
247" let g:miniBufExplCheckDupeBufs = 0
248"
249" We are working on a fix so that we can all enjoy the feature
250" if you want!
251"
252" If you would like to omit the buffer number from MBE's buffer
253" display, put the following in your .vimrc:
254"
255" let g:miniBufExplShowBufNumbers = 0
256"
257" There is a VIM bug that can cause buffers to show up without
258" their highlighting. The following setting will cause MBE to
259" try and turn highlighting back on (introduced in 6.3.1):
260"
261" let g:miniBufExplForceSyntaxEnable = 1
262"
263" MBE has had a basic debugging capability for quite some time.
264" However, it has not been very friendly in the past. As of 6.0.8,
265" you can put one of each of the following into your .vimrc:
266"
267" let g:miniBufExplorerDebugLevel = 0 " MBE serious errors output
268" let g:miniBufExplorerDebugLevel = 4 " MBE all errors output
269" let g:miniBufExplorerDebugLevel = 10 " MBE reports everything
270"
271" You can also set a DebugMode to cause output to be target as
272" follows (default is mode 3):
273"
274" let g:miniBufExplorerDebugMode = 0 " Errors will show up in
275" " a vim window
276" let g:miniBufExplorerDebugMode = 1 " Uses VIM's echo function
277" " to display on the screen
278" let g:miniBufExplorerDebugMode = 2 " Writes to a file
279" " MiniBufExplorer.DBG
280" let g:miniBufExplorerDebugMode = 3 " Store output in global:
281" " g:miniBufExplorerDebugOutput
282"
283" Or if you are able to start VIM, you might just perform these
284" at a command prompt right before you do the operation that is
285" failing.
286"
287" History: Moved to end of file
288"
289" Known Issues: When debugging is turned on and set to output to a window, there
290" are some cases where the window is opened more than once, there
291" are other cases where an old debug window can be lost.
292"
293" Several MBE commands can break the window history so <C-W>[pnw]
294" might not take you to the expected window.
295"
296" Todo: - Add context to tab titles so that multiple tabs show the
297" root folder names. Useful for working with MVC frameworks
298" where multiple files have the same name but are in different
299" locations.
300" - Add the ability to specify a regexp for eligible buffers
301" allowing the ability to filter out certain buffers that
302" you don't want to control from MBE.
303"
304"=============================================================================
305" }}}
306
307" Startup Check
308"
309" Has this plugin already been loaded? {{{
310"
311if exists('loaded_minibufexplorer')
312 finish
…lines 313–2074 unchanged (1762 lines)
2075 if winbufnr(2) == -1
2076 quit
2077 endif
2078 endif
2079endfunction " }}}
2080
2081" MBE Script History {{{
2082"=============================================================================
2083"
2084" History: 6.4.3 o Fix MBE losing highlighting when a buffer is closed.
2085" Thanks to Markus Koller for the pull request!
2086" o Disable spellcheck on MBE buffer.
2087" o Don't use colorcolumn setting on MBE buffer. Thanks to
2088" grassofhust for the pull requests for this and the
2089" previous issue!
2090" 6.4.2 o Moving current build out of beta. Getting ready for a
2091" re-write!
2092" 6.4.1b5 o Allow users to turn off Buffer number display on exporer
2093" tabs courtesy of jmatraszek.
2094" o Allow users to turn off duplicate buffer name checking
2095" to speed up MBE buffer switching. We are working on
2096" optimizing this feature so that it is usable even with
2097" many buffers open.
2098" o Set Shellslash fix for Windows users so that duplicate
2099" buffer name checking works properly.
2100" o Re-enable synatx highlighitng after cycling the buffer
2101" courtesy of Sontek.
2102" o Fix erratic :q behavior when MBE is the last buffer
2103" courtesy of Moopet.
2104" 6.4.1b4 o Finally figured out how to turn off parentheses
2105" matching for the MBE buffer, which solves a couple of
2106" annoying graphical glitches. Thanks to Thomas Egreger
2107" for the patch!
2108" o Added a temporary fix for the issues with MBE and
2109" FuzzyFinder thanks to toupeira.
2110" 6.4.1b2 o Fixed Dupe File Name checking function to prevent some
2111" errors and actually work properly!
2112" 6.4.1b1 o Added handler function to only update MBE on changes.
2113" 6.4.0 o Added Emacs-like 'uniquify' feature where MBE will
2114" show a parent directory when there are 2 buffers with
2115" the same filename. Example: There are 2 buffers, one
2116" is /ProjectA/Application/CSS/style.css and
2117" /ProjectB/Applications/CSS/style.css. Originally, MBE
2118" would just display 'style.css' for both buffers. Now,
2119" MBE crawls up the directory tree to find the first
2120" differentiating parent directory for both buffers, so
2121" MBE will show 'ProjectA/style.css' and
2122" 'ProjectB/style.css' for each buffer name.
2123" o Now setting winfixheight and winfixwidth for the MBE
2124" buffer so that it does not get resized automatically
2125" by window resizing commands such as 'CTRL W='.
2126" 6.3.7 o MBE now uses it's own status line format to reduce the
2127" amount of visual clutter. This can be customized.
2128" 6.3.6 o MBE now updates current buffer's status on buffer save
2129" and when a buffer is modified. Patched by Federico
2130" Holgado (fholgado at gmail dot com).
2131" 6.3.5 o Added highlighting for currently active buffer.
2132" Patched by Federico Holgado (fholgado at gmail dot
2133" com).
2134" 6.3.4 o Now returns to augroup NONE after setting augroup
2135" commands. Big thanks to Maciej Laszcz for the bug
2136" report!
2137" 6.3.3 o Added additional keybindings. In addition to <TAB> and
2138" <S-TAB>, l and h can now be used. In addition to <CR>,
2139" and e can now be used.
2140" o You can open the selected buffer in a new split window
2141" by pressing s while in the minibufexplorer window.
2142" o You can open the selected buffer in a new vertically
2143" split window while pressing v while in the
2144" minibufexplorer window. Patched by Oliver Uvman.
2145" 6.3.2 o For some reason there was still a call to StopExplorer
2146" with 2 params. Very old bug. I know I fixed before,
2147" any way many thanks to Jason Mills for reporting this!
2148" 6.3.1 o Include folds in source so that it's easier to
2149" navigate.
2150" o Added g:miniBufExplForceSyntaxEnable setting for folks
2151" that want a :syntax enable to be called when we enter
2152" buffers. This can resolve issues caused by a vim bug
2153" where buffers show up without highlighting when another
2154" buffer has been closed, quit, wiped or deleted.
2155" 6.3.0 o Added an option to allow single click (rather than
2156" the default double click) to select buffers in the
2157" MBE window. This feature was requested by AW Law
2158" and was inspired by taglist.vim. Note that you will
2159" need the latest version of taglist.vim if you want to
2160" use MBE and taglist both with singleclick turned on.
2161" Also thanks to AW Law for pointing out that you can
2162" make an Explorer not be listed in a standard :ls.
2163" o Added the ability to have your tabs show up in a
2164" vertical window rather than the standard horizontal
2165" one. Just let g:miniBufExplVSplit = <width> in your
2166" .vimrc and your will get this functionality.
2167" o If you use the vertical explorer and you want it to
2168" autosize then let g:miniBufExplMaxSize = <max width>
2169" in your .vimrc. You may use the MinSize letting in
2170" addition to the MaxLetting if you don't want a super
2171" thin window.
2172" o g:miniBufExplMaxHeight was renamed g:miniBufExplMaxSize
2173" g:miniBufExplMinHeight was renamed g:miniBufExplMinSize
2174" the old settings are backwards compatible if you don't
2175" use the new settings, but they are depreciated.
2176" 6.2.8 o Add an option to stop MBE from targeting non-modifiable
2177" buffers when switching buffers. Thanks to AW Law for
2178" the inspiration for this. This may not work if a user
2179" has lots of explorer/help windows open.
2180" 6.2.7 o Very minor bug fix for people who want to set
2181" loaded_minibufexplorer in their .vimrc in order to
2182" stop MBE from loading. 99.99% of users do not need
2183" this update.
2184" 6.2.6 o Moved history to end of source file
2185" o Updated highlighting documentation
2186" o Created global commands MBEbn and MBEbp that can be
2187" used in mappings if folks want to cycle buffers while
2188" skipping non-eligible buffers.
2189" 6.2.5 o Added <Leader>mbt key mapping which will toggle
2190" the MBE window. I map this to F3 in my .vimrc
2191" with "map <F3> :TMiniBufExplorer<CR>" which
2192" means I can easily close the MBE window when I'm
2193" not using it and get it back when I want it.
2194" o Changed default debug mode to 3 (write to global
2195" g:miniBufExplorerDebugOutput)
2196" o Made a pass through the documentation to clarify
2197" serveral issues and provide more complete docs
2198" for mappings and commands.
2199" 6.2.4 o Because of the autocommand switch (see 6.2.0) it
2200" was possible to remove the restriction on the
2201" :set hidden option. It is now possible to use
2202" this option with MBE.
2203" 6.2.3 o Added miniBufExplTabWrap option. It is turned
2204" off by default. When turned on spaces are added
2205" between tabs and gq} is issued to perform line
2206" formatting. This won't work very well if filenames
2207" contain spaces. It would be pretty easy to write
2208" my own formatter, but I'm too lazy, so if someone
2209" really needs that feature I'll add it :)
2210" 6.2.2 o Changed the way the g:miniBufExplorerMoreThanOne
2211" global is handled. You can set this to the number
2212" of eligible buffers you want to be loaded before
2213" the MBE window is loaded. Setting it to 0 causes
2214" the MBE window to be opened even if there are no
2215" buffers. Setting it to 4 causes the window to stay
2216" closed until the 4th eligible buffer is loaded.
2217" o Added a MinHeight option. This is nice if you want
2218" the MBE window to always take the same amount of
2219" space. For example set MaxSize and MinSize to 2
2220" and set MoreThanOne to 0 and you will always have
2221" a 2 row (plus the ruler :) MBE window.
2222" NOTE: in 6.3.0 we started using MinSize instead of
2223" Minheight. This will still work if MinSize is not
2224" specified, but it is depreciated. Use MinSize instead.
2225" o I now setlocal foldcolumn=0 and nonumber in the MBE
2226" window. This is for those of you that like to have
2227" these options turned on locally. I'm assuming noone
2228" outthere wants foldcolumns and line numbers in the
2229" MBE window? :)
2230" o Fixed a bug where an empty MBE window was taking half
2231" of the screen (partly why the MinHeight option was
2232" added.)
2233" 6.2.1 o If MBE is the only window (because of :bd for example)
2234" and there are still eligible buffers then one of them
2235" will be displayed.
2236" o The <Leader>mbe mapping now highlights the buffer from
2237" the current window.
2238" o The delete ('d') binding in the MBE window now restors
2239" the cursor position, which can help if you want to
2240" delete several buffers in a row that are not at the
2241" beginning of the buffer list.
2242" o Added a new key binding ('p') in the MBE window to
2243" switch to the previous window (last edit window)
2244" 6.2.0 o Major overhaul of autocommand and list updating code,
2245" we now have much better handling of :bd (which is the
2246" most requested feature.) As well as resolving other
2247" issues where the buffer list would not be updated
2248" automatically. The old version tried to trap specific
2249" events, this one just updates frequently, but it keeps
2250" track and only changes the screen if there has been
2251" a change.
2252" o Added g:miniBufExplMaxHeight variable so you can keep
2253" the -MiniBufExplorer- window small when you have lots
2254" of buffers (or buffers with long names :)
2255" NOTE: in 6.3.0 we started using MaxSize instead of
2256" MaxHeight. This will still work if MaxSize is not
2257" specified, but it is depreciated. Use MaxSize instead.
2258" o Improvement to internal syntax highlighting code
2259" I renamed the syntax group names. Anyone who has
2260" figured out how to use them already shouldn't have
2261" any trouble with the new Nameing :)
2262" o Added debug mode 3 which writes to a global variable
2263" this is fast and doesn't mess with the buffer/window
2264" lists.
2265" 6.1.0 o <Leader>mbc was failing because I was calling one of
2266" my own functions with the wrong number of args. :(
2267" Thanks to Gerry Patterson for finding this!
2268" This code is very stable (although it has some
2269" idiocyncracies.)
2270" 6.0.9 o Double clicking tabs was overwriting the cliboard
2271" register on MS Windows. Thanks to Shoeb Bhinderwala
2272" for reporting this issue.
2273" 6.0.8 o Apparently some VIM builds are having a hard time with
2274" line continuation in scripts so the few that were here
2275" have been removed.
2276" o Generalized FindExplorer and FindCreateExplorer so
2277" that they can be used for the debug window. Renaming
2278" to FindWindow and FindCreateWindow.
2279" o Updated debugging code so that debug output is put into
2280" a buffer which can then be written to disk or emailed
2281" to me when someone is having a major issue. Can also
2282" write directly to a file (VERY SLOWLY) on UNIX or Win32
2283" (not 95 or 98 at the moment) or use VIM's echo function
2284" to display the output to the screen.
2285" o Several people have had issues when the hidden option
2286" is turned on. So I have put in several checks to make
2287" sure folks know this if they try to use MBE with this
2288" option set.
2289" 6.0.7 o Handling BufDelete autocmd so that the UI updates
2290" properly when using :bd (rather than going through
2291" the MBE UI.)
2292" o The AutoUpdate code will now close the MBE window when
2293" there is a single eligible buffer available.
2294" This has the usefull side effect of stopping the MBE
2295" window from blocking the VIM session open when you close
2296" the last buffer.
2297" o Added functions, commands and maps to close & update
2298" the MBE window (<leader>mbc and <leader>mbu.)
2299" o Made MBE open/close state be sticky if set through
2300" StartExplorer(1) or StopExplorer(1), which are
2301" called from the standard mappings. So if you close
2302" the mbe window with \mbc it won't be automatically
2303" opened again unless you do a \mbe (or restart VIM).
2304" o Removed spaces between "tabs" (even more mini :)
2305" o Simplified MBE tab processing
2306" 6.0.6 o Fixed register overwrite bug found by S?bastien Pierre
2307" 6.0.5 o Fixed an issue with window sizing when we run out of
2308" buffers.
2309" o Fixed some weird commenting bugs.
2310" o Added more optional fancy window/buffer navigation:
2311" o You can turn on the capability to use control and the
2312" arrow keys to move between windows.
2313" o You can turn on the ability to use <C-TAB> and
2314" <C-S-TAB> to open the next and previous (respectively)
2315" buffer in the current window.
2316" o You can turn on the ability to use <C-TAB> and
2317" <C-S-TAB> to switch windows (forward and backwards
2318" respectively.)
2319" 6.0.4 o Added optional fancy window navigation:
2320" o Holding down control and pressing a vim direction
2321" [hjkl] will switch windows in the indicated direction.
2322" 6.0.3 o Changed buffer name to -MiniBufExplorer- to resolve
2323" Issue in filename pattern matching on Windows.
2324" 6.0.2 o 2 Changes requested by Suresh Govindachar:
2325" o Added SplitToEdge option and set it on by default
2326" o Added tab and shift-tab mappings in [MBE] window
2327" 6.0.1 o Added MoreThanOne option and set it on by default
2328" MiniBufExplorer will not automatically open until
2329" more than one eligible buffers are opened. This
2330" reduces cluter when you are only working on a
2331" single file.
2332" NOTE: See change log for 6.2.2 for more details about
2333" this feature
2334" 6.0.0 o Initial Release on November 20, 2001
2335"
2336"=============================================================================
2337" }}}
2338" vim:ft=vim:fdm=marker:ff=unix:nowrap:tabstop=4:shiftwidth=4:softtabstop=4:smarttab:shiftround:expandtab
2339

After

1" Mini Buffer Explorer <minibufexpl.vim>
2"
3" HINT: Type zR if you don't know how to use folds
4"
5" Script Info and Documentation {{{
6"=============================================================================
7" Copyright: Copyright (C) 2002 & 2003 Bindu Wavell
8" Copyright (C) 2010 Oliver Uvman
9" Copyright (C) 2010 Danielle Church
10" Copyright (C) 2010 Stephan Sokolow
11" Copyright (C) 2010 & 2011 Federico Holgado
12" Permission is hereby granted to use and distribute this code,
13" with or without modifications, provided that this copyright
14" notice is copied with it. Like anything else that's free,
15" minibufexpl.vim is provided *as is* and comes with no
16" warranty of any kind, either expressed or implied. In no
17" event will the copyright holder be liable for any damamges
18" resulting from the use of this software.
19"
20" Name Of File: minibufexpl.vim
21" Description: Mini Buffer Explorer Vim Plugin
22" Documentation: See minibufexpl.txt
23"
24"=============================================================================
25" }}}
26"
27" Startup Check
28"
29" Has this plugin already been loaded? {{{
30"
31if exists('loaded_minibufexplorer')
32 finish
…lines 33–1793 unchanged (1761 lines)
1794 " if this window is last on screen quit without warning
1795 if winbufnr(2) == -1
1796 quit
1797 endif
1798 endif
1799endfunction " }}}
1800
1801" vim:ft=vim:fdm=marker:ff=unix:nowrap:tabstop=4:shiftwidth=4:softtabstop=4:smarttab:shiftround:expandtab
1802

Before

script_file
comment "\" Mini Buffer Explorer <minibufexpl.vim>"
comment "\""
comment "\" HINT: Type zR if you don't know how to use folds"
comment "\""
comment "\" Script Info and Documentation {{{"
comment "\"==========================================================="...
comment "\" Copyright: Copyright (C) 2002 & 2003 Bindu Wavell "
comment "\" \t\t Copyright (C) 2010 Oliver Uvman"
comment "\" \t\t Copyright (C) 2010 Danielle Church"
comment "\" \t\t Copyright (C) 2010 Stephan Sokolow"
comment "\" \t\t Copyright (C) 2010 & 2011 Federico Holgado"
comment "\" Permission is hereby granted to use and dist"...
comment "\" with or without modifications, provided that"...
comment "\" notice is copied with it. Like anything else"...
comment "\" minibufexpl.vim is provided *as is* and come"...
comment "\" warranty of any kind, either expressed or im"...
comment "\" event will the copyright holder be liable fo"...
comment "\" resulting from the use of this software."
comment "\""
comment "\" Name Of File: minibufexpl.vim"
comment "\" Description: Mini Buffer Explorer Vim Plugin"
comment "\" Maintainer: Federico Holgado <fholgado@gmail.com>"
comment "\" Last Updated: Federico Holgado <fholgado@gmail.com>"
comment "\" URL: http://vim.sourceforge.net/scripts/script.ph"...
comment "\" GitHub URL: https://github.com/fholgado/minibufexpl.vim"
comment "\" Last Change: Friday, October 21, 2011"
comment "\" Version: 6.4.3"
comment "\" Derived from Jeff Lanzarotta's bufexplorer.v"...
comment "\" Jeff can be reached at (jefflanzarotta@yahoo"...
comment "\" original plugin can be found at:"
comment "\" http://lanzarotta.tripod.com/vim/plugin/6/bu"...
comment "\" [NO LONGER AVAILABLE]"
comment "\""
comment "\" Usage: Normally, this file should reside in the plu"...
comment "\" directory and be automatically sourced. If n"...
comment "\" manually source this file using ':source min"...
comment "\""
comment "\" You may use the default keymappings of"
comment "\""
comment "\" <Leader>mbe - Opens MiniBufExplorer"
comment "\""
comment "\" or you may want to add something like the fo"...
comment "\" key mapping to your _vimrc/.vimrc file."
comment "\""
comment "\" map <Leader>b :MiniBufExplorer<cr>"
comment "\""
comment "\" However, in most cases you won't need any ke"...
comment "\""
comment "\" <Leader> is usually backslash so type \"\\mbe\""...
comment "\" the -MiniBufExplorer- window."
comment "\""
comment "\" Other keymappings include: <Leader>mbc to cl"...
comment "\" window, <Leader>mbu to force the Explorer t"...
comment "\" <Leader>mbt to toggle the Explorer window; i"...
comment "\" closed or close if open. Each of these key b"...
comment "\" overridden (see the notes on <Leader>mbe abo"...
comment "\" "
comment "\" You can map these additional commands as fol"...
comment "\""
comment "\" map <Leader>c :CMiniBufExplorer<cr>"
comment "\" map <Leader>u :UMiniBufExplorer<cr>"
comment "\" map <Leader>t :TMiniBufExplorer<cr>"
comment "\""
comment "\" NOTE: you can change the key binding used in"...
comment "\" so that they fit with your configurati"...
comment "\""
comment "\" You can also call each of these features by "...
comment "\" following in command mode:"
comment "\""
comment "\" :MiniBufExplorer \" Open and/or goto Exp"...
comment "\" :CMiniBufExplorer \" Close the Explorer i"...
comment "\" :UMiniBufExplorer \" Update Explorer with"...
comment "\" :TMiniBufExplorer \" Toggle the Explorer "...
comment "\" closed."
comment "\""
comment "\" To control where the new split window goes r"...
comment "\" current window, use the setting:"
comment "\""
comment "\" let g:miniBufExplSplitBelow=0 \" Put new w"...
comment "\" \" current o"...
comment "\" \" left for "...
comment "\" let g:miniBufExplSplitBelow=1 \" Put new w"...
comment "\" \" current o"...
comment "\" \" right for"...
comment "\""
comment "\" The default for this is read from the &split"...
comment "\""
comment "\" By default we are now (as of 6.0.2) forcing "...
comment "\" window to open up at the edge of the screen."...
comment "\" off by setting the following variable in you"...
comment "\""
comment "\" let g:miniBufExplSplitToEdge = 0"
comment "\""
comment "\" If you would like a vertical explorer you ca"...
comment "\" width (in characters) you want for your expl"...
comment "\" following .vimrc variable (this was introduc"...
comment "\""
comment "\" let g:miniBufExplVSplit = 20 \" column wi"...
comment "\""
comment "\" IN HORIZONTAL MODE:"
comment "\" It is now (as of 6.1.1) possible to set a ma"...
comment "\" the -MiniBufExplorer- window. You can set th"...
comment "\" letting the following variable in your .vimr"...
comment "\""
comment "\" let g:miniBufExplMaxSize = <max lines: def"...
comment "\" "
comment "\" setting this to 0 will mean the window gets "...
comment "\" needed to fit all your buffers. "
comment "\""
comment "\" NOTE: This was g:miniBufExplMaxHeight before"...
comment "\" setting is backwards compatible if you don't"...
comment "\""
comment "\" As of 6.2.2 it is possible to set a minimum "...
comment "\" -MiniBufExplorer- window. You can set the mi"...
comment "\" letting the following variable in your .vimr"...
comment "\""
comment "\" let g:miniBufExplMinSize = <min height: de"...
comment "\""
comment "\" NOTE: This was g:miniBufExplMinHeight before"...
comment "\" setting is backwards compatible if you don't"...
comment "\""
comment "\" IN VERTICAL MODE: (as of 6.3.0)"
comment "\" By default the vertical explorer has a fixed"...
comment "\""
comment "\" let g:miniBufExplMaxSize = <max width: def"...
comment "\""
comment "\" into your .vimrc then MBE will attempt to se"...
comment "\" MBE window to be as wide as your widest tab."...
comment "\" exceed MaxSize even if you have wider tabs. "
comment "\""
comment "\" Accepting the default value of 0 for this wi"...
comment "\" width MBE window."
comment "\""
comment "\" You can specify a MinSize for the vertical e"...
comment "\" putting the following in your .vimrc:"
comment "\""
comment "\" let g:miniBufExplMinSize = <min width: def"...
comment "\""
comment "\" This will have no effect unless you also spe"...
comment "\""
comment "\" By default we are now (as of 6.0.1) turning "...
comment "\" option. This stops the -MiniBufExplorer- fro"...
comment "\" automatically until more than one eligible b"...
comment "\" You can turn this feature off by setting the"...
comment "\" in your .vimrc:"
comment "\" "
comment "\" let g:miniBufExplorerMoreThanOne=1"
comment "\""
comment "\" (The following enhancement is as of 6.2.2)"
comment "\" Setting this to 0 will cause the MBE window "...
comment "\" if no buffers are available. Setting it to 1"...
comment "\" window to be loaded as soon as an eligible b"...
comment "\" can also set it to larger numbers. So if you"...
comment "\" example the MBE window wouldn't auto-open un"...
comment "\" buffers had been loaded. This is nice for fo"...
comment "\" want an MBE window unless they are editing m"...
comment "\" three buffers."
comment "\""
comment "\" To enable the optional mapping of Control + "...
comment "\" [hjkl] to window movement commands, you can "...
comment "\" your .vimrc:"
comment "\""
comment "\" let g:miniBufExplMapWindowNavVim = 1"
comment "\""
comment "\" To enable the optional mapping of Control + "...
comment "\" movement commands, you can put the following"...
comment "\""
comment "\" let g:miniBufExplMapWindowNavArrows = 1"
comment "\""
comment "\" To enable the optional mapping of <C-TAB> an"...
comment "\" function that will bring up the next or prev"...
comment "\" current window, you can put the following in"...
comment "\""
comment "\" let g:miniBufExplMapCTabSwitchBufs = 1"
comment "\""
comment "\" To enable the optional mapping of <C-TAB> an"...
comment "\" that will move to the next and previous (res"...
comment "\" can put the following into your .vimrc:"
comment "\""
comment "\" let g:miniBufExplMapCTabSwitchWindows = 1"
comment "\""
comment "\""
comment "\" NOTE: If you set the ...TabSwitchBufs AND .."...
comment "\" ...TabSwitchBufs will be enabled and ."...
comment "\" will not."
comment "\" "
comment "\" As of MBE 6.3.0, you can put the following i"...
comment "\" "
comment "\" let g:miniBufExplUseSingleClick = 1"
comment "\""
comment "\" If you would like to single click on tabs ra"...
comment "\" clicking on them to goto the selected buffer"...
comment "\""
comment "\" NOTE: If you use the single click option in "...
comment "\" need to get an updated version that in"...
comment "\" provided to allow both explorers to pr"...
comment "\" buffer selection."
comment "\""
comment "\" It is possible to customize the the highligh"...
comment "\" the MBE by configuring the following highlig"...
comment "\""
comment "\" MBENormal - for buffers that"...
comment "\" are NOT VISIBLE."
comment "\" MBEChanged - for buffers that"...
comment "\" NOT VISIBLE"
comment "\" MBEVisibleNormal - buffers that hav"...
comment "\" VISIBLE"
comment "\" MBEVisibleNormalActive - buffers that hav"...
comment "\" VISIBLE and is t"...
comment "\" MBEVisibleChanged - for buffers that"...
comment "\" VISIBLE"
comment "\" MBEVisibleChangedActive - buffers that hav"...
comment "\" and is the activ"...
comment "\""
comment "\" You can either link to an existing highlight"...
comment "\" adding a command like:"
comment "\""
comment "\" hi link MBEVisibleChanged Error"
comment "\""
comment "\" to your .vimrc or you can specify exact fore"...
comment "\" colors using the following syntax:"
comment "\""
comment "\" hi MBEChanged guibg=darkblue ctermbg=darkb"...
comment "\""
comment "\" NOTE: If you set a colorscheme in your .vimr"...
comment "\" BEFORE updating the MBE highlighting g"...
comment "\""
comment "\" If you use other explorers like TagList you "...
comment "\""
comment "\" let g:miniBufExplModSelTarget = 1"
comment "\" "
comment "\" If you would like MBE to close when you sele"...
comment "\""
comment "\" let g:miniBufExplCloseOnSelect = 1"
comment "\""
comment "\" into your .vimrc in order to force MBE to tr"...
comment "\" buffers into a window that does not have a n"...
comment "\" The upshot of this should be that if you go "...
comment "\" a buffer, the buffer should not show up in a"...
comment "\" hosting an explorer."
comment "\""
comment "\" If you use Vim with many open buffers simult"...
comment "\" you notice that switching buffers takes long"...
comment "\" is because of MBE's duplicate buffer name ch"...
comment "\" turn it off, you can add the following to yo"...
comment "\""
comment "\" let g:miniBufExplCheckDupeBufs = 0"
comment "\" "
comment "\" We are working on a fix so that we can all e"...
comment "\" if you want!"
comment "\""
comment "\" If you would like to omit the buffer number "...
comment "\" display, put the following in your .vimrc:"
comment "\""
comment "\" let g:miniBufExplShowBufNumbers = 0"
comment "\""
comment "\" There is a VIM bug that can cause buffers to"...
comment "\" their highlighting. The following setting wi"...
comment "\" try and turn highlighting back on (introduce"...
comment "\""
comment "\" let g:miniBufExplForceSyntaxEnable = 1"
comment "\""
comment "\" MBE has had a basic debugging capability for"...
comment "\" However, it has not been very friendly in th"...
comment "\" you can put one of each of the following int"...
comment "\""
comment "\" let g:miniBufExplorerDebugLevel = 0 \" MBE"...
comment "\" let g:miniBufExplorerDebugLevel = 4 \" MBE"...
comment "\" let g:miniBufExplorerDebugLevel = 10 \" MBE"...
comment "\""
comment "\" You can also set a DebugMode to cause output"...
comment "\" follows (default is mode 3):"
comment "\""
comment "\" let g:miniBufExplorerDebugMode = 0 \" Err"...
comment "\" \" a v"...
comment "\" let g:miniBufExplorerDebugMode = 1 \" Use"...
comment "\" \" to "...
comment "\" let g:miniBufExplorerDebugMode = 2 \" Wri"...
comment "\" \" Min"...
comment "\" let g:miniBufExplorerDebugMode = 3 \" Sto"...
comment "\" \" g:miniBu"...
comment "\""
comment "\" Or if you are able to start VIM, you might j"...
comment "\" at a command prompt right before you do the "...
comment "\" failing."
comment "\""
comment "\" History: Moved to end of file"
comment "\" "
comment "\" Known Issues: When debugging is turned on and set to outpu"...
comment "\" are some cases where the window is opened mo"...
comment "\" are other cases where an old debug window ca"...
comment "\" "
comment "\" Several MBE commands can break the window hi"...
comment "\" might not take you to the expected window."
comment "\""
comment "\" Todo: - Add context to tab titles so that multip"...
comment "\" root folder names. Useful for working with"...
comment "\" where multiple files have the same name bu"...
comment "\" locations."
comment "\" - Add the ability to specify a regexp for "...
comment "\" allowing the ability to filter out certain"...
comment "\" you don't want to control from MBE."
comment "\""
comment "\"==========================================================="...
comment "\" }}}"
comment "\" Startup Check"
comment "\""
comment "\" Has this plugin already been loaded? {{{"
comment "\""
if_statement
if "if"
call_expression
identifier "exists"
( "("
string_literal "'loaded_minibufexplorer'"
) ")"
body
unknown_builtin_statement
unknown_command_name "finish"
endif "endif"
let_statement
let "let"
identifier "loaded_minibufexplorer"
= "="
integer_literal "1"
comment "\" }}}"
comment "\" Mappings and Commands"
comment "\""
comment "\" MBE Keyboard Mappings {{{"
comment "\" If we don't already have keyboard mappings for MBE then cr"...
comment "\" "
if_statement (+22 nodes collapsed)
if_statement (+22 nodes collapsed)
if_statement (+22 nodes collapsed)
if_statement (+22 nodes collapsed)
if_statement (+22 nodes collapsed)
comment "\" }}}"
comment "\" MBE <Script> internal map {{{"
comment "\" "
map_statement
noremap "noremap"
<unique> "<unique>"
<script> "<script>"
map_side
keycode
< "<"
> ">"
map_side
keycode
< "<"
> ">"
keycode
< "<"
> ">"
keycode
< "<"
> ">"
map_statement
noremap "noremap"
<unique> "<unique>"
<script> "<script>"
map_side
keycode
< "<"
> ">"
map_side
keycode
< "<"
> ">"
keycode
< "<"
> ">"
keycode
< "<"
> ">"
map_statement
noremap "noremap"
<unique> "<unique>"
<script> "<script>"
map_side
keycode
< "<"
> ">"
map_side
keycode
< "<"
> ">"
keycode
< "<"
> ">"
keycode
< "<"
> ">"
map_statement
noremap "noremap"
<unique> "<unique>"
<script> "<script>"
map_side
keycode
< "<"
> ">"
map_side
keycode
< "<"
> ">"
keycode
< "<"
> ">"
keycode
< "<"
> ">"
map_statement
noremap "noremap"
<unique> "<unique>"
<script> "<script>"
map_side
keycode
< "<"
> ">"
map_side
keycode
< "<"
> ">"
keycode
< "<"
> ">"
keycode
< "<"
> ">"
comment "\" }}}"
comment "\" MBE commands {{{"
comment "\" "
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "':MiniBufExplorer'"
) ")"
body
command_statement
command "command"
bang
! "!"
command_name "MiniBufExplorer"
command " call <SID>StartExplorer(1, -1, bufnr(\"%\"))"
endif "endif"
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "':CMiniBufExplorer'"
) ")"
body
command_statement
command "command"
bang
! "!"
command_name "CMiniBufExplorer"
command " call <SID>StopExplorer(1)"
endif "endif"
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "':UMiniBufExplorer'"
) ")"
body
command_statement
command "command"
bang
! "!"
command_name "UMiniBufExplorer"
command " call <SID>AutoUpdate(-1,bufnr(\"%\"))"
endif "endif"
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "':TMiniBufExplorer'"
) ")"
body
command_statement
command "command"
bang
! "!"
command_name "TMiniBufExplorer"
command " call <SID>ToggleExplorer()"
endif "endif"
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "':MBEbn'"
) ")"
body
command_statement
command "command"
bang
! "!"
command_name "MBEbn"
command " call <SID>CycleBuffer(1)"
endif "endif"
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "':MBEbp'"
) ")"
body
command_statement
command "command"
bang
! "!"
command_name "MBEbp"
command " call <SID>CycleBuffer(0)"
endif "endif"
comment "\" }}}"
comment "\" Global Configuration Variables"
comment "\""
comment "\" Debug Level {{{"
comment "\""
comment "\" 0 = no logging"
comment "\" 1=5 = errors ; 1 is the most important"
comment "\" 5-9 = info ; 5 is the most important"
comment "\" 10 = Entry/Exit"
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "'g:miniBufExplorerDebugLevel'"
) ")"
body
let_statement
let "let"
scoped_identifier
scope "g:"
identifier "miniBufExplorerDebugLevel"
= "="
integer_literal "1"
endif "endif"
comment "\" }}}"
comment "\" Debug Mode {{{"
comment "\""
comment "\" 0 = debug to a window"
comment "\" 1 = use vim's echo facility"
comment "\" 2 = write to a file named MiniBufExplorer.DBG"
comment "\" in the directory where vim was started"
comment "\" THIS IS VERY SLOW"
comment "\" 3 = Write into g:miniBufExplorerDebugOutput"
comment "\" global variable [This is the default]"
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "'g:miniBufExplorerDebugMode'"
) ")"
body
let_statement
let "let"
scoped_identifier
scope "g:"
identifier "miniBufExplorerDebugMode"
= "="
integer_literal "3"
endif "endif"
comment "\" }}}"
comment "\" Allow auto update? {{{"
comment "\""
comment "\" We start out with this off for startup, but once vim is ru"...
comment "\" turn this on."
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "'g:miniBufExplorerAutoUpdate'"
) ")"
body
let_statement
let "let"
scoped_identifier
scope "g:"
identifier "miniBufExplorerAutoUpdate"
= "="
integer_literal "0"
endif "endif"
comment "\" }}}"
comment "\" MoreThanOne? {{{"
comment "\" Display Mini Buf Explorer when there are 'More Than One' e"...
comment "\""
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "'g:miniBufExplorerMoreThanOne'"
) ")"
body
let_statement
let "let"
scoped_identifier
scope "g:"
identifier "miniBufExplorerMoreThanOne"
= "="
integer_literal "2"
endif "endif"
comment "\" }}}"
comment "\" Split below/above/left/right? {{{"
comment "\" When opening a new -MiniBufExplorer- window, split the new"...
comment "\" above the current window? 1 = below, 0 = above."
comment "\""
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "'g:miniBufExplSplitBelow'"
) ")"
body
let_statement
let "let"
scoped_identifier
scope "g:"
identifier "miniBufExplSplitBelow"
= "="
option
& "&"
option_name "splitbelow"
endif "endif"
comment "\" }}}"
comment "\" Split to edge? {{{"
comment "\" When opening a new -MiniBufExplorer- window, split the new"...
comment "\" full edge? 1 = yes, 0 = no."
comment "\""
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "'g:miniBufExplSplitToEdge'"
) ")"
body
let_statement
let "let"
scoped_identifier
scope "g:"
identifier "miniBufExplSplitToEdge"
= "="
integer_literal "1"
endif "endif"
comment "\" }}}"
comment "\" MaxHeight (depreciated) {{{"
comment "\" When sizing the -MiniBufExplorer- window, assign a maximum"...
comment "\" 0 = size to fit all buffers, otherwise the value is number"...
comment "\" buffer. [Depreciated use g:miniBufExplMaxSize]"
comment "\""
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "'g:miniBufExplMaxHeight'"
) ")"
body
let_statement
let "let"
scoped_identifier
scope "g:"
identifier "miniBufExplMaxHeight"
= "="
integer_literal "0"
endif "endif"
comment "\" }}}"
comment "\" MaxSize {{{"
comment "\" Same as MaxHeight but also works for vertical splits if sp"...
comment "\" vertical split then vertical resizing will be performed. I"...
comment "\" then the number of columns in g:miniBufExplVSplit will be "...
comment "\" static window width."
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "'g:miniBufExplMaxSize'"
) ")"
body
let_statement
let "let"
scoped_identifier
scope "g:"
identifier "miniBufExplMaxSize"
= "="
scoped_identifier
scope "g:"
identifier "miniBufExplMaxHeight"
endif "endif"
comment "\" }}}"
comment "\" MinHeight (depreciated) {{{"
comment "\" When sizing the -MiniBufExplorer- window, assign a minumum"...
comment "\" the value is minimum number of lines for buffer. Setting t"...
comment "\" cause strange height behavior. The default value is 1 [Dep"...
comment "\" g:miniBufExplMinSize]"
comment "\""
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "'g:miniBufExplMinHeight'"
) ")"
body
let_statement
let "let"
scoped_identifier
scope "g:"
identifier "miniBufExplMinHeight"
= "="
integer_literal "1"
endif "endif"
comment "\" }}}"
comment "\" MinSize {{{"
comment "\" Same as MinHeight but also works for vertical splits. For "...
comment "\" this is ignored unless g:miniBufExplMax(Size|Height) are s"...
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "'g:miniBufExplMinSize'"
) ")"
body
let_statement
let "let"
scoped_identifier
scope "g:"
identifier "miniBufExplMinSize"
= "="
scoped_identifier
scope "g:"
identifier "miniBufExplMinHeight"
endif "endif"
comment "\" }}}"
comment "\" Horizontal or Vertical explorer? {{{"
comment "\" For folks that like vertical explorers, I'm caving in and "...
comment "\" veritcal splits. If this is set to 0 then the current hori"...
comment "\" splitting logic will be run. If however you want a vertica"...
comment "\" assign the width (in characters) you wish to assign to the"...
comment "\""
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "'g:miniBufExplVSplit'"
) ")"
body
let_statement
let "let"
scoped_identifier
scope "g:"
identifier "miniBufExplVSplit"
= "="
integer_literal "0"
endif "endif"
comment "\" }}}"
comment "\" TabWrap? {{{"
comment "\" By default line wrap is used (possibly breaking a tab name"...
comment "\" lines.) Turning this option on (setting it to 1) can take "...
comment "\" space, but will make sure that each tab is on one and only"...
comment "\""
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "'g:miniBufExplTabWrap'"
) ")"
body
let_statement
let "let"
scoped_identifier
scope "g:"
identifier "miniBufExplTabWrap"
= "="
integer_literal "0"
endif "endif"
comment "\" }}}"
comment "\" ShowBufNumber? {{{"
comment "\" By default buffers' numbers are shown in MiniBufExplorer. "...
comment "\" by setting this option to 0."
comment "\""
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "'g:miniBufExplShowBufNumbers'"
) ")"
body
let_statement
let "let"
scoped_identifier
scope "g:"
identifier "miniBufExplShowBufNumbers"
= "="
integer_literal "1"
endif "endif"
comment "\" }}}"
comment "\" Extended window navigation commands? {{{"
comment "\" Global flag to turn extended window navigation commands on"...
comment "\" enabled = 1, dissabled = 0"
comment "\""
if_statement (+21 nodes collapsed)
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "'g:miniBufExplMapWindowNavVim'"
) ")"
body
let_statement
let "let"
scoped_identifier
scope "g:"
identifier "miniBufExplMapWindowNavVim"
= "="
integer_literal "0"
endif "endif"
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "'g:miniBufExplMapWindowNavArrows'"
) ")"
body
let_statement
let "let"
scoped_identifier
scope "g:"
identifier "miniBufExplMapWindowNavArrows"
= "="
integer_literal "0"
endif "endif"
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "'g:miniBufExplMapCTabSwitchBufs'"
) ")"
body
let_statement
let "let"
scoped_identifier
scope "g:"
identifier "miniBufExplMapCTabSwitchBufs"
= "="
integer_literal "0"
endif "endif"
comment "\" Notice: that if CTabSwitchBufs is turned on then"
comment "\" we turn off CTabSwitchWindows."
if_statement (+26 nodes collapsed)
comment "\""
comment "\" If we have enabled control + vim direction key remapping"
comment "\" then perform the remapping"
comment "\""
comment "\" Notice: I left g:miniBufExplMapWindowNav in for backward"
comment "\" compatibility. Eventually this mapping will be removed so"
comment "\" please use the newer g:miniBufExplMapWindowNavVim setting."
if_statement (+52 nodes collapsed)
comment "\""
comment "\" If we have enabled control + arrow key remapping"
comment "\" then perform the remapping"
comment "\""
if_statement (+47 nodes collapsed)
comment "\" If we have enabled <C-TAB> and <C-S-TAB> to switch buffers"
comment "\" in the current window then perform the remapping"
comment "\""
if_statement (+39 nodes collapsed)
comment "\""
comment "\" If we have enabled <C-TAB> and <C-S-TAB> to switch windows"
comment "\" then perform the remapping"
comment "\""
if_statement (+27 nodes collapsed)
comment "\" }}}"
comment "\" Modifiable Select Target {{{"
comment "\""
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "'g:miniBufExplModSelTarget'"
) ")"
body
let_statement
let "let"
scoped_identifier
scope "g:"
identifier "miniBufExplModSelTarget"
= "="
integer_literal "0"
endif "endif"
comment "\"}}}"
comment "\" Force Syntax Enable {{{"
comment "\""
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "'g:miniBufExplForceSyntaxEnable'"
) ")"
body
let_statement
let "let"
scoped_identifier
scope "g:"
identifier "miniBufExplForceSyntaxEnable"
= "="
integer_literal "0"
endif "endif"
comment "\" }}}"
comment "\" Single/Double Click? {{{"
comment "\" flag that can be set to 1 in a users .vimrc to allow "
comment "\" single click switching of tabs. By default we use"
comment "\" double click for tab selection."
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "'g:miniBufExplUseSingleClick'"
) ")"
body
let_statement
let "let"
scoped_identifier
scope "g:"
identifier "miniBufExplUseSingleClick"
= "="
integer_literal "0"
endif "endif"
comment "\""
comment "\" attempt to perform single click mapping, it would be much"
comment "\" nicer if we could nnoremap <buffer> ... however vim does"
comment "\" not fire the <buffer> <leftmouse> when you use the mouse"
comment "\" to enter a buffer."
comment "\""
if_statement (+115 nodes collapsed)
comment "\" }}}"
comment "\" Close on Select? {{{"
comment "\" Flag that can be set to 1 in a users .vimrc to hide"
comment "\" the explorer when a user selects a buffer."
comment "\""
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "'g:miniBufExplCloseOnSelect'"
) ")"
body
let_statement
let "let"
scoped_identifier
scope "g:"
identifier "miniBufExplCloseOnSelect"
= "="
integer_literal "0"
endif "endif"
comment "\" }}}"
comment "\" Check for duplicate buffer names? {{{"
comment "\" Flag that can be set to 0 in a users .vimrc to turn off"
comment "\" the explorer's feature that differentiates similar buffer "...
comment "\" displaying the parent directory names. This feature should"...
comment "\" if you work with a large number of buffers (>15) simultane"...
comment "\""
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "'g:miniBufExplCheckDupeBufs'"
) ")"
body
let_statement
let "let"
scoped_identifier
scope "g:"
identifier "miniBufExplCheckDupeBufs"
= "="
integer_literal "1"
endif "endif"
comment "\" }}}"
comment "\" Variables used internally"
comment "\""
comment "\" Script/Global variables {{{"
comment "\" Global used to store the buffer list so we don't update th"...
comment "\" UI unless the list has changed."
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "'g:miniBufExplBufList'"
) ")"
body
let_statement
let "let"
scoped_identifier
scope "g:"
identifier "miniBufExplBufList"
= "="
string_literal "''"
endif "endif"
comment "\" Variable used as a mutex so that we don't do lots"
comment "\" of AutoUpdates at the same time."
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "'g:miniBufExplInAutoUpdate'"
) ")"
body
let_statement
let "let"
scoped_identifier
scope "g:"
identifier "miniBufExplInAutoUpdate"
= "="
integer_literal "0"
endif "endif"
comment "\" In debug mode 3 this variable will hold the debug output"
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "'g:miniBufExplorerDebugOutput'"
) ")"
body
let_statement
let "let"
scoped_identifier
scope "g:"
identifier "miniBufExplorerDebugOutput"
= "="
string_literal "''"
endif "endif"
comment "\" In debug mode 3 this variable will hold the debug output"
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "'g:miniBufExplForceDisplay'"
) ")"
body
let_statement
let "let"
scoped_identifier
scope "g:"
identifier "miniBufExplForceDisplay"
= "="
integer_literal "0"
endif "endif"
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "'g:miniBufExplSortBy'"
) ")"
body
let_statement
let "let"
scoped_identifier
scope "g:"
identifier "miniBufExplSortBy"
= "="
string_literal "\"number\""
endif "endif"
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "'g:statusLineText'"
) ")"
body
let_statement
let "let"
scoped_identifier
scope "g:"
identifier "statusLineText"
= "="
string_literal "\"-MiniBufExplorer-\""
endif "endif"
comment "\" Variable used to pass maxTabWidth info between functions"
let_statement
let "let"
scoped_identifier
scope "s:"
identifier "maxTabWidth"
= "="
integer_literal "0"
comment "\" Variable used to count debug output lines"
let_statement
let "let"
scoped_identifier
scope "s:"
identifier "debugIndex"
= "="
integer_literal "0"
comment "\" Build initial MRUList. This makes sure all the files speci"...
comment "\" command line are picked up correctly."
let_statement
let "let"
scoped_identifier
scope "s:"
identifier "MRUList"
= "="
call_expression
identifier "range"
( "("
integer_literal "1"
, ","
call_expression
identifier "bufnr"
( "("
string_literal "'$'"
) ")"
) ")"
comment "\" }}}"
comment "\" Setup an autocommand group and some autocommands {{{"
comment "\" that keep our explorer updated automatically."
comment "\""
comment "\"set update time for the CursorHold function so that it is c"...
comment "\"a key is pressed"
setlocal_statement
setlocal "setlocal"
set_item
option_name "updatetime"
= "="
set_value "300"
augroup_statement
augroup "augroup"
augroup_name "MiniBufExplorer"
autocmd_statement
autocmd "autocmd"
augroup_name "MiniBufExplorer"
au_event_list
au_event "BufDelete"
pattern "*"
call_statement
call "call"
call_expression
scoped_identifier
scope "<SID>"
identifier "DEBUG"
( "("
string_literal "'-=> BufDelete AutoCmd'"
, ","
integer_literal "10"
) ")"
call_statement
call "call"
call_expression
scoped_identifier
scope "<SID>"
identifier "AutoUpdate"
( "("
call_expression
identifier "expand"
( "("
string_literal "'<abuf>'"
) ")"
, ","
call_expression
identifier "bufnr"
( "("
string_literal "\"%\""
) ")"
) ")"
autocmd_statement (+24 nodes collapsed)
call_statement
call "call"
call_expression
scoped_identifier
scope "<SID>"
identifier "CleanModTrackingList"
( "("
call_expression
identifier "bufnr"
( "("
string_literal "\"%\""
) ")"
) ")"
autocmd_statement
autocmd "autocmd"
augroup_name "MiniBufExplorer"
au_event_list
au_event "BufEnter"
pattern "*"
call_statement
call "call"
call_expression
scoped_identifier
scope "<SID>"
identifier "DEBUG"
( "("
string_literal "'-=> BufEnter AutoCmd'"
, ","
integer_literal "10"
) ")"
call_statement
call "call"
call_expression
scoped_identifier
scope "<SID>"
identifier "AutoUpdate"
( "("
integer_literal "-1"
, ","
call_expression
identifier "bufnr"
( "("
string_literal "\"%\""
) ")"
) ")"
autocmd_statement
autocmd "autocmd"
augroup_name "MiniBufExplorer"
au_event_list
au_event "BufEnter"
pattern "*"
call_statement
call "call"
call_expression
scoped_identifier
scope "<SID>"
identifier "DEBUG"
( "("
string_literal "'-=> BufEnter Checking for Last window'"
, ","
integer_literal "10"
) ")"
call_statement
call "call"
call_expression
scoped_identifier
scope "<SID>"
identifier "CheckForLastWindow"
( "("
) ")"
autocmd_statement
autocmd "autocmd"
augroup_name "MiniBufExplorer"
au_event_list
au_event "BufWritePost"
pattern "*"
call_statement
call "call"
call_expression
scoped_identifier
scope "<SID>"
identifier "DEBUG"
( "("
string_literal "'-=> BufWritePost AutoCmd'"
, ","
integer_literal "10"
) ")"
call_statement
call "call"
call_expression
scoped_identifier
scope "<SID>"
identifier "AutoUpdate"
( "("
integer_literal "-1"
, ","
call_expression
identifier "bufnr"
( "("
string_literal "\"%\""
) ")"
) ")"
autocmd_statement
autocmd "autocmd"
augroup_name "MiniBufExplorer"
au_event_list
au_event "CursorHold"
pattern "*"
call_statement
call "call"
call_expression
scoped_identifier
scope "<SID>"
identifier "DEBUG"
( "("
string_literal "'-=> CursroHold AutoCmd'"
, ","
integer_literal "10"
) ")"
call_statement
call "call"
call_expression
scoped_identifier
scope "<SID>"
identifier "AutoUpdateCheck"
( "("
call_expression
identifier "bufnr"
( "("
string_literal "\"%\""
) ")"
) ")"
autocmd_statement
autocmd "autocmd"
augroup_name "MiniBufExplorer"
au_event_list
au_event "CursorHoldI"
pattern "*"
call_statement
call "call"
call_expression
scoped_identifier
scope "<SID>"
identifier "DEBUG"
( "("
string_literal "'-=> CursorHoldI AutoCmd'"
, ","
integer_literal "10"
) ")"
call_statement
call "call"
call_expression
scoped_identifier
scope "<SID>"
identifier "AutoUpdateCheck"
( "("
call_expression
identifier "bufnr"
( "("
string_literal "\"%\""
) ")"
) ")"
autocmd_statement
autocmd "autocmd"
augroup_name "MiniBufExplorer"
au_event_list
au_event "VimEnter"
pattern "*"
call_statement
call "call"
call_expression
scoped_identifier
scope "<SID>"
identifier "DEBUG"
( "("
string_literal "'-=> VimEnter AutoCmd'"
, ","
integer_literal "10"
) ")"
let_statement
let "let"
scoped_identifier
scope "g:"
identifier "miniBufExplorerAutoUpdate"
= "="
integer_literal "1"
call_statement
call "call"
call_expression
scoped_identifier
scope "<SID>"
identifier "AutoUpdate"
( "("
integer_literal "-1"
, ","
call_expression
identifier "bufnr"
( "("
string_literal "\"%\""
) ")"
) ")"
augroup_statement
augroup "augroup"
augroup_name "NONE"
comment "\" }}}"
comment "\" Functions"
comment "\""
comment "\" StartExplorer - Sets up our explorer and causes it to be d"...
comment "\""
function_definition (+759 nodes collapsed)
comment "\" }}}"
comment "\" StopExplorer - Looks for our explorer and closes the windo"...
comment "\""
function_definition (+159 nodes collapsed)
comment "\" }}}"
comment "\" ToggleExplorer - Looks for our explorer and opens/closes t"...
comment "\""
function_definition (+142 nodes collapsed)
comment "\" }}}"
comment "\" FindWindow - Return the window number of a named buffer {{"...
comment "\" If none is found then returns -1. "
comment "\""
function_definition (+118 nodes collapsed)
comment "\" }}}"
comment "\" FindCreateWindow - Attempts to find a window for a named b"...
comment "\""
comment "\" If it is found then moves there. Otherwise creates a new w"...
comment "\" configures it and moves there."
comment "\""
comment "\" forceEdge, -1 use defaults, 0 below, 1 above"
comment "\" isExplorer, 0 no, 1 yes "
comment "\" doDebug, 0 no, 1 yes"
comment "\""
function_definition (+520 nodes collapsed)
comment "\" }}}"
comment "\" DisplayBuffers - Wrapper for getting MBE window shown {{{"
comment "\""
comment "\" Makes sure we are in our explorer, then erases the current"...
comment "\" it into a mini buffer explorer window."
comment "\""
function_definition (+97 nodes collapsed)
comment "\" }}}"
comment "\" Resize Window - Set width/height of MBE window {{{"
comment "\" "
comment "\" Makes sure we are in our explorer, then sets the height/wi"...
comment "\" window so that we can fit all of our information without t"...
comment "\""
function_definition (+421 nodes collapsed)
comment "\" }}}"
comment "\" ShowBuffers - Clear current buffer and put the MBE text in"...
comment "\" "
comment "\" Makes sure we are in our explorer, then adds a list of all"...
comment "\" buffers to the current buffer. Special marks are added for"...
comment "\" are in one or more windows (*) and buffers that have been "...
comment "\""
function_definition (+158 nodes collapsed)
comment "\" }}}"
comment "\" Max - Returns the max of two numbers {{{"
comment "\""
function_definition (+41 nodes collapsed)
comment "\" }}}"
comment "\" CheckRootDirForDupes - Checks if the buffer parent dirs ar"...
comment "\" "
comment "\" Compares 2 buffers with the same filename and returns the "...
comment "\" buffer 1's path at the point where it is different from bu"...
comment "\""
function_definition (+265 nodes collapsed)
comment "\" }}}"
comment "\" IgnoreBuffer - check to see if buffer should be ignored {{"...
comment "\""
comment "\" Returns 0 if this buffer should be displayed in the list, "...
comment "\""
function_definition (+121 nodes collapsed)
comment "\" }}}"
comment "\" BuildBufferList - Build the text for the MBE window {{{"
comment "\" "
comment "\" Creates the buffer list string and returns 1 if it is diff"...
comment "\" last time this was called and 0 otherwise."
comment "\""
function_definition (+1343 nodes collapsed)
comment "\" }}}"
comment "\" NameCmp - compares tabs based on filename {{{"
comment "\""
function_definition (+81 nodes collapsed)
comment "\" }}}"
comment "\" MRUCmp - compares tabs based on MRU order {{{"
comment "\""
function_definition (+80 nodes collapsed)
comment "\" }}}"
comment "\" HasEligibleBuffers - Are there enough MBE eligible buffers"...
comment "\" "
comment "\" Returns 1 if there are any buffers that can be displayed i"...
comment "\" mini buffer explorer. Otherwise returns 0. If delBufNum is"
comment "\" any non -1 value then don't include that buffer in the lis"...
comment "\" of eligible buffers."
comment "\""
function_definition (+324 nodes collapsed)
comment "\" }}}"
comment "\" Auto Update Check - Function called by auto commands to se"...
comment "\" be updated {{{"
comment "\" If current buffer's modified flag has changed THEN"
comment "\" call the auto update function. ELSE"
comment "\" Don't do anything"
comment "\" This is implemented to save resources so that MBE does not"...
comment "\" on every keypress to check if the buffer has been modified"
let_statement
let "let"
scoped_identifier
scope "g:"
identifier "modTrackingList"
= "="
list
[ "["
] "]"
function_definition (+183 nodes collapsed)
comment "\" }}}"
comment "\" Clean Mod Tracking List - Function called when a buffer is"...
comment "\" list used to track modified buffers nice and small {{{"
comment "\" On buffer delete, loop through g:modTrackingList and delet"...
comment "\" matches this buffer's number"
function_definition (+87 nodes collapsed)
comment "\" }}}"
comment "\" Auto Update - Function called by auto commands for auto up"...
comment "\""
comment "\" IF auto update is turned on AND"
comment "\" we are in a real buffer AND"
comment "\" we have enough eligible buffers THEN"
comment "\" Update our explorer and get back to the current window"
comment "\""
comment "\" If we get a buffer number for a buffer that "
comment "\" is being deleted, we need to make sure and "
comment "\" remove the buffer from the list of eligible "
comment "\" buffers in case we are down to one eligible"
comment "\" buffer, in which case we will want to close"
comment "\" the MBE window."
comment "\""
function_definition (+656 nodes collapsed)
comment "\" }}}"
comment "\" GetSelectedBuffer - From the MBE window, return the bufnum"...
comment "\" "
comment "\" If we are in our explorer window then return the buffer nu"...
comment "\" for the buffer under the cursor."
comment "\""
function_definition (+119 nodes collapsed)
comment "\" }}}"
comment "\" MBESelectBuffer - From the MBE window, open buffer under t"...
comment "\" "
comment "\" If we are in our explorer, then we attempt to open the buf"...
comment "\" cursor in the previous window."
comment "\""
comment "\" Split indicates whether to open with split, 0 no split, 1 "...
comment "\""
function_definition (+463 nodes collapsed)
comment "\" }}}"
comment "\" MBEDeleteBuffer - From the MBE window, delete selected buf"...
comment "\" "
comment "\" After making sure that we are in our explorer, This will d"...
comment "\" under the cursor. If the buffer under the cursor is being "...
comment "\" window, this routine will attempt to get different buffers"...
comment "\" windows that will be affected so that windows don't get re"...
comment "\""
function_definition (+691 nodes collapsed)
comment "\" }}}"
comment "\" MBEClick - Handle mouse double click {{{"
comment "\""
function_definition (+33 nodes collapsed)
comment "\""
comment "\" MBEDoubleClick - Double click with the mouse."
comment "\""
function_definition (+33 nodes collapsed)
comment "\" }}}"
comment "\" CycleBuffer - Cycle Through Buffers {{{"
comment "\""
comment "\" Move to next or previous buffer in the current window. If "...
comment "\" are no more modifiable buffers then stay on the current bu"...
comment "\" can be called with no parameters in which case the buffers"...
comment "\" cycled forward. Otherwise a single argument is accepted, i"...
comment "\" it's 0 then the buffers are cycled backwards, otherwise th"...
comment "\" are cycled forward."
comment "\""
function_definition (+192 nodes collapsed)
comment "\" }}}"
comment "\" MRUPop - remove buffer from MRU list {{{"
comment "\""
function_definition (+30 nodes collapsed)
comment "\" }}}"
comment "\" MRUPush - add buffer to MRU list {{{"
comment "\""
function_definition (+58 nodes collapsed)
comment "\" }}}"
comment "\" DEBUG - Display debug output when debugging is turned on {"...
comment "\""
comment "\" Thanks to Charles E. Campbell, Jr. PhD <cec@NgrOyphSon.gPs"...
comment "\" for Decho.vim which was the inspiration for this enhanced "...
comment "\" capability."
comment "\""
function_definition (+439 nodes collapsed)
comment "\" }}}"
comment "\" CheckForLastWindow - Quit Vim if :q is excecuted when no f"...
function_definition (+39 nodes collapsed)
comment "\" }}}"
comment "\" MBE Script History {{{"
comment "\"==========================================================="...
comment "\""
comment "\" History: 6.4.3 o Fix MBE losing highlighting when a b"...
comment "\" Thanks to Markus Koller for the pull"...
comment "\" o Disable spellcheck on MBE buffer."
comment "\" o Don't use colorcolumn setting on MBE"...
comment "\" grassofhust for the pull requests fo"...
comment "\" previous issue!"
comment "\" 6.4.2 o Moving current build out of beta. Ge"...
comment "\" re-write!"
comment "\" 6.4.1b5 o Allow users to turn off Buffer numbe"...
comment "\" tabs courtesy of jmatraszek."
comment "\" o Allow users to turn off duplicate bu"...
comment "\" to speed up MBE buffer switching. We"...
comment "\" optimizing this feature so that it i"...
comment "\" many buffers open."
comment "\" o Set Shellslash fix for Windows users"...
comment "\" buffer name checking works properly."
comment "\" o Re-enable synatx highlighitng after "...
comment "\" courtesy of Sontek."
comment "\" o Fix erratic :q behavior when MBE is "...
comment "\" courtesy of Moopet."
comment "\" 6.4.1b4 o Finally figured out how to turn off "...
comment "\" matching for the MBE buffer, which s"...
comment "\" annoying graphical glitches. Thanks "...
comment "\" for the patch!"
comment "\" o Added a temporary fix for the issues"...
comment "\" FuzzyFinder thanks to toupeira."
comment "\" 6.4.1b2 o Fixed Dupe File Name checking functi"...
comment "\" errors and actually work properly!"
comment "\" 6.4.1b1 o Added handler function to only updat"...
comment "\" 6.4.0 o Added Emacs-like 'uniquify' feature "...
comment "\" show a parent directory when there a"...
comment "\" the same filename. Example: There ar"...
comment "\" is /ProjectA/Application/CSS/style.c"...
comment "\" /ProjectB/Applications/CSS/style.css"...
comment "\" would just display 'style.css' for b"...
comment "\" MBE crawls up the directory tree to "...
comment "\" differentiating parent directory for"...
comment "\" MBE will show 'ProjectA/style.css' a"...
comment "\" 'ProjectB/style.css' for each buffer"...
comment "\" o Now setting winfixheight and winfixw"...
comment "\" buffer so that it does not get resiz"...
comment "\" by window resizing commands such as "...
comment "\" 6.3.7 o MBE now uses it's own status line fo"...
comment "\" amount of visual clutter. This can b"...
comment "\" 6.3.6 o MBE now updates current buffer's sta"...
comment "\" and when a buffer is modified. Patch"...
comment "\" Holgado (fholgado at gmail dot com)."
comment "\" 6.3.5 o Added highlighting for currently act"...
comment "\" Patched by Federico Holgado (fholgad"...
comment "\" com)."
comment "\" 6.3.4 o Now returns to augroup NONE after se"...
comment "\" \t\t\t commands. Big thanks to Maciej Laszcz for "...
comment "\" \t\t\t report!"
comment "\" \t \t6.3.3 o Added additional keybindings. In additi"...
comment "\" \t\t \t<S-TAB>, l and h can now be used. In addit"...
comment "\" \t\t \tand e can now be used."
comment "\" \t\t o You can open the selected buffer in a n"...
comment "\" \t\t by pressing s while in the minibufexplo"...
comment "\" \t\t o You can open the selected buffer in a n"...
comment "\" \t\t split window while pressing v while in "...
comment "\" \t\t minibufexplorer window. Patched by Oliv"...
comment "\" \t \t6.3.2 o For some reason there was still a call "...
comment "\" with 2 params. Very old bug. I know "...
comment "\" any way many thanks to Jason Mills f"...
comment "\" 6.3.1 o Include folds in source so that it's"...
comment "\" navigate."
comment "\" o Added g:miniBufExplForceSyntaxEnable"...
comment "\" that want a :syntax enable to be cal"...
comment "\" buffers. This can resolve issues cau"...
comment "\" where buffers show up without highli"...
comment "\" buffer has been closed, quit, wiped "...
comment "\" 6.3.0 o Added an option to allow single clic"...
comment "\" the default double click) to select "...
comment "\" MBE window. This feature was request"...
comment "\" and was inspired by taglist.vim. Not"...
comment "\" need the latest version of taglist.v"...
comment "\" use MBE and taglist both with single"...
comment "\" Also thanks to AW Law for pointing o"...
comment "\" make an Explorer not be listed in a "...
comment "\" o Added the ability to have your tabs "...
comment "\" vertical window rather than the stan"...
comment "\" one. Just let g:miniBufExplVSplit = "...
comment "\" .vimrc and your will get this functi"...
comment "\" o If you use the vertical explorer and"...
comment "\" autosize then let g:miniBufExplMaxSi"...
comment "\" in your .vimrc. You may use the MinS"...
comment "\" addition to the MaxLetting if you do"...
comment "\" thin window."
comment "\" o g:miniBufExplMaxHeight was renamed g"...
comment "\" g:miniBufExplMinHeight was renamed g"...
comment "\" the old settings are backwards compa"...
comment "\" use the new settings, but they are d"...
comment "\" 6.2.8 o Add an option to stop MBE from targe"...
comment "\" buffers when switching buffers. Than"...
comment "\" the inspiration for this. This may n"...
comment "\" has lots of explorer/help windows op"...
comment "\" 6.2.7 o Very minor bug fix for people who wa"...
comment "\" loaded_minibufexplorer in their .vim"...
comment "\" stop MBE from loading. 99.99% of use"...
comment "\" this update."
comment "\" 6.2.6 o Moved history to end of source file"
comment "\" o Updated highlighting documentation"
comment "\" o Created global commands MBEbn and MB"...
comment "\" used in mappings if folks want to cy"...
comment "\" skipping non-eligible buffers."
comment "\" 6.2.5 o Added <Leader>mbt key mapping which "...
comment "\" the MBE window. I map this to F3 in "...
comment "\" with \"map <F3> :TMiniBufExplorer<CR>"...
comment "\" means I can easily close the MBE win"...
comment "\" not using it and get it back when I "...
comment "\" o Changed default debug mode to 3 (wri"...
comment "\" g:miniBufExplorerDebugOutput)"
comment "\" o Made a pass through the documentatio"...
comment "\" serveral issues and provide more com"...
comment "\" for mappings and commands."
comment "\" 6.2.4 o Because of the autocommand switch (s"...
comment "\" was possible to remove the restricti"...
comment "\" :set hidden option. It is now possib"...
comment "\" this option with MBE."
comment "\" 6.2.3 o Added miniBufExplTabWrap option. It "...
comment "\" off by default. When turned on space"...
comment "\" between tabs and gq} is issued to pe"...
comment "\" formatting. This won't work very wel"...
comment "\" contain spaces. It would be pretty e"...
comment "\" my own formatter, but I'm too lazy, "...
comment "\" really needs that feature I'll add i"...
comment "\" 6.2.2 o Changed the way the g:miniBufExplore"...
comment "\" global is handled. You can set this "...
comment "\" of eligible buffers you want to be l"...
comment "\" the MBE window is loaded. Setting it"...
comment "\" the MBE window to be opened even if "...
comment "\" buffers. Setting it to 4 causes the "...
comment "\" closed until the 4th eligible buffer"...
comment "\" o Added a MinHeight option. This is ni"...
comment "\" the MBE window to always take the sa"...
comment "\" space. For example set MaxSize and M"...
comment "\" and set MoreThanOne to 0 and you wil"...
comment "\" a 2 row (plus the ruler :) MBE windo"...
comment "\" NOTE: in 6.3.0 we started using MinS"...
comment "\" Minheight. This will still work if M"...
comment "\" specified, but it is depreciated. Us"...
comment "\" o I now setlocal foldcolumn=0 and nonu"...
comment "\" window. This is for those of you tha"...
comment "\" these options turned on locally. I'm"...
comment "\" outthere wants foldcolumns and line "...
comment "\" MBE window? :)"
comment "\" o Fixed a bug where an empty MBE windo"...
comment "\" of the screen (partly why the MinHei"...
comment "\" added.)"
comment "\" 6.2.1 o If MBE is the only window (because o"...
comment "\" and there are still eligible buffers"...
comment "\" will be displayed."
comment "\" o The <Leader>mbe mapping now highligh"...
comment "\" the current window."
comment "\" o The delete ('d') binding in the MBE "...
comment "\" the cursor position, which can help "...
comment "\" delete several buffers in a row that"...
comment "\" beginning of the buffer list."
comment "\" o Added a new key binding ('p') in the"...
comment "\" switch to the previous window (last "...
comment "\" 6.2.0 o Major overhaul of autocommand and li"...
comment "\" we now have much better handling of "...
comment "\" most requested feature.) As well as "...
comment "\" issues where the buffer list would n"...
comment "\" automatically. The old version tried"...
comment "\" events, this one just updates freque"...
comment "\" track and only changes the screen if"...
comment "\" a change."
comment "\" o Added g:miniBufExplMaxHeight variabl"...
comment "\" the -MiniBufExplorer- window small w"...
comment "\" of buffers (or buffers with long nam"...
comment "\" NOTE: in 6.3.0 we started using MaxS"...
comment "\" MaxHeight. This will still work if M"...
comment "\" specified, but it is depreciated. Us"...
comment "\" o Improvement to internal syntax highl"...
comment "\" I renamed the syntax group names. An"...
comment "\" figured out how to use them already "...
comment "\" any trouble with the new Nameing :)"
comment "\" o Added debug mode 3 which writes to a"...
comment "\" this is fast and doesn't mess with t"...
comment "\" lists."
comment "\" 6.1.0 o <Leader>mbc was failing because I wa"...
comment "\" my own functions with the wrong numb"...
comment "\" Thanks to Gerry Patterson for findin"...
comment "\" This code is very stable (although i"...
comment "\" idiocyncracies.)"
comment "\" 6.0.9 o Double clicking tabs was overwriting"...
comment "\" register on MS Windows. Thanks to S"...
comment "\" for reporting this issue."
comment "\" 6.0.8 o Apparently some VIM builds are havin"...
comment "\" line continuation in scripts so the "...
comment "\" have been removed."
comment "\" o Generalized FindExplorer and FindCre"...
comment "\" that they can be used for the debug "...
comment "\" to FindWindow and FindCreateWindow."
comment "\" o Updated debugging code so that debug"...
comment "\" a buffer which can then be written t"...
comment "\" to me when someone is having a major"...
comment "\" write directly to a file (VERY SLOWL"...
comment "\" (not 95 or 98 at the moment) or use "...
comment "\" to display the output to the screen."
comment "\" o Several people have had issues when "...
comment "\" is turned on. So I have put in sever"...
comment "\" sure folks know this if they try to "...
comment "\" option set."
comment "\" 6.0.7 o Handling BufDelete autocmd so that t"...
comment "\" properly when using :bd (rather than"...
comment "\" the MBE UI.)"
comment "\" o The AutoUpdate code will now close t"...
comment "\" there is a single eligible buffer av"...
comment "\" This has the usefull side effect of "...
comment "\" window from blocking the VIM session"...
comment "\" the last buffer."
comment "\" o Added functions, commands and maps t"...
comment "\" the MBE window (<leader>mbc and <lea"...
comment "\" o Made MBE open/close state be sticky "...
comment "\" StartExplorer(1) or StopExplorer(1),"...
comment "\" called from the standard mappings. S"...
comment "\" the mbe window with \\mbc it won't be"...
comment "\" opened again unless you do a \\mbe (o"...
comment "\" o Removed spaces between \"tabs\" (even "...
comment "\" o Simplified MBE tab processing "
comment "\" 6.0.6 o Fixed register overwrite bug found b"...
comment "\" 6.0.5 o Fixed an issue with window sizing wh"...
comment "\" buffers. "
comment "\" o Fixed some weird commenting bugs. "
comment "\" o Added more optional fancy window/buf"...
comment "\" o You can turn on the capability to us"...
comment "\" arrow keys to move between windows."
comment "\" o You can turn on the ability to use <"...
comment "\" <C-S-TAB> to open the next and previ"...
comment "\" buffer in the current window."
comment "\" o You can turn on the ability to use <"...
comment "\" <C-S-TAB> to switch windows (forward"...
comment "\" respectively.)"
comment "\" 6.0.4 o Added optional fancy window navigati"...
comment "\" o Holding down control and pressing a "...
comment "\" [hjkl] will switch windows in the in"...
comment "\" 6.0.3 o Changed buffer name to -MiniBufExplo"...
comment "\" Issue in filename pattern matching o"...
comment "\" 6.0.2 o 2 Changes requested by Suresh Govind"...
comment "\" o Added SplitToEdge option and set it "...
comment "\" o Added tab and shift-tab mappings in "...
comment "\" 6.0.1 o Added MoreThanOne option and set it "...
comment "\" MiniBufExplorer will not automatical"...
comment "\" more than one eligible buffers are o"...
comment "\" reduces cluter when you are only wor"...
comment "\" single file. "
comment "\" NOTE: See change log for 6.2.2 for m"...
comment "\" this feature"
comment "\" 6.0.0 o Initial Release on November 20, 2001"
comment "\""
comment "\"==========================================================="...
comment "\" }}}"
comment "\" vim:ft=vim:fdm=marker:ff=unix:nowrap:tabstop=4:shiftwidth="...

After

script_file
comment "\" Mini Buffer Explorer <minibufexpl.vim>"
comment "\""
comment "\" HINT: Type zR if you don't know how to use folds"
comment "\""
comment "\" Script Info and Documentation {{{"
comment "\"==========================================================="...
comment "\" Copyright: Copyright (C) 2002 & 2003 Bindu Wavell "
comment "\" Copyright (C) 2010 Oliver Uvman"
comment "\" Copyright (C) 2010 Danielle Church"
comment "\" Copyright (C) 2010 Stephan Sokolow"
comment "\" Copyright (C) 2010 & 2011 Federico Holgado"
comment "\" Permission is hereby granted to use and dis"...
comment "\" with or without modifications, provided tha"...
comment "\" notice is copied with it. Like anything els"...
comment "\" minibufexpl.vim is provided *as is* and com"...
comment "\" warranty of any kind, either expressed or i"...
comment "\" event will the copyright holder be liable f"...
comment "\" resulting from the use of this software."
comment "\" "
comment "\" Name Of File: minibufexpl.vim"
comment "\" Description: Mini Buffer Explorer Vim Plugin"
comment "\" Documentation: See minibufexpl.txt"
comment "\""
comment "\"==========================================================="...
comment "\" }}}"
comment "\""
comment "\" Startup Check"
comment "\""
comment "\" Has this plugin already been loaded? {{{"
comment "\""
if_statement
if "if"
call_expression
identifier "exists"
( "("
string_literal "'loaded_minibufexplorer'"
) ")"
body
unknown_builtin_statement
unknown_command_name "finish"
endif "endif"
let_statement
let "let"
identifier "loaded_minibufexplorer"
= "="
integer_literal "1"
comment "\" }}}"
comment "\" Mappings and Commands"
comment "\""
comment "\" MBE Keyboard Mappings {{{"
comment "\" If we don't already have keyboard mappings for MBE then cr"...
comment "\" "
if_statement (+22 nodes collapsed)
if_statement (+22 nodes collapsed)
if_statement (+22 nodes collapsed)
if_statement (+22 nodes collapsed)
if_statement (+22 nodes collapsed)
comment "\" }}}"
comment "\" MBE <Script> internal map {{{"
comment "\" "
map_statement
noremap "noremap"
<unique> "<unique>"
<script> "<script>"
map_side
keycode
< "<"
> ">"
map_side
keycode
< "<"
> ">"
keycode
< "<"
> ">"
keycode
< "<"
> ">"
map_statement
noremap "noremap"
<unique> "<unique>"
<script> "<script>"
map_side
keycode
< "<"
> ">"
map_side
keycode
< "<"
> ">"
keycode
< "<"
> ">"
keycode
< "<"
> ">"
map_statement
noremap "noremap"
<unique> "<unique>"
<script> "<script>"
map_side
keycode
< "<"
> ">"
map_side
keycode
< "<"
> ">"
keycode
< "<"
> ">"
keycode
< "<"
> ">"
map_statement
noremap "noremap"
<unique> "<unique>"
<script> "<script>"
map_side
keycode
< "<"
> ">"
map_side
keycode
< "<"
> ">"
keycode
< "<"
> ">"
keycode
< "<"
> ">"
map_statement
noremap "noremap"
<unique> "<unique>"
<script> "<script>"
map_side
keycode
< "<"
> ">"
map_side
keycode
< "<"
> ">"
keycode
< "<"
> ">"
keycode
< "<"
> ">"
comment "\" }}}"
comment "\" MBE commands {{{"
comment "\" "
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "':MiniBufExplorer'"
) ")"
body
command_statement
command "command"
bang
! "!"
command_name "MiniBufExplorer"
command " call <SID>StartExplorer(1, -1, bufnr(\"%\"))"
endif "endif"
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "':CMiniBufExplorer'"
) ")"
body
command_statement
command "command"
bang
! "!"
command_name "CMiniBufExplorer"
command " call <SID>StopExplorer(1)"
endif "endif"
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "':UMiniBufExplorer'"
) ")"
body
command_statement
command "command"
bang
! "!"
command_name "UMiniBufExplorer"
command " call <SID>AutoUpdate(-1,bufnr(\"%\"))"
endif "endif"
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "':TMiniBufExplorer'"
) ")"
body
command_statement
command "command"
bang
! "!"
command_name "TMiniBufExplorer"
command " call <SID>ToggleExplorer()"
endif "endif"
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "':MBEbn'"
) ")"
body
command_statement
command "command"
bang
! "!"
command_name "MBEbn"
command " call <SID>CycleBuffer(1)"
endif "endif"
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "':MBEbp'"
) ")"
body
command_statement
command "command"
bang
! "!"
command_name "MBEbp"
command " call <SID>CycleBuffer(0)"
endif "endif"
comment "\" }}}"
comment "\" Global Configuration Variables"
comment "\""
comment "\" Debug Level {{{"
comment "\""
comment "\" 0 = no logging"
comment "\" 1=5 = errors ; 1 is the most important"
comment "\" 5-9 = info ; 5 is the most important"
comment "\" 10 = Entry/Exit"
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "'g:miniBufExplorerDebugLevel'"
) ")"
body
let_statement
let "let"
scoped_identifier
scope "g:"
identifier "miniBufExplorerDebugLevel"
= "="
integer_literal "1"
endif "endif"
comment "\" }}}"
comment "\" Debug Mode {{{"
comment "\""
comment "\" 0 = debug to a window"
comment "\" 1 = use vim's echo facility"
comment "\" 2 = write to a file named MiniBufExplorer.DBG"
comment "\" in the directory where vim was started"
comment "\" THIS IS VERY SLOW"
comment "\" 3 = Write into g:miniBufExplorerDebugOutput"
comment "\" global variable [This is the default]"
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "'g:miniBufExplorerDebugMode'"
) ")"
body
let_statement
let "let"
scoped_identifier
scope "g:"
identifier "miniBufExplorerDebugMode"
= "="
integer_literal "3"
endif "endif"
comment "\" }}}"
comment "\" Allow auto update? {{{"
comment "\""
comment "\" We start out with this off for startup, but once vim is ru"...
comment "\" turn this on."
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "'g:miniBufExplorerAutoUpdate'"
) ")"
body
let_statement
let "let"
scoped_identifier
scope "g:"
identifier "miniBufExplorerAutoUpdate"
= "="
integer_literal "0"
endif "endif"
comment "\" }}}"
comment "\" MoreThanOne? {{{"
comment "\" Display Mini Buf Explorer when there are 'More Than One' e"...
comment "\""
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "'g:miniBufExplorerMoreThanOne'"
) ")"
body
let_statement
let "let"
scoped_identifier
scope "g:"
identifier "miniBufExplorerMoreThanOne"
= "="
integer_literal "2"
endif "endif"
comment "\" }}}"
comment "\" Split below/above/left/right? {{{"
comment "\" When opening a new -MiniBufExplorer- window, split the new"...
comment "\" above the current window? 1 = below, 0 = above."
comment "\""
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "'g:miniBufExplSplitBelow'"
) ")"
body
let_statement
let "let"
scoped_identifier
scope "g:"
identifier "miniBufExplSplitBelow"
= "="
option
& "&"
option_name "splitbelow"
endif "endif"
comment "\" }}}"
comment "\" Split to edge? {{{"
comment "\" When opening a new -MiniBufExplorer- window, split the new"...
comment "\" full edge? 1 = yes, 0 = no."
comment "\""
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "'g:miniBufExplSplitToEdge'"
) ")"
body
let_statement
let "let"
scoped_identifier
scope "g:"
identifier "miniBufExplSplitToEdge"
= "="
integer_literal "1"
endif "endif"
comment "\" }}}"
comment "\" MaxHeight (depreciated) {{{"
comment "\" When sizing the -MiniBufExplorer- window, assign a maximum"...
comment "\" 0 = size to fit all buffers, otherwise the value is number"...
comment "\" buffer. [Depreciated use g:miniBufExplMaxSize]"
comment "\""
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "'g:miniBufExplMaxHeight'"
) ")"
body
let_statement
let "let"
scoped_identifier
scope "g:"
identifier "miniBufExplMaxHeight"
= "="
integer_literal "0"
endif "endif"
comment "\" }}}"
comment "\" MaxSize {{{"
comment "\" Same as MaxHeight but also works for vertical splits if sp"...
comment "\" vertical split then vertical resizing will be performed. I"...
comment "\" then the number of columns in g:miniBufExplVSplit will be "...
comment "\" static window width."
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "'g:miniBufExplMaxSize'"
) ")"
body
let_statement
let "let"
scoped_identifier
scope "g:"
identifier "miniBufExplMaxSize"
= "="
scoped_identifier
scope "g:"
identifier "miniBufExplMaxHeight"
endif "endif"
comment "\" }}}"
comment "\" MinHeight (depreciated) {{{"
comment "\" When sizing the -MiniBufExplorer- window, assign a minumum"...
comment "\" the value is minimum number of lines for buffer. Setting t"...
comment "\" cause strange height behavior. The default value is 1 [Dep"...
comment "\" g:miniBufExplMinSize]"
comment "\""
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "'g:miniBufExplMinHeight'"
) ")"
body
let_statement
let "let"
scoped_identifier
scope "g:"
identifier "miniBufExplMinHeight"
= "="
integer_literal "1"
endif "endif"
comment "\" }}}"
comment "\" MinSize {{{"
comment "\" Same as MinHeight but also works for vertical splits. For "...
comment "\" this is ignored unless g:miniBufExplMax(Size|Height) are s"...
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "'g:miniBufExplMinSize'"
) ")"
body
let_statement
let "let"
scoped_identifier
scope "g:"
identifier "miniBufExplMinSize"
= "="
scoped_identifier
scope "g:"
identifier "miniBufExplMinHeight"
endif "endif"
comment "\" }}}"
comment "\" Horizontal or Vertical explorer? {{{"
comment "\" For folks that like vertical explorers, I'm caving in and "...
comment "\" veritcal splits. If this is set to 0 then the current hori"...
comment "\" splitting logic will be run. If however you want a vertica"...
comment "\" assign the width (in characters) you wish to assign to the"...
comment "\""
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "'g:miniBufExplVSplit'"
) ")"
body
let_statement
let "let"
scoped_identifier
scope "g:"
identifier "miniBufExplVSplit"
= "="
integer_literal "0"
endif "endif"
comment "\" }}}"
comment "\" TabWrap? {{{"
comment "\" By default line wrap is used (possibly breaking a tab name"...
comment "\" lines.) Turning this option on (setting it to 1) can take "...
comment "\" space, but will make sure that each tab is on one and only"...
comment "\""
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "'g:miniBufExplTabWrap'"
) ")"
body
let_statement
let "let"
scoped_identifier
scope "g:"
identifier "miniBufExplTabWrap"
= "="
integer_literal "0"
endif "endif"
comment "\" }}}"
comment "\" ShowBufNumber? {{{"
comment "\" By default buffers' numbers are shown in MiniBufExplorer. "...
comment "\" by setting this option to 0."
comment "\""
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "'g:miniBufExplShowBufNumbers'"
) ")"
body
let_statement
let "let"
scoped_identifier
scope "g:"
identifier "miniBufExplShowBufNumbers"
= "="
integer_literal "1"
endif "endif"
comment "\" }}}"
comment "\" Extended window navigation commands? {{{"
comment "\" Global flag to turn extended window navigation commands on"...
comment "\" enabled = 1, dissabled = 0"
comment "\""
if_statement (+21 nodes collapsed)
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "'g:miniBufExplMapWindowNavVim'"
) ")"
body
let_statement
let "let"
scoped_identifier
scope "g:"
identifier "miniBufExplMapWindowNavVim"
= "="
integer_literal "0"
endif "endif"
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "'g:miniBufExplMapWindowNavArrows'"
) ")"
body
let_statement
let "let"
scoped_identifier
scope "g:"
identifier "miniBufExplMapWindowNavArrows"
= "="
integer_literal "0"
endif "endif"
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "'g:miniBufExplMapCTabSwitchBufs'"
) ")"
body
let_statement
let "let"
scoped_identifier
scope "g:"
identifier "miniBufExplMapCTabSwitchBufs"
= "="
integer_literal "0"
endif "endif"
comment "\" Notice: that if CTabSwitchBufs is turned on then"
comment "\" we turn off CTabSwitchWindows."
if_statement (+26 nodes collapsed)
comment "\""
comment "\" If we have enabled control + vim direction key remapping"
comment "\" then perform the remapping"
comment "\""
comment "\" Notice: I left g:miniBufExplMapWindowNav in for backward"
comment "\" compatibility. Eventually this mapping will be removed so"
comment "\" please use the newer g:miniBufExplMapWindowNavVim setting."
if_statement (+52 nodes collapsed)
comment "\""
comment "\" If we have enabled control + arrow key remapping"
comment "\" then perform the remapping"
comment "\""
if_statement (+47 nodes collapsed)
comment "\" If we have enabled <C-TAB> and <C-S-TAB> to switch buffers"
comment "\" in the current window then perform the remapping"
comment "\""
if_statement (+39 nodes collapsed)
comment "\""
comment "\" If we have enabled <C-TAB> and <C-S-TAB> to switch windows"
comment "\" then perform the remapping"
comment "\""
if_statement (+27 nodes collapsed)
comment "\" }}}"
comment "\" Modifiable Select Target {{{"
comment "\""
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "'g:miniBufExplModSelTarget'"
) ")"
body
let_statement
let "let"
scoped_identifier
scope "g:"
identifier "miniBufExplModSelTarget"
= "="
integer_literal "0"
endif "endif"
comment "\"}}}"
comment "\" Force Syntax Enable {{{"
comment "\""
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "'g:miniBufExplForceSyntaxEnable'"
) ")"
body
let_statement
let "let"
scoped_identifier
scope "g:"
identifier "miniBufExplForceSyntaxEnable"
= "="
integer_literal "0"
endif "endif"
comment "\" }}}"
comment "\" Single/Double Click? {{{"
comment "\" flag that can be set to 1 in a users .vimrc to allow "
comment "\" single click switching of tabs. By default we use"
comment "\" double click for tab selection."
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "'g:miniBufExplUseSingleClick'"
) ")"
body
let_statement
let "let"
scoped_identifier
scope "g:"
identifier "miniBufExplUseSingleClick"
= "="
integer_literal "0"
endif "endif"
comment "\""
comment "\" attempt to perform single click mapping, it would be much"
comment "\" nicer if we could nnoremap <buffer> ... however vim does"
comment "\" not fire the <buffer> <leftmouse> when you use the mouse"
comment "\" to enter a buffer."
comment "\""
if_statement (+115 nodes collapsed)
comment "\" }}}"
comment "\" Close on Select? {{{"
comment "\" Flag that can be set to 1 in a users .vimrc to hide"
comment "\" the explorer when a user selects a buffer."
comment "\""
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "'g:miniBufExplCloseOnSelect'"
) ")"
body
let_statement
let "let"
scoped_identifier
scope "g:"
identifier "miniBufExplCloseOnSelect"
= "="
integer_literal "0"
endif "endif"
comment "\" }}}"
comment "\" Check for duplicate buffer names? {{{"
comment "\" Flag that can be set to 0 in a users .vimrc to turn off"
comment "\" the explorer's feature that differentiates similar buffer "...
comment "\" displaying the parent directory names. This feature should"...
comment "\" if you work with a large number of buffers (>15) simultane"...
comment "\""
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "'g:miniBufExplCheckDupeBufs'"
) ")"
body
let_statement
let "let"
scoped_identifier
scope "g:"
identifier "miniBufExplCheckDupeBufs"
= "="
integer_literal "1"
endif "endif"
comment "\" }}}"
comment "\" Variables used internally"
comment "\""
comment "\" Script/Global variables {{{"
comment "\" Global used to store the buffer list so we don't update th"...
comment "\" UI unless the list has changed."
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "'g:miniBufExplBufList'"
) ")"
body
let_statement
let "let"
scoped_identifier
scope "g:"
identifier "miniBufExplBufList"
= "="
string_literal "''"
endif "endif"
comment "\" Variable used as a mutex so that we don't do lots"
comment "\" of AutoUpdates at the same time."
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "'g:miniBufExplInAutoUpdate'"
) ")"
body
let_statement
let "let"
scoped_identifier
scope "g:"
identifier "miniBufExplInAutoUpdate"
= "="
integer_literal "0"
endif "endif"
comment "\" In debug mode 3 this variable will hold the debug output"
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "'g:miniBufExplorerDebugOutput'"
) ")"
body
let_statement
let "let"
scoped_identifier
scope "g:"
identifier "miniBufExplorerDebugOutput"
= "="
string_literal "''"
endif "endif"
comment "\" In debug mode 3 this variable will hold the debug output"
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "'g:miniBufExplForceDisplay'"
) ")"
body
let_statement
let "let"
scoped_identifier
scope "g:"
identifier "miniBufExplForceDisplay"
= "="
integer_literal "0"
endif "endif"
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "'g:miniBufExplSortBy'"
) ")"
body
let_statement
let "let"
scoped_identifier
scope "g:"
identifier "miniBufExplSortBy"
= "="
string_literal "\"number\""
endif "endif"
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "'g:statusLineText'"
) ")"
body
let_statement
let "let"
scoped_identifier
scope "g:"
identifier "statusLineText"
= "="
string_literal "\"-MiniBufExplorer-\""
endif "endif"
comment "\" Variable used to pass maxTabWidth info between functions"
let_statement
let "let"
scoped_identifier
scope "s:"
identifier "maxTabWidth"
= "="
integer_literal "0"
comment "\" Variable used to count debug output lines"
let_statement
let "let"
scoped_identifier
scope "s:"
identifier "debugIndex"
= "="
integer_literal "0"
comment "\" Build initial MRUList. This makes sure all the files speci"...
comment "\" command line are picked up correctly."
let_statement
let "let"
scoped_identifier
scope "s:"
identifier "MRUList"
= "="
call_expression
identifier "range"
( "("
integer_literal "1"
, ","
call_expression
identifier "bufnr"
( "("
string_literal "'$'"
) ")"
) ")"
comment "\" }}}"
comment "\" Setup an autocommand group and some autocommands {{{"
comment "\" that keep our explorer updated automatically."
comment "\""
comment "\"set update time for the CursorHold function so that it is c"...
comment "\"a key is pressed"
setlocal_statement
setlocal "setlocal"
set_item
option_name "updatetime"
= "="
set_value "300"
augroup_statement
augroup "augroup"
augroup_name "MiniBufExplorer"
autocmd_statement
autocmd "autocmd"
augroup_name "MiniBufExplorer"
au_event_list
au_event "BufDelete"
pattern "*"
call_statement
call "call"
call_expression
scoped_identifier
scope "<SID>"
identifier "DEBUG"
( "("
string_literal "'-=> BufDelete AutoCmd'"
, ","
integer_literal "10"
) ")"
call_statement
call "call"
call_expression
scoped_identifier
scope "<SID>"
identifier "AutoUpdate"
( "("
call_expression
identifier "expand"
( "("
string_literal "'<abuf>'"
) ")"
, ","
call_expression
identifier "bufnr"
( "("
string_literal "\"%\""
) ")"
) ")"
autocmd_statement (+24 nodes collapsed)
call_statement
call "call"
call_expression
scoped_identifier
scope "<SID>"
identifier "CleanModTrackingList"
( "("
call_expression
identifier "bufnr"
( "("
string_literal "\"%\""
) ")"
) ")"
autocmd_statement
autocmd "autocmd"
augroup_name "MiniBufExplorer"
au_event_list
au_event "BufEnter"
pattern "*"
call_statement
call "call"
call_expression
scoped_identifier
scope "<SID>"
identifier "DEBUG"
( "("
string_literal "'-=> BufEnter AutoCmd'"
, ","
integer_literal "10"
) ")"
call_statement
call "call"
call_expression
scoped_identifier
scope "<SID>"
identifier "AutoUpdate"
( "("
integer_literal "-1"
, ","
call_expression
identifier "bufnr"
( "("
string_literal "\"%\""
) ")"
) ")"
autocmd_statement
autocmd "autocmd"
augroup_name "MiniBufExplorer"
au_event_list
au_event "BufEnter"
pattern "*"
call_statement
call "call"
call_expression
scoped_identifier
scope "<SID>"
identifier "DEBUG"
( "("
string_literal "'-=> BufEnter Checking for Last window'"
, ","
integer_literal "10"
) ")"
call_statement
call "call"
call_expression
scoped_identifier
scope "<SID>"
identifier "CheckForLastWindow"
( "("
) ")"
autocmd_statement
autocmd "autocmd"
augroup_name "MiniBufExplorer"
au_event_list
au_event "BufWritePost"
pattern "*"
call_statement
call "call"
call_expression
scoped_identifier
scope "<SID>"
identifier "DEBUG"
( "("
string_literal "'-=> BufWritePost AutoCmd'"
, ","
integer_literal "10"
) ")"
call_statement
call "call"
call_expression
scoped_identifier
scope "<SID>"
identifier "AutoUpdate"
( "("
integer_literal "-1"
, ","
call_expression
identifier "bufnr"
( "("
string_literal "\"%\""
) ")"
) ")"
autocmd_statement
autocmd "autocmd"
augroup_name "MiniBufExplorer"
au_event_list
au_event "CursorHold"
pattern "*"
call_statement
call "call"
call_expression
scoped_identifier
scope "<SID>"
identifier "DEBUG"
( "("
string_literal "'-=> CursroHold AutoCmd'"
, ","
integer_literal "10"
) ")"
call_statement
call "call"
call_expression
scoped_identifier
scope "<SID>"
identifier "AutoUpdateCheck"
( "("
call_expression
identifier "bufnr"
( "("
string_literal "\"%\""
) ")"
) ")"
autocmd_statement
autocmd "autocmd"
augroup_name "MiniBufExplorer"
au_event_list
au_event "CursorHoldI"
pattern "*"
call_statement
call "call"
call_expression
scoped_identifier
scope "<SID>"
identifier "DEBUG"
( "("
string_literal "'-=> CursorHoldI AutoCmd'"
, ","
integer_literal "10"
) ")"
call_statement
call "call"
call_expression
scoped_identifier
scope "<SID>"
identifier "AutoUpdateCheck"
( "("
call_expression
identifier "bufnr"
( "("
string_literal "\"%\""
) ")"
) ")"
autocmd_statement
autocmd "autocmd"
augroup_name "MiniBufExplorer"
au_event_list
au_event "VimEnter"
pattern "*"
call_statement
call "call"
call_expression
scoped_identifier
scope "<SID>"
identifier "DEBUG"
( "("
string_literal "'-=> VimEnter AutoCmd'"
, ","
integer_literal "10"
) ")"
let_statement
let "let"
scoped_identifier
scope "g:"
identifier "miniBufExplorerAutoUpdate"
= "="
integer_literal "1"
call_statement
call "call"
call_expression
scoped_identifier
scope "<SID>"
identifier "AutoUpdate"
( "("
integer_literal "-1"
, ","
call_expression
identifier "bufnr"
( "("
string_literal "\"%\""
) ")"
) ")"
augroup_statement
augroup "augroup"
augroup_name "NONE"
comment "\" }}}"
comment "\" Functions"
comment "\""
comment "\" StartExplorer - Sets up our explorer and causes it to be d"...
comment "\""
function_definition (+759 nodes collapsed)
comment "\" }}}"
comment "\" StopExplorer - Looks for our explorer and closes the windo"...
comment "\""
function_definition (+159 nodes collapsed)
comment "\" }}}"
comment "\" ToggleExplorer - Looks for our explorer and opens/closes t"...
comment "\""
function_definition (+142 nodes collapsed)
comment "\" }}}"
comment "\" FindWindow - Return the window number of a named buffer {{"...
comment "\" If none is found then returns -1. "
comment "\""
function_definition (+118 nodes collapsed)
comment "\" }}}"
comment "\" FindCreateWindow - Attempts to find a window for a named b"...
comment "\""
comment "\" If it is found then moves there. Otherwise creates a new w"...
comment "\" configures it and moves there."
comment "\""
comment "\" forceEdge, -1 use defaults, 0 below, 1 above"
comment "\" isExplorer, 0 no, 1 yes "
comment "\" doDebug, 0 no, 1 yes"
comment "\""
function_definition (+520 nodes collapsed)
comment "\" }}}"
comment "\" DisplayBuffers - Wrapper for getting MBE window shown {{{"
comment "\""
comment "\" Makes sure we are in our explorer, then erases the current"...
comment "\" it into a mini buffer explorer window."
comment "\""
function_definition (+97 nodes collapsed)
comment "\" }}}"
comment "\" Resize Window - Set width/height of MBE window {{{"
comment "\" "
comment "\" Makes sure we are in our explorer, then sets the height/wi"...
comment "\" window so that we can fit all of our information without t"...
comment "\""
function_definition (+421 nodes collapsed)
comment "\" }}}"
comment "\" ShowBuffers - Clear current buffer and put the MBE text in"...
comment "\" "
comment "\" Makes sure we are in our explorer, then adds a list of all"...
comment "\" buffers to the current buffer. Special marks are added for"...
comment "\" are in one or more windows (*) and buffers that have been "...
comment "\""
function_definition (+158 nodes collapsed)
comment "\" }}}"
comment "\" Max - Returns the max of two numbers {{{"
comment "\""
function_definition (+41 nodes collapsed)
comment "\" }}}"
comment "\" CheckRootDirForDupes - Checks if the buffer parent dirs ar"...
comment "\" "
comment "\" Compares 2 buffers with the same filename and returns the "...
comment "\" buffer 1's path at the point where it is different from bu"...
comment "\""
function_definition (+265 nodes collapsed)
comment "\" }}}"
comment "\" IgnoreBuffer - check to see if buffer should be ignored {{"...
comment "\""
comment "\" Returns 0 if this buffer should be displayed in the list, "...
comment "\""
function_definition (+121 nodes collapsed)
comment "\" }}}"
comment "\" BuildBufferList - Build the text for the MBE window {{{"
comment "\" "
comment "\" Creates the buffer list string and returns 1 if it is diff"...
comment "\" last time this was called and 0 otherwise."
comment "\""
function_definition (+1343 nodes collapsed)
comment "\" }}}"
comment "\" NameCmp - compares tabs based on filename {{{"
comment "\""
function_definition (+81 nodes collapsed)
comment "\" }}}"
comment "\" MRUCmp - compares tabs based on MRU order {{{"
comment "\""
function_definition (+80 nodes collapsed)
comment "\" }}}"
comment "\" HasEligibleBuffers - Are there enough MBE eligible buffers"...
comment "\" "
comment "\" Returns 1 if there are any buffers that can be displayed i"...
comment "\" mini buffer explorer. Otherwise returns 0. If delBufNum is"
comment "\" any non -1 value then don't include that buffer in the lis"...
comment "\" of eligible buffers."
comment "\""
function_definition (+324 nodes collapsed)
comment "\" }}}"
comment "\" Auto Update Check - Function called by auto commands to se"...
comment "\" be updated {{{"
comment "\" If current buffer's modified flag has changed THEN"
comment "\" call the auto update function. ELSE"
comment "\" Don't do anything"
comment "\" This is implemented to save resources so that MBE does not"...
comment "\" on every keypress to check if the buffer has been modified"
let_statement
let "let"
scoped_identifier
scope "g:"
identifier "modTrackingList"
= "="
list
[ "["
] "]"
function_definition (+183 nodes collapsed)
comment "\" }}}"
comment "\" Clean Mod Tracking List - Function called when a buffer is"...
comment "\" list used to track modified buffers nice and small {{{"
comment "\" On buffer delete, loop through g:modTrackingList and delet"...
comment "\" matches this buffer's number"
function_definition (+87 nodes collapsed)
comment "\" }}}"
comment "\" Auto Update - Function called by auto commands for auto up"...
comment "\""
comment "\" IF auto update is turned on AND"
comment "\" we are in a real buffer AND"
comment "\" we have enough eligible buffers THEN"
comment "\" Update our explorer and get back to the current window"
comment "\""
comment "\" If we get a buffer number for a buffer that "
comment "\" is being deleted, we need to make sure and "
comment "\" remove the buffer from the list of eligible "
comment "\" buffers in case we are down to one eligible"
comment "\" buffer, in which case we will want to close"
comment "\" the MBE window."
comment "\""
function_definition (+656 nodes collapsed)
comment "\" }}}"
comment "\" GetSelectedBuffer - From the MBE window, return the bufnum"...
comment "\" "
comment "\" If we are in our explorer window then return the buffer nu"...
comment "\" for the buffer under the cursor."
comment "\""
function_definition (+119 nodes collapsed)
comment "\" }}}"
comment "\" MBESelectBuffer - From the MBE window, open buffer under t"...
comment "\" "
comment "\" If we are in our explorer, then we attempt to open the buf"...
comment "\" cursor in the previous window."
comment "\""
comment "\" Split indicates whether to open with split, 0 no split, 1 "...
comment "\""
function_definition (+463 nodes collapsed)
comment "\" }}}"
comment "\" MBEDeleteBuffer - From the MBE window, delete selected buf"...
comment "\" "
comment "\" After making sure that we are in our explorer, This will d"...
comment "\" under the cursor. If the buffer under the cursor is being "...
comment "\" window, this routine will attempt to get different buffers"...
comment "\" windows that will be affected so that windows don't get re"...
comment "\""
function_definition (+691 nodes collapsed)
comment "\" }}}"
comment "\" MBEClick - Handle mouse double click {{{"
comment "\""
function_definition (+33 nodes collapsed)
comment "\""
comment "\" MBEDoubleClick - Double click with the mouse."
comment "\""
function_definition (+33 nodes collapsed)
comment "\" }}}"
comment "\" CycleBuffer - Cycle Through Buffers {{{"
comment "\""
comment "\" Move to next or previous buffer in the current window. If "...
comment "\" are no more modifiable buffers then stay on the current bu"...
comment "\" can be called with no parameters in which case the buffers"...
comment "\" cycled forward. Otherwise a single argument is accepted, i"...
comment "\" it's 0 then the buffers are cycled backwards, otherwise th"...
comment "\" are cycled forward."
comment "\""
function_definition (+192 nodes collapsed)
comment "\" }}}"
comment "\" MRUPop - remove buffer from MRU list {{{"
comment "\""
function_definition (+30 nodes collapsed)
comment "\" }}}"
comment "\" MRUPush - add buffer to MRU list {{{"
comment "\""
function_definition (+58 nodes collapsed)
comment "\" }}}"
comment "\" DEBUG - Display debug output when debugging is turned on {"...
comment "\""
comment "\" Thanks to Charles E. Campbell, Jr. PhD <cec@NgrOyphSon.gPs"...
comment "\" for Decho.vim which was the inspiration for this enhanced "...
comment "\" capability."
comment "\""
function_definition (+439 nodes collapsed)
comment "\" }}}"
comment "\" CheckForLastWindow - Quit Vim if :q is excecuted when no f"...
function_definition (+39 nodes collapsed)
comment "\" }}}"
comment "\" vim:ft=vim:fdm=marker:ff=unix:nowrap:tabstop=4:shiftwidth="...