tags:

views:

25

answers:

1

Hi,

I'm trying to create a custom vim filewrite command of the form:

autocommand BufWriteCmd py function()

:w argv1 argv2 argv3 ...

The autommand itself is working, but I can't figure out how to access argvN from the python function or how to pass it along (I also get an error when I'm passing mulitple argvs to :w "only one filename might be specified").

The goal is to remap :w to a custom command which sends the buffer to a remote server using XMLRPC.

Thanks in advance!

A: 

Define another command that is not :w. Then you will have full control over the arguments. You will even be able to provide a custom completion policy for each of your command argument.

Luc Hermitte