Revisions
-
joshheartsy revised this gist
Jul 1, 2011 . 1 changed file with 2 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,13 +6,12 @@ // works for <% content_for :inline_js do -%> // can prefix :inline_js like :fb_inline_js // The end tag should contain <% end #end :inline_js %> { name = 'inline_js.rails.embedded.html'; begin = '<%\s*(content_for)\s+(:.*inline_js)\s+(do)\s*-?%>'; end = '<%\s*(end)\s*(\#(end|END) :.*inline_js\s*-?%>\s*)'; beginCaptures = { 1 = { name = 'support.function.viewhelpers.rails'; }; 2 = { name = 'constant.other.symbol.double-quoted.ruby'; }; -
joshheartsy revised this gist
Jul 1, 2011 . 1 changed file with 14 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -25,4 +25,17 @@ patterns = ( { include = 'source.js'; } ); } // Snippet to make this easier (ijs + tab key) // To create in textmate: // Bundles -> Bundle Editor // Add Snippet // Activation -> choose "Tab Trigger" // Choose a trigger, I used "ijs" <% content_for :inline_js do %> ${1:\$(document).ready(function(){ ${0:$TM_SELECTED_TEXT} \});} <% end #end :inline_js %> -
hmcfletch revised this gist
Jun 11, 2011 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,8 +6,8 @@ // works for <% content_for :inline_js do -%> // can prefix :inline_js like :fb_inline_js // the end tag must be followed by an HTML comment: <!-- end :inline_js--> // <!-- end :fb_inline_js--> works as well { name = 'inline_js.rails.embedded.html'; -
hmcfletch revised this gist
Jun 11, 2011 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,7 +12,7 @@ { name = 'inline_js.rails.embedded.html'; begin = '<%\s*(content_for)\s+(:.*inline_js)\s+(do)\s*-?%>'; end = '<%\s*(end)\s*-?%>\s*(<!--\s*(end|END) :.*inline_js\s*-->)'; beginCaptures = { 1 = { name = 'support.function.viewhelpers.rails'; }; 2 = { name = 'constant.other.symbol.double-quoted.ruby'; }; -
hmcfletch revised this gist
Jun 11, 2011 . 1 changed file with 10 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,18 +4,24 @@ // Edit HTML (Rails) // add to the patterns // works for <% content_for :inline_js do -%> // can prefix :inline_js like :fb_inline_js // the end tag must have a comment like <% end # inline_js -%> // <% end # fb_inline_js %> works as well { name = 'inline_js.rails.embedded.html'; begin = '<%\s*(content_for)\s+(:.*inline_js)\s+(do)\s*-?%>'; end = '<%\s*(end)\s*(#\s*.*inline_js)\s*-?%>'; beginCaptures = { 1 = { name = 'support.function.viewhelpers.rails'; }; 2 = { name = 'constant.other.symbol.double-quoted.ruby'; }; 3 = { name = 'keyword.control.def.ruby'; }; }; endCaptures = { 1 = { name = 'keyword.control.def.ruby'; }; 2 = { name = 'comment.block.erb'; }; }; patterns = ( { include = 'source.js'; } ); -
hmcfletch revised this gist
Jun 11, 2011 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,6 +4,8 @@ // Edit HTML (Rails) // add to the patterns // Note: breaks if you embed a <% end %> within the js block { name = 'inline_js.rails.embedded.html'; begin = '<%\s+(content_for)\s+(:inline_js)\s+(do)\s+-?%>'; -
hmcfletch revised this gist
Jun 10, 2011 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -13,7 +13,7 @@ 2 = { name = 'constant.other.symbol.double-quoted.ruby'; }; 3 = { name = 'keyword.control.def.ruby'; }; }; endCaptures = { 1 = { name = 'keyword.control.def.ruby'; }; }; patterns = ( { include = 'source.js'; } ); -
hmcfletch created this gist
Jun 10, 2011 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ // To edit: // Bundles -> Bundle Editor -> Edit Languages // Open Ruby on Rails // Edit HTML (Rails) // add to the patterns { name = 'inline_js.rails.embedded.html'; begin = '<%\s+(content_for)\s+(:inline_js)\s+(do)\s+-?%>'; end = '<%\s+(end)\s+-?%>'; beginCaptures = { 1 = { name = 'support.function.viewhelpers.rails'; }; 2 = { name = 'constant.other.symbol.double-quoted.ruby'; }; 3 = { name = 'keyword.control.def.ruby'; }; }; endCaptures = { 1 = { name = 'keyword.control.def.ruby'; }; }; // make it blue patterns = ( { include = 'source.js'; } ); }