gpt4 book ai didi

php - 如何将文本与 phpstorm 或 webstorm 中的特定字符对齐?

转载 作者:IT王子 更新时间:2023-10-29 00:55:27 29 4
gpt4 key购买 nike

我有这段文字

$test1 = 'testing1';
$test1test1 = 'testing1';
$test1test1test1 = 'testing1';
$test1 = 'testing1';

我想像这样对齐,使用制表符,

$test1           = 'testing1';
$test1test1 = 'testing1';
$test1test1test1 = 'testing1';
$test1 = 'testing1';

有没有办法在 phpstorm 或 webstorm 中做到这一点?

最佳答案

Cmd+Alt+L(在 Mac 中)或 Ctrl+Alt+L(Win)和 PHP Storm 将根据您在设置中的代码样式来格式化代码。要设置此代码样式,请执行以下操作:文件 -> 设置 -> 代码样式 -> PHP(在此处选择您的语言) -> 其他 -> 对齐键值对 - 标记为选中。然后按重新格式化代码 (Ctrl+Alt+L),瞧。你会得到代码,你在上面写的样式。

关于php - 如何将文本与 phpstorm 或 webstorm 中的特定字符对齐?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17281308/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com