On 6/8/06, Markus Mottl <[EMAIL PROTECTED]> wrote:
Hi,

I'm new to the developer list so I don't know whether this has already
been discussed here.

One thing I encounter frequently is that I have tons of open buffers,
especially also from different projects, and I would like to switch
between sets of windows very quickly.  It would be great if Vim had a
feature that allowed me to bind the current layout of windows (buffers
contained, positions + dimensions, etc.) to a key.  Jumping between
projects would then be really easy.

One can, of course, use several terminals and start multiple
Vim-instances in them, but this is inconvenient, because one cannot
easily share data between them (registers, etc.).

It seems to me that this feature should be fairly easy to implement.
Any suggestions on how to approach this problem?

Vim has mechanism of mapping keys to user-defined
commends/scripts/functions. If you can write vim function(s)
that, say, delete current windows and then re-create
desirable windows layout (using sequence of vim commands)
then it's definitely possible to bind call to such a function to
the key. You'll probably need one window-creating function
per "project". Only you know your window layout, so
only you can write such function. Once you wrote the function, we'll
help you to map it to the keys yuo select.

I don't think vim is missing any elemental functionality
needed for such scripts yuo describe. For more info:

   :help vim-script-info
   :help key-mapping

Yakov

Reply via email to