VIM does not detect syntax of .ssh/config

Posted by Erik on Ask Ubuntu See other posts from Ask Ubuntu or by Erik
Published on 2012-10-17T09:12:41Z Indexed on 2012/10/17 23:21 UTC
Read the original article Hit count: 472

Filed under:
|
|

On a plain Ubuntu installation (12.04 in my case) when I have no ~/.vimrc VIM does not detect syntax of .ssh/config.

Syntax highlighting works, but it does not set the correct filetype.

vi ~/.ssh/config
  :set syn?
  >syntax=conf

When I do:

set syn=sshconfig

Then the syntax highlighting is as it should be.

Why isn't the filetype automatically identified? And how can it be set automatically?

© Ask Ubuntu or respective owner

Related posts about ssh

Related posts about vim