NAME
Vi::QuickFix - Support for vim's QuickFix mode
SYNOPSIS
#!/usr/bin/perl
use Vi::QuickFix;
#!/usr/bin/perl
use Vi::QuickFix '/my/errorfile';
perl -MVi::QuickFix program
perl -MVi::QuickFix=/my/errorfile program
DESCRIPTION
With QuickFix support, Perl logs errors and warnings to an error file named, by default, errors.err
. This file is picked up when vim is called in QuickFix mode as vim -q
. Vim starts editing the perl source where the first error occured, at the error location. QuickFix allows you to jump from one error to another, switching files as necessary. Type :help quickfix
in vim for a description.
To activate QuickFix support in Perl, add
use Vi::QuickFix;
or, specifying an error file
use Vi::QuickFix '/my/errorfile';
to your main program, before other use
statements.
To leave the program file unaltered, Vi::QuickFix can be invoked from the command line as
perl -MVi::QuickFix program
or
perl -MVi::QuickFix=/my/errorfile program
It is a fatal error when the error file cannot be opened. Vi::QuickFix
is a development tool and is not meant to be remain in a distributed product.
USAGE
The module file .../Vi/QuickFix.pm can also be called as an executable. In that mode, it behaves (roughly) like the cat
command, but also logs Perl warnings and error messages it encounters to the error file. The error file can be set through the switches -f
or -q
. Called with -v, it prints the version and exits.
You may want to use Vi::QuickFix
this way to keep everything Vi::QuickFix
-related away from your program in a different process. In that case you should copy or link .../Vi/QuickFix.pm
to a file tee_quickfix
or similar in a directory along your command path.
Used as
./program |& tee_quickfix
or
./program |& tee_quickfix -f /my/errorfile
it will create an error file and still show the program output and error messages on the screen.
This mode is not particularly supported. A more versatile tool with similar functionality comes with vim. It is located in $VIMRUNTIME/tools/efm_perl.pl
. $VIMRUNTIME
is /usr/share/vim/vim62/
on my machine, for what it's worth.
BUGS
no Vi::QuickFix
has no effect
AUTHOR
Anno Siegel
CPAN ID: ANNO
siegel@zrz.tu-berlin.de
http://www.tu-berlin.de/~siegel
COPYRIGHT
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
SEE ALSO
perl(1), vim(1).