Advertisement
triclops200

Vim printer

Jul 23rd, 2013
253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.35 KB | None | 0 0
  1. #!/usr/bin/env ruby
  2. if ARGV.length < 1
  3.     puts "Usage: #{$0} <filename> [vim color scheme]"
  4.     exit 1
  5. end
  6. puts "Welcome to #{$0}"
  7. puts "PRINTING #{ARGV[0]}"
  8. printopts="+set printoptions=number:y,left:5pc"
  9. color = "+colo"
  10. if ARGV.length == 2
  11. color = "+colo #{ARGV[1]}"
  12. end
  13. `vim "#{color}" "#{printopts}" "+hardcopy > /tmp/out.ps" #{ARGV[0]} "+q"`
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement