Does anyone need code beautifier / formatter?
Moderator: kfury77
Forum rules
Please follow these guidelines when posting feature requests. This will help to increase the value of your contribution.
Please follow these guidelines when posting feature requests. This will help to increase the value of your contribution.
- Do not create new topics for already requested features. Add your comments to the existing feature request topics instead;
- Create separate topic for each feature suggestion. Do NOT post a number of non-related feature suggestions in a single topic;
- Give your topic a meaningful title. Do NOT create topics with meaningless titles, such as "My Suggestion" or "My Problem".
- Karlis
- Site Admin
- Posts: 3605
- Joined: Mon Jul 15, 2002 5:24 pm
- Location: Riga, Latvia, Europe
- Contact:
Does anyone need code beautifier / formatter?
We are currently thinking about implementing code beautifier for HTML, CSS, JavaScript and PHP.
It would be basic code beautifier/formatter which would allow you to automatically re-format your code according to your prefferred style.
It would be basic code beautifier/formatter which would allow you to automatically re-format your code according to your prefferred style.
beauty is in the eye of the beholder
I keep thinking that one of these days I am gonna write my own beautifier. I have my own quirky style of line separation:
longFunctionName(
$arg1
,$arg2
,$arg3
);
is an example. It makes a lot of sense to me because you can never get confused about which part the line was separated at and what's going on. There is no chance of being confused by a long line and an autowrap. Another:
$ternaryFormat = ( $condition )
? $ifTrue
: $else;
echo "lots of stuff lots of stuff lots of stuff lots of stuff lots of stuff"
. "lots of stuff lots of stuff lots of stuff lots of stuff ";
The important features are:
* long lines are indented one step
* function calls with long argument lists are indented two steps for the
start of each argument, one step if an argument somehow gets long
enough to wrap.
* an operator or "punctuation" grammar element begins any line except
As you can see, I am gonna want to have something very pretty TO ME, and it probably won't match up to any non-OCD coder. Being able to go back and forth between my style and anyone else's would be FANTASTIC. Being able to beautify into anyone else's style WITHOUT being able to go back frankly would be useless to me.
I suspect that, among the beautify users, I am not alone in my quirky preferences. If I can't configure it to make the result I prefer, I don't want it. I suggest that you could more profitably spend your time on other features.
I may be wrong. It has happened before.
longFunctionName(
$arg1
,$arg2
,$arg3
);
is an example. It makes a lot of sense to me because you can never get confused about which part the line was separated at and what's going on. There is no chance of being confused by a long line and an autowrap. Another:
$ternaryFormat = ( $condition )
? $ifTrue
: $else;
echo "lots of stuff lots of stuff lots of stuff lots of stuff lots of stuff"
. "lots of stuff lots of stuff lots of stuff lots of stuff ";
The important features are:
* long lines are indented one step
* function calls with long argument lists are indented two steps for the
start of each argument, one step if an argument somehow gets long
enough to wrap.
* an operator or "punctuation" grammar element begins any line except
As you can see, I am gonna want to have something very pretty TO ME, and it probably won't match up to any non-OCD coder. Being able to go back and forth between my style and anyone else's would be FANTASTIC. Being able to beautify into anyone else's style WITHOUT being able to go back frankly would be useless to me.
I suspect that, among the beautify users, I am not alone in my quirky preferences. If I can't configure it to make the result I prefer, I don't want it. I suggest that you could more profitably spend your time on other features.
I may be wrong. It has happened before.
My co-workers use a different editor. When they edit a file, they "crash" my prefered source formating and add a lot of blank whitespace lines to the code. I would like to remove this with a beautifier.
Also important for me:
An option to change
<p>
text
</p>
to
<p>text</p>
A good example for a beautifer is Dreamweaver's "Apply Source Formating" function.
Also important for me:
An option to change
<p>
text
</p>
to
<p>text</p>
A good example for a beautifer is Dreamweaver's "Apply Source Formating" function.
-
- Posts: 11
- Joined: Fri Jun 24, 2005 1:41 am
- Location: Sydney, Oz
A CSS beautifier would be nice
I work with CSS and sometimes the properties are all on one line, a keep looking for the menu option to "Indent CSS" and get a result like I get with "Indent HTML"
Regards,
Purple
Purple
-
- Posts: 2
- Joined: Wed Apr 05, 2006 10:12 pm
Code Formatter
I liked the feature to remove trailing spaces, but I had to turn it off because I would do this:
<div class="blah">
</div>
And it would be tabbed properly, then I would go UP to the middle area and start typing, but the tabs would be gone already.
So it would be nice to have a code formatter to remove the traling spaces when I finished the page. Also, making sure the tabbing is correct would be nice.
<div class="blah">
</div>
And it would be tabbed properly, then I would go UP to the middle area and start typing, but the tabs would be gone already.
So it would be nice to have a code formatter to remove the traling spaces when I finished the page. Also, making sure the tabbing is correct would be nice.