Indicate programming language in a file without extension

前端 未结 3 1146
-上瘾入骨i
-上瘾入骨i 2020-12-16 03:03

When writing executable scripts, and declarative configuration files that use a common language (eg. Python), I often find it undesirable to add an extension to the file nam

3条回答
  •  误落风尘
    2020-12-16 03:35

    This works for many editors if you're using non-standard shebangs:

    #!/usr/bin/env python3
    # filetype=python
    

提交回复
热议问题