新建jsx文件页头作者信息注释这个功能能不能具体点。
来源:7-2 登录页面的开发(1)

lovejavacoffee
2019-11-22
因为我也用了FileHeader插件了,并且其他模板都可以的。比方说 js HTML 文件
1回答
-
Rosen
2019-11-24
是sublime么?sublime可以直接用下面这个插件配置文件
{
/*
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": {
"jsx": "js"
},
/*
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.
- 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.
*/
/*
Email
*/
"email": "email@example.com"
// 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": {},
"JSX":{},
"Bable": {},
"LaTeX": {},
"Lisp": {},
"Lua": {},
"Makefile": {},
"Markdown": {},
"Matlab": {},
"OCaml": {},
"Objective-C": {},
"PHP": {},
"Pascal": {},
"Perl": {},
"Python": {},
"R": {},
"RestructuredText": {},
"Ruby": {},
"SQL": {},
"Scala": {},
"ShellScript": {},
"TCL": {},
"Text": {},
"Textile": {},
"XML": {},
"YAML": {}
}
112019-11-24
相似问题