自动对齐"var";在PhpStorm(7.0.1)中的JavaScript下 [英] Auto align "var" under JavaScript in PhpStorm (7.0.1)

查看:73
本文介绍了自动对齐"var";在PhpStorm(7.0.1)中的JavaScript下的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用PhpStorm(现在是7.0.1)已有几个月了,对此感到非常满意,尤其是在代码格式方面.但是,即使自动格式化在PHP和HTML中效果很好,但我还是不知道如何使PhpStorm从此自动对齐 var s:

I've been using PhpStorm (now 7.0.1) for several months now and am more than satisfied, especially with the code formatting. However, even though the auto formatting works very well in PHP and HTML, I just can't figure out how to make PhpStorm automatically align vars from this:

var my_variable = "my value";
var your_variable = "your value";

对此:

var my_variable   = "my value";
var your_variable = "your value";

我花了数小时来研究代码样式设置,但仍然无法完成.我本来希望选择设置>代码样式> JavaScript>其他>对齐对象属性:按值是我要寻找的,但是不幸的是,它无论在当前还是当前都没有改变.一个新的项目.

I've spent hours playing around with the code styling settings but still can't get it done. I would have expected the option Settings > Code Style > JavaScript > Other > Align object properties: On value would be what I'm looking for but unfortunately it does not change anything, neither in the current nor in a fresh project.

有什么想法吗?

推荐答案

首先: 设置>代码样式>JavaScript>其他>对齐对象属性:值变量对齐无关.

第二个:此选项(对齐多行变量声明)在v7中不可用-仅在即将发布的v8 中可用.

Second: This option (Align multiline variable declaration) is NOT available in v7 -- ONLY in upcoming v8.

PhpStorm v8的EAP(早期访问程序)具有问题已得到解决 ..但我不能确定它将在下一个EAP构建中使用可用-只需关注内部版本号(帮助|关于")-应该为 136.1141或更高版本.

EAP (Early Access Program) for PhpStorm v8 has already started and option is there. Unfortunately, it is buggy (IDE just hangs straight away when this option is activated). Issue has been fixed already .. but I cannot tell in which of next EAP builds it will be available -- just keep an eye on build number (Help | About) -- it should be 136.1141 or newer.

这篇关于自动对齐"var";在PhpStorm(7.0.1)中的JavaScript下的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆