Usually, vim will get the highlighting right from the file extension, but this obviously doesn't work when I'm displaying content read from standard input.
cat File.hs | some | processing | pipeline | view -
I can obtain the proper highlighting with
:set syntax=haskell
but that's awkward to do multiple times. How do I select the highlighting right at command-line invocation?
cat File.hs | vim -R {???syntax=haskell} -