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=haskellbut 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} -
How can I select a syntax highlighting at the (shell-) command line?
syntax highlighting;invocation
You can use +command to execute command after the file is loaded:cat File.hs | some | processing | pipeline | vim -R +'setf haskell' -