jkformat:Visual Studio Code 中美化 JavaScript、JSON、CSS、Sass、Less、HTML 和 nunjucks 的终极工具
jkformat 是一款专为 Visual Studio Code 设计的扩展工具,旨在帮助开发者美化多种编程语言和标记语言的代码,包括 JavaScript、JSON、CSS、Sass、Less、HTML 和 nunjucks。无论您是前端开发者还是全栈工程师,jkformat 都能显著提升您的代码可读性和开发效率。
扩展设置:
jkformat 提供了丰富的设置选项,允许用户根据个人需求定制代码格式。以下是默认设置示例:
jkformat:{
"html": {
"brace_style": "collapse,preserve-inline",
"extra_liners": [],
"end_with_newline": true,
"indent_size": 2,
"indent_char": " ",
"indent_with_tabs": false,
"indent_inner_html": false,
"indent_handlebars": true,
"indent_body_inner_html": true,
"indent_head_inner_html": true,
"indent_scripts": "normal",
"max_preserve_newlines": 0,
"preserve_newlines": true,
"unformatted": ["img", "code", "pre", "sub", "sup", "em", "strong", "b", "i", "u", "strike", "big", "small", "pre", "h1", "h2", "h3", "h4", "h5", "h6"],
"wrap_line_length": 0
},
"css": {
"end_with_newline": true,
"indent_char": " ",
"indent_size": 2,
"newline_between_rules": true,
"selector_separator": " ",
"selector_separator_newline": true
},
"js": {
"operator_position": "before-newline",
"comma_first": false,
"brace_style": "collapse,preserve-inline",
"break_chained_methods": false,
"e4x": false,
"end_with_newline": true,
"indent_char": " ",
"indent_level": 0,
"indent_size": 2,
"indent_with_tabs": false,
"jslint_happy": false,
"keep_array_indentation": false,
"keep_function_indentation": false,
"max_preserve_newlines": 2,
"preserve_newlines": true,
"space_after_anon_function": false,
"space_before_conditional": true,
"space_in_empty_paren": false,
"space_in_paren": false,
"unescape_strings": false,
"wrap_line_length": 0
}
}
您可以根据自己的需求调整这些设置,以达到最佳的代码美化效果。更多关于 js-beautify 的设置选项,请参阅相关文档。
享受美化后的代码吧!
jkformat 让您的代码变得更加整洁、易读,助您在开发过程中事半功倍。
本站所有资源都是由网友投稿发布,或转载各大下载站, 请自行检测软件的完整性!
本站所有资源仅供学习与参考,请勿用于商业用途,否则 产生的一切后果将由您自己承担!
如有侵权请联系我们删除下架,联系方式:study_golang@163.com