-
Notifications
You must be signed in to change notification settings - Fork 75
/
FileHeader.sublime-settings
253 lines (204 loc) · 6.26 KB
/
FileHeader.sublime-settings
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
{
/*
options
=======
*/
/*
The datetime format.
0: "%Y-%m-%d %H:%M:%S"
1: "%Y-%m-%d"
2: "%H:%M:%S"
*/
"time_format": 0,
/*
The custom time format. It will format `create_time` and `last_modified_time`
instead of `time_format` if you set it. The time format refers to`
https://docs.python.org/2/library/datetime.html#strftime-and-strptime-behavior`.
*/
"custom_time_format": "",
/*
Whether add template on save. Can be either a boolean or a regex which will
be searched against the file name
*/
"enable_add_template_on_save": false,
/*
Whether add template to the empty file.
It's useful when you create new file through other command, for
example, the default Sublime Text's **New File...** or other plugin.
*/
"enable_add_template_to_empty_file": true,
/*
Set your custom template header path here, it is a directory in which
you write your own header files. The file name should be a language,
"Python.tmpl" for example.
*/
"custom_template_header_path": "",
/*
Set your custom template body path here, it is a directory in which
you write your own body files. The file name should be a language,
"Python.tmpl" for example.
The template structure is:
I am a file
-----------
header
body
*/
"custom_template_body_path": "",
/*
Whether show input panel when you add header. The default file which
you add header to is the current file you edit.
*/
"show_input_panel_when_add_header": true,
/*
Whether open file when you add header to files in the specified
directory.
*/
"open_file_when_add_header_to_directory": true,
/*
Whether enable add header to hidden directory. If false, FileHeader
won't add header to files under it.
*/
"enable_add_header_to_hidden_dir": false,
/*
Whether enable add header to hidden file. If false, FileHeader
won't add header to it.
*/
"enable_add_header_to_hidden_file": false,
/*
FileHeader judges programming language according file suffix.
Default programming language if FileHeader judges failed when you
create new file.
*/
"syntax_when_not_match": "Text",
/*
FileHeader will judge programming language according to file suffix.
You can add more file suffix here. Note: language should be one of
that under **Default**. If FileHeader don't find the suffix,
FileHeader will set language as **syntax_when_not_match** above.
*/
"file_suffix_mapping": {
},
/*
FileHeader will handle header prefix according to programming language.
You can add more header prefix here. Note: language should be one of
that under **Default**.
*/
"header_prefix_mapping": {
},
/*
Set special language syntax mapping, in case of syntax mapping file name
differs from programming language name file name
*/
"language_syntax_mapping": {
},
/*
Set special file suffix equivalence. Take `blade.php` for example,
FileHeader will initial file with suffix `blade.php` with that of `html`.
*/
"extension_equivalence": {
},
/*
Variables
=========
*/
/*
Below is the variables you render templater.
*/
"Default": {
/*
Builtin Variables
=================
- create_time
The file created time. It will be automatically set when you create
a new file if you use it.
Can't be set custom.
- author
The file creator.
FileHeader will set it automatically. If it's in
a git repository and the `user.name` has been set, `autor`
will set to `user.name`, otherwise it will be set to current
system user.
Can be set custom.
- email
Author's email
FileHeader will set it automatically. If it's in
a git repository and the `user.email` has been set, `email`
will set to `user.email`, otherwise it will be set to `None`.
Can be set custom.
- last_modified_by
The file last modified by who? It is specially useful when
cooperation programming.
FileHeader will set it automatically. If it's in
a git repository and the `user.name` has been set, `autor`
will set to `user.name`, otherwise it will be set to current
system logined user.
Can be set custom.
- last_modified_time
The file last modified time.
FileHeader will set it automatically when you save the file.
Can't be set custom.
- file_path
The absolute path of the current file.
FileHeader will update it automatically when you change it.
Can't be set custom.
- file_name
The name of current file with extension.
FileHeader will update it automatically when you change it.
Can't be set custom.
- file_name_without_extension
The name of current file without extension.
FileHeader will update it automatically when you change it.
Can't be set custom.
- project_name
The project name.
Note: `project_name` only works in ST3.
Can't be set custom.
*/
// You can add more here......
},
/*
You can set different variables in different languages. It will cover
that in "Default".
*/
"ASP": {},
"ActionScript": {},
"AppleScript": {},
"Batch File": {},
"C#": {},
"C++": {},
"CSS": {},
"Clojure": {},
"D": {},
"Diff": {},
"Erlang": {},
"Go": {},
"Graphviz": {},
"Groovy": {},
"HTML": {},
"Haskell": {},
"Java": {},
"JavaScript": {},
"LaTeX": {},
"Lisp": {},
"Lua": {},
"Makefile": {},
"Markdown": {},
"Matlab": {},
"OCaml": {},
"Objective-C": {},
"PHP": {},
"Pascal": {},
"Perl": {},
"Python": {},
"R": {},
"RestructuredText": {},
"Ruby": {},
"SQL": {},
"Scala": {},
"ShellScript": {},
"TCL": {},
"Text": {},
"Textile": {},
"XML": {},
"YAML": {}
}