Set filetype inside file, no file extension, without using shebang #12737
-
For certain files without extensions or specific syntaxes, it would be great to be able to explicitly set a filetype using a comment at the top of the file. A shebang wouldn't make sense for certain files which are not scripts but are for ex. config files or other miscellaneous or supporting files without extensions. Example: Toward the top of this
For vim, this doesn't need to be the first line, but it also can't be further down inside the file. I assume it cannot be below any un-commented lines...? There was a previous discussion on this which was closed with a workaround resolution that doesn't directly address the need 100%, especially for files which are not scripts and therefore cannot use shebang lines. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Duplicate of #729, this feature in Vi is called the mode line |
Beta Was this translation helpful? Give feedback.
Duplicate of #729, this feature in Vi is called the mode line