I am a relative new user to vim. I started using it along with a newly set up arch installation. So when I created different netctl profiles in vim, it highlighted the parameters like shown in the image, without having defined a filetype. But from one moment, it stopped doing so, the plain text profiles are now unicolored and I cant get it back working, e.g. by switching on syntax highlighting manually. Edit: the shown profile is named like in the description, htw_eduroam. No file extension.
Vim generally identifies the filetype(and therefore the syntax higlighting) from the extension of a file.
one.py would imply that it's a Python file. But in your case, since your file
netctl does not have an extension, it is not able to ascertain the filetype.
Since the syntax of assignments in
netctl is very similar to Python, you can type
:set syntax=python in the normal mode. You could also do the same with
:set filetype=python. Though it would do the trick, I do not recommend the same.
If you extensively work with these files, you could make your own vim syntax files . Have a look at
:help syntax in vim.
Edit : As @Christian mentioned in comment,
:set syntax=dosini will set the syntax highlighting as it's an