forked from textmate/ruby.tmbundle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCheck ERB Syntax.plist
48 lines (46 loc) · 1.37 KB
/
Check ERB Syntax.plist
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?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>beforeRunningCommand</key>
<string>nop</string>
<key>command</key>
<string>#!/usr/bin/env ruby18
require "shellwords"
require ENV['TM_SUPPORT_PATH'] + '/lib/textmate'
puts "Using " + `"${TM_RUBY:=ruby}" -e'puts "ruby-" + RUBY_VERSION.to_s'`.chomp + " / " + `"${TM_ERB:=erb}" --version 2>&1`.chomp
puts result = `"${TM_ERB:=erb}" -T - -x | "${TM_RUBY:=ruby}" -c 2>&1`
if result =~ /-:(\d+):(.*)/
TextMate.go_to :line => $1
`"$TM_MATE" -c warning`
result.each_line do |line|
if line =~ /-:(\d+):(.*)/
`"$TM_MATE" --set-mark warning:#{Shellwords.escape($2)} --line #{$1}`
end
end
else
`"$TM_MATE" -c warning`
end
</string>
<key>input</key>
<string>document</string>
<key>inputFormat</key>
<string>text</string>
<key>keyEquivalent</key>
<string>^V</string>
<key>name</key>
<string>Validate Syntax (ERB)</string>
<key>outputCaret</key>
<string>afterOutput</string>
<key>outputFormat</key>
<string>text</string>
<key>outputLocation</key>
<string>toolTip</string>
<key>scope</key>
<string>text.html.erb, text.html source.ruby</string>
<key>uuid</key>
<string>76FCF165-54CB-4213-BC55-BD60B9C6A3EC</string>
<key>version</key>
<integer>2</integer>
</dict>
</plist>