Is there some way Linux editors can tell the programming language without the file extension?
Posted
by
vfclists
on Super User
See other posts from Super User
or by vfclists
Published on 2012-10-03T16:11:44Z
Indexed on
2012/10/03
21:43 UTC
Read the original article
Hit count: 243
I am editing some scripts on Linux without the languages file extensions, and it seems that the editors, namely vi, nano and gedit are not applying syntax highlighting because the filenames don't use the language extensions.
Is there some parameters to be passed or some setting that can enable them to recognize the language?
Update:
After some googling I realize that bash has that ability, at least to do some parsing or check the shebang at the top determine the language. By default Ubuntu does not install the complete vim package, so after installing it, the shell files are recognized. I don't know about nano or gedit, but vi and its graphical counterpart will do.
© Super User or respective owner