Created
November 11, 2013 10:50
-
-
Save jokester/7411359 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# vim: ft=perl | |
use File::Which qw/ which /; | |
use Data::Dumper; | |
$pdf_mode = 1; # use pdflatex | |
$pdflatex = "pdflatex -file-line-error -halt-on-error"; | |
&find_pdf_previewer(\$pdf_previewer); | |
sub find_pdf_previewer { | |
my $result = shift; | |
my $os = `uname`; | |
if( $os =~ /linux/i ){ | |
print "is linux\n"; | |
my @previewers = qw/ evince /; | |
for(@previewers){ | |
$found = which $_; | |
if($found){ | |
$$result = $found; | |
return; | |
} | |
} | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment