PHPstorm 9.0.2 在哪设置 HereDoc 的格式?

2015-11-09 14:03:14 +08:00
 zhangwei1996
格式化的时候想这样:

```
$heredoc = <<< HEREDOC_ID
some $contents
HEREDOC_ID;
```

但是现在格式化以后是这样:

```
$heredoc
= <<< HEREDOC_ID
some $contents
HEREDOC_ID;
```

请问在哪里设置呢? Editor->Code&style->PHP 找了很久都没有找到呢!
1225 次点击
所在节点    问与答
5 条回复
zhangwei1996
2015-11-09 14:06:19 +08:00
where setting "heredoc format style" in phpstorm 9.0.2

I hope like this :

```
$heredoc = <<< HEREDOC_ID
some $contents
HEREDOC_ID;
```


but now , After formatting like this :

```
$heredoc
= <<< HEREDOC_ID
some $contents
HEREDOC_ID;
```


Where can I set it? `Editor->Code&style->PHP` for a long time did not find
zhangwei1996
2015-11-09 14:07:24 +08:00
linauror
2015-11-09 16:11:44 +08:00
File-Settings
搜索框直接输入 heredoc 回车
Colors & Fonts - PHP
点进去就是
zhangwei1996
2015-11-09 16:20:19 +08:00
@linauror 搜,只有 color 设置
cxbig
2015-11-09 16:26:44 +08:00
HereDoc 从第二行开始必须顶格写。 reformat 是对的。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/234776

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX