文件头配置

人非生而知之者,孰能无惑?惑而不从师,其为惑也,终不解矣。

—— 唐·韩愈·《师说》

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
{
    "psi-header.config": {
        "author": "fasion",
        "authorEmail": "fasionchan@gmail.com"
    },

    "psi-header.lang-config": [
        {
            "language": "shellscript",
            "begin": "",
            "prefix": "# ",
            "end": "",
            "beforeHeader": [
                "#!/bin/sh",
                "",
            ],
        },
        {
            "language": "python",
            "begin": "'''",
            "prefix": "",
            "end": "'''",
            "beforeHeader": [
                "#!/usr/bin/env python",
                "# -*- encoding=utf8 -*-",
                "",
            ],
        },
        {
            "language": "makefile",
            "begin": "",
            "prefix": "# ",
            "end": "",
        },
        {
            "language": "restructuredtext",
            "begin": "..",
            "prefix": "    ",
            "end": ""
        },
        {
            "language": "markdown",
            "begin": "---",
            "prefix": "",
            "end": "---",
            "modDate": "date:",
            "modDateFormat": "YYYY-MM-DD[T]HH:mm:ssZ"
        }
    ],

    "psi-header.changes-tracking": {
        "isActive": true,
        "modAuthor": "Last Modified by:",
        "modDate": "Last Modified time:",
        "modDateFormat": "YYYY-MM-DD HH:mm:ss"
    },

    "psi-header.templates": [
        {
            "language": "*",
            "template": [
                "Author: <<author>>",
                "Created time: <<filecreated('YYYY-MM-DD HH:mm:ss')>>",
                "Last Modified by:",
                "Last Modified time:",
            ]
        },
        {
            "language": "markdown",
            "template": [
                "author: <<author>>",
                "date:",
            ]
        },
    ]
}

【小菜笔记】系列文章首发于公众号【小菜学编程】,敬请关注: