sponsor Vim development Vim logo Vim Book Ad

SideBar.vim : Auto-shrinking container of vertically aligned material

 script karma  Rating 9/3, Downloaded by 1784  Comments, bugs, improvements  Vim wiki

created by
Andrew Rodionoff
 
script type
utility
 
description
There are many fine plugins that use persistent windows to display useful
information (e.g. TagList plugin) or to provide bookmark-like portal to
other files and buffers (e.g. Project or Buffer explorers etc.). There is
one major drawback to using them: you have to sacrifice precious screen real
estate. One way to compensate is to put those auxillary windows in
'side-pocket', and to open and close it when needed. So here comes SideBar.

As a stand-alone plugin it's pretty useless. It's really a framework that
allows easy creation of SideBar-contained plugins. As an example I've
included my very simplistic rewrite of excellent Project plugin by Aric
Blumer. Note that it doesn't even try to manage its window. Just 'register'
it in SideBar with following command (to learn more of ProjectJr, read its
comments):
:SideBarAddCmd ProjectJr ~/main.prj

Now you have mini-project in your side-pocket. Use :SideBarEnter or
:SideBarEnterToggle to quickly enter/leave it. If you close its window
(without destroying its buffer), or make it 'only', next invocation of one
of those commands will bring SideBar back. Of course, it's best to map these
commands to some handy keys, e.g. <Tab>.

You can have as many projects/other buffers managed by SideBar as you wish.
Register these buffers with :SideBarAddCmd <any ex command> and switch
between them with :SideBarCycle

To hack deep inside SideBar, another command is provided:
:SideBarExec <any ex command> will execute <any ex command> in SideBar
context without buffer registration. Note that you can use 's:' prefix to
call plugin-local functions and modify its variables, so proceed with
caution. To call functions local to your script, use <SID> prefix as
usual.
 
install details
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
SideBar-0.3.zip 0.3 2003-09-26 6.0 Andrew Rodionoff Some behaviour improvements (see comments). Added two mini-plugins.
SideBar.zip 0.2 2003-08-14 6.0 Andrew Rodionoff New :SideBarSwallow command, some config  options
Improved functionality in ProjectJr plugin
SideBar.zip 0.1 2003-07-23 6.0 Andrew Rodionoff Initial upload
ip used for rating: 34.235.150.151

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github