Home > Uncategorized > Useful VIM Abbreviations for Debugging Perl

Useful VIM Abbreviations for Debugging Perl

iab perlb print “<p>debug ::: $_ :: $’ :: $` line “.__LINE__.”\n”;exit;
iab perlbb print “<p>debug ::: <C-R>a line “.__LINE__.”\n”;exit;
iab perlbd do{print “<p>debug :: <C-R>a line “.__LINE__.”\n”;exit} if $_ =~ /\w\w/i;
iab perld use Data::Dumper; print Dumper %ENV;

the <C-R>a automatically inserts whatever variable you had previously stored in register a

Categories: Uncategorized Tags:
  1. No comments yet.
  1. No trackbacks yet.