新的介绍内容:
Better Align for Visual Studio Code:提升代码可读性的终极工具
Better Align是一款为Visual Studio Code设计的强大代码对齐插件,适用于所有编程语言和字符。它通过智能对齐功能和灵活的配置选项,帮助您轻松提升代码的可读性和编写效率。
主要功能:
使用方法:
将光标放置在您希望对齐代码的位置,然后使用快捷键Alt+A或通过命令面板调用Align命令,即可轻松实现代码对齐。
屏幕截图:
扩展配置:
默认值:
betterAlign.surroundSpace : {
"colon" : [0, 1], // 左侧添加的空格数,可以为负数。
// 右侧添加的空格数,可以为负数。
"assignment" : [1, 1], // 同上。
"arrow" : [1, 1], // 同上。
"comment" : 2 // 尾随注释与代码之间的空格数。
// 如果为负数,则不进行尾随注释对齐。
}
// 原始代码
var abc = {
hello: 1
,my :2//comment
,friend: 3 // comment
}
// "colon": [0, 1]
// "comment": 2
var abc = {
hello : 1
, my : 2 // comment
, friend: 3 // comment
}
// "colon": [1, 2]
// "comment": 4
var abc = {
hello : 1
, my : 2 // comment
, friend : 3 // comment
}
// "colon": [-1, 3]
// "comment": 2
var abc = {
hello: 1
, my: 2 // comment
, friend: 3 // comment
}
// "colon": [-1, -1]
// "comment": 2
var abc = {
hello:1
, my:2 //comment
, friend:3 // comment
}
// 原始代码
$data = array(
'text' => 'something',
'here is another' => 'sample'
);
// "arrow": [1, 3]
$data = array(
'text' => 'something',
'here is another' => 'sample'
);
问题/贡献:
如果您发现了bug,请在https://github.com/chouzz/vscode-better-align/issues上提交。
如果您想参与贡献,请fork该仓库并提交pull请求。
许可证:
本作品在Apache License 2.0下授权。
致谢:
该代码库基于此仓库。感谢@WarWithinMe。
本站所有资源都是由网友投稿发布,或转载各大下载站, 请自行检测软件的完整性!
本站所有资源仅供学习与参考,请勿用于商业用途,否则 产生的一切后果将由您自己承担!
如有侵权请联系我们删除下架,联系方式:study_golang@163.com