installed_progs.t: Python checks stdout too, 150 ok
[sunny256-utils.git] / suntodofold
blob245c87a27d36b911402cedbab9166f9b2fd78b23
1 #!/usr/bin/env perl
3 # suntodofold
4 # File ID: a7b42cf8-5d45-11df-b2c3-90e6ba3022ac
5 # Inserts fold marks in TODO files before and after stdin.
6 # Select text in visual line mode and filter the block through this script.
8 use strict;
9 use warnings;
11 $| = 1;
13 my $Line = <STDIN>;
14 my ($Indent) = ("");
16 # defined($ARGV[0]) && ($Title = join(" ", @ARGV) . " ");
17 $Line =~ /^(\s+)/ && ($Indent = $1);
18 chomp($Line);
19 print("$Line \x7B\x7B\x7B\n");
21 while (<STDIN>) {
22 print("$_");
25 print("$Indent\x7D\x7D\x7D\n");