From d4656493638b8cc0401c617d8bc4b477065342c6 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sun, 26 Sep 2010 14:40:59 +0200 Subject: vim_mode: Only print debug output if DEBUG is 1. --- vim-mode/vim_mode.pl | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'vim-mode') diff --git a/vim-mode/vim_mode.pl b/vim-mode/vim_mode.pl index 67e5cc4..d6c03b6 100644 --- a/vim-mode/vim_mode.pl +++ b/vim-mode/vim_mode.pl @@ -20,8 +20,7 @@ # /statusbar window add vim_mode to get the status. # NOTE: This is still under extreme development, and there's a whole bunch of -# debugging output. Edit the script to remove all the print statements if it -# bothers you. +# debugging output. Edit the DEBUG constant to remove it if it bothers you. # Have fun! @@ -384,18 +383,18 @@ sub cmd_ex_command { $search = '(?i)' . $search; } - print "Search is $search"; + print "Search is $search" if DEBUG; my $re_pattern = qr/$search/; if (scalar grep { $_ eq 'g' } @re_flags) { $line =~ s/$re_pattern/$rep_fun->()/eg; } else { - print "Single replace: $replace"; + print "Single replace: $replace" if DEBUG; $line =~ s/$re_pattern/$rep_fun->()/e; } - print "New line is: $line"; + print "New line is: $line" if DEBUG; _input($line); } } -- cgit v1.2.3