开发者

Aptana 3 format phtml files

i've been using aptana for a while now, and i have开发者_如何学JAVA a little question because it is driving me mad. It is possible to recode formmat rules if there is no option in the preferences options (Windows->Preferences->Aptana studio->Formmatter).

I want to recode format rules of .phtml files for a simple rule, <?php ... ?> tag. Everytime i autoformat .phtml files, the "tag" ?> adds a line. I do not want that new line, i want it keep at the same line as the initial tag.

if i write in a .phtml file something like this:

<?php if ($this->x > 10) : ?>
   <p> It is not greater than 10 </p>
<?php else : ?>
   <p> It is greater than 10 </p>
<?php endif : ?>

and do autoformat, the autoformat return this:

<?php if ($this->x > 10) : 
?>
<p> It is not greater than 10 </p>
<?php else : 
?>
<p> It is greater than 10 </p>
<?php endif : 
?>

I hope you can understand my question. How can anybody recode a format rule or show me the option where i can say do not add a new line in ?> tag.

Thanks in advance.

P.D. Excuse if i have some grammars errors, if been a while since i have to write in english.


It's not possible (yet) with the current formatter capabilities. However, I've created an issue for that at http://jira.appcelerator.org/browse/APSTUD-3340 and you are more than welcome to add yourself as a watcher, so you will get notified.

That main problem is that the current formatter works partition-by-partition, and not by looking at the entire content as a whole.

Cheers

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜