Advanced Custom Syntax Coloring for Aptana Studio 3 (.less)
Asked Answered
P

1

9

I would like to add syntax highlighting for .less for Aptana Studio 3. I found XText but it only seems to work with Eclipse. Apatana doesn't seem to give too many leads into how to do this on their forums, so does anyone have any experience working with creating custom syntax highlighting or know of a solution for including .less syntax detection and highlighting already?

Polymath answered 17/3, 2012 at 17:26 Comment(1)
I have an idea, upgrade to Komodo. We used to use Eclipse PDT then Aptana and now we've grown up and started to use Komodo like all the cool guys... (Komodo has built in LESS / SASS code intelligence/syntax colouring, theres also a plugin that can compile LESS on save)Franchot
K
10

If you just want syntax highlighting, you could get Aptana to treat .less files as .css files.

To do this, open the Aptana preferences window and find the File Associations tab. You can do this by typing 'File Associations' into the search/filter bar, choose the opption listed under General > Editors.

From here, you can add a new file type, giving it the type: '*.less'. This will add the file type and may add some default associated editors.

Click on Add... to add a new associated editor, choosing the 'CSS Source Editor' option. When you press OK, it should be added to the list and be selected, click on Default to take it to the top of the list.

Now, when you open a .less file in Aptana, you'll have CSS syntax highlighting and autocomplete.

Kramlich answered 22/3, 2012 at 11:59 Comment(1)
Strangely I had done something very similar but screwed up the adding the 'CSS Source Editor' for some reason. Looks like you were mind reading and corrected that for me. This for sure will be alot of help until it is officially supported by the IDE.Polymath

© 2022 - 2024 — McMap. All rights reserved.