Beast_Code
Beast_Code

Reputation: 3247

How do i change the formatting Aptana Studio does when using the format command?

There are times where I will use the Aptana shortcut key for auto formatting my code.

Shift + cmd + f

It's the same as clicking

Source >> Format

My problem is that I don't always like some of the formatting it does for me. For example, when performing the auto format command. It will format my lists in HTML like this:

<li>
  <a href"#">Home</a>
</li>

but I want it to format it like this:

<li><a href"#">Home</a></li>

How can I make it format it like the second example? I have tried

Preferences >> Aptana Studio >> Formatter

But it is very confusing on what and how to change. Are there any better ways of doing this?

Upvotes: 1

Views: 840

Answers (1)

bsauls
bsauls

Reputation: 41

  1. In Aptana, or Titanium Studio, open Window>Preferences... find Formatter (under Studio in Titanium Studio, I don't know the exact location in Aptana).

  2. Active profile: I created a new profile and saved it in (Win 7) %AppData/Local/Titanium Studio/, but you may be able to edit the Default Profile.

  3. Preview: Select HTML and click edit (pencil icon). You will see a list of exclusions of HTML elements on the left of the dialog.

  4. Click the Add button and type li in the dialog box. Click OK, OK, OK.

You may need to refresh your open file, but you do not need to restart the app.

Upvotes: 1

Related Questions