12

Does anyone know of a syntax highlight for Mako templates for Eclipse or for TextMate?

I know that there is a .mako syntax highlighter for the default text editor in Ubuntu.

That1Guy
  • 7,075
  • 4
  • 47
  • 59
Claudio Acciaresi
  • 31,951
  • 5
  • 33
  • 43

7 Answers7

8

I just did some googlin'. There is a Mako bundle.

I installed it under ~/Library/Application Support/TextMate/Bundles/ like so:

cd ~/Library/Application\ Support/TextMate/Bundles/
svn co http://svn.makotemplates.org/contrib/textmate/Mako.tmbundle

In TextMate, I did Bundles | Bundle Editor | Reload Bundles, and Mako showed up in the menu.

It adds new HTML language variant: HTML (Mako), snippets and stuff like that.

Hope this helps.

Pavel Repin
  • 30,663
  • 1
  • 34
  • 41
  • 2
    Working great, some minor tweak, once loaded... go to Bundle Editor, select Mako, then HTML (mako) and in the second line of the script, the file type should be MAKO and not MAO, once changed, is looking really really cool. Thanks¡ – Claudio Acciaresi Jun 01 '09 at 01:54
  • 1
    thanks a ton! the link above doesn't work anymore, but this does: git clone http://github.com/williamsjj/Mako.tmbundle.git Also, if this stumps anyone, I had to create a TextMate/Bundles folder myself, it wasn't already there. – DPlusV Aug 08 '10 at 10:44
  • 1
    The link has changed : http://www.makotemplates.org/trac/attachment/wiki/WikiStart/Mako.tmbundle.zip – Studer Aug 17 '10 at 16:26
2

Claudio,

I don't use mako templates, but a quick google search turned up this article from the mako-discuss google group, which refers to a Colorer library syntax highlighter. This sounds like it might be a decent lead for you.

-matt

Matt Newby
  • 111
  • 6
  • Yep, that seems to work on os x only and I'm not sure if it does work at all anymore with recent versions of colorer / eclipse. And it works, quite badly anyways, I never took my time to finish it properly. – Mikael Lepistö Apr 08 '11 at 21:27
2

What I ended up doing was naming my Mako Templates with .html suffix and thus getting the usual HTML syntax highlighting etc. that I am used to. Alternatively I could have associated .mako suffix with the HTML handler. While this does not address Mako specifically, it was enough for me, since I find most of the template is plain HTML anyway.

Heikki Toivonen
  • 30,964
  • 11
  • 42
  • 44
  • 1
    For Aptana 3, I've found if you associate .mako's with an HTML editor you seem to get pretty good highlighting. The Python bits will not have colors, but the HTML will. – mikeycgto Jan 20 '11 at 20:03
1

You can go to:

  1. Preferences->General->Editors->File Associations.
  2. Click to add a new file type and type *.mak and click OK.
  3. In File types click on *.mak and under Associated editors add HTML editor(default), Text Editor, Text Editor(studio) and Web Browser.

This colors the text, works OK for me :)

P.S. Be sure to have the Aptana plugin installed.

Mr.Wizard
  • 24,179
  • 5
  • 44
  • 125
Alko
  • 672
  • 10
  • 21
0

There is a Mako Template Editor for Eclipse. To install, copy the plugins directory with the jar file into your dropins folder in your Eclipse root folder. That is, a manual installation of a Eclipse plugin in jar format.

Jaime M.
  • 3,613
  • 5
  • 32
  • 35
0
  1. Windows (menu) > Preference > General > Editor > File Associations Add *.mako in File Types (upper box) and add Html editor in Associated editor (lower box)

  2. Windows (menu) > Preference > General > Editor > Content Types

Under Text find HTML and add *.mako in File associations.

Esmaeil
  • 558
  • 5
  • 11
0

The LiClipse plugin (http://www.liclipse.com/), provides Mako support out of the box for Eclipse (and as a note, if you want support for any other language in Eclipse, LiClipse can load any existing TextMate bundle -- http://www.liclipse.com/textmate_bundles.html -- for that).

Fabio Zadrozny
  • 24,814
  • 4
  • 66
  • 78