Fix TextMate bundle for NVM users.

This commit is contained in:
Tom MacWright 2011-05-11 18:27:50 -04:00
parent ba332becd3
commit f04f612235
2 changed files with 14 additions and 5 deletions

View File

@ -5,10 +5,19 @@
<key>beforeRunningCommand</key> <key>beforeRunningCommand</key>
<string>nop</string> <string>nop</string>
<key>command</key> <key>command</key>
<string># just to remind you of some useful environment variables <strong>
# see Help / Environment Variables for the full list #!/usr/bin/env ruby
"mapnik-render.js" "$TM_FILEPATH" "/tmp/test.png"</string> nvmdir = File.expand_path('~/.nvm')
if File.directory?nvmdir then
cartos = Dir.glob(nvmdir + '/*/bin/mapnik-render.js')
carto = cartos.pop() if cartos
node = carto.gsub('/bin/mapnik-render.js', '/bin/node')
end
if carto
`#{node} #{carto} #{ENV['TM_FILEPATH']} /tmp/test.png`
end
</string>
<key>input</key> <key>input</key>
<string>none</string> <string>none</string>
<key>keyEquivalent</key> <key>keyEquivalent</key>

View File

@ -47,7 +47,7 @@ syn region cartoFontDescriptorFunction contained matchgroup=cartoFunctionName st
syn match cartoUnicodeRange contained "U+[0-9A-Fa-f?]\+" syn match cartoUnicodeRange contained "U+[0-9A-Fa-f?]\+"
syn match cartoUnicodeRange contained "U+\x\+-\x\+" syn match cartoUnicodeRange contained "U+\x\+-\x\+"
syn match cartoKeywordAttr "/\|miter\|round\|bevel\|butt\|round\|square\|point\|line\|arrow\|ellipse\|png\|jpg\|svg\|normal\|grain_merge\|grain_merge2\|multiply\|multiply2\|divide\|divide2\|screen\|hard_light\|fast\|bilinear\|bilinear8\|centroid\|interior\|top\|middle\|bottom\|point\|line\|vertex\|interior\|none\|uppercase\|lowercase\|capitalize\|/" syn match cartoKeywordAttr "/\|miter\|round\|bevel\|butt\|round\|square\|point\|line\|arrow\|ellipse\|local\|global\|normal\|grain_merge\|grain_merge2\|multiply\|multiply2\|divide\|divide2\|screen\|hard_light\|fast\|bilinear\|bilinear8\|centroid\|interior\|top\|middle\|bottom\|point\|line\|vertex\|interior\|none\|uppercase\|lowercase\|capitalize\|/"
" syn keyword cartoColor contained {{#colors}}{{.}} {{/colors}} " syn keyword cartoColor contained {{#colors}}{{.}} {{/colors}}
syn match cartoColor "/\|aliceblue\|antiquewhite\|aqua\|aquamarine\|azure\|beige\|bisque\|black\|blanchedalmond\|blue\|blueviolet\|brown\|burlywood\|cadetblue\|chartreuse\|chocolate\|coral\|cornflowerblue\|cornsilk\|crimson\|cyan\|darkblue\|darkcyan\|darkgoldenrod\|darkgray\|darkgreen\|darkgrey\|darkkhaki\|darkmagenta\|darkolivegreen\|darkorange\|darkorchid\|darkred\|darksalmon\|darkseagreen\|darkslateblue\|darkslategrey\|darkturquoise\|darkviolet\|deeppink\|deepskyblue\|dimgray\|dimgrey\|dodgerblue\|firebrick\|floralwhite\|forestgreen\|fuchsia\|gainsboro\|ghostwhite\|gold\|goldenrod\|gray\|grey\|green\|greenyellow\|honeydew\|hotpink\|indianred\|indigo\|ivory\|khaki\|lavender\|lavenderblush\|lawngreen\|lemonchiffon\|lightblue\|lightcoral\|lightcyan\|lightgoldenrodyellow\|lightgray\|lightgreen\|lightgrey\|lightpink\|lightsalmon\|lightseagreen\|lightskyblue\|lightslategray\|lightslategrey\|lightsteelblue\|lightyellow\|lime\|limegreen\|linen\|magenta\|maroon\|mediumaquamarine\|mediumblue\|mediumorchid\|mediumpurple\|mediumseagreen\|mediumslateblue\|mediumspringgreen\|mediumturquoise\|mediumvioletred\|midnightblue\|mintcream\|mistyrose\|moccasin\|navajowhite\|navy\|oldlace\|olive\|olivedrab\|orange\|orangered\|orchid\|palegoldenrod\|palegreen\|paleturquoise\|palevioletred\|papayawhip\|peachpuff\|peru\|pink\|plum\|powderblue\|purple\|red\|rosybrown\|royalblue\|saddlebrown\|salmon\|sandybrown\|seagreen\|seashell\|sienna\|silver\|skyblue\|slateblue\|slategray\|slategrey\|snow\|springgreen\|steelblue\|tan\|teal\|thistle\|tomato\|turquoise\|violet\|wheat\|white\|whitesmoke\|yellow\|yellowgreen\|transparent\|/" syn match cartoColor "/\|aliceblue\|antiquewhite\|aqua\|aquamarine\|azure\|beige\|bisque\|black\|blanchedalmond\|blue\|blueviolet\|brown\|burlywood\|cadetblue\|chartreuse\|chocolate\|coral\|cornflowerblue\|cornsilk\|crimson\|cyan\|darkblue\|darkcyan\|darkgoldenrod\|darkgray\|darkgreen\|darkgrey\|darkkhaki\|darkmagenta\|darkolivegreen\|darkorange\|darkorchid\|darkred\|darksalmon\|darkseagreen\|darkslateblue\|darkslategrey\|darkturquoise\|darkviolet\|deeppink\|deepskyblue\|dimgray\|dimgrey\|dodgerblue\|firebrick\|floralwhite\|forestgreen\|fuchsia\|gainsboro\|ghostwhite\|gold\|goldenrod\|gray\|grey\|green\|greenyellow\|honeydew\|hotpink\|indianred\|indigo\|ivory\|khaki\|lavender\|lavenderblush\|lawngreen\|lemonchiffon\|lightblue\|lightcoral\|lightcyan\|lightgoldenrodyellow\|lightgray\|lightgreen\|lightgrey\|lightpink\|lightsalmon\|lightseagreen\|lightskyblue\|lightslategray\|lightslategrey\|lightsteelblue\|lightyellow\|lime\|limegreen\|linen\|magenta\|maroon\|mediumaquamarine\|mediumblue\|mediumorchid\|mediumpurple\|mediumseagreen\|mediumslateblue\|mediumspringgreen\|mediumturquoise\|mediumvioletred\|midnightblue\|mintcream\|mistyrose\|moccasin\|navajowhite\|navy\|oldlace\|olive\|olivedrab\|orange\|orangered\|orchid\|palegoldenrod\|palegreen\|paleturquoise\|palevioletred\|papayawhip\|peachpuff\|peru\|pink\|plum\|powderblue\|purple\|red\|rosybrown\|royalblue\|saddlebrown\|salmon\|sandybrown\|seagreen\|seashell\|sienna\|silver\|skyblue\|slateblue\|slategray\|slategrey\|snow\|springgreen\|steelblue\|tan\|teal\|thistle\|tomato\|turquoise\|violet\|wheat\|white\|whitesmoke\|yellow\|yellowgreen\|transparent\|/"
@ -66,7 +66,7 @@ syn match cartoColor contained "#[0-9A-Fa-f]\{6\}\>"
syn region cartoURL contained matchgroup=cartoFunctionName start="\<url\s*(" end=")" oneline keepend syn region cartoURL contained matchgroup=cartoFunctionName start="\<url\s*(" end=")" oneline keepend
syn region cartoFunction contained matchgroup=cartoFunctionName start="\<\(rgb\|lighten\|darken\|saturate\|desaturate\|fadein\|fadeout\|spin\|clip\|attr\|counter\|rect\)\s*(" end=")" oneline keepend syn region cartoFunction contained matchgroup=cartoFunctionName start="\<\(rgb\|lighten\|darken\|saturate\|desaturate\|fadein\|fadeout\|spin\|clip\|attr\|counter\|rect\)\s*(" end=")" oneline keepend
syn match cartoProp "/\|background\-color\|background\-image\|srs\|buffer\|font\-directory\|polygon\-fill\|polygon\-gamma\|polygon\-opacity\|polygon\-meta\-output\|polygon\-meta\-writer\|line\-color\|line\-width\|line\-opacity\|line\-join\|line\-cap\|line\-gamma\|line\-dasharray\|line\-meta\-output\|line\-meta\-writer\|marker\-file\|marker\-opacity\|marker\-line\-color\|marker\-line\-width\|marker\-line\-opacity\|marker\-placement\|marker\-type\|marker\-width\|marker\-height\|marker\-fill\|marker\-allow\-overlap\|marker\-spacing\|marker\-max\-error\|marker\-transform\|marker\-meta\-output\|marker\-meta\-writer\|shield\-name\|shield\-face\-name\|shield\-size\|shield\-fill\|shield\-min\-distance\|shield\-spacing\|shield\-spacing\|shield\-line\-spacing\|shield\-file\|shield\-width\|shield\-height\|shield\-type\|shield\-text\-dx\|shield\-text\-dy\|shield\-dx\|shield\-dy\|shield\-meta\-output\|shield\-meta\-writer\|line\-pattern\-file\|line\-pattern\-width\|line\-pattern\-height\|line\-pattern\-type\|line\-pattern\-meta\-output\|line\-pattern\-meta\-writer\|polygon\-pattern\-file\|polygon\-pattern\-width\|polygon\-pattern\-height\|polygon\-pattern\-type\|polygon\-pattern\-meta\-output\|polygon\-pattern\-meta\-writer\|raster\-opacity\|raster\-mode\|raster\-scaling\|point\-file\|point\-width\|point\-height\|point\-type\|point\-allow\-overlap\|point\-placement\|point\-transform\|point\-meta\-output\|point\-meta\-writer\|text\-name\|text\-face\-name\|text\-size\|text\-ratio\|text\-wrap\-width\|text\-spacing\|text\-character\-spacing\|text\-line\-spacing\|text\-label\-position\-tolerance\|text\-max\-char\-angle\-delta\|text\-fill\|text\-halo\-fill\|text\-halo\-radius\|text\-dx\|text\-dy\|text\-vertical\-alignment\|text\-avoid\-edges\|text\-min\-distance\|text\-min\-padding\|text\-allow\-overlap\|text\-placement\|text\-transform\|text\-meta\-output\|text\-meta\-writer\|building\-fill\|building\-fill\-opacity\|building\-height\|/" syn match cartoProp "/\|background\-color\|background\-image\|srs\|buffer\|font\-directory\|polygon\-fill\|polygon\-gamma\|polygon\-opacity\|polygon\-meta\-output\|polygon\-meta\-writer\|line\-color\|line\-width\|line\-opacity\|line\-join\|line\-cap\|line\-gamma\|line\-dasharray\|line\-meta\-output\|line\-meta\-writer\|marker\-file\|marker\-opacity\|marker\-line\-color\|marker\-line\-width\|marker\-line\-opacity\|marker\-placement\|marker\-type\|marker\-width\|marker\-height\|marker\-fill\|marker\-allow\-overlap\|marker\-spacing\|marker\-max\-error\|marker\-transform\|marker\-meta\-output\|marker\-meta\-writer\|shield\-name\|shield\-face\-name\|shield\-size\|shield\-fill\|shield\-min\-distance\|shield\-spacing\|shield\-spacing\|shield\-line\-spacing\|shield\-file\|shield\-text\-dx\|shield\-text\-dy\|shield\-dx\|shield\-dy\|shield\-meta\-output\|shield\-meta\-writer\|line\-pattern\-file\|line\-pattern\-meta\-output\|line\-pattern\-meta\-writer\|polygon\-pattern\-file\|polygon\-pattern\-alignment\|polygon\-pattern\-meta\-output\|polygon\-pattern\-meta\-writer\|raster\-opacity\|raster\-mode\|raster\-scaling\|point\-file\|point\-allow\-overlap\|point\-ignore\-placement\|point\-placement\|point\-transform\|point\-meta\-output\|point\-meta\-writer\|text\-name\|text\-face\-name\|text\-size\|text\-ratio\|text\-wrap\-width\|text\-spacing\|text\-character\-spacing\|text\-line\-spacing\|text\-label\-position\-tolerance\|text\-max\-char\-angle\-delta\|text\-fill\|text\-halo\-fill\|text\-halo\-radius\|text\-dx\|text\-dy\|text\-vertical\-alignment\|text\-avoid\-edges\|text\-min\-distance\|text\-min\-padding\|text\-allow\-overlap\|text\-placement\|text\-transform\|text\-meta\-output\|text\-meta\-writer\|building\-fill\|building\-fill\-opacity\|building\-height\|/"
syn match cartoComment "//.*$" contains=@Spell syn match cartoComment "//.*$" contains=@Spell
syn match cartoVariable "@[A-Za-z_-][A-Za-z0-9_-]*" contained syn match cartoVariable "@[A-Za-z_-][A-Za-z0-9_-]*" contained