Place the following into your .vimrc/_vimrc:

    autocmd BufRead *.java compiler ant

Now when you edit .java files and want to compile them using the default
ant target, you simply type the following command from the editor:


If you want to invoke a non-default target, simply execute it using the
following command:

    :!ant othertarget

This command simply interacts with the shell.  If your $PWD isn't where
your build.xml file is located, then you'll have to pass that file to
ant as a parameter.

This is how I use ant with Vim, and it doesn't require any plugins.
Also, it's very effective and easy to use.

Also, you might want to try the following command:

    :h quickfix

Please note that this works on both Windows and Linux.


Tom Purl

P.S.  I control my $PWD variable using the Project plugin, which is
something that you might want to look into if you're doing a lot of Java
development using Vim.

> Hi,
> I need some plugin to be able to compile using ant and parse it's output
> from vim.
> I've seen there are some, but I want something small and simple i have
> not found yet.
> Any recomendation will be appreciated. Thanks.

Reply via email to