winmanager: A simple windows type IDE for Vim-6.0

Snapshot

winmanager.vim is a plugin which implements a classical windows type IDE in Vim-6.0. Vim6.0 has some very cool features one of which is vertical splitting of windows. The time was thus ripe to make something like this. People have already made excellent File and Buffer explorers seperately and I thought that it might be a cool idea to combine them both.

winmanager.vim combines the standard File Explorer which ships with Vim6.0 and a Buffer Explorer written by Jeff Lanzarotta into one package. Unfortunately, I had to change a few features here and there so instead of using the packages as is, I have to ship a relatively very small plugin with all of the original code from both packages basically just dumped at the end with just a few things changed here and there. When you open up a new file, simply type in :WManager. This will start up the file explorer.


Usage

The file explorer can be thought of as dividing the overall gvim window into 3 distinct "regions" as shown in the table below:

1: File Explorer Area
  1. <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.
  2. <tab> : open the file or directory in a new window in the FileEditing area.
  3. c : change the pwd to the directory currently displayed
  4. C : change the currently displayed directory to pwd (converse of c)
  5. s : select sort field (size, date, name)
  6. r : reverse direction of sort
  7. R : rename file
  8. D : delete file
  9. - : move up one level
2: Buffer Explorer
  1. <enter> : Attempts to open the file in the same window as the one visited before, otherwise split open a new window horizontally.
  2. <tab> : open the file in a new window in the FileEditing area.
  3. s : select sort field (name, buffer number)
  4. r : reverse direction of sort
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.
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. One mapping which I find useful (which should be placed in your .vimrc if you plan on using WManager) is:

map <c-w><c-b> :GotoBufExplorerWindow
map <c-w><c-f> :GotoFileExplorerWindow

Pressing CTRL-W-B should then take you directly to the buffer list area where you can switch easily between buffers, and CTRL-W-F should take you to the file explorer area. Also, only the filename is displayed in the buffer explorer area. While moving around in this area, the full path of each buffer should be displayed in the comand line. (this is helpful if you are editing files in multiple directories).
3(ii) File Editing Area