mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-27 03:05:39 +01:00
add setup resources
This commit is contained in:
parent
4cb266b7b5
commit
da8114758e
18 changed files with 12796 additions and 0 deletions
513
resources/.vim/doc/bufexplorer.txt
Normal file
513
resources/.vim/doc/bufexplorer.txt
Normal file
|
|
@ -0,0 +1,513 @@
|
|||
*bufexplorer.txt* Buffer Explorer Last Change: 22 Oct 2010
|
||||
|
||||
Buffer Explorer *buffer-explorer* *bufexplorer*
|
||||
Version 7.2.8
|
||||
|
||||
Plugin for easily exploring (or browsing) Vim |:buffers|.
|
||||
|
||||
|bufexplorer-installation| Installation
|
||||
|bufexplorer-usage| Usage
|
||||
|bufexplorer-windowlayout| Window Layout
|
||||
|bufexplorer-customization| Customization
|
||||
|bufexplorer-changelog| Change Log
|
||||
|bufexplorer-todo| Todo
|
||||
|bufexplorer-credits| Credits
|
||||
|
||||
For Vim version 7.0 and above.
|
||||
This plugin is only available if 'compatible' is not set.
|
||||
|
||||
{Vi does not have any of this}
|
||||
|
||||
==============================================================================
|
||||
INSTALLATION *bufexplorer-installation*
|
||||
|
||||
To install:
|
||||
- Download the bufexplorer.zip.
|
||||
- Extract the zip archive into your runtime directory.
|
||||
The archive contains plugin/bufexplorer.vim, and doc/bufexplorer.txt.
|
||||
- Start Vim or goto an existing instance of Vim.
|
||||
- Execute the following command:
|
||||
>
|
||||
:helptag <your runtime directory>/doc
|
||||
<
|
||||
This will generate all the help tags for any file located in the doc
|
||||
directory.
|
||||
|
||||
==============================================================================
|
||||
USAGE *bufexplorer-usage*
|
||||
|
||||
To start exploring in the current window, use: >
|
||||
\be or :BufExplorer
|
||||
To start exploring in a newly split horizontal window, use: >
|
||||
\bs or :BufExplorerHorizontalSplit
|
||||
To start exploring in a newly split vertical window, use: >
|
||||
\bv or :BufExplorerVerticalSplit
|
||||
|
||||
If you would like to use something other than '\', you may simply change the
|
||||
leader (see |mapleader|).
|
||||
|
||||
Note: If the current buffer is modified when bufexplorer started, the current
|
||||
window is always split and the new bufexplorer is displayed in that new
|
||||
window.
|
||||
|
||||
Commands to use once exploring:
|
||||
|
||||
<F1> Toggle help information.
|
||||
<enter> Opens the buffer that is under the cursor into the current
|
||||
window.
|
||||
<leftmouse> Opens the buffer that is under the cursor into the current
|
||||
window.
|
||||
<shift-enter> Opens the buffer that is under the cursor in another tab.
|
||||
d |:delete|the buffer under the cursor from the list. The
|
||||
buffer's 'buflisted' is cleared. This allows for the buffer to
|
||||
be displayed again using the 'show unlisted' command.
|
||||
R Toggles relative path/absolute path.
|
||||
T Toggles to show only buffers for this tab or not.
|
||||
D |:wipeout|the buffer under the cursor from the list. When a
|
||||
buffers is wiped, it will not be shown when unlisted buffer are
|
||||
displayed.
|
||||
f Toggles whether you are taken to the active window when
|
||||
selecting a buffer or not.
|
||||
o Opens the buffer that is under the cursor into the current
|
||||
window.
|
||||
p Toggles the showing of a split filename/pathname.
|
||||
q Quit exploring.
|
||||
r Reverses the order the buffers are listed in.
|
||||
s Selects the order the buffers are listed in. Either by buffer
|
||||
number, file name, file extension, most recently used (MRU), or
|
||||
full path.
|
||||
t Opens the buffer that is under the cursor in another tab.
|
||||
u Toggles the showing of "unlisted" buffers.
|
||||
|
||||
Once invoked, Buffer Explorer displays a sorted list (MRU is the default
|
||||
sort method) of all the buffers that are currently opened. You are then
|
||||
able to move the cursor to the line containing the buffer's name you are
|
||||
wanting to act upon. Once you have selected the buffer you would like,
|
||||
you can then either open it, close it(delete), resort the list, reverse
|
||||
the sort, quit exploring and so on...
|
||||
|
||||
===============================================================================
|
||||
WINDOW LAYOUT *bufexplorer-windowlayout*
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
" Press <F1> for Help
|
||||
" Sorted by mru | Locate buffer | Absolute Split path
|
||||
"=
|
||||
01 %a bufexplorer.txt C:\Vim\vimfiles\doc line 87
|
||||
02 # bufexplorer.vim c:\Vim\vimfiles\plugin line 1
|
||||
-------------------------------------------------------------------------------
|
||||
| | | | |
|
||||
| | | | +-- Current Line #.
|
||||
| | | +-- Relative/Full Path
|
||||
| | +-- Buffer Name.
|
||||
| +-- Buffer Attributes. See|:buffers|for more information.
|
||||
+-- Buffer Number. See|:buffers|for more information.
|
||||
|
||||
===============================================================================
|
||||
CUSTOMIZATION *bufexplorer-customization*
|
||||
|
||||
*g:bufExplorerChgWin*
|
||||
If set, bufexplorer will bring up the selected buffer in the window specified
|
||||
by g:bufExplorerChgWin.
|
||||
|
||||
*g:bufExplorerDefaultHelp*
|
||||
To control whether the default help is displayed or not, use: >
|
||||
let g:bufExplorerDefaultHelp=0 " Do not show default help.
|
||||
let g:bufExplorerDefaultHelp=1 " Show default help.
|
||||
The default is to show the default help.
|
||||
|
||||
*g:bufExplorerDetailedHelp*
|
||||
To control whether detailed help is display by, use: >
|
||||
let g:bufExplorerDetailedHelp=0 " Do not show detailed help.
|
||||
let g:bufExplorerDetailedHelp=1 " Show detailed help.
|
||||
The default is NOT to show detailed help.
|
||||
|
||||
*g:bufExplorerFindActive*
|
||||
To control whether you are taken to the active window when selecting a buffer,
|
||||
use: >
|
||||
let g:bufExplorerFindActive=0 " Do not go to active window.
|
||||
let g:bufExplorerFindActive=1 " Go to active window.
|
||||
The default is to be taken to the active window.
|
||||
|
||||
*g:bufExplorerFuncRef*
|
||||
When a buffer is selected, the functions specified either singly or as a list
|
||||
will be called.
|
||||
|
||||
*g:bufExplorerReverseSort*
|
||||
To control whether to sort the buffer in reverse order or not, use: >
|
||||
let g:bufExplorerReverseSort=0 " Do not sort in reverse order.
|
||||
let g:bufExplorerReverseSort=1 " Sort in reverse order.
|
||||
The default is NOT to sort in reverse order.
|
||||
|
||||
*g:bufExplorerShowDirectories*
|
||||
Directories usually show up in the list from using a command like ":e .".
|
||||
To control whether to show directories in the buffer list or not, use: >
|
||||
let g:bufExplorerShowDirectories=1 " Show directories.
|
||||
let g:bufExplorerShowDirectories=0 " Don't show directories.
|
||||
The default is to show directories.
|
||||
|
||||
*g:bufExplorerShowRelativePath*
|
||||
To control whether to show absolute paths or relative to the current
|
||||
directory, use: >
|
||||
let g:bufExplorerShowRelativePath=0 " Show absolute paths.
|
||||
let g:bufExplorerShowRelativePath=1 " Show relative paths.
|
||||
The default is to show absolute paths.
|
||||
|
||||
*g:bufExplorerShowTabBuffer*
|
||||
To control weither or not to show buffers on for the specific tab or not, use: >
|
||||
let g:bufExplorerShowTabBuffer=0 " No.
|
||||
let g:bufExplorerShowTabBuffer=1 " Yes.
|
||||
The default is not to show.
|
||||
|
||||
*g:bufExplorerShowUnlisted*
|
||||
To control whether to show unlisted buffer or not, use: >
|
||||
let g:bufExplorerShowUnlisted=0 " Do not show unlisted buffers.
|
||||
let g:bufExplorerShowUnlisted=1 " Show unlisted buffers.
|
||||
The default is to NOT show unlisted buffers.
|
||||
|
||||
*g:bufExplorerSortBy*
|
||||
To control what field the buffers are sorted by, use: >
|
||||
let g:bufExplorerSortBy='extension' " Sort by file extension.
|
||||
let g:bufExplorerSortBy='fullpath' " Sort by full file path name.
|
||||
let g:bufExplorerSortBy='mru' " Sort by most recently used.
|
||||
let g:bufExplorerSortBy='name' " Sort by the buffer's name.
|
||||
let g:bufExplorerSortBy='number' " Sort by the buffer's number.
|
||||
The default is to sort by mru.
|
||||
|
||||
*g:bufExplorerSplitBelow*
|
||||
To control where the new split window will be placed above or below the
|
||||
current window, use: >
|
||||
let g:bufExplorerSplitBelow=1 " Split new window below current.
|
||||
let g:bufExplorerSplitBelow=0 " Split new window above current.
|
||||
The default is to use what ever is set by the global &splitbelow
|
||||
variable.
|
||||
|
||||
*g:bufExplorerSplitOutPathName*
|
||||
To control whether to split out the path and file name or not, use: >
|
||||
let g:bufExplorerSplitOutPathName=1 " Split the path and file name.
|
||||
let g:bufExplorerSplitOutPathName=0 " Don't split the path and file
|
||||
" name.
|
||||
The default is to split the path and file name.
|
||||
|
||||
*g:bufExplorerSplitRight*
|
||||
To control where the new vsplit window will be placed to the left or right of
|
||||
current window, use: >
|
||||
let g:bufExplorerSplitRight=0 " Split left.
|
||||
let g:bufExplorerSplitRight=1 " Split right.
|
||||
The default is to use the global &splitright.
|
||||
|
||||
===============================================================================
|
||||
CHANGE LOG *bufexplorer-changelog*
|
||||
|
||||
7.2.8 - Enhancements:
|
||||
* Thanks to Charles Campbell for integrating bufexplorer with GDBMGR.
|
||||
http://mysite.verizon.net/astronaut/vim/index.html#GDBMGR
|
||||
7.2.7 - Fix:
|
||||
* My 1st attempt to fix the "cache" issue where buffers information
|
||||
has changed but the cache/display does not reflect those changes.
|
||||
More work still needs to be done.
|
||||
7.2.6 - Fix:
|
||||
* Thanks to Michael Henry for pointing out that I totally forgot to
|
||||
update the inline help to reflect the previous change to the 'd'
|
||||
and 'D' keys. Opps!
|
||||
7.2.5 - Fix:
|
||||
* Philip Morant suggested switching the command (bwipe) associated
|
||||
with the 'd' key with the command (bdelete) associated with the 'D'
|
||||
key. This made sense since the 'd' key is more likely to be used
|
||||
compared to the 'D' key.
|
||||
7.2.4 - Fix:
|
||||
* I did not implement the patch provided by Godefroid Chapelle
|
||||
correctly. I missed one line which happened to be the most
|
||||
important one :)
|
||||
7.2.3 - Enhancements:
|
||||
* Thanks to David Fishburn for helping me out with a much needed
|
||||
code overhaul as well as some awesome performance enhancements.
|
||||
He also reworked the handling of tabs.
|
||||
* Thanks to Vladimir Dobriakov for making the suggestions on
|
||||
enhancing the documentation to include a better explaination of
|
||||
what is contained in the main bufexplorer window.
|
||||
* Thanks to Yuriy Ershov for added code that when the bufexplorer
|
||||
window is opened, the cursor is now positioned at the line with the
|
||||
active buffer (useful in non-MRU sort modes).
|
||||
* Yuriy also added the abiltiy to cycle through the sort fields in
|
||||
reverse order.
|
||||
Fixes:
|
||||
* Thanks to Michael Henry for supplying a patch that allows
|
||||
bufexplorer to be opened even when there is one buffer or less.
|
||||
* Thanks to Godefroid Chapelle for supplying a patch that fixed
|
||||
MRU sort order after loading a session.
|
||||
7.2.2 - Fixes:
|
||||
* Thanks to David L. Dight for spotting and fixing an issue when
|
||||
using ctrl^. bufexplorer would incorrectly handle the previous
|
||||
buffer so that when ctrl^ was pressed the incorrect file was opened.
|
||||
7.2.1 - Fixes:
|
||||
* Thanks to Dimitar for spotting and fixing a feature that was
|
||||
inadvertently left out of the previous version. The feature was
|
||||
when bufexplorer was used together with WinManager, you could use
|
||||
the tab key to open a buffer in a split window.
|
||||
7.2.0 - Enhancements:
|
||||
* For all those missing the \bs and \bv commands, these have now
|
||||
returned. Thanks to Phil O'Connell for asking for the return of
|
||||
these missing features and helping test out this version.
|
||||
Fixes:
|
||||
* Fixed problem with the bufExplorerFindActive code not working
|
||||
correctly.
|
||||
* Fixed an incompatibility between bufexplorer and netrw that caused
|
||||
buffers to be incorrectly removed from the MRU list.
|
||||
7.1.7 - Fixes:
|
||||
* TaCahiroy fixed several issues related to opening a buffer in a
|
||||
tab.
|
||||
7.1.6 - Fixes:
|
||||
* Removed ff=unix from modeline in bufexplorer.txt. Found by Bill
|
||||
McCarthy.
|
||||
7.1.5 - Fixes:
|
||||
* Could not open unnamed buffers. Fixed by TaCahiroy.
|
||||
7.1.4 - Fixes:
|
||||
* Sometimes when a file's path has 'white space' in it, extra buffers
|
||||
would be created containing each piece of the path. i.e:
|
||||
opening c:\document and settings\test.txt would create a buffer
|
||||
named "and" and a buffer named "Documents". This was reported and
|
||||
fixed by TaCa Yoss.
|
||||
7.1.3 - Fixes:
|
||||
* Added code to allow only one instance of the plugin to run at a
|
||||
time. Thanks Dennis Hostetler.
|
||||
7.1.2 - Fixes:
|
||||
* Fixed a jumplist issue spotted by JiangJun. I overlooked the
|
||||
'jumplist' and with a couple calls to 'keepjumps', everything is
|
||||
fine again.
|
||||
* Went back to just having a plugin file, no autoload file. By having
|
||||
the autoload, WinManager was no longer working and without really
|
||||
digging into the cause, it was easier to go back to using just a
|
||||
plugin file.
|
||||
7.1.1 - Fixes:
|
||||
* A problem spotted by Thomas Arendsen Hein.
|
||||
When running Vim (7.1.94), error E493 was being thrown.
|
||||
Enhancements:
|
||||
* Added 'D' for 'delete' buffer as the 'd' command was a 'wipe'
|
||||
buffer.
|
||||
7.1.0 - Another 'major' update, some by Dave Larson, some by me.
|
||||
* Making use of 'autoload' now to make the plugin load quicker.
|
||||
* Removed '\bs' and '\bv'. These are now controlled by the user. The
|
||||
user can issue a ':sp' or ':vs' to create a horizontal or vertical
|
||||
split window and then issue a '\be'
|
||||
* Added handling of tabs.
|
||||
7.0.17 - Fixed issue with 'drop' command.
|
||||
Various enhancements and improvements.
|
||||
7.0.16 - Fixed issue reported by Liu Jiaping on non Windows systems, which was
|
||||
...
|
||||
Open file1, open file2, modify file1, open bufexplorer, you get the
|
||||
following error:
|
||||
|
||||
--------8<--------
|
||||
Error detected while processing function
|
||||
<SNR>14_StartBufExplorer..<SNR>14_SplitOpen:
|
||||
line 4:
|
||||
E37: No write since last change (add ! to override)
|
||||
|
||||
But the worse thing is, when I want to save the current buffer and
|
||||
type ':w', I get another error message:
|
||||
E382: Cannot write, 'buftype' option is set
|
||||
--------8<--------
|
||||
|
||||
7.0.15 - Thanks to Mark Smithfield for suggesting bufexplorer needed to handle
|
||||
the ':args' command.
|
||||
7.0.14 - Thanks to Randall Hansen for removing the requirement of terminal
|
||||
versions to be recompiled with 'gui' support so the 'drop' command
|
||||
would work. The 'drop' command is really not needed in terminal
|
||||
versions.
|
||||
7.0.13 - Fixed integration with WinManager.
|
||||
Thanks to Dave Eggum for another update.
|
||||
- Fix: The detailed help didn't display the mapping for toggling
|
||||
the split type, even though the split type is displayed.
|
||||
- Fixed incorrect description in the detailed help for toggling
|
||||
relative or full paths.
|
||||
- Deprecated s:ExtractBufferNbr(). Vim's str2nr() does the same
|
||||
thing.
|
||||
- Created a s:Set() function that sets a variable only if it hasn't
|
||||
already been defined. It's useful for initializing all those
|
||||
default settings.
|
||||
- Removed checks for repetitive command definitions. They were
|
||||
unnecessary.
|
||||
- Made the help highlighting a little more fancy.
|
||||
- Minor reverse compatibility issue: Changed ambiguous setting
|
||||
names to be more descriptive of what they do (also makes the code
|
||||
easier to follow):
|
||||
Changed bufExplorerSortDirection to bufExplorerReverseSort
|
||||
Changed bufExplorerSplitType to bufExplorerSplitVertical
|
||||
Changed bufExplorerOpenMode to bufExplorerUseCurrentWindow
|
||||
- When the BufExplorer window closes, all the file-local marks are
|
||||
now deleted. This may have the benefit of cleaning up some of the
|
||||
jumplist.
|
||||
- Changed the name of the parameter for StartBufExplorer from
|
||||
"split" to "open". The parameter is a string which specifies how
|
||||
the buffer will be open, not if it is split or not.
|
||||
- Deprecated DoAnyMoreBuffersExist() - it is a one line function
|
||||
only used in one spot.
|
||||
- Created four functions (SplitOpen(), RebuildBufferList(),
|
||||
UpdateHelpStatus() and ReSortListing()) all with one purpose - to
|
||||
reduce repeated code.
|
||||
- Changed the name of AddHeader() to CreateHelp() to be more
|
||||
descriptive of what it does. It now returns an array instead of
|
||||
updating the window directly. This has the benefit of making the
|
||||
code more efficient since the text the function returns is used a
|
||||
little differently in the two places the function is called.
|
||||
- Other minor simplifications.
|
||||
7.0.12 - MAJOR Update.
|
||||
This version will ONLY run with Vim version 7.0 or greater.
|
||||
Dave Eggum has made some 'significant' updates to this latest
|
||||
version:
|
||||
- Added BufExplorerGetAltBuf() global function to be used in the
|
||||
user’s rulerformat.
|
||||
- Added g:bufExplorerSplitRight option.
|
||||
- Added g:bufExplorerShowRelativePath option with mapping.
|
||||
- Added current line highlighting.
|
||||
- The split type can now be changed whether bufexplorer is opened
|
||||
in split mode or not.
|
||||
- Various major and minor bug fixes and speed improvements.
|
||||
- Sort by extension.
|
||||
Other improvements/changes:
|
||||
- Changed the help key from '?' to <F1> to be more 'standard'.
|
||||
- Fixed splitting of vertical bufexplorer window.
|
||||
Hopefully I have not forgot something :)
|
||||
7.0.11 - Fixed a couple of highlighting bugs, reported by David Eggum. He also
|
||||
changed passive voice to active on a couple of warning messages.
|
||||
7.0.10 - Fixed bug report by Xiangjiang Ma. If the 'ssl' option is set,
|
||||
the slash character used when displaying the path was incorrect.
|
||||
7.0.9 - Martin Grenfell found and eliminated an annoying bug in the
|
||||
bufexplorer/winmanager integration. The bug was were an
|
||||
annoying message would be displayed when a window was split or
|
||||
a new file was opened in a new window. Thanks Martin!
|
||||
7.0.8 - Thanks to Mike Li for catching a bug in the WinManager integration.
|
||||
The bug was related to the incorrect displaying of the buffer
|
||||
explorer's window title.
|
||||
7.0.7 - Thanks to Jeremy Cowgar for adding a new enhancement. This
|
||||
enhancement allows the user to press 'S', that is capital S, which
|
||||
will open the buffer under the cursor in a newly created split
|
||||
window.
|
||||
7.0.6 - Thanks to Larry Zhang for finding a bug in the "split" buffer code.
|
||||
If you force set g:bufExplorerSplitType='v' in your vimrc, and if you
|
||||
tried to do a \bs to split the bufexplorer window, it would always
|
||||
split horizontal, not vertical. He also found that I had a typeo in
|
||||
that the variable g:bufExplorerSplitVertSize was all lower case in
|
||||
the documentation which was incorrect.
|
||||
7.0.5 - Thanks to Mun Johl for pointing out a bug that if a buffer was
|
||||
modified, the '+' was not showing up correctly.
|
||||
7.0.4 - Fixed a problem discovered first by Xiangjiang Ma. Well since I've
|
||||
been using vim 7.0 and not 6.3, I started using a function (getftype)
|
||||
that is not in 6.3. So for backward compatibility, I conditionaly use
|
||||
this function now. Thus, the g:bufExplorerShowDirectories feature is
|
||||
only available when using vim 7.0 and above.
|
||||
7.0.3 - Thanks to Erwin Waterlander for finding a problem when the last
|
||||
buffer was deleted. This issue got me to rewrite the buffer display
|
||||
logic (which I've wanted to do for sometime now).
|
||||
Also great thanks to Dave Eggum for coming up with idea for
|
||||
g:bufExplorerShowDirectories. Read the above information about this
|
||||
feature.
|
||||
7.0.2 - Thanks to Thomas Arendsen Hein for finding a problem when a user
|
||||
has the default help turned off and then brought up the explorer. An
|
||||
E493 would be displayed.
|
||||
7.0.1 - Thanks to Erwin Waterlander for finding a couple problems.
|
||||
The first problem allowed a modified buffer to be deleted. Opps! The
|
||||
second problem occurred when several files were opened, BufExplorer
|
||||
was started, the current buffer was deleted using the 'd' option, and
|
||||
then BufExplorer was exited. The deleted buffer was still visible
|
||||
while it is not in the buffers list. Opps again!
|
||||
7.0.0 - Thanks to Shankar R. for suggesting to add the ability to set
|
||||
the fixed width (g:bufExplorerSplitVertSize) of a new window
|
||||
when opening bufexplorer vertically and fixed height
|
||||
(g:bufExplorerSplitHorzSize) of a new window when opening
|
||||
bufexplorer horizontally. By default, the windows are normally
|
||||
split to use half the existing width or height.
|
||||
6.3.0 - Added keepjumps so that the jumps list would not get cluttered with
|
||||
bufexplorer related stuff.
|
||||
6.2.3 - Thanks to Jay Logan for finding a bug in the vertical split position
|
||||
of the code. When selecting that the window was to be split
|
||||
vertically by doing a '\bv', from then on, all splits, i.e. '\bs',
|
||||
were split vertically, even though g:bufExplorerSplitType was not set
|
||||
to 'v'.
|
||||
6.2.2 - Thanks to Patrik Modesto for adding a small improvement. For some
|
||||
reason his bufexplorer window was always showing up folded. He added
|
||||
'setlocal nofoldenable' and it was fixed.
|
||||
6.2.1 - Thanks goes out to Takashi Matsuo for added the 'fullPath' sorting
|
||||
logic and option.
|
||||
6.2.0 - Thanks goes out to Simon Johann-Ganter for spotting and fixing a
|
||||
problem in that the last search pattern is overridden by the search
|
||||
pattern for blank lines.
|
||||
6.1.6 - Thanks to Artem Chuprina for finding a pesky bug that has been around
|
||||
for sometime now. The <esc> key mapping was causing the buffer
|
||||
explored to close prematurely when vim was run in an xterm. The <esc>
|
||||
key mapping is now removed.
|
||||
6.1.5 - Thanks to Khorev Sergey. Added option to show default help or not.
|
||||
6.1.4 - Thanks goes out to Valery Kondakoff for suggesting the addition of
|
||||
setlocal nonumber and foldcolumn=0. This allows for line numbering
|
||||
and folding to be turned off temporarily while in the explorer.
|
||||
6.1.3 - Added folding. Did some code cleanup. Added the ability to force the
|
||||
newly split window to be temporarily vertical, which was suggested by
|
||||
Thomas Glanzmann.
|
||||
6.1.2 - Now pressing the <esc> key will quit, just like 'q'.
|
||||
Added folds to hide winmanager configuration.
|
||||
If anyone had the 'C' option in their cpoptions they would receive
|
||||
a E10 error on startup of BufExplorer. cpo is now saved, updated and
|
||||
restored. Thanks to Charles E Campbell, Jr.
|
||||
Attempted to make sure there can only be one BufExplorer window open
|
||||
at a time.
|
||||
6.1.1 - Thanks to Brian D. Goodwin for adding toupper to FileNameCmp. This
|
||||
way buffers sorted by name will be in the correct order regardless of
|
||||
case.
|
||||
6.0.16 - Thanks to Andre Pang for the original patch/idea to get bufexplorer
|
||||
to work in insertmode/modeless mode (evim). Added Initialize
|
||||
and Cleanup autocommands to handle commands that need to be
|
||||
performed when starting or leaving bufexplorer.
|
||||
6.0.15 - Srinath Avadhanulax added a patch for winmanager.vim.
|
||||
6.0.14 - Fix a few more bug that I thought I already had fixed. Thanks
|
||||
to Eric Bloodworth for adding 'Open Mode/Edit in Place'. Added
|
||||
vertical splitting.
|
||||
6.0.13 - Thanks to Charles E Campbell, Jr. for pointing out some embarrassing
|
||||
typos that I had in the documentation. I guess I need to run
|
||||
the spell checker more :o)
|
||||
6.0.12 - Thanks to Madoka Machitani, for the tip on adding the augroup command
|
||||
around the MRUList autocommands.
|
||||
6.0.11 - Fixed bug report by Xiangjiang Ma. '"=' was being added to the
|
||||
search history which messed up hlsearch.
|
||||
6.0.10 - Added the necessary hooks so that the Srinath Avadhanula's
|
||||
winmanager.vim script could more easily integrate with this script.
|
||||
Tried to improve performance.
|
||||
6.0.9 - Added MRU (Most Recently Used) sort ordering.
|
||||
6.0.8 - Was not resetting the showcmd command correctly.
|
||||
Added nifty help file.
|
||||
6.0.7 - Thanks to Brett Carlane for some great enhancements. Some are added,
|
||||
some are not, yet. Added highlighting of current and alternate
|
||||
filenames. Added splitting of path/filename toggle. Reworked
|
||||
ShowBuffers().
|
||||
Changed my email address.
|
||||
6.0.6 - Copyright notice added. Needed this so that it could be distributed
|
||||
with Debian Linux. Fixed problem with the SortListing() function
|
||||
failing when there was only one buffer to display.
|
||||
6.0.5 - Fixed problems reported by David Pascoe, in that you where unable to
|
||||
hit 'd' on a buffer that belonged to a files that no longer existed
|
||||
and that the 'yank' buffer was being overridden by the help text when
|
||||
the bufexplorer was opened.
|
||||
6.0.4 - Thanks to Charles Campbell, Jr. for making this plugin more plugin
|
||||
*compliant*, adding default keymappings of <Leader>be and <Leader>bs
|
||||
as well as fixing the 'w:sortDirLabel not being defined' bug.
|
||||
6.0.3 - Added sorting capabilities. Sort taken from explorer.vim.
|
||||
6.0.2 - Can't remember. (2001-07-25)
|
||||
6.0.1 - Initial release.
|
||||
|
||||
===============================================================================
|
||||
TODO *bufexplorer-todo*
|
||||
|
||||
- Nothing as of now, buf if you have any suggestions, drop me an email.
|
||||
|
||||
===============================================================================
|
||||
CREDITS *bufexplorer-credits*
|
||||
|
||||
Author: Jeff Lanzarotta <delux256-vim at yahoo dot com>
|
||||
|
||||
Credit must go out to Bram Moolenaar and all the Vim developers for
|
||||
making the world's best editor (IMHO). I also want to thank everyone who
|
||||
helped and gave me suggestions. I wouldn't want to leave anyone out so I
|
||||
won't list names.
|
||||
|
||||
===============================================================================
|
||||
vim:tw=78:noet:wrap:ts=8:ft=help:norl:
|
||||
1501
resources/.vim/doc/taglist.txt
Executable file
1501
resources/.vim/doc/taglist.txt
Executable file
File diff suppressed because it is too large
Load diff
110
resources/.vim/doc/tags
Normal file
110
resources/.vim/doc/tags
Normal file
|
|
@ -0,0 +1,110 @@
|
|||
'Tlist_Auto_Highlight_Tag' taglist.txt /*'Tlist_Auto_Highlight_Tag'*
|
||||
'Tlist_Auto_Open' taglist.txt /*'Tlist_Auto_Open'*
|
||||
'Tlist_Auto_Update' taglist.txt /*'Tlist_Auto_Update'*
|
||||
'Tlist_Close_On_Select' taglist.txt /*'Tlist_Close_On_Select'*
|
||||
'Tlist_Compact_Format' taglist.txt /*'Tlist_Compact_Format'*
|
||||
'Tlist_Ctags_Cmd' taglist.txt /*'Tlist_Ctags_Cmd'*
|
||||
'Tlist_Display_Prototype' taglist.txt /*'Tlist_Display_Prototype'*
|
||||
'Tlist_Display_Tag_Scope' taglist.txt /*'Tlist_Display_Tag_Scope'*
|
||||
'Tlist_Enable_Fold_Column' taglist.txt /*'Tlist_Enable_Fold_Column'*
|
||||
'Tlist_Exit_OnlyWindow' taglist.txt /*'Tlist_Exit_OnlyWindow'*
|
||||
'Tlist_File_Fold_Auto_Close' taglist.txt /*'Tlist_File_Fold_Auto_Close'*
|
||||
'Tlist_GainFocus_On_ToggleOpen' taglist.txt /*'Tlist_GainFocus_On_ToggleOpen'*
|
||||
'Tlist_Highlight_Tag_On_BufEnter' taglist.txt /*'Tlist_Highlight_Tag_On_BufEnter'*
|
||||
'Tlist_Inc_Winwidth' taglist.txt /*'Tlist_Inc_Winwidth'*
|
||||
'Tlist_Max_Submenu_Items' taglist.txt /*'Tlist_Max_Submenu_Items'*
|
||||
'Tlist_Max_Tag_Length' taglist.txt /*'Tlist_Max_Tag_Length'*
|
||||
'Tlist_Process_File_Always' taglist.txt /*'Tlist_Process_File_Always'*
|
||||
'Tlist_Show_Menu' taglist.txt /*'Tlist_Show_Menu'*
|
||||
'Tlist_Show_One_File' taglist.txt /*'Tlist_Show_One_File'*
|
||||
'Tlist_Sort_Type' taglist.txt /*'Tlist_Sort_Type'*
|
||||
'Tlist_Use_Horiz_Window' taglist.txt /*'Tlist_Use_Horiz_Window'*
|
||||
'Tlist_Use_Right_Window' taglist.txt /*'Tlist_Use_Right_Window'*
|
||||
'Tlist_Use_SingleClick' taglist.txt /*'Tlist_Use_SingleClick'*
|
||||
'Tlist_WinHeight' taglist.txt /*'Tlist_WinHeight'*
|
||||
'Tlist_WinWidth' taglist.txt /*'Tlist_WinWidth'*
|
||||
:TlistAddFiles taglist.txt /*:TlistAddFiles*
|
||||
:TlistAddFilesRecursive taglist.txt /*:TlistAddFilesRecursive*
|
||||
:TlistClose taglist.txt /*:TlistClose*
|
||||
:TlistDebug taglist.txt /*:TlistDebug*
|
||||
:TlistHighlightTag taglist.txt /*:TlistHighlightTag*
|
||||
:TlistLock taglist.txt /*:TlistLock*
|
||||
:TlistMessages taglist.txt /*:TlistMessages*
|
||||
:TlistOpen taglist.txt /*:TlistOpen*
|
||||
:TlistSessionLoad taglist.txt /*:TlistSessionLoad*
|
||||
:TlistSessionSave taglist.txt /*:TlistSessionSave*
|
||||
:TlistShowPrototype taglist.txt /*:TlistShowPrototype*
|
||||
:TlistShowTag taglist.txt /*:TlistShowTag*
|
||||
:TlistToggle taglist.txt /*:TlistToggle*
|
||||
:TlistUndebug taglist.txt /*:TlistUndebug*
|
||||
:TlistUnlock taglist.txt /*:TlistUnlock*
|
||||
:TlistUpdate taglist.txt /*:TlistUpdate*
|
||||
Tlist_Get_Tag_Prototype_By_Line() taglist.txt /*Tlist_Get_Tag_Prototype_By_Line()*
|
||||
Tlist_Get_Tagname_By_Line() taglist.txt /*Tlist_Get_Tagname_By_Line()*
|
||||
Tlist_Set_App() taglist.txt /*Tlist_Set_App()*
|
||||
Tlist_Update_File_Tags() taglist.txt /*Tlist_Update_File_Tags()*
|
||||
WinManagerFileEdit winmanager.txt /*WinManagerFileEdit*
|
||||
WinManagerForceReSize winmanager.txt /*WinManagerForceReSize*
|
||||
WinManagerResumeAUs winmanager.txt /*WinManagerResumeAUs*
|
||||
WinManagerSuspendAUs winmanager.txt /*WinManagerSuspendAUs*
|
||||
bufexplorer bufexplorer.txt /*bufexplorer*
|
||||
bufexplorer-changelog bufexplorer.txt /*bufexplorer-changelog*
|
||||
bufexplorer-credits bufexplorer.txt /*bufexplorer-credits*
|
||||
bufexplorer-customization bufexplorer.txt /*bufexplorer-customization*
|
||||
bufexplorer-installation bufexplorer.txt /*bufexplorer-installation*
|
||||
bufexplorer-todo bufexplorer.txt /*bufexplorer-todo*
|
||||
bufexplorer-usage bufexplorer.txt /*bufexplorer-usage*
|
||||
bufexplorer-windowlayout bufexplorer.txt /*bufexplorer-windowlayout*
|
||||
bufexplorer.txt bufexplorer.txt /*bufexplorer.txt*
|
||||
buffer-explorer bufexplorer.txt /*buffer-explorer*
|
||||
g:bufExplorerChgWin bufexplorer.txt /*g:bufExplorerChgWin*
|
||||
g:bufExplorerDefaultHelp bufexplorer.txt /*g:bufExplorerDefaultHelp*
|
||||
g:bufExplorerDetailedHelp bufexplorer.txt /*g:bufExplorerDetailedHelp*
|
||||
g:bufExplorerFindActive bufexplorer.txt /*g:bufExplorerFindActive*
|
||||
g:bufExplorerFuncRef bufexplorer.txt /*g:bufExplorerFuncRef*
|
||||
g:bufExplorerReverseSort bufexplorer.txt /*g:bufExplorerReverseSort*
|
||||
g:bufExplorerShowDirectories bufexplorer.txt /*g:bufExplorerShowDirectories*
|
||||
g:bufExplorerShowRelativePath bufexplorer.txt /*g:bufExplorerShowRelativePath*
|
||||
g:bufExplorerShowTabBuffer bufexplorer.txt /*g:bufExplorerShowTabBuffer*
|
||||
g:bufExplorerShowUnlisted bufexplorer.txt /*g:bufExplorerShowUnlisted*
|
||||
g:bufExplorerSortBy bufexplorer.txt /*g:bufExplorerSortBy*
|
||||
g:bufExplorerSplitBelow bufexplorer.txt /*g:bufExplorerSplitBelow*
|
||||
g:bufExplorerSplitOutPathName bufexplorer.txt /*g:bufExplorerSplitOutPathName*
|
||||
g:bufExplorerSplitRight bufexplorer.txt /*g:bufExplorerSplitRight*
|
||||
taglist-commands taglist.txt /*taglist-commands*
|
||||
taglist-debug taglist.txt /*taglist-debug*
|
||||
taglist-extend taglist.txt /*taglist-extend*
|
||||
taglist-faq taglist.txt /*taglist-faq*
|
||||
taglist-functions taglist.txt /*taglist-functions*
|
||||
taglist-install taglist.txt /*taglist-install*
|
||||
taglist-internet taglist.txt /*taglist-internet*
|
||||
taglist-intro taglist.txt /*taglist-intro*
|
||||
taglist-keys taglist.txt /*taglist-keys*
|
||||
taglist-license taglist.txt /*taglist-license*
|
||||
taglist-menu taglist.txt /*taglist-menu*
|
||||
taglist-options taglist.txt /*taglist-options*
|
||||
taglist-requirements taglist.txt /*taglist-requirements*
|
||||
taglist-session taglist.txt /*taglist-session*
|
||||
taglist-todo taglist.txt /*taglist-todo*
|
||||
taglist-using taglist.txt /*taglist-using*
|
||||
taglist.txt taglist.txt /*taglist.txt*
|
||||
winmanager winmanager.txt /*winmanager*
|
||||
winmanager-adding winmanager.txt /*winmanager-adding*
|
||||
winmanager-bufexplorer-settings winmanager.txt /*winmanager-bufexplorer-settings*
|
||||
winmanager-bug winmanager.txt /*winmanager-bug*
|
||||
winmanager-commands winmanager.txt /*winmanager-commands*
|
||||
winmanager-customizing winmanager.txt /*winmanager-customizing*
|
||||
winmanager-details winmanager.txt /*winmanager-details*
|
||||
winmanager-fileexplorer-settings winmanager.txt /*winmanager-fileexplorer-settings*
|
||||
winmanager-hook-isvalid winmanager.txt /*winmanager-hook-isvalid*
|
||||
winmanager-hook-refresh winmanager.txt /*winmanager-hook-refresh*
|
||||
winmanager-hook-resize winmanager.txt /*winmanager-hook-resize*
|
||||
winmanager-hook-start winmanager.txt /*winmanager-hook-start*
|
||||
winmanager-hook-title winmanager.txt /*winmanager-hook-title*
|
||||
winmanager-hooks winmanager.txt /*winmanager-hooks*
|
||||
winmanager-installing winmanager.txt /*winmanager-installing*
|
||||
winmanager-overview winmanager.txt /*winmanager-overview*
|
||||
winmanager-plugin winmanager.txt /*winmanager-plugin*
|
||||
winmanager-settings winmanager.txt /*winmanager-settings*
|
||||
winmanager-thanks winmanager.txt /*winmanager-thanks*
|
||||
winmanager-updates winmanager.txt /*winmanager-updates*
|
||||
503
resources/.vim/doc/winmanager.txt
Normal file
503
resources/.vim/doc/winmanager.txt
Normal file
|
|
@ -0,0 +1,503 @@
|
|||
*winmanager* Plugin for a classical Windows style IDE for Vim 6.0
|
||||
For Vim version 6.0.
|
||||
Last Change: Sun Mar 31 11:00 PM 2002 PST
|
||||
|
||||
By Srinath Avadhanula
|
||||
(srinath@fastmail.fm)
|
||||
|
||||
*winmanager-plugin*
|
||||
|
||||
winmanager.vim is a plugin which implements a classical windows type IDE in
|
||||
Vim-6.0, where the directory and buffer browsers are displayed in 2 windows on
|
||||
the left and the current editing is done on the right. When you open up a new
|
||||
vim window, simply type in :WMToggle. This will start up winmanager.
|
||||
|
||||
Note This plugin is available only if 'compatible' is not set
|
||||
You can avoid loading this plugin by setting the "loaded_winmanager"
|
||||
variable >
|
||||
:let loaded_winmanager = 1
|
||||
|
||||
{Vi does not have any of this}
|
||||
===========================================================================
|
||||
OVERVIEW *winmanager-overview*
|
||||
|
||||
|winmanager-installing| Please follow these instructions for installing
|
||||
winmanager.
|
||||
|
||||
|winmanager-customizing| Describes ways of customizing the window layout, i.e
|
||||
how to club various explorers into groups, how to
|
||||
change their relative position, etc.
|
||||
|
||||
|winmanager-details| details of using winmanager. keyboard shortcuts
|
||||
and other usage details.
|
||||
|
||||
|winmanager-commands| commands provided to the user. its useful to
|
||||
set keyboard shortcuts to these commands.
|
||||
|
||||
|winmanager-settings| settings (typically made in ~/.vimrc) which
|
||||
affect the behavior of winmanager.
|
||||
|
||||
|winmanager-adding| one of the most important new features of this
|
||||
version is the creation of a framework whereby adding
|
||||
other plugins like explorer.vim or bufexplorer.vim to
|
||||
winmanager. This section describes briefly the
|
||||
implementation of winmanager and then describes how
|
||||
to add a new plugin to winmanager
|
||||
|
||||
|add-local-help| how to use this text file as a vim help file.
|
||||
|winmanager-bug| bug reports are welcome.
|
||||
|winmanager-thanks| thanks to the many people who helped!
|
||||
|
||||
===========================================================================
|
||||
UPDATES *winmanager-updates*
|
||||
|
||||
The official releases can be found at: >
|
||||
http://vim.sourceforge.net/scripts/script.php?script_id=95
|
||||
However, I will only update the vim.sf.net version of winmanager.zip in case
|
||||
of a major bug or new feature. For small (and not so bothersome) bug-fixes, I
|
||||
will put the latest version at: >
|
||||
http://robotics.eecs.berkeley.edu/~srinath/vim/winmanager-2.0.htm
|
||||
and also announce it in vim@vim.org when an update occurs.
|
||||
Therefore if you want to keep to be kept abreast of updates, you could
|
||||
check occassionally at vim@vim.org. (you can also use your mail server's
|
||||
filtering capability to effectively subscribe to the announcement).
|
||||
|
||||
============================================================================
|
||||
INSTALLING *winmanager-installing*
|
||||
|
||||
winmanager.vim should start working as soon as you restart vim after unzipping
|
||||
the .zip file you got this from into ~/.vim (unix) or ~\vimfiles (dos)
|
||||
|
||||
winmanager only recognizes plugins whose name appears in the global variable >
|
||||
g:winManagerWindowLayout
|
||||
<
|
||||
By default this global variable has the value >
|
||||
g:winManagerWindowLayout = 'FileExplorer,TagsExplorer|BufExplorer'
|
||||
<
|
||||
(which is the value which winmanager uses if its not set in the user's .vimrc)
|
||||
|
||||
This global variable is responsible for making winmanager recognize the
|
||||
existence of the explorers and simultaneously custome the window layout. See
|
||||
the next section for how to set this variable for various custom layouts of
|
||||
winmanager.
|
||||
|
||||
============================================================================
|
||||
CUSTOMIZING *winmanager-customizing*
|
||||
|
||||
The layout of winmanager is controlled by changing the value of the
|
||||
"g:winManagerWindowLayout" variable. The general form of this variable is
|
||||
>
|
||||
g:winManagerWindowLayout =
|
||||
'Group1_Member1,Group1_Member2|Group2_Member_1,Group2_Member_2'
|
||||
<
|
||||
i.e, explorer "groups" are seperated by the '|' character. Within each group,
|
||||
individual explorer plugin names are seperated by the comma (',') character.
|
||||
What winmanager does is display only 1 member from each group in a window. The
|
||||
user can go to a window and press <C-n> to display the next explorer belonging
|
||||
to that group. This ability to "group" windows is valuable to preserve screen
|
||||
real-estate by using them only as needed.
|
||||
|
||||
Thus for the default value of 'g:winManagerWindowLayout', winmanager will
|
||||
split the vim window as follows:
|
||||
+-----------+-------------------+
|
||||
| | |
|
||||
| File | |
|
||||
| explorer | File being |
|
||||
| | edited |
|
||||
| | |
|
||||
+-----------+ |
|
||||
| Buffer | |
|
||||
| explorer | |
|
||||
| | |
|
||||
+-----------+-------------------+
|
||||
|
||||
The user can go the [File List] window and press <C-n> to goto the
|
||||
'TagsExplorer' view.
|
||||
|
||||
Removing a plugin name from the 'g:winManagerWindowLayout' variable means
|
||||
winmanager no longer sees that variable.
|
||||
|
||||
============================================================================
|
||||
COMMANDS *winmanager-commands*
|
||||
|
||||
:WMToggle :toggles the visibility of winmanager. This can
|
||||
also be used to start winmanager for the first
|
||||
time. A handy mapping is: >
|
||||
:map <c-w><c-t> :WMToggle<cr>
|
||||
< mnemonic: window-toggle : <c-W><c-T>
|
||||
|
||||
:FirstExplorerWindow :directly takes you to the first explorer window
|
||||
from the top left corner which is visible. >
|
||||
:map <c-w><c-f> :FirstExplorerWindow<cr>
|
||||
< mnemonic: window-first : <c-W><c-F>
|
||||
|
||||
:BottomExplorerWindow :directly takes you to the last explorere window
|
||||
from the top-left which is visible. >
|
||||
:map <c-w><c-b> :BottomExplorerWindow<cr>
|
||||
< mnemonic: window-last : <c-W><c-B>
|
||||
|
||||
NOTE: winmanager does not provide any mappings by default. These have to set
|
||||
in the user's .vimrc if you want to use mappings.
|
||||
|
||||
============================================================================
|
||||
SETTINGS *winmanager-settings*
|
||||
|
||||
The values of the following global variables should be set in your .vimrc
|
||||
file if you want a different value than the default:
|
||||
|
||||
g:persistentBehaviour: if set to 0, then as soon as you quit all the files
|
||||
and only the explorer windows are the ones left, vim will quit. the
|
||||
default is 1, which means that the explorer windows persist even if
|
||||
they are the only ones visible.
|
||||
|
||||
g:winManagerWidth: the width of the explorer areas.
|
||||
(default 25)
|
||||
|
||||
g:defaultExplorer: If you want winmanager to assume the functioning of the
|
||||
default explorer.vim which ships with vim, set this variable to 0.
|
||||
(default 1). If this variable is set to 1, then winmanager will behave as
|
||||
follows:
|
||||
. if the user starts off vim with a command such as
|
||||
":vim some/dir/" then winmanager starts off the window layout with
|
||||
FileExplorer at the top left window. as of now it changes the
|
||||
g:windowLayout variable so that file explorer appears in the top left
|
||||
window.
|
||||
. if on the other hand the user does ":e some/dir/" while _inside_ vim,
|
||||
then the behavior is consistent with the original behavior of the
|
||||
explorer.vim plugin which ships with vim, i.e, the directory is opened
|
||||
in a buffer and the user can use that to open a file in that window.
|
||||
Note that the commands ":Explore" and ":Sexplore" are still available if
|
||||
you set this variable to 1.
|
||||
winfileexplorer.vim, the modification of explorer.vim which ships with
|
||||
this version is different from the standard explorer.vim in that it has
|
||||
display caching. i.e, the directory is read and sorted only the first
|
||||
time. From the second time on, the directory list is cached in a script
|
||||
variable so display is faster.
|
||||
|
||||
*winmanager-fileexplorer-settings*
|
||||
See |explorer| for details.
|
||||
NOTE: Some of the settings used in explorer.vim are not utlized in
|
||||
winmanager.
|
||||
*winmanager-bufexplorer-settings*
|
||||
g:bufExplorerMaxHeight: the buffer list window dynamicall rescales itself to
|
||||
occupy only the minimum space required to display all the windows. you
|
||||
can set a maximum number of lines for this window. (defualt 15)
|
||||
See |bufexplorer| for details on additional options.
|
||||
NOTE: Some of the settings used in bufexplorer.vim are not utlized in
|
||||
winmanager.
|
||||
|
||||
=============================================================================
|
||||
DETAILED HELP *winmanager-details*
|
||||
|
||||
When winmanager starts up, it divides up the whole vim window into 2
|
||||
"regions". The region on the left is the "explorer area" where the various
|
||||
explorer plugins are displayed. The region on the right is the "file editing
|
||||
area", where the user works on his current editing session.
|
||||
|
||||
+--------+-------------------+
|
||||
| | |
|
||||
| | 2(i) |
|
||||
| 1(i) | |
|
||||
| +-------------------+
|
||||
| | |
|
||||
+--------+ 2(ii) |
|
||||
| 1(ii) | |
|
||||
+--------+-------------------+
|
||||
|
||||
The explorer area (area 1) might contain multiple windows each of which might
|
||||
contain multiple explorers. In the default configuration (for
|
||||
g:winManagerWindowLayout = 'FileExplorer,TagsExplorer|BufExplorer'), the first
|
||||
window can be thought of as containing 2 explorers, the file explorer plugin
|
||||
and the tags explorer plugin, while the bottom window contains bufexplorer by
|
||||
itself.
|
||||
|
||||
When a window contains multiple explorers, then the user can cycle between
|
||||
them by pressing <c-n> (mnemonic: next) or <c-p> (mnemonic: previous).
|
||||
|
||||
This section describes the various keyboard shortcuts for the 3 plugins which
|
||||
are used with winmanager by default.
|
||||
NOTE: Other plugins might be distributed as add-ins to winmanager. In that
|
||||
case, please refer to the help which ships with that plugin.
|
||||
|
||||
1. File Explorer plugin
|
||||
This plugin displays the current directory. Its a modification of the standard
|
||||
explorer.vim which ships with vim6.0. The following keyboard shortcuts are
|
||||
available with this plugin:
|
||||
<enter> if on a directory, enters it and displays it in the same
|
||||
area. If on a file, then opens it in the File Editing Area.
|
||||
Attempts to open in the same window as the one visited
|
||||
before, otherwise split open a new window horizontally. if
|
||||
this sounds a bit confusing, it isnt. its the most intuitive
|
||||
behaviour that one expects.
|
||||
<2-leftmouse> (doubleclick) the same as <enter>
|
||||
<tab> open the file or directory in a new window in the FileEditing
|
||||
area.
|
||||
c change the pwd to the directory currently displayed
|
||||
C change the currently displayed directory to pwd (converse of
|
||||
c) this helps in changing to different drives in windows.
|
||||
i.e, if you are currently on the c: drive and you want to
|
||||
change to the d: drive, you will have to do
|
||||
cd d:\
|
||||
and then press 'C' in the file explorer area.
|
||||
s select sort field (size, date, name)
|
||||
r reverse direction of sort
|
||||
f add current directory to list of favorites.
|
||||
R rename file
|
||||
D delete file (or range of files in visual mode)
|
||||
- move up one level
|
||||
<F5> refresh the file list
|
||||
|
||||
2. Buffer Explorer plugin
|
||||
See |bufexplorer-usage| for details.
|
||||
NOTE: In addition to those shortcuts, winmanager adds the following:
|
||||
<tab> Opens the buffer under the cursor in a split window even if
|
||||
the current buffer is not modified.
|
||||
|
||||
This window is dynamically rescaled and re-displayed. i.e, when a new window
|
||||
opens somehwere, the buffer list is automatically updated. also, it tries to
|
||||
occupy the minimum possible space required to display the files.
|
||||
|
||||
3. File Editing Area
|
||||
The area where normal editing takes place. The commands in the File Explorer
|
||||
and Buffer Explorer shouldnt affect the layout of the windows here. Some
|
||||
mappings which I find useful (which should be placed in your .vimrc if you
|
||||
plan on using WManager often) is
|
||||
>
|
||||
map <c-w><c-b> :BottomExplorerWindow<cr>
|
||||
map <c-w><c-f> :FirstExplorerWindow<cr>
|
||||
map <c-w><c-t> :WMToggle<cr>
|
||||
|
||||
Pressing CTRL-W-B should then take you directly to the last explorer window
|
||||
Similarly pressing CTRL-W-F should take you to the first explorer window.
|
||||
CTRL-W-T will toggle between the winmanager visible and invisible.
|
||||
|
||||
=============================================================================
|
||||
ADDING NEW PLUGINS *winmanager-adding*
|
||||
|
||||
This section is of interest only to people who might want to extend winmanager
|
||||
by adding other plugins to it. The casual user can skip it.
|
||||
|
||||
One of the most important new features of winmanager2.x is the ability to let
|
||||
other users add IDE type plugins to winmanager.vim with a minimum of effort.
|
||||
The way winmanager ships, it usually contains the following plugins:
|
||||
>
|
||||
(FileExplorer, TagsExplorer)
|
||||
(BufExplorer)
|
||||
|
||||
i.e, FileExplorer and TagsExplorer occupy one window as a single group, while
|
||||
BufExplorer occupies another window. "Adding" a plugin means that you will be
|
||||
able to add a seperate IDE plugin, (call it "YourPlugin" henceforth) either to
|
||||
one of these groups or seperately by itself. This section describes how to
|
||||
accomplish this. Although the section is somewhat lengthy, please rest assured
|
||||
that its really quite simple to do. Have a look at |wintagexplorer|.vim for a
|
||||
small plugin which accomplishes this.
|
||||
|
||||
To better understand the process, its helpful to give a short description of
|
||||
the workings of winmanager. When a user wants to use your plugin, he
|
||||
"registers" it with winmanager, i.e he adds the "name" of the plugin to the
|
||||
variable g:winManagerWindowLayout in his .vimrc as:
|
||||
|
||||
" this line goes in the user's .vimrc
|
||||
let g:winManagerWindowLayout = "FileExplorer,TagsExplorer|YourPlugin"
|
||||
|
||||
When winmanager starts up, it remembers the string "YourPlugin" internally as
|
||||
the plugins "name". (The reason for making this a part of the user's .vimrc
|
||||
is that that way, he can customize the window layout according to his
|
||||
preferences).
|
||||
|
||||
In addition to registering, the plugin itself initializes a variable called
|
||||
the "title" which starts with the name, such as: >
|
||||
|
||||
" this line goes in your script file.
|
||||
let g:YourPlugin_title = "[My Plugin Title]"
|
||||
|
||||
<
|
||||
NOTE: Just like the rest of the hooks provided by your plugin, this global
|
||||
variable name is formed according the rule: g:<YourPluginName>_title.
|
||||
|
||||
When winmanager starts up, it performs the following 2 actions:
|
||||
1. It opens a new file with the "title" provided by the plugin. This
|
||||
automatically ensures that the same buffer is opened for multiple
|
||||
invokations of the plugin.
|
||||
NOTE: It is very important for this reason that the plugin's name be
|
||||
distinct so that there is a low (ideally zero) probability of a file
|
||||
with the same name existing on a user's system.
|
||||
2. It modifies the "name" string (in this case "YourPlugin") to form
|
||||
"call YourPlugin_Start()" and then |exec|s this string. Thus winmanager
|
||||
communicates with your plugin by using a number of such "hooks" or
|
||||
global functions which all start with the string "YourPlugin" which are
|
||||
defined in the script file you create.
|
||||
|
||||
In order to enable the dynamic nature of winmanager, where you can have your
|
||||
plugin change its display every time a |BufEnter| or |BufDelete| event occurs,
|
||||
it is necessary to provide a few other hooks. Every time a BufEnter or
|
||||
BufDelete event occurs, winmanager makes a loop over all the visible buffers.
|
||||
Then it "refreshes" the display of that plugin if it is "invalid". The
|
||||
following paragraphs describe the hooks that have to be provided to enable
|
||||
this.
|
||||
|
||||
*winmanager-hooks*
|
||||
|
||||
The following is a list of hooks which should be provided. A few of them are
|
||||
optional. Consider the case where you want to add a plugin which you have
|
||||
named "YourPlugin". In the following discussion, a "hook" simply refers to a
|
||||
globally visible function which is formed according to the rule that it start
|
||||
with the string "YourPlugin_", where "YourPlugin" is the name of your plugin.
|
||||
|
||||
*winmanager-hook-start*
|
||||
YourPlugin_Start() This function is called during initialization. It
|
||||
{Mandatory} can be assumed (and _should_ be) that the focus is
|
||||
already in the buffer where stuff needs to be
|
||||
displayed. i.e, the plugin shouldnt open some other
|
||||
buffer during this function. (i.e, commands such as
|
||||
":e", ":vsplit", ":wincmd h" etc in this stage are
|
||||
bad. If however, you absolutely need to switch
|
||||
buffers or something which will cause |BufEnter| or
|
||||
|BufDelete| events, then you need to temporarily
|
||||
switch winmanager off by using
|
||||
|WinManagerSuspendAUs|)
|
||||
|
||||
*winmanager-hook-isvalid*
|
||||
YourPlugin_IsValid() winmanager is dynamic in the sense that it allows the
|
||||
{Mandatory} plugins to change their displays when a BufEnter event
|
||||
occurs. At each BufEnter event, winmanager will cycle
|
||||
through all the visible explorers asking them if
|
||||
their display is "valid". If it isn't, then they will
|
||||
be redrawn by calling the next function.
|
||||
|
||||
For plugins such as bufexplorer which change with
|
||||
every BufEnter, it is sufficient to make this always
|
||||
return 1. For plugins such as fileexplorer, the
|
||||
display never changes with the BufEnter even. hence
|
||||
in its case, it will always return 0.
|
||||
|
||||
*winmanager-hook-refresh*
|
||||
YourPlugin_Refresh() If the YourPlugin_IsValid() function returns 0, then
|
||||
{Optional} this function is called to update the display. if the
|
||||
first function always returns 1, then this function
|
||||
need not be defined.
|
||||
NOTE: It is not clear at this time whether this
|
||||
function is really necessary. It might be obsoleted
|
||||
in the future. Future versions might call the
|
||||
_Start() function instead.
|
||||
NOTE: It has been obsoleted as of version 2.1
|
||||
|
||||
*winmanager-hook-resize*
|
||||
YourPlugin_ReSize() The plugins can also be dynamically resizable. (the
|
||||
{Optional} current bufexplorer which ships with the winmanager
|
||||
exhibits this behavior). If a plugin creates such a
|
||||
function, then it will be called after its Refresh()
|
||||
function. The reason for not letting the plugin make
|
||||
this a part of its Refresh() function is that
|
||||
sometimes resizing is not allowed, such as in
|
||||
instances where there is no window above or below the
|
||||
plugin to take the slack of a resize.
|
||||
|
||||
|
||||
In addition, the plugin should also initialize the following global variable
|
||||
|
||||
*winmanager-hook-title*
|
||||
g:YourPlugin_title This is the name of the buffer associated with
|
||||
this plugin. The reason for a title in addition to a
|
||||
name is that the name should be such that a global
|
||||
function of that name can be defined. However, the
|
||||
title can be more descriptive and contain spaces
|
||||
etc. For example, the present distribution of
|
||||
FileExplorer has the title "[File List]". Also,
|
||||
winmanager opens a file with this name (using an
|
||||
equivalent of ":e g:YourPlugin_title"), which
|
||||
automatically ensures that new buffers are not eaten
|
||||
up in multiple invokations of winmanager, toggling
|
||||
visibility of buffers, etc.
|
||||
NOTE: It is very important for this reason that the
|
||||
plugin's name be distinct so that there is a low
|
||||
(ideally zero) probability of a file with the same
|
||||
name existing on a user's system.
|
||||
|
||||
In addition to YourPlugin providing winmanager with hooks, winmanager also
|
||||
provides the following hooks for use by YourPlugin:
|
||||
|
||||
*WinManagerFileEdit*
|
||||
WinManagerFileEdit({filename}, {split})
|
||||
This function _must_ be used when the plugin wants
|
||||
to open a new file in the file editing area for
|
||||
editing. Its not sufficient to do something like
|
||||
":wincmd p" and then ":e filename", because first of
|
||||
all the ":wincmd p" command gets screwed
|
||||
(unfortunately) in the presence of winmanager
|
||||
because of the (sometimes) large movement winmanager
|
||||
does over all visible windows to maintain the
|
||||
dynamic nature. Secondly, doing a simple ":e
|
||||
filename" will not preserve the @# and the @%
|
||||
registers properly, causing handy commands such as
|
||||
|CTRL-^| to totally mis-behave.
|
||||
|
||||
The first argument should be (preferably) the
|
||||
(complete) name of the file to be opened (including
|
||||
the full path to it if possible). The second
|
||||
argument decides whether winmanager should attempt
|
||||
to open the file in the same window as the last
|
||||
window or to split a new window to open the file.
|
||||
|
||||
*WinManagerSuspendAUs*
|
||||
WinManagerSuspendAUs() This makes winmanager stop responding to the
|
||||
|BufEnter| or |BufDelete| autocommands like it
|
||||
normally does. Please use this function with care.
|
||||
You will need to use this when you are performing
|
||||
some action which causes these events but you dont
|
||||
want to have winmanager go through the whole
|
||||
isvalid/refresh cycle. NOTE: Take care to definitely
|
||||
reset the behavior by using the next function.
|
||||
|
||||
*WinManagerResumeAUs*
|
||||
WinManagerResumeAUs() This is the converse of |WinManagerSuspendAUs()|. It
|
||||
makes winmanager start responding to events with the
|
||||
usual isvalid/refresh cycle.
|
||||
|
||||
*WinManagerForceReSize*
|
||||
WinManagerForceReSize() Normally, winmanager calls the YourPlugin_ReSize()
|
||||
function after the YourPlugin_Refresh(). However,
|
||||
this happens only every |BufEnter| event. When the
|
||||
plugin performs some function which requires it to
|
||||
resize even when there was no |BufEnter| or
|
||||
|BufDelete| event, use this function. Please avoid
|
||||
making a call to YourPlugin_ReSize() because a
|
||||
number of safety checks have to be performed before
|
||||
a resizing is "legal".
|
||||
|
||||
Finally, if you do plan on making an addin to winmanager, feel free to contact
|
||||
me for help/comments/suggestions. You might also want to take a look at: >
|
||||
http://robotics.eecs.berkeley.edu/~srinath/vim/explorerSample.vim
|
||||
for a simple template of an add-in plugin.
|
||||
|
||||
=============================================================================
|
||||
BUGS *winmanager-bug*
|
||||
|
||||
Please send any comments for improvements or bug-reports to >
|
||||
srinath@fastmail.fm
|
||||
If the bug is repeatable, then it will be of great help if a short description
|
||||
of the events leading to the bug are also given.
|
||||
|
||||
Note "I dont like winmanager" is not a bug report, only an opinion ;-)
|
||||
|
||||
=============================================================================
|
||||
THANKS *winmanager-thanks*
|
||||
|
||||
I am really grateful to all those who emailed me with bug-reports and comments
|
||||
for improvement. Most of all, a huge thanks to Xiangjiang Ma for his enormous
|
||||
support and extremeley helpful QA.
|
||||
|
||||
Other people who helped greatly:
|
||||
Madoka Machitani: fixed a couple of typos and gave some ideas for making
|
||||
things more robust.
|
||||
Colin Dearing: gave many useful suggestions for improvement which lead to
|
||||
the fast redraw capability of winmanager
|
||||
Jeff Lanzarotta: for agreeing to make changes to bufexplorer.vim so that
|
||||
bufexplorer.vim would be compatible with the latest version of
|
||||
winmanager.vim
|
||||
|
||||
and finally all the great support I got from vim@vim.org and comp.editors
|
||||
helped a lot.
|
||||
|
||||
|
||||
vim:tw=78:et:ts=4:ft=help:norl:
|
||||
Loading…
Add table
Add a link
Reference in a new issue