Vim Access to Macros in OpenOffice Session Environments
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


*vamoose.txt* Vim Access to Macros in OpenOffice Session Environments

Author:  Ted Tibbetts <intuited à j'y aimé à y elle point com>
License: The same terms as Vim itself.  See |license|.

Intro                                                        *vamoose-intro*

Vamoose connects a buffer with a running instance of,
providing a convenient interface for editing Basic scripts in that instance.

A Vamoosed buffer is linked to a particular macro module.
As you may know, an macro module can be identified by
its document, library, and module names.

Installation                        *vamoose-install* *vamoose-installation*

You'll need to have the python package `ooo-macro-exchange`
installed on your system in order to use vamoose.

This can be installed via PyPI by running the command >
    easy_install ooo-macro-exchange

In order for ooo-macro-exchange to work,
you must have the UNO-python bridge installed.
If this is not already installed on your Debian-ish system, >
    sudo aptitude install python-uno
should do the trick.

Of course, since vamoose relies on Python,
you'll also need to have a vim binary
that was compiled with the |+python| feature.

Vamoose URLs    *vamoose-urls* *vamoose-usage* *vamoose-edit* *vamoose-open*

Vamoose works via vamoose URLs that look like this: >
The host:port part is optional,
and you can include only one of them, with a colon before/after it.

So if you have an OpenOffice listening on the default port (2002),
and an open document named "SpruceGoose",
you can open a Basic module with the command >
    :tabedit vamoose://SpruceGoose//Standard.Module1

If you need to specify the port 1234, it would look like >
    :tabedit vamoose://:1234//SpruceGoose//Standard.Module1

Buffers opened with vamoose URLs work in the normal way:
you should be able to update the OpenOffice document
by making changes and doing |:write|.
You should see your changes reflected in OpenOffice
if you open the module in the code editor or invoke a macro in it.

Connecting to OpenOffice                               *vamoose-running-ooo*

In order to be able to connect to OpenOffice,
it needs to be started in "listen mode".

This is accomplished by launching it with a command like >
    $ ooffice -accept='socket,host=localhost,port=2002;urp;'
That will start a visible open office,
ready to accept connections from vamoose on the default port.

If you already have OpenOffice up and running, you'll have to close it down.

If you also pass the option `-headless`,
OpenOffice will start in invisible stealth mode.
This will let you edit macros without alerting any spies to your activity.

Options                                *vamoose-options* *vamoose-save-mode*
                                 *g:vamoose_save_mode* *b:vamoose_save_mode*

Currently, the only .vimrc configuration option for vamoose
is the variable 'g:vamoose_save_mode'.

If this variable is truthy (like 1),
writing buffers will cause the documents which own their macro libraries
to be saved.

The default is to save documents.  This may be undesirable in some cases.

This behaviour can be customized on a per-buffer level
by setting the buffer variable 'b:vamoose_save_mode'.