Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

JSHint on save upgraded to TM2 using `validate.quick` semantic action

Now you can have more than 1 onSave action in TextMate.
You can also add additional proxies to trigger `validate.quick` across
all languages and implementations.

Separation of concerns win!
  • Loading branch information...
commit 665335006fc8bc3f1c5f625c179af2e0f3c0508d 1 parent 5ee39f3
@subtleGradient authored
View
6 Commands/Validate with JSHint (Quick).tmCommand
@@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>beforeRunningCommand</key>
- <string>saveActiveFile</string>
+ <string>nop</string>
<key>command</key>
<string>#!/usr/bin/env bash -l
[[ -f "${TM_SUPPORT_PATH}/lib/bash_init.sh" ]] &amp;&amp; . "${TM_SUPPORT_PATH}/lib/bash_init.sh"
@@ -18,8 +18,6 @@ cat|"${TM_NODEJS:-node}" "$TM_BUNDLE_SUPPORT/bin/jshint.textmate.js" quick
<string>scope</string>
<key>inputFormat</key>
<string>text</string>
- <key>keyEquivalent</key>
- <string>@s</string>
<key>name</key>
<string>Validate with JSHint (Quick)</string>
<key>outputCaret</key>
@@ -30,6 +28,8 @@ cat|"${TM_NODEJS:-node}" "$TM_BUNDLE_SUPPORT/bin/jshint.textmate.js" quick
<string>toolTip</string>
<key>scope</key>
<string>source.js -(meta.tag.block.script.html)</string>
+ <key>semanticClass</key>
+ <string>validate.quick</string>
<key>uuid</key>
<string>EAC536BF-6C4C-4AE9-8437-B28E8EB31631</string>
<key>version</key>
View
16 Proxies/Validate Quick On Save.tmProxy
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>content</key>
+ <string>validate.quick</string>
+ <key>name</key>
+ <string>Validate Quick On Save</string>
+ <key>scope</key>
+ <string>source.es, source.js</string>
+ <key>semanticClass</key>
+ <string>callback.document.did-save</string>
+ <key>uuid</key>
+ <string>8CA136A0-6648-4DA0-9253-9A1F1F9967E7</string>
+</dict>
+</plist>
Please sign in to comment.
Something went wrong with that request. Please try again.