谁记得实现等号对齐的 sublime text 插件的名称叫什么?

2017-01-06 10:18:31 +08:00
 ioioioioioioi
'country_name' => input(''),
'company_name' => input(''),
'company_id' => input(''),
'job_title' => input(''),

等号对其如下

'country_name'  => input(''),
'company_name'  => input(''),
'company_id'    => input(''),
'job_title'     => input(''),

找到了,是alignment

5558 次点击
所在节点    问与答
7 条回复
hanzichi
2017-01-06 10:27:55 +08:00
alignment
hanzichi
2017-01-06 10:28:50 +08:00
ioioioioioioi
2017-01-06 10:35:23 +08:00
@hanzichi 刚装了 alignment , 没反应是怎么回事?
~~~~
[
{ "keys": ["alt+z"], "command": "alignment" }
]
hanzichi
2017-01-06 11:03:18 +08:00
@ioioioioioioi 没选中代码?或者 alt+z 快捷键冲突了?
hanzichi
2017-01-06 11:03:35 +08:00
@ioioioioioioi 重启下 sublime ?
ioioioioioioi
2017-01-06 11:14:33 +08:00
@hanzichi 搞定了,多谢。在 setting 里加了"alignment_chars": ["=", ":", "=>"]
loserwn
2017-01-06 11:41:10 +08:00
@ioioioioioioi 原则上默认的配置中应该支持 => 吧。

```bash
// The characters to align along with "alignment_chars"
// For instance if the = is to be aligned, there are a number of
// symbols that can be combined with the = to make an operator, and all
// of those must be kept next to the = for the operator to be parsed
"alignment_prefix_chars": [
"+", "-", "&", "|", "<", ">", "!", "~", "%", "/", "*", "."
]
```

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

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

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

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

© 2021 V2EX