1 of 3
1
ExpressionEngine Mode for Coda
Posted: 28 April 2007 11:16 AM   [ Ignore ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  838
Joined  04-24-2002

I’ve put together a REALLY basic ExpressionEngine mode for Panic’s new Coda. Consider it an alpha release. Right now it will just highlight EE tags and comments, along with HTML, CSS, JavaScript and PHP. There’s no autocompletion and no clips.

I’ve noticed that if your EE template doesn’t start with <html>, highlighting gets borked. A simple way to force it to highlight correctly is to start your template with an EE comment

{!-- EE Template --}

Anyway, I’m releasing it out in the wild to ask for help with it. Crack it open, check out the files and help me refine it.

Download EE mode for Coda

Image Attachments
EE-coda.jpg
Click thumbnail to see full-size image
 Signature 

chrisruzin.netTextMate EE BundleTextMate EE Developer Bundle • Pro Network member
“The greatest barrier to success is the fear of failure.” - Sven Goran Eriksson

Profile
 
 
Posted: 28 April 2007 12:51 PM   [ Ignore ]   [ # 1 ]  
Lab Assistant
RankRank
Total Posts:  188
Joined  10-23-2002

How do we install this and then, how is it supposed to work?

Profile
 
 
Posted: 28 April 2007 01:07 PM   [ Ignore ]   [ # 2 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  838
Joined  04-24-2002

Install it here: ~/Library/Application Support/Coda/Modes/

Then when you’re editing a template, change the syntax mode to ExpressionEngine in Coda. It should highlight all EE tags along with other common languages used in EE templates.

You will most likely need to reassign colors for the mode in your preferences.

 Signature 

chrisruzin.netTextMate EE BundleTextMate EE Developer Bundle • Pro Network member
“The greatest barrier to success is the fear of failure.” - Sven Goran Eriksson

Profile
 
 
Posted: 28 April 2007 01:33 PM   [ Ignore ]   [ # 3 ]  
Lab Assistant
RankRank
Total Posts:  188
Joined  10-23-2002

So far it looks great.  I haven’t had time to play a bunch with it, but did notice right off that the {embed=”“} tag is not colorized.  Is this an oversight or am I doing something wrong?

Profile
 
 
Posted: 28 April 2007 01:37 PM   [ Ignore ]   [ # 4 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  838
Joined  04-24-2002

Yeah, embed is colorized like an attribute right now. It’s one of my to-dos.

 Signature 

chrisruzin.netTextMate EE BundleTextMate EE Developer Bundle • Pro Network member
“The greatest barrier to success is the fear of failure.” - Sven Goran Eriksson

Profile
 
 
Posted: 28 April 2007 02:04 PM   [ Ignore ]   [ # 5 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  758
Joined  09-27-2004

wow. thxs grin

Profile
 
 
Posted: 28 April 2007 06:09 PM   [ Ignore ]   [ # 6 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  838
Joined  04-24-2002

I’ve updated the EE mode. Highlighting should be better now. It still colorizes embed as an attribute, but I think I like that. It makes embeds stick out a little. Let me know what you think.

Now I need to start working on autocompletion…

Download EE mode for Coda

 Signature 

chrisruzin.netTextMate EE BundleTextMate EE Developer Bundle • Pro Network member
“The greatest barrier to success is the fear of failure.” - Sven Goran Eriksson

Profile
 
 
Posted: 28 April 2007 08:12 PM   [ Ignore ]   [ # 7 ]  
Administrator
Avatar
RankRankRankRankRankRank
Total Posts:  6713
Joined  03-23-2006

Chris, great work.  I’ve recently found myself using and liking Coda, and I think this will make it even more useful.  Thanks for releasing this to the world!

 Signature 

DerekAllard.com - CodeIgniter, ExpressionEngine, and the World of Web Design
BambooInvoice - Open Source, CodeIgniter powered invoicing.

Profile
MSG
 
 
Posted: 28 April 2007 10:45 PM   [ Ignore ]   [ # 8 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  838
Joined  04-24-2002

I’ve updated the EE mode again. I started with a different base mode this time, just plain HTML instead of PHP-HTML. This reduced the size of the mode file from 62k down to 50k.

I’ve also got the embed tag colored correctly, along with other single-line EE tags like encode, switch, path, etc. Also, EE comments are now considered symbols, so you’ll find them in the symbols window.

I’ve still got some stuff I need to do with the highlighting:

* Color numbers in EE Tags, but ignore segment_X
* EE tags in string (e.g. <a href=”{path=“weblog/comment”}”>)

Right now, EE tags inside of attribute strings can really bork the highlighting. If a RegEx guru wants to crack open the mode file and look in SyntaxDefinition.xml, go right ahead. Any optimizing or fixes are welcome.

 Signature 

chrisruzin.netTextMate EE BundleTextMate EE Developer Bundle • Pro Network member
“The greatest barrier to success is the fear of failure.” - Sven Goran Eriksson

Profile
 
 
Posted: 04 May 2007 09:28 AM   [ Ignore ]   [ # 9 ]  
Lab Assistant
RankRank
Total Posts:  137
Joined  05-09-2005

BBEdit sure is looking dated.  Coda doesn’t seem much good to me other than a text editor, but it’s worth it for that alone and this bundle makes it complete. Thanks very much!

 Signature 

Sonnet Media LLC,
Brooklyn, NY

Profile
 
 
Posted: 04 May 2007 10:31 AM   [ Ignore ]   [ # 10 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  838
Joined  04-24-2002

Keep in mind it’s not fully armed and operational yet, so it will mess up highlighting on some templates. I haven’t had time to get back to it this week, but maybe will this weekend.

 Signature 

chrisruzin.netTextMate EE BundleTextMate EE Developer Bundle • Pro Network member
“The greatest barrier to success is the fear of failure.” - Sven Goran Eriksson

Profile
 
 
Posted: 24 May 2007 07:11 PM   [ Ignore ]   [ # 11 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  105
Joined  12-20-2005

Thanks for putting this together…I was scared I’d have to do it!

 Signature 

Phil J Leitch - Unwound Design

Profile
 
 
Posted: 19 June 2007 03:14 PM   [ Ignore ]   [ # 12 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  549
Joined  10-14-2005

Kudos!

I did however spot that JavaScript code colouring is a little out of whack, but as you say. This is in progress. Keep up the good work!

 Signature 

Nathan Pitman

Nine Four Ltd - a member of the EEPro Network

Profile
 
 
Posted: 07 July 2007 05:10 PM   [ Ignore ]   [ # 13 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  364
Joined  05-15-2007
Chris Ruzin - 28 April 2007 01:07 PM

Install it here: ~/Library/Application Support/Coda/Modes/

Then when you’re editing a template, change the syntax mode to ExpressionEngine in Coda. It should highlight all EE tags along with other common languages used in EE templates.

You will most likely need to reassign colors for the mode in your preferences.

Sorry for the dumb question when everyone else is using this fine, but I still can’t get this to work!

When I unzip your file, there’s a folder named Contents. Do I place this in the Modes directory, or do I place the file and folder that are inside this in the directory?  Or do I just place the files/folders within the Resources folder in the Modes directory?  To be honest, I’ve tried all three anyway, but still couldn’t get it to work!

Just to confirm, I start Coda up and open a file - I then go to Text > Syntax Mode, then should be able to choose an EE option?  It just doesn’t appear for me. Do I have to activate it somehow?

Thanks,

Ste

Profile
 
 
Posted: 12 July 2007 06:35 AM   [ Ignore ]   [ # 14 ]  
Lab Assistant
RankRank
Total Posts:  162
Joined  01-22-2007
sm9 - 07 July 2007 05:10 PM
Chris Ruzin - 28 April 2007 01:07 PM

Install it here: ~/Library/Application Support/Coda/Modes/

Then when you’re editing a template, change the syntax mode to ExpressionEngine in Coda. It should highlight all EE tags along with other common languages used in EE templates.

You will most likely need to reassign colors for the mode in your preferences.

Sorry for the dumb question when everyone else is using this fine, but I still can’t get this to work!

When I unzip your file, there’s a folder named Contents. Do I place this in the Modes directory, or do I place the file and folder that are inside this in the directory?  Or do I just place the files/folders within the Resources folder in the Modes directory?  To be honest, I’ve tried all three anyway, but still couldn’t get it to work!

Just to confirm, I start Coda up and open a file - I then go to Text > Syntax Mode, then should be able to choose an EE option?  It just doesn’t appear for me. Do I have to activate it somehow?

Thanks,

Ste

SM9 when you unzip you should get a folder called ‘ExpressionEngine.mode’.

Easiest way in finder is to press shift + apple + G and copy and past ~/Library/Application Support/Coda/Modes/ into that and drag the ExpressionEngine.mode into the Modes folder.

Now when you open a template within coda you can click on the little settings/gear wheel at the bottom and go to ‘text encoding’ and then ‘expression engine’

As mentioned in the first post - you can put the tag {!—EE Template—}  at the top of your templates if they aren’t getting parsed correctly.

Hope that helps!

And to Chris thanks so much for this plugin - I’m really enjoying the EE and CODA development workflow now.

Profile
 
 
Posted: 13 July 2007 03:53 PM   [ Ignore ]   [ # 15 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  364
Joined  05-15-2007
danethomas - 12 July 2007 06:35 AM
sm9 - 07 July 2007 05:10 PM
Chris Ruzin - 28 April 2007 01:07 PM

Install it here: ~/Library/Application Support/Coda/Modes/

Then when you’re editing a template, change the syntax mode to ExpressionEngine in Coda. It should highlight all EE tags along with other common languages used in EE templates.

You will most likely need to reassign colors for the mode in your preferences.

Sorry for the dumb question when everyone else is using this fine, but I still can’t get this to work!

When I unzip your file, there’s a folder named Contents. Do I place this in the Modes directory, or do I place the file and folder that are inside this in the directory?  Or do I just place the files/folders within the Resources folder in the Modes directory?  To be honest, I’ve tried all three anyway, but still couldn’t get it to work!

Just to confirm, I start Coda up and open a file - I then go to Text > Syntax Mode, then should be able to choose an EE option?  It just doesn’t appear for me. Do I have to activate it somehow?

Thanks,

Ste

SM9 when you unzip you should get a folder called ‘ExpressionEngine.mode’.

Easiest way in finder is to press shift + apple + G and copy and past ~/Library/Application Support/Coda/Modes/ into that and drag the ExpressionEngine.mode into the Modes folder.

Now when you open a template within coda you can click on the little settings/gear wheel at the bottom and go to ‘text encoding’ and then ‘expression engine’

As mentioned in the first post - you can put the tag {!—EE Template—}  at the top of your templates if they aren’t getting parsed correctly.

Hope that helps!

And to Chris thanks so much for this plugin - I’m really enjoying the EE and CODA development workflow now.

Ahhhhhhh…  I was looking past the containing folder and instead was getting fooled by the folder within that named ‘contents,’ as in, I thought that was the contents of the plugin…

Got it working fine now, thanks for the help with this!  cool smile

Ste

Profile
 
 
Posted: 13 July 2007 08:06 PM   [ Ignore ]   [ # 16 ]  
Lab Assistant
RankRank
Total Posts:  162
Joined  01-22-2007

I thought that might have been the case - glas to see you have it up and running.

Code and EE is quite a nice development setup I have found grin

Profile
 
 
Posted: 14 July 2007 05:02 AM   [ Ignore ]   [ # 17 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  364
Joined  05-15-2007
danethomas - 13 July 2007 08:06 PM

I thought that might have been the case - glas to see you have it up and running.

Code and EE is quite a nice development setup I have found grin

I totally agree - it’s so nice not to have to use the plain text form box of EE itself and to instead, save the templates straight back to the server.  So much more efficient!

On another note, for times when I’m not on machine with Coda or a similar editor, and absolutely must edit a template via the EE control panel, how do I make a ‘tab’ space?  Pressing tab takes me out of the template window!  I’m using a Mac. I find myself copying and pasting tabs when editing a stylesheet! grin

Thanks,

Ste

Profile
 
 
Posted: 30 July 2007 04:57 PM   [ Ignore ]   [ # 18 ]  
Lab Assistant
RankRank
Total Posts:  162
Joined  01-22-2007

just wondering if there is a way to get the command + / shortcut to work with the expression engine bundle?
The shortcut is to comment selected code and I use it quite a bit when testing templates. For some reason when the mode is set to ExpressionEngine the shortcut doesn’t work.

I had a quick look through the bundle and compared it to the html bundle mode that ships with Coda but couldn’t see anything that might fix the problem for me.

Profile
 
 
   
1 of 3
1
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 64547 Total Logged-in Users: 28
Total Topics: 81142 Total Anonymous Users: 18
Total Replies: 436541 Total Guests: 191
Total Posts: 517683    
Members ( View Memberlist )