mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Add bundles and themes
This commit is contained in:
1
bundles/CoffeeScriptBundle.tmbundle/.gitignore
vendored
Normal file
1
bundles/CoffeeScriptBundle.tmbundle/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
*.cache
|
||||
@@ -0,0 +1,159 @@
|
||||
<?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 ruby
|
||||
#
|
||||
# Based on (from Source.tmbundle):
|
||||
#
|
||||
# Assignment block tidier, version 0.1.
|
||||
#
|
||||
# Copyright Chris Poirier 2006.
|
||||
# Licensed under the Academic Free License version 3.0.
|
||||
#
|
||||
# This script can be used as a command for TextMate to align all
|
||||
# of the assignment signs within a block of text. When using it with
|
||||
# TextMate, set the command input to "Selected Text" or "Document",
|
||||
# and the output to "Replace Selected Text". Map it to a key
|
||||
# equivalent, and any time you want to tidy up a block, either
|
||||
# select it, or put your cursor somewhere within it; then hit the
|
||||
# key equivalent. Voila.
|
||||
#
|
||||
# Note that this is the first version of the script, and it hasn't
|
||||
# been heavily tested. You might encounter a bug or two.
|
||||
#
|
||||
# Note (by Dr Nic) - the "first version" seems to have worked for years.
|
||||
# I hope the CoffeeScript version is as successful.
|
||||
#
|
||||
# Per the license, use of this script is ENTIRELY at your own risk.
|
||||
# See the license for full details (they override anything I've
|
||||
# said here).
|
||||
|
||||
lines = STDIN.readlines()
|
||||
selected_text = ENV.member?("TM_SELECTED_TEXT")
|
||||
|
||||
relevant_line_pattern = /^[^:]+:/
|
||||
column_search_pattern = /[\t ]*:/
|
||||
|
||||
comments = []
|
||||
|
||||
begin
|
||||
#
|
||||
# If called on a selection, every assignment statement
|
||||
# is in the block. If called on the document, we start on the
|
||||
# current line and look up and down for the start and end of the
|
||||
# block.
|
||||
|
||||
if selected_text then
|
||||
block_top = 1
|
||||
block_bottom = lines.length
|
||||
else
|
||||
|
||||
#
|
||||
# We start looking on the current line. However, if the
|
||||
# current line doesn't match the pattern, we may be just
|
||||
# after or just before a block, and we should check. If
|
||||
# neither, we are done.
|
||||
|
||||
start_on = ENV["TM_LINE_NUMBER"].to_i
|
||||
block_top = lines.length + 1
|
||||
block_bottom = 0
|
||||
search_top = 1
|
||||
search_bottom = lines.length
|
||||
search_failed = false
|
||||
|
||||
if lines[start_on - 1] !~ relevant_line_pattern then
|
||||
if lines[start_on - 2] =~ relevant_line_pattern then
|
||||
search_bottom = start_on = start_on - 1
|
||||
elsif lines[start_on] =~ relevant_line_pattern then
|
||||
search_top = start_on = start_on
|
||||
else
|
||||
search_failed = true
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
# Now with the search boundaries set, start looking for
|
||||
# the block top and bottom.
|
||||
|
||||
unless search_failed
|
||||
start_on.downto(search_top) do |number|
|
||||
if lines[number-1] =~ relevant_line_pattern then
|
||||
block_top = number
|
||||
else
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
start_on.upto(search_bottom) do |number|
|
||||
if lines[number-1] =~ relevant_line_pattern then
|
||||
block_bottom = number
|
||||
else
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
# Now, iterate over the block and find the best column number
|
||||
# for the = sign. The pattern will tell us the position of the
|
||||
# first bit of whitespace before the equal sign. We put the
|
||||
# equals sign to the right of the furthest-right one. Note that
|
||||
# we cannot assume every line in the block is relevant.
|
||||
|
||||
best_column = 0
|
||||
block_top.upto(block_bottom) do |number|
|
||||
line = lines[number - 1]
|
||||
if line =~ relevant_line_pattern then
|
||||
m = column_search_pattern.match(line)
|
||||
best_column = m.begin(0) if m.begin(0) > best_column
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
#
|
||||
# Reformat the block. Again, we cannot assume all lines in the
|
||||
# block are relevant.
|
||||
|
||||
block_top.upto(block_bottom) do |number|
|
||||
if lines[number-1] =~ relevant_line_pattern then
|
||||
before, after = lines[number-1].split(/[\t ]*:[\t ]*/, 2)
|
||||
# lines[number-1] = [before.ljust(best_column), after].join(after[0,1] == '>' ? ":" : ": ")
|
||||
lines[number-1] = ["#{before}:".ljust(best_column + 2), after].join
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
rescue => e
|
||||
comments << "Error: #{e.inspect}"
|
||||
comments << e.backtrace
|
||||
end
|
||||
|
||||
#
|
||||
# Output the replacement text
|
||||
|
||||
lines.each do |line|
|
||||
puts line
|
||||
end
|
||||
|
||||
comments.flatten.each { |c| puts "# #{c}" }
|
||||
|
||||
</string>
|
||||
<key>input</key>
|
||||
<string>selection</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>~@]</string>
|
||||
<key>name</key>
|
||||
<string>Align Assignments</string>
|
||||
<key>output</key>
|
||||
<string>replaceSelectedText</string>
|
||||
<key>scope</key>
|
||||
<string>source.coffee</string>
|
||||
<key>uuid</key>
|
||||
<string>EE3293A5-3761-40BD-9CA8-DAAA176AA19E</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"path": "$HOME/bin:/usr/local/bin:$PATH",
|
||||
"cmd": ["coffee","-c","$file"],
|
||||
"file_regex": "^(...*?):([0-9]*):?([0-9]*)",
|
||||
"selector": "source.coffee"
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?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>#!/bin/bash
|
||||
|
||||
function pre {
|
||||
echo -n '<pre style="word-wrap: break-word;">'
|
||||
perl -pe '$| = 1; s/&/&amp;/g; s/</&lt;/g; s/>/&gt;/g; s/$\\n/<br>/'
|
||||
echo '</pre>'
|
||||
}
|
||||
|
||||
${TM_COFFEE:=coffee} -scp --bare | pre
|
||||
</string>
|
||||
<key>fallbackInput</key>
|
||||
<string>document</string>
|
||||
<key>input</key>
|
||||
<string>selection</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>@b</string>
|
||||
<key>name</key>
|
||||
<string>Compile and Display JS</string>
|
||||
<key>output</key>
|
||||
<string>showAsHTML</string>
|
||||
<key>scope</key>
|
||||
<string>source.coffee</string>
|
||||
<key>uuid</key>
|
||||
<string>D749F761-1740-4918-9490-90DF376BA72E</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,34 @@
|
||||
<?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 ruby
|
||||
|
||||
column_number = ENV['TM_COLUMN_NUMBER']
|
||||
whitespace = " " * (column_number.to_i - 1)
|
||||
|
||||
print <<-EOS
|
||||
###
|
||||
#{whitespace}$0
|
||||
#{whitespace}###
|
||||
EOS
|
||||
</string>
|
||||
<key>fallbackInput</key>
|
||||
<string>line</string>
|
||||
<key>input</key>
|
||||
<string>none</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>^#</string>
|
||||
<key>name</key>
|
||||
<string>Insert Heredoc """ comment</string>
|
||||
<key>output</key>
|
||||
<string>insertAsSnippet</string>
|
||||
<key>scope</key>
|
||||
<string>source.coffee</string>
|
||||
<key>uuid</key>
|
||||
<string>68A86250-0280-11E0-A976-0800200C9A66</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,34 @@
|
||||
<?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 ruby
|
||||
|
||||
column_number = ENV['TM_COLUMN_NUMBER']
|
||||
whitespace = " " * (column_number.to_i - 1)
|
||||
|
||||
print <<-EOS
|
||||
"""
|
||||
#{whitespace}$0
|
||||
#{whitespace}"""
|
||||
EOS
|
||||
</string>
|
||||
<key>fallbackInput</key>
|
||||
<string>line</string>
|
||||
<key>input</key>
|
||||
<string>none</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>@"</string>
|
||||
<key>name</key>
|
||||
<string>Insert Heredoc """ quotes</string>
|
||||
<key>output</key>
|
||||
<string>insertAsSnippet</string>
|
||||
<key>scope</key>
|
||||
<string>source.coffee</string>
|
||||
<key>uuid</key>
|
||||
<string>F08537AF-4F02-4040-999D-F0785CF64C02</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,34 @@
|
||||
<?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 ruby
|
||||
|
||||
column_number = ENV['TM_COLUMN_NUMBER']
|
||||
whitespace = " " * (column_number.to_i - 1)
|
||||
|
||||
print <<-EOS
|
||||
'''
|
||||
#{whitespace}$0
|
||||
#{whitespace}'''
|
||||
EOS
|
||||
</string>
|
||||
<key>fallbackInput</key>
|
||||
<string>line</string>
|
||||
<key>input</key>
|
||||
<string>none</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>@'</string>
|
||||
<key>name</key>
|
||||
<string>Insert Heredoc ''' quotes</string>
|
||||
<key>output</key>
|
||||
<string>insertAsSnippet</string>
|
||||
<key>scope</key>
|
||||
<string>source.coffee</string>
|
||||
<key>uuid</key>
|
||||
<string>C4F99E3D-1540-4BC1-8038-0A19D65BABC8</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,27 @@
|
||||
<?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>cat <<SNIPPET
|
||||
${TM_SELECTED_TEXT:-$TM_CURRENT_WORD} = (\${1:args}) ->
|
||||
\$0
|
||||
SNIPPET</string>
|
||||
<key>fallbackInput</key>
|
||||
<string>word</string>
|
||||
<key>input</key>
|
||||
<string>selection</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>$
|
||||
</string>
|
||||
<key>name</key>
|
||||
<string>New Function</string>
|
||||
<key>output</key>
|
||||
<string>insertAsSnippet</string>
|
||||
<key>scope</key>
|
||||
<string>source.coffee</string>
|
||||
<key>uuid</key>
|
||||
<string>192428A1-8684-4172-8728-225B4C9E532F</string>
|
||||
</dict>
|
||||
@@ -0,0 +1,25 @@
|
||||
<?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>#!/bin/bash
|
||||
|
||||
${TM_COFFEE:=coffee} -s
|
||||
</string>
|
||||
<key>input</key>
|
||||
<string>selection</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>@R</string>
|
||||
<key>name</key>
|
||||
<string>Run selected text</string>
|
||||
<key>output</key>
|
||||
<string>showAsTooltip</string>
|
||||
<key>scope</key>
|
||||
<string>source.coffee</string>
|
||||
<key>uuid</key>
|
||||
<string>90424631-D00B-448C-B157-DAC92DFB2858</string>
|
||||
</dict>
|
||||
</plist>
|
||||
32
bundles/CoffeeScriptBundle.tmbundle/Commands/Run.tmCommand
Normal file
32
bundles/CoffeeScriptBundle.tmbundle/Commands/Run.tmCommand
Normal file
@@ -0,0 +1,32 @@
|
||||
<?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>#!/bin/bash
|
||||
|
||||
function pre {
|
||||
echo -n '<pre style="word-wrap: break-word;">'
|
||||
perl -pe '$| = 1; s/&/&amp;/g; s/</&lt;/g; s/>/&gt;/g; s/$\\n/<br>/'
|
||||
echo '</pre>'
|
||||
}
|
||||
|
||||
|
||||
${TM_COFFEE:=coffee} -s | pre
|
||||
</string>
|
||||
<key>input</key>
|
||||
<string>selection</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>@r</string>
|
||||
<key>name</key>
|
||||
<string>Run</string>
|
||||
<key>output</key>
|
||||
<string>showAsHTML</string>
|
||||
<key>scope</key>
|
||||
<string>source.coffee</string>
|
||||
<key>uuid</key>
|
||||
<string>30395DAB-44A6-44F7-99E1-02D64621303A</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,36 @@
|
||||
<?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>name</key>
|
||||
<string>Comments</string>
|
||||
<key>scope</key>
|
||||
<string>source.coffee</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>shellVariables</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>TM_COMMENT_START</string>
|
||||
<key>value</key>
|
||||
<string># </string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>TM_COMMENT_START_2</string>
|
||||
<key>value</key>
|
||||
<string>###</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>TM_COMMENT_END_2</string>
|
||||
<key>value</key>
|
||||
<string>###</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<key>uuid</key>
|
||||
<string>0A92C6F6-4D73-4859-B38C-4CC19CBC191F</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,17 @@
|
||||
<?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>name</key>
|
||||
<string>Disable Indent Corrections</string>
|
||||
<key>scope</key>
|
||||
<string>source.coffee</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>disableIndentCorrections</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>uuid</key>
|
||||
<string>5E57C0C3-77D5-4809-A131-F777EE264908</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,27 @@
|
||||
<?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>name</key>
|
||||
<string>Indent</string>
|
||||
<key>scope</key>
|
||||
<string>source.coffee</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>decreaseIndentPattern</key>
|
||||
<string>^\s*(\}|\]|else|catch|finally)$</string>
|
||||
<key>increaseIndentPattern</key>
|
||||
<string>(?x)
|
||||
^\s*
|
||||
(.*class\s+
|
||||
|[a-zA-Z\$_](\w|\$|:|\.)*\s*(?=\:(\s*\(.*\))?\s*((=|-)>\s*$)) # function that is not one line
|
||||
|[a-zA-Z\$_](\w|\$|\.)*\s*(:|=)\s*((if|while)(?!.*?then)|for|$) # assignment using multiline if/while/for
|
||||
|(if|while)\b(?!.*?then)|for\b
|
||||
|(try|finally|catch\s+\S.*)\s*$
|
||||
|.*[-=]>$
|
||||
|.*[\{\[]$)</string>
|
||||
</dict>
|
||||
<key>uuid</key>
|
||||
<string>C5D6C716-12FE-4CE8-A916-6CABEDE8AFE7</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,19 @@
|
||||
<?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>name</key>
|
||||
<string>Symbol List: Method</string>
|
||||
<key>scope</key>
|
||||
<string>source.coffee meta.function.coffee</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>showInSymbolList</key>
|
||||
<integer>1</integer>
|
||||
<key>symbolTransformation</key>
|
||||
<string>s/^\s*([a-zA-Z\$_]+)\s*=/$2/</string>
|
||||
</dict>
|
||||
<key>uuid</key>
|
||||
<string>419D24D8-0DD6-4D9A-8CA0-6D9CD740BEEC</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,17 @@
|
||||
<?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>name</key>
|
||||
<string>Symbol List: Method Instance</string>
|
||||
<key>scope</key>
|
||||
<string>source.coffee entity.name.type.instance</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>showInSymbolList</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<key>uuid</key>
|
||||
<string>B087AF2F-8946-4EA9-8409-49E7C4A2EEF0</string>
|
||||
</dict>
|
||||
</plist>
|
||||
21
bundles/CoffeeScriptBundle.tmbundle/README.markdown
Normal file
21
bundles/CoffeeScriptBundle.tmbundle/README.markdown
Normal file
@@ -0,0 +1,21 @@
|
||||
CoffeeScript.tmbundle
|
||||
---------------------
|
||||
|
||||
A **TextMate Bundle** for the **CoffeeScript** programming language.
|
||||
|
||||
Installation:
|
||||
-------------
|
||||
|
||||
cd ~/Library/Application\ Support/TextMate/Bundles (Textmate 1)
|
||||
cd /Applications/TextMate.app/Contents/SharedSupport/Bundles (Textmate 1.5.10 & 2)
|
||||
git clone git://github.com/jashkenas/coffee-script-tmbundle CoffeeScriptBundle.tmbundle
|
||||
|
||||
The bundle includes syntax highlighting, the ability to compile or evaluate CoffeeScript inline, convenient symbol listing for functions, and a number of expando snippets.
|
||||
|
||||
Patches for additions are always welcome.
|
||||
|
||||

|
||||
|
||||
If your TextMate.app is having trouble finding the `coffee` command, remember that [TextMate doesn't inherit your regular PATH](http://wiki.macromates.com/Troubleshooting/TextMateAndThePath).
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
<?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>for ${1:name} in ${2:array}
|
||||
${0:# body...}</string>
|
||||
<key>name</key>
|
||||
<string>Array Comprehension</string>
|
||||
<key>scope</key>
|
||||
<string>source.coffee</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>fora</string>
|
||||
<key>uuid</key>
|
||||
<string>2D4AC0B4-47AA-4E38-9A11-09A48C2A9439</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,17 @@
|
||||
<?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>(${1:args}) =>
|
||||
${0:# body...}</string>
|
||||
<key>name</key>
|
||||
<string>Function (bound)</string>
|
||||
<key>scope</key>
|
||||
<string>source.coffee</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>bfun</string>
|
||||
<key>uuid</key>
|
||||
<string>20BDC055-ED67-4D0E-A47F-ADAA828EFF2B</string>
|
||||
</dict>
|
||||
</plist>
|
||||
20
bundles/CoffeeScriptBundle.tmbundle/Snippets/Class.tmSnippet
Normal file
20
bundles/CoffeeScriptBundle.tmbundle/Snippets/Class.tmSnippet
Normal file
@@ -0,0 +1,20 @@
|
||||
<?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>class ${1:ClassName}${2: extends ${3:Ancestor}}
|
||||
|
||||
${4:constructor: (${5:args}) ->
|
||||
${6:# body...}}
|
||||
$7</string>
|
||||
<key>name</key>
|
||||
<string>Class</string>
|
||||
<key>scope</key>
|
||||
<string>source.coffee</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>cla</string>
|
||||
<key>uuid</key>
|
||||
<string>765ACBD3-380A-4CF8-9111-345A36A0DAE7</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,17 @@
|
||||
<?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>else if ${1:condition}
|
||||
${0:# body...}</string>
|
||||
<key>name</key>
|
||||
<string>Else if</string>
|
||||
<key>scope</key>
|
||||
<string>source.coffee</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>elif</string>
|
||||
<key>uuid</key>
|
||||
<string>EA8F5EDB-6E1E-4C36-9CA5-12B108F1A7C9</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,19 @@
|
||||
<?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>(${1:args}) ->
|
||||
${0:# body...}
|
||||
|
||||
</string>
|
||||
<key>name</key>
|
||||
<string>Function</string>
|
||||
<key>scope</key>
|
||||
<string>source.coffee</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>fun</string>
|
||||
<key>uuid</key>
|
||||
<string>F2E2E79A-A85D-471D-9847-72AE40205942</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,19 @@
|
||||
<?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>if ${1:condition}
|
||||
${2:# body...}
|
||||
else
|
||||
${3:# body...}</string>
|
||||
<key>name</key>
|
||||
<string>If .. Else</string>
|
||||
<key>scope</key>
|
||||
<string>source.coffee</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>ife</string>
|
||||
<key>uuid</key>
|
||||
<string>2AD19F12-E499-4715-9A47-FC8D594BC550</string>
|
||||
</dict>
|
||||
</plist>
|
||||
17
bundles/CoffeeScriptBundle.tmbundle/Snippets/If.tmSnippet
Normal file
17
bundles/CoffeeScriptBundle.tmbundle/Snippets/If.tmSnippet
Normal file
@@ -0,0 +1,17 @@
|
||||
<?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>if ${1:condition}
|
||||
${0:# body...}</string>
|
||||
<key>name</key>
|
||||
<string>If</string>
|
||||
<key>scope</key>
|
||||
<string>source.coffee</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>if</string>
|
||||
<key>uuid</key>
|
||||
<string>F4FDFB3A-71EF-48A4-93F4-178B949546B1</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,18 @@
|
||||
<?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>#{${1:$TM_SELECTED_TEXT}}</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>#</string>
|
||||
<key>name</key>
|
||||
<string>Interpolated Code</string>
|
||||
<key>scope</key>
|
||||
<string>(string.quoted.double.coffee) - string source, (string.quoted.double.heredoc.coffee) - string source</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>#</string>
|
||||
<key>uuid</key>
|
||||
<string>C04ED189-6ACB-44E6-AD5B-911B760AD1CC</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,17 @@
|
||||
<?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>for ${1:key}, ${2:value} of ${3:Object}
|
||||
${0:# body...}</string>
|
||||
<key>name</key>
|
||||
<string>Object comprehension</string>
|
||||
<key>scope</key>
|
||||
<string>source.coffee</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>foro</string>
|
||||
<key>uuid</key>
|
||||
<string>9D126CC5-EA14-4A40-B6D3-6A5FC1AC1420</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,17 @@
|
||||
<?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>for ${1:name} in [${2:start}...${3:finish}]${4: by ${5:step}}
|
||||
${0:# body...}</string>
|
||||
<key>name</key>
|
||||
<string>Range comprehension (exclusive)</string>
|
||||
<key>scope</key>
|
||||
<string>source.coffee</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>forrex</string>
|
||||
<key>uuid</key>
|
||||
<string>FA6AB9BF-3444-4A8C-B010-C95C2CF5BAB3</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,17 @@
|
||||
<?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>for ${1:name} in [${2:start}..${3:finish}]${4: by ${5:step}}
|
||||
${0:# body...}</string>
|
||||
<key>name</key>
|
||||
<string>Range comprehension (inclusive)</string>
|
||||
<key>scope</key>
|
||||
<string>source.coffee</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>forr</string>
|
||||
<key>uuid</key>
|
||||
<string>E0F8E45A-9262-4DD6-ADFF-B5B9D6CE99C2</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -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>\`${1:`pbpaste`}\`</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>^j</string>
|
||||
<key>name</key>
|
||||
<string>Raw javascript</string>
|
||||
<key>scope</key>
|
||||
<string>source.coffee</string>
|
||||
<key>uuid</key>
|
||||
<string>422A59E7-FC36-4E99-B01C-6353515BB544</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,18 @@
|
||||
<?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>switch ${1:object}
|
||||
when ${2:value}
|
||||
${0:# body...}</string>
|
||||
<key>name</key>
|
||||
<string>Switch</string>
|
||||
<key>scope</key>
|
||||
<string>source.coffee</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>swi</string>
|
||||
<key>uuid</key>
|
||||
<string>3931A7C6-F1FB-484F-82D1-26F5A8F779D0</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -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>if ${1:condition} then ${2:value} else ${3:other}</string>
|
||||
<key>name</key>
|
||||
<string>Ternary If</string>
|
||||
<key>scope</key>
|
||||
<string>source.coffee</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>ifte</string>
|
||||
<key>uuid</key>
|
||||
<string>CF0B4684-E4CB-4E10-8C25-4D15400C3385</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,19 @@
|
||||
<?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>try
|
||||
$1
|
||||
catch ${2:error}
|
||||
$3</string>
|
||||
<key>name</key>
|
||||
<string>Try .. Catch</string>
|
||||
<key>scope</key>
|
||||
<string>source.coffee</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>try</string>
|
||||
<key>uuid</key>
|
||||
<string>CAFB0DED-5E23-4A84-AC20-87FBAF22DBAC</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -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>${1:action} unless ${2:condition}</string>
|
||||
<key>name</key>
|
||||
<string>Unless</string>
|
||||
<key>scope</key>
|
||||
<string>source.coffee</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>unl</string>
|
||||
<key>uuid</key>
|
||||
<string>E561AECD-5933-4F59-A6F7-FA96E1203606</string>
|
||||
</dict>
|
||||
</plist>
|
||||
16
bundles/CoffeeScriptBundle.tmbundle/Snippets/h1.tmSnippet
Normal file
16
bundles/CoffeeScriptBundle.tmbundle/Snippets/h1.tmSnippet
Normal file
@@ -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># $1
|
||||
# ==============================================================================
|
||||
$0</string>
|
||||
<key>name</key>
|
||||
<string>Subheader</string>
|
||||
<key>scope</key>
|
||||
<string>source.coffee</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>/1</string>
|
||||
</dict>
|
||||
</plist>
|
||||
16
bundles/CoffeeScriptBundle.tmbundle/Snippets/h2.tmSnippet
Normal file
16
bundles/CoffeeScriptBundle.tmbundle/Snippets/h2.tmSnippet
Normal file
@@ -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># $1
|
||||
# ----------------------------------------------------------------------
|
||||
$0</string>
|
||||
<key>name</key>
|
||||
<string>Subheader</string>
|
||||
<key>scope</key>
|
||||
<string>source.coffee</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>/2</string>
|
||||
</dict>
|
||||
</plist>
|
||||
16
bundles/CoffeeScriptBundle.tmbundle/Snippets/h3.tmSnippet
Normal file
16
bundles/CoffeeScriptBundle.tmbundle/Snippets/h3.tmSnippet
Normal file
@@ -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># $1
|
||||
# -------------------------
|
||||
$0</string>
|
||||
<key>name</key>
|
||||
<string>Subheader</string>
|
||||
<key>scope</key>
|
||||
<string>source.coffee</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>/3</string>
|
||||
</dict>
|
||||
</plist>
|
||||
16
bundles/CoffeeScriptBundle.tmbundle/Snippets/log.tmSnippet
Normal file
16
bundles/CoffeeScriptBundle.tmbundle/Snippets/log.tmSnippet
Normal file
@@ -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>console.log $0</string>
|
||||
<key>name</key>
|
||||
<string>log</string>
|
||||
<key>scope</key>
|
||||
<string>source.coffee</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>log</string>
|
||||
<key>uuid</key>
|
||||
<string>FBC44B18-323A-4C00-A35B-15E41830C5AD</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -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>${2/^.*?([\w_]+).*$/\L$1/} = require ${2:'${1:sys}'}$3</string>
|
||||
<key>name</key>
|
||||
<string>require</string>
|
||||
<key>scope</key>
|
||||
<string>source.coffee</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>req</string>
|
||||
<key>uuid</key>
|
||||
<string>8A65E175-18F2-428F-A695-73E01139E41A</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,736 @@
|
||||
<?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>comment</key>
|
||||
<string>CoffeeScript Syntax: version 1</string>
|
||||
<key>fileTypes</key>
|
||||
<array>
|
||||
<string>coffee</string>
|
||||
<string>Cakefile</string>
|
||||
<string>coffee.erb</string>
|
||||
</array>
|
||||
<key>firstLineMatch</key>
|
||||
<string>^#!.*\bcoffee</string>
|
||||
<key>foldingStartMarker</key>
|
||||
<string>^\s*class\s+\S.*$|.*(->|=>)\s*$|.*[\[{]\s*$</string>
|
||||
<key>foldingStopMarker</key>
|
||||
<string>^\s*$|^\s*[}\]]\s*$</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>^~C</string>
|
||||
<key>name</key>
|
||||
<string>CoffeeScript</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>variable.parameter.function.coffee</string>
|
||||
</dict>
|
||||
<key>2</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>storage.type.function.coffee</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>comment</key>
|
||||
<string>match stuff like: a -> … </string>
|
||||
<key>match</key>
|
||||
<string>(\([^()]*?\))\s*([=-]>)</string>
|
||||
<key>name</key>
|
||||
<string>meta.inline.function.coffee</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>keyword.operator.new.coffee</string>
|
||||
</dict>
|
||||
<key>2</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>entity.name.type.instance.coffee</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>match</key>
|
||||
<string>(new)\s+(\w+(?:\.\w*)*)</string>
|
||||
<key>name</key>
|
||||
<string>meta.class.instance.constructor</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>'''</string>
|
||||
<key>beginCaptures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.string.begin.coffee</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>'''</string>
|
||||
<key>endCaptures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.string.end.coffee</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>name</key>
|
||||
<string>string.quoted.heredoc.coffee</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>"""</string>
|
||||
<key>beginCaptures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.string.begin.coffee</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>"""</string>
|
||||
<key>endCaptures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.string.end.coffee</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>name</key>
|
||||
<string>string.quoted.double.heredoc.coffee</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\\.</string>
|
||||
<key>name</key>
|
||||
<string>constant.character.escape.coffee</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>#interpolated_coffee</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>`</string>
|
||||
<key>beginCaptures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.string.begin.coffee</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>`</string>
|
||||
<key>endCaptures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.string.end.coffee</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>name</key>
|
||||
<string>string.quoted.script.coffee</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\\(x\h{2}|[0-2][0-7]{,2}|3[0-6][0-7]|37[0-7]?|[4-7][0-7]?|.)</string>
|
||||
<key>name</key>
|
||||
<string>constant.character.escape.coffee</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>(?<!#)###(?!#)</string>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.comment.coffee</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>###(?:[ \t]*\n)</string>
|
||||
<key>name</key>
|
||||
<string>comment.block.coffee</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>@\w*</string>
|
||||
<key>name</key>
|
||||
<string>storage.type.annotation.coffeescript</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.comment.coffee</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>match</key>
|
||||
<string>(#)(?!\{).*$\n?</string>
|
||||
<key>name</key>
|
||||
<string>comment.line.number-sign.coffee</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>/{3}</string>
|
||||
<key>end</key>
|
||||
<string>/{3}[imgy]{0,4}</string>
|
||||
<key>name</key>
|
||||
<string>string.regexp.coffee</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>#interpolated_coffee</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>#embedded_comment</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>/(?![\s=/*+{}?]).*?[^\\]/[igmy]{0,4}(?![a-zA-Z0-9])</string>
|
||||
<key>name</key>
|
||||
<string>string.regexp.coffee</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>(?x)
|
||||
\b(?<![\.\$])(
|
||||
break|by|catch|continue|else|finally|for|in|of|if|return|switch|
|
||||
then|throw|try|unless|when|while|until|loop|do|(?<=for)\s+own
|
||||
)(?!\s*:)\b
|
||||
</string>
|
||||
<key>name</key>
|
||||
<string>keyword.control.coffee</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>(?x)
|
||||
and=|or=|!|%|&|\^|\*|\/|(\-)?\-(?!>)|\+\+|\+|~|==|=(?!>)|!=|<=|>=|<<=|>>=|
|
||||
>>>=|<>|<|>|!|&&|\.\.(\.)?|\?|\||\|\||\:|\*=|(?<!\()/=|%=|\+=|\-=|&=|
|
||||
\^=|\b(?<![\.\$])(instanceof|new|delete|typeof|and|or|is|isnt|not)\b
|
||||
</string>
|
||||
<key>name</key>
|
||||
<string>keyword.operator.coffee</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>variable.assignment.coffee</string>
|
||||
</dict>
|
||||
<key>4</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.separator.key-value</string>
|
||||
</dict>
|
||||
<key>5</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>keyword.operator.coffee</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>match</key>
|
||||
<string>([a-zA-Z\$_](\w|\$|\.)*\s*(?!\::)((:)|(=))(?!(\s*\(.*\))?\s*((=|-)>)))</string>
|
||||
<key>name</key>
|
||||
<string>variable.assignment.coffee</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>(?<=\s|^)([\[\{])(?=.*?[\]\}]\s+[:=])</string>
|
||||
<key>beginCaptures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>keyword.operator.coffee</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>([\]\}]\s*[:=])</string>
|
||||
<key>endCaptures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>keyword.operator.coffee</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>name</key>
|
||||
<string>meta.variable.assignment.destructured.coffee</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>#variable_name</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>#instance_variable</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>#single_quoted_string</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>#double_quoted_string</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>#numeric</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>2</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>entity.name.function.coffee</string>
|
||||
</dict>
|
||||
<key>3</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>entity.name.function.coffee</string>
|
||||
</dict>
|
||||
<key>4</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>variable.parameter.function.coffee</string>
|
||||
</dict>
|
||||
<key>5</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>storage.type.function.coffee</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>match</key>
|
||||
<string>(?x)
|
||||
(\s*)
|
||||
(?=[a-zA-Z\$_])
|
||||
(
|
||||
[a-zA-Z\$_](\w|\$|:|\.)*\s*
|
||||
(?=[:=](\s*\(.*\))?\s*([=-]>))
|
||||
)
|
||||
</string>
|
||||
<key>name</key>
|
||||
<string>meta.function.coffee</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>[=-]></string>
|
||||
<key>name</key>
|
||||
<string>storage.type.function.coffee</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(?<!\.)(true|on|yes)(?!\s*[:=])\b</string>
|
||||
<key>name</key>
|
||||
<string>constant.language.boolean.true.coffee</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(?<!\.)(false|off|no)(?!\s*[:=])\b</string>
|
||||
<key>name</key>
|
||||
<string>constant.language.boolean.false.coffee</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(?<!\.)null(?!\s*[:=])\b</string>
|
||||
<key>name</key>
|
||||
<string>constant.language.null.coffee</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(?<!\.)(super|this|extends)(?!\s*[:=])\b</string>
|
||||
<key>name</key>
|
||||
<string>variable.language.coffee</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>storage.type.class.coffee</string>
|
||||
</dict>
|
||||
<key>2</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>entity.name.type.class.coffee</string>
|
||||
</dict>
|
||||
<key>3</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>keyword.control.inheritance.coffee</string>
|
||||
</dict>
|
||||
<key>4</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>entity.other.inherited-class.coffee</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>match</key>
|
||||
<string>(class\b)\s+(@?[a-zA-Z\$_][\w\.]*)?(?:\s+(extends)\s+(@?[a-zA-Z\$\._][\w\.]*))?</string>
|
||||
<key>name</key>
|
||||
<string>meta.class.coffee</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(debugger|\\)\b</string>
|
||||
<key>name</key>
|
||||
<string>keyword.other.coffee</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>(?x)\b(
|
||||
Array|ArrayBuffer|Blob|Boolean|Date|document|event|Function|
|
||||
Int(8|16|32|64)Array|Math|Map|Number|
|
||||
Object|Proxy|RegExp|Set|String|WeakMap|
|
||||
window|Uint(8|16|32|64)Array|XMLHttpRequest
|
||||
)\b</string>
|
||||
<key>name</key>
|
||||
<string>support.class.coffee</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(console)\b</string>
|
||||
<key>name</key>
|
||||
<string>entity.name.type.object.coffee</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>((?<=console\.)(debug|warn|info|log|error|time|timeEnd|assert))\b</string>
|
||||
<key>name</key>
|
||||
<string>support.function.console.coffee</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>(?x)\b(
|
||||
decodeURI(Component)?|encodeURI(Component)?|eval|parse(Float|Int)|require
|
||||
)\b</string>
|
||||
<key>name</key>
|
||||
<string>support.function.coffee</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>(?x)((?<=\.)(
|
||||
apply|call|concat|every|filter|forEach|from|hasOwnProperty|indexOf|
|
||||
isPrototypeOf|join|lastIndexOf|map|of|pop|propertyIsEnumerable|push|
|
||||
reduce(Right)?|reverse|shift|slice|some|sort|splice|to(Locale)?String|
|
||||
unshift|valueOf
|
||||
))\b</string>
|
||||
<key>name</key>
|
||||
<string>support.function.method.array.coffee</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>(?x)((?<=Array\.)(
|
||||
isArray
|
||||
))\b</string>
|
||||
<key>name</key>
|
||||
<string>support.function.static.array.coffee</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>(?x)((?<=Object\.)(
|
||||
create|definePropert(ies|y)|freeze|getOwnProperty(Descriptors?|Names)|
|
||||
getProperty(Descriptor|Names)|getPrototypeOf|is(Extensible|Frozen|Sealed)?|
|
||||
isnt|keys|preventExtensions|seal
|
||||
))\b</string>
|
||||
<key>name</key>
|
||||
<string>support.function.static.object.coffee</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>(?x)((?<=Math\.)(
|
||||
abs|acos|acosh|asin|asinh|atan|atan2|atanh|ceil|cos|cosh|exp|expm1|floor|
|
||||
hypot|log|log10|log1p|log2|max|min|pow|random|round|sign|sin|sinh|sqrt|
|
||||
tan|tanh|trunc
|
||||
))\b</string>
|
||||
<key>name</key>
|
||||
<string>support.function.static.math.coffee</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>(?x)((?<=Number\.)(
|
||||
is(Finite|Integer|NaN)|toInteger
|
||||
))\b</string>
|
||||
<key>name</key>
|
||||
<string>support.function.static.number.coffee</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(Infinity|NaN|undefined)\b</string>
|
||||
<key>name</key>
|
||||
<string>constant.language.coffee</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\;</string>
|
||||
<key>name</key>
|
||||
<string>punctuation.terminator.statement.coffee</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>,[ |\t]*</string>
|
||||
<key>name</key>
|
||||
<string>meta.delimiter.object.comma.coffee</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\.</string>
|
||||
<key>name</key>
|
||||
<string>meta.delimiter.method.period.coffee</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\{|\}</string>
|
||||
<key>name</key>
|
||||
<string>meta.brace.curly.coffee</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\(|\)</string>
|
||||
<key>name</key>
|
||||
<string>meta.brace.round.coffee</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\[|\]\s*</string>
|
||||
<key>name</key>
|
||||
<string>meta.brace.square.coffee</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>#instance_variable</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>#single_quoted_string</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>#double_quoted_string</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>#numeric</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>repository</key>
|
||||
<dict>
|
||||
<key>double_quoted_string</key>
|
||||
<dict>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>"</string>
|
||||
<key>beginCaptures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.string.begin.coffee</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>"</string>
|
||||
<key>endCaptures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.string.end.coffee</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>name</key>
|
||||
<string>string.quoted.double.coffee</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\\(x\h{2}|[0-2][0-7]{,2}|3[0-6][0-7]|37[0-7]?|[4-7][0-7]?|.)</string>
|
||||
<key>name</key>
|
||||
<string>constant.character.escape.coffee</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>#interpolated_coffee</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<key>embedded_comment</key>
|
||||
<dict>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.comment.coffee</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>match</key>
|
||||
<string>(?<!\\)(#).*$\n?</string>
|
||||
<key>name</key>
|
||||
<string>comment.line.number-sign.coffee</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<key>instance_variable</key>
|
||||
<dict>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>(@)([a-zA-Z_\$]\w*)?</string>
|
||||
<key>name</key>
|
||||
<string>variable.other.readwrite.instance.coffee</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<key>interpolated_coffee</key>
|
||||
<dict>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>\#\{</string>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.section.embedded.coffee</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>\}</string>
|
||||
<key>name</key>
|
||||
<string>source.coffee.embedded.source</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>$self</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<key>numeric</key>
|
||||
<dict>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>(?<!\$)\b((0([box])[0-9a-fA-F]+)|([0-9]+(\.[0-9]+)?(e[+\-]?[0-9]+)?))\b</string>
|
||||
<key>name</key>
|
||||
<string>constant.numeric.coffee</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<key>single_quoted_string</key>
|
||||
<dict>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>'</string>
|
||||
<key>beginCaptures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.string.begin.coffee</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>'</string>
|
||||
<key>endCaptures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.string.end.coffee</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>name</key>
|
||||
<string>string.quoted.single.coffee</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\\(x\h{2}|[0-2][0-7]{,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)</string>
|
||||
<key>name</key>
|
||||
<string>constant.character.escape.coffee</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<key>variable_name</key>
|
||||
<dict>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>variable.assignment.coffee</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>match</key>
|
||||
<string>([a-zA-Z\$_]\w*(\.\w+)*)</string>
|
||||
<key>name</key>
|
||||
<string>variable.assignment.coffee</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>scopeName</key>
|
||||
<string>source.coffee</string>
|
||||
<key>uuid</key>
|
||||
<string>5B520980-A7D5-4E10-8582-1A4C889A8DE5</string>
|
||||
</dict>
|
||||
</plist>
|
||||
114
bundles/CoffeeScriptBundle.tmbundle/info.plist
Normal file
114
bundles/CoffeeScriptBundle.tmbundle/info.plist
Normal file
@@ -0,0 +1,114 @@
|
||||
<?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>mainMenu</key>
|
||||
<dict>
|
||||
<key>items</key>
|
||||
<array>
|
||||
<string>D77D67C9-7BA6-4B42-A563-2E2416DEEB53</string>
|
||||
<string>E11D7545-67B4-4191-8012-756E2C9AD382</string>
|
||||
<string>5786C9CC-C7ED-46FA-9D0B-069E52DAF268</string>
|
||||
<string>1C7FD768-1DEA-4825-8220-FACA8D507E80</string>
|
||||
</array>
|
||||
<key>submenus</key>
|
||||
<dict>
|
||||
<key>1C7FD768-1DEA-4825-8220-FACA8D507E80</key>
|
||||
<dict>
|
||||
<key>items</key>
|
||||
<array>
|
||||
<string>F08537AF-4F02-4040-999D-F0785CF64C02</string>
|
||||
<string>C4F99E3D-1540-4BC1-8038-0A19D65BABC8</string>
|
||||
<string>68A86250-0280-11E0-A976-0800200C9A66</string>
|
||||
<string>EE3293A5-3761-40BD-9CA8-DAAA176AA19E</string>
|
||||
<string>422A59E7-FC36-4E99-B01C-6353515BB544</string>
|
||||
<string>8A65E175-18F2-428F-A695-73E01139E41A</string>
|
||||
<string>C04ED189-6ACB-44E6-AD5B-911B760AD1CC</string>
|
||||
<string>FBC44B18-323A-4C00-A35B-15E41830C5AD</string>
|
||||
</array>
|
||||
<key>name</key>
|
||||
<string>Other</string>
|
||||
</dict>
|
||||
<key>5786C9CC-C7ED-46FA-9D0B-069E52DAF268</key>
|
||||
<dict>
|
||||
<key>items</key>
|
||||
<array>
|
||||
<string>192428A1-8684-4172-8728-225B4C9E532F</string>
|
||||
<string>F2E2E79A-A85D-471D-9847-72AE40205942</string>
|
||||
<string>20BDC055-ED67-4D0E-A47F-ADAA828EFF2B</string>
|
||||
<string>2D4AC0B4-47AA-4E38-9A11-09A48C2A9439</string>
|
||||
<string>9D126CC5-EA14-4A40-B6D3-6A5FC1AC1420</string>
|
||||
<string>FA6AB9BF-3444-4A8C-B010-C95C2CF5BAB3</string>
|
||||
<string>E0F8E45A-9262-4DD6-ADFF-B5B9D6CE99C2</string>
|
||||
<string>3931A7C6-F1FB-484F-82D1-26F5A8F779D0</string>
|
||||
<string>765ACBD3-380A-4CF8-9111-345A36A0DAE7</string>
|
||||
<string>CAFB0DED-5E23-4A84-AC20-87FBAF22DBAC</string>
|
||||
</array>
|
||||
<key>name</key>
|
||||
<string>Constructs</string>
|
||||
</dict>
|
||||
<key>D77D67C9-7BA6-4B42-A563-2E2416DEEB53</key>
|
||||
<dict>
|
||||
<key>items</key>
|
||||
<array>
|
||||
<string>30395DAB-44A6-44F7-99E1-02D64621303A</string>
|
||||
<string>D749F761-1740-4918-9490-90DF376BA72E</string>
|
||||
<string>90424631-D00B-448C-B157-DAC92DFB2858</string>
|
||||
</array>
|
||||
<key>name</key>
|
||||
<string>Run</string>
|
||||
</dict>
|
||||
<key>E11D7545-67B4-4191-8012-756E2C9AD382</key>
|
||||
<dict>
|
||||
<key>items</key>
|
||||
<array>
|
||||
<string>F4FDFB3A-71EF-48A4-93F4-178B949546B1</string>
|
||||
<string>2AD19F12-E499-4715-9A47-FC8D594BC550</string>
|
||||
<string>EA8F5EDB-6E1E-4C36-9CA5-12B108F1A7C9</string>
|
||||
<string>CF0B4684-E4CB-4E10-8C25-4D15400C3385</string>
|
||||
<string>E561AECD-5933-4F59-A6F7-FA96E1203606</string>
|
||||
</array>
|
||||
<key>name</key>
|
||||
<string>Control</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>name</key>
|
||||
<string>CoffeeScript</string>
|
||||
<key>ordering</key>
|
||||
<array>
|
||||
<string>5B520980-A7D5-4E10-8582-1A4C889A8DE5</string>
|
||||
<string>0A92C6F6-4D73-4859-B38C-4CC19CBC191F</string>
|
||||
<string>419D24D8-0DD6-4D9A-8CA0-6D9CD740BEEC</string>
|
||||
<string>B087AF2F-8946-4EA9-8409-49E7C4A2EEF0</string>
|
||||
<string>C5D6C716-12FE-4CE8-A916-6CABEDE8AFE7</string>
|
||||
<string>EE3293A5-3761-40BD-9CA8-DAAA176AA19E</string>
|
||||
<string>192428A1-8684-4172-8728-225B4C9E532F</string>
|
||||
<string>30395DAB-44A6-44F7-99E1-02D64621303A</string>
|
||||
<string>D749F761-1740-4918-9490-90DF376BA72E</string>
|
||||
<string>90424631-D00B-448C-B157-DAC92DFB2858</string>
|
||||
<string>F08537AF-4F02-4040-999D-F0785CF64C02</string>
|
||||
<string>C4F99E3D-1540-4BC1-8038-0A19D65BABC8</string>
|
||||
<string>F2E2E79A-A85D-471D-9847-72AE40205942</string>
|
||||
<string>20BDC055-ED67-4D0E-A47F-ADAA828EFF2B</string>
|
||||
<string>F4FDFB3A-71EF-48A4-93F4-178B949546B1</string>
|
||||
<string>2AD19F12-E499-4715-9A47-FC8D594BC550</string>
|
||||
<string>EA8F5EDB-6E1E-4C36-9CA5-12B108F1A7C9</string>
|
||||
<string>CF0B4684-E4CB-4E10-8C25-4D15400C3385</string>
|
||||
<string>E561AECD-5933-4F59-A6F7-FA96E1203606</string>
|
||||
<string>2D4AC0B4-47AA-4E38-9A11-09A48C2A9439</string>
|
||||
<string>9D126CC5-EA14-4A40-B6D3-6A5FC1AC1420</string>
|
||||
<string>FA6AB9BF-3444-4A8C-B010-C95C2CF5BAB3</string>
|
||||
<string>E0F8E45A-9262-4DD6-ADFF-B5B9D6CE99C2</string>
|
||||
<string>3931A7C6-F1FB-484F-82D1-26F5A8F779D0</string>
|
||||
<string>765ACBD3-380A-4CF8-9111-345A36A0DAE7</string>
|
||||
<string>CAFB0DED-5E23-4A84-AC20-87FBAF22DBAC</string>
|
||||
<string>422A59E7-FC36-4E99-B01C-6353515BB544</string>
|
||||
<string>8A65E175-18F2-428F-A695-73E01139E41A</string>
|
||||
<string>C04ED189-6ACB-44E6-AD5B-911B760AD1CC</string>
|
||||
<string>FBC44B18-323A-4C00-A35B-15E41830C5AD</string>
|
||||
</array>
|
||||
<key>uuid</key>
|
||||
<string>A46E4382-F1AC-405B-8F22-65FF470F34D7</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,54 @@
|
||||
<?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 perl
|
||||
#
|
||||
# Written by John Gruber, taken with permission from:
|
||||
# http://daringfireball.net/2007/03/javascript_bookmarklet_builder
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use URI::Escape qw(uri_escape_utf8);
|
||||
use open IO => ":utf8", # UTF8 by default
|
||||
":std"; # Apply to STDIN/STDOUT/STDERR
|
||||
|
||||
my $src = do { local $/; <> };
|
||||
|
||||
# Zap the first line if there's already a bookmarklet comment:
|
||||
$src =~ s{^// ?javascript:.+\n}{};
|
||||
my $bookmarklet = $src;
|
||||
|
||||
$bookmarklet =~ s{^\s*//.+\n}{}gm; # Kill comments.
|
||||
$bookmarklet =~ s{\t}{ }gm; # Tabs to spaces
|
||||
$bookmarklet =~ s{ +}{ }gm; # Space runs to one space
|
||||
$bookmarklet =~ s{^\s+}{}gm; # Kill line-leading whitespace
|
||||
$bookmarklet =~ s{\s+$}{}gm; # Kill line-ending whitespace
|
||||
$bookmarklet =~ s{\n}{}gm; # Kill newlines
|
||||
|
||||
# Escape single- and double-quotes, spaces, control chars, unicode:
|
||||
$bookmarklet = "javascript:" .
|
||||
uri_escape_utf8($bookmarklet, qq('" \x00-\x1f\x7f-\xff));
|
||||
|
||||
print "// $bookmarklet\n" . $src;
|
||||
|
||||
# Put bookmarklet on clipboard:
|
||||
`/bin/echo -n '$bookmarklet' | /usr/bin/pbcopy`;
|
||||
</string>
|
||||
<key>input</key>
|
||||
<string>selection</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>^H</string>
|
||||
<key>name</key>
|
||||
<string>Copy as Bookmarklet to Clipboard</string>
|
||||
<key>output</key>
|
||||
<string>replaceSelectedText</string>
|
||||
<key>scope</key>
|
||||
<string>source.js</string>
|
||||
<key>uuid</key>
|
||||
<string>20E61C43-B81F-4FB9-9362-BFFE668EB9C9</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//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># index created using: curl -s 'http://devguru.com/technologies/javascript/index.asp'|grep -o '<a href="[0-9]*.asp">[a-z][a-zA-Z]*</a>'|perl -pe 's/<a href="([^"]*)">([^<]*)<\/a>/$2\t$1/'|sort|uniq|gzip >dev_guru_index.gz
|
||||
|
||||
ref=$(zgrep -w "^${TM_SELECTED_TEXT:-$TM_CURRENT_WORD}" "$TM_BUNDLE_SUPPORT/dev_guru_index.gz"|cut -f2)
|
||||
|
||||
[[ -n "$ref" ]] && exit_show_html "<meta http-equiv='Refresh' content='0;URL=http://devguru.com/technologies/javascript/$ref'>"
|
||||
|
||||
echo "No documentation found."</string>
|
||||
<key>fallbackInput</key>
|
||||
<string>word</string>
|
||||
<key>input</key>
|
||||
<string>selection</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>^h</string>
|
||||
<key>name</key>
|
||||
<string>Documentation for Word / Selection</string>
|
||||
<key>output</key>
|
||||
<string>showAsTooltip</string>
|
||||
<key>scope</key>
|
||||
<string>source.js</string>
|
||||
<key>uuid</key>
|
||||
<string>B4874A14-2491-465A-A349-61E4EBCF4700</string>
|
||||
</dict>
|
||||
</plist>
|
||||
28
bundles/javascript.tmbundle/Commands/New Function.tmCommand
Normal file
28
bundles/javascript.tmbundle/Commands/New Function.tmCommand
Normal file
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//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>cat <<SNIPPET
|
||||
function ${TM_SELECTED_TEXT:-$TM_CURRENT_WORD}(\${1:args}) {
|
||||
\$0
|
||||
}
|
||||
SNIPPET</string>
|
||||
<key>fallbackInput</key>
|
||||
<string>word</string>
|
||||
<key>input</key>
|
||||
<string>selection</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>$
|
||||
</string>
|
||||
<key>name</key>
|
||||
<string>New Function</string>
|
||||
<key>output</key>
|
||||
<string>insertAsSnippet</string>
|
||||
<key>scope</key>
|
||||
<string>source.js</string>
|
||||
<key>uuid</key>
|
||||
<string>73951799-AC15-40A6-81DB-EC051AB4A033</string>
|
||||
</dict>
|
||||
28
bundles/javascript.tmbundle/Commands/New Method.tmCommand
Normal file
28
bundles/javascript.tmbundle/Commands/New Method.tmCommand
Normal file
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//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>cat <<SNIPPET
|
||||
${TM_SELECTED_TEXT:-$TM_CURRENT_WORD}: function(\${1:args}) {
|
||||
\$0
|
||||
}\${2:,}
|
||||
SNIPPET</string>
|
||||
<key>fallbackInput</key>
|
||||
<string>word</string>
|
||||
<key>input</key>
|
||||
<string>selection</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>~$
|
||||
</string>
|
||||
<key>name</key>
|
||||
<string>New Method</string>
|
||||
<key>output</key>
|
||||
<string>insertAsSnippet</string>
|
||||
<key>scope</key>
|
||||
<string>source.js</string>
|
||||
<key>uuid</key>
|
||||
<string>1717B5AE-209B-4548-9155-9E88A7230C1C</string>
|
||||
</dict>
|
||||
@@ -0,0 +1,40 @@
|
||||
<?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 python
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
sys.path.append(os.path.join(os.environ["TM_BUNDLE_SUPPORT"], "lib"))
|
||||
|
||||
import jsbeautifier
|
||||
|
||||
opts = jsbeautifier.default_options()
|
||||
|
||||
if os.environ["TM_SOFT_TABS"] == 'NO':
|
||||
opts.indent_size = 1
|
||||
opts.indent_char = '\t'
|
||||
else:
|
||||
opts.indent_size = int(os.environ["TM_TAB_SIZE"])
|
||||
|
||||
print jsbeautifier.beautify_file('-', opts)
|
||||
</string>
|
||||
<key>input</key>
|
||||
<string>selection</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>^H</string>
|
||||
<key>name</key>
|
||||
<string>Reformat Document / Selection</string>
|
||||
<key>output</key>
|
||||
<string>replaceSelectedText</string>
|
||||
<key>scope</key>
|
||||
<string>source.js</string>
|
||||
<key>uuid</key>
|
||||
<string>36EC03E9-EFF4-479A-AB90-8DFA16800642</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Comments</string>
|
||||
<key>scope</key>
|
||||
<string>source.js</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>shellVariables</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>TM_COMMENT_START</string>
|
||||
<key>value</key>
|
||||
<string>// </string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>TM_COMMENT_START_2</string>
|
||||
<key>value</key>
|
||||
<string>/*</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>TM_COMMENT_END_2</string>
|
||||
<key>value</key>
|
||||
<string>*/</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<key>uuid</key>
|
||||
<string>A67A8BD9-A951-406F-9175-018DD4B52FD1</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>JavaScript Indent</string>
|
||||
<key>scope</key>
|
||||
<string>source.js</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>decreaseIndentPattern</key>
|
||||
<string>^(.*\*/)?\s*(\}|\))([^{]*\{)?([;,]?\s*|\.[^{]*|\s*\)[;\s]*)$</string>
|
||||
<key>increaseIndentPattern</key>
|
||||
<string>^.*(\{[^}"']*|\([^)"']*)$</string>
|
||||
</dict>
|
||||
<key>uuid</key>
|
||||
<string>BC062860-3346-4D3B-8421-C5543F83D11F</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Symbol List Banned</string>
|
||||
<key>scope</key>
|
||||
<string>source.js meta.property.function entity.name.function</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>showInSymbolList</key>
|
||||
<string>0</string>
|
||||
</dict>
|
||||
<key>uuid</key>
|
||||
<string>834BC727-6B31-4073-A161-4823227219EF</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Symbol List Class</string>
|
||||
<key>scope</key>
|
||||
<string>source.js entity.name.type.class</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>showInSymbolList</key>
|
||||
<string>1</string>
|
||||
<key>symbolTransformation</key>
|
||||
<string>
|
||||
s/^/• /g;
|
||||
</string>
|
||||
</dict>
|
||||
<key>uuid</key>
|
||||
<string>3CEA49B2-A5C5-405C-82E2-B8B668877C37</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Symbol List Instance</string>
|
||||
<key>scope</key>
|
||||
<string>source.js entity.name.instance</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>showInSymbolList</key>
|
||||
<string>1</string>
|
||||
<key>symbolTransformation</key>
|
||||
<string>
|
||||
s/^/\t/g;
|
||||
</string>
|
||||
</dict>
|
||||
<key>uuid</key>
|
||||
<string>E6EB7CC8-04E8-43A9-93B2-BC9EF5BA862B</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Symbol List Sub 1</string>
|
||||
<key>scope</key>
|
||||
<string>source.js object.property.function -(meta.group meta.group)</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>showInSymbolList</key>
|
||||
<string>1</string>
|
||||
<key>symbolTransformation</key>
|
||||
<string>
|
||||
s/^/ :/g;
|
||||
</string>
|
||||
</dict>
|
||||
<key>uuid</key>
|
||||
<string>73557394-4F0F-4DD3-8029-EEE8201AC7F5</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Symbol List Sub 2</string>
|
||||
<key>scope</key>
|
||||
<string>source.js meta.group meta.group object.property.function</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>showInSymbolList</key>
|
||||
<string>1</string>
|
||||
<key>symbolTransformation</key>
|
||||
<string>
|
||||
s/^/ :/g;
|
||||
</string>
|
||||
</dict>
|
||||
<key>uuid</key>
|
||||
<string>51841DDB-C2A4-461C-A8AB-6C124AD50EAE</string>
|
||||
</dict>
|
||||
</plist>
|
||||
16
bundles/javascript.tmbundle/Snippets/Get Elements.tmSnippet
Normal file
16
bundles/javascript.tmbundle/Snippets/Get Elements.tmSnippet
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>content</key>
|
||||
<string>getElement${1/(T)|.*/(?1:s)/}By${1:T}${1/(T)|(I)|.*/(?1:agName)(?2:d)/}('$2')</string>
|
||||
<key>name</key>
|
||||
<string>Get Elements</string>
|
||||
<key>scope</key>
|
||||
<string>source.js</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>get</string>
|
||||
<key>uuid</key>
|
||||
<string>9E0E3BCC-7F20-4D6B-891D-A44D6EC56E31</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>content</key>
|
||||
<string>'${1:${2:#thing}:${3:click}}': function(element){
|
||||
$0
|
||||
}${10:,}</string>
|
||||
<key>name</key>
|
||||
<string>Object Method String</string>
|
||||
<key>scope</key>
|
||||
<string>source.js</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>'':f</string>
|
||||
<key>uuid</key>
|
||||
<string>7B9AEFCC-B450-416D-8527-430FE2A08568</string>
|
||||
</dict>
|
||||
</plist>
|
||||
18
bundles/javascript.tmbundle/Snippets/Object Method.tmSnippet
Normal file
18
bundles/javascript.tmbundle/Snippets/Object Method.tmSnippet
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>content</key>
|
||||
<string>${1:method_name}: function(${3:attribute}){
|
||||
$0
|
||||
}${10:,}</string>
|
||||
<key>name</key>
|
||||
<string>Object Method</string>
|
||||
<key>scope</key>
|
||||
<string>source.js</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>:f</string>
|
||||
<key>uuid</key>
|
||||
<string>77065D69-742A-4FF0-9A41-AD211DFBE72F</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>content</key>
|
||||
<string>${1:value_name}:${0:value},</string>
|
||||
<key>name</key>
|
||||
<string>Object Value JS</string>
|
||||
<key>scope</key>
|
||||
<string>source.js</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>:,</string>
|
||||
<key>uuid</key>
|
||||
<string>AD506BEC-B33C-4168-A900-0A4D386A4B05</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>content</key>
|
||||
<string>${1:key}: ${2:"${3:value}"}${4:, }</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>~:</string>
|
||||
<key>name</key>
|
||||
<string>Object key — key: "value"</string>
|
||||
<key>scope</key>
|
||||
<string>source.js</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>:</string>
|
||||
<key>uuid</key>
|
||||
<string>DC8B46FB-8ADA-45EA-8F36-94C807A0D302</string>
|
||||
</dict>
|
||||
</plist>
|
||||
19
bundles/javascript.tmbundle/Snippets/Prototype (proto).plist
Normal file
19
bundles/javascript.tmbundle/Snippets/Prototype (proto).plist
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>content</key>
|
||||
<string>${1:class_name}.prototype.${2:method_name} = function(${3:first_argument}) {
|
||||
${0:// body...}
|
||||
};
|
||||
</string>
|
||||
<key>name</key>
|
||||
<string>Prototype</string>
|
||||
<key>scope</key>
|
||||
<string>source.js</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>proto</string>
|
||||
<key>uuid</key>
|
||||
<string>2F96136B-0193-42F5-90FC-B6F456A3AD77</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>content</key>
|
||||
<string>for (var ${20:i} = ${1:Things}.length - 1; ${20:i} >= 0; ${20:i}--){
|
||||
${100:${1:Things}[${20:i}]}$0
|
||||
};</string>
|
||||
<key>name</key>
|
||||
<string>for (…) {…} (Improved Native For-Loop)</string>
|
||||
<key>scope</key>
|
||||
<string>source.js</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>for</string>
|
||||
<key>uuid</key>
|
||||
<string>C207B7C3-5597-4873-8AAD-C46FB8842AF2</string>
|
||||
</dict>
|
||||
</plist>
|
||||
18
bundles/javascript.tmbundle/Snippets/for (…) {…}.tmSnippet
Normal file
18
bundles/javascript.tmbundle/Snippets/for (…) {…}.tmSnippet
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>content</key>
|
||||
<string>for (var ${20:i}=0; ${20:i} < ${1:Things}.length; ${20:i}++) {
|
||||
${100:${1:Things}[${20:i}]}$0
|
||||
};</string>
|
||||
<key>name</key>
|
||||
<string>for (…) {…}</string>
|
||||
<key>scope</key>
|
||||
<string>source.js</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>for</string>
|
||||
<key>uuid</key>
|
||||
<string>011C4681-FBEC-4891-9326-3DECFCDED6D6</string>
|
||||
</dict>
|
||||
</plist>
|
||||
18
bundles/javascript.tmbundle/Snippets/function (fun).plist
Normal file
18
bundles/javascript.tmbundle/Snippets/function (fun).plist
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>content</key>
|
||||
<string>function ${1:function_name} (${2:argument}) {
|
||||
${0:// body...}
|
||||
}</string>
|
||||
<key>name</key>
|
||||
<string>Function</string>
|
||||
<key>scope</key>
|
||||
<string>source.js</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>fun</string>
|
||||
<key>uuid</key>
|
||||
<string>F0E4FB6A-4878-48C6-A777-62438DF1E14F</string>
|
||||
</dict>
|
||||
</plist>
|
||||
16
bundles/javascript.tmbundle/Snippets/function.tmSnippet
Normal file
16
bundles/javascript.tmbundle/Snippets/function.tmSnippet
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>content</key>
|
||||
<string>function($1) {${0:$TM_SELECTED_TEXT}};</string>
|
||||
<key>name</key>
|
||||
<string>Anonymous Function</string>
|
||||
<key>scope</key>
|
||||
<string>source.js</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>f</string>
|
||||
<key>uuid</key>
|
||||
<string>4C6EDB43-3E2E-411B-A016-13C135C59833</string>
|
||||
</dict>
|
||||
</plist>
|
||||
16
bundles/javascript.tmbundle/Snippets/if ___ else.tmSnippet
Normal file
16
bundles/javascript.tmbundle/Snippets/if ___ else.tmSnippet
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>content</key>
|
||||
<string>if (${1:true}) {${0:$TM_SELECTED_TEXT}} else{};</string>
|
||||
<key>name</key>
|
||||
<string>if … else</string>
|
||||
<key>scope</key>
|
||||
<string>source.js</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>ife</string>
|
||||
<key>uuid</key>
|
||||
<string>31964029-9D71-4ADC-8213-DFE5C4E222B3</string>
|
||||
</dict>
|
||||
</plist>
|
||||
16
bundles/javascript.tmbundle/Snippets/if.tmSnippet
Normal file
16
bundles/javascript.tmbundle/Snippets/if.tmSnippet
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>content</key>
|
||||
<string>if (${1:true}) {${0:$TM_SELECTED_TEXT}};</string>
|
||||
<key>name</key>
|
||||
<string>if</string>
|
||||
<key>scope</key>
|
||||
<string>source.js</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>if</string>
|
||||
<key>uuid</key>
|
||||
<string>F19F3732-39A7-48EC-A72B-A8F477A01795</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>content</key>
|
||||
<string>setTimeout(function() {$0}${2:}, ${1:10});</string>
|
||||
<key>name</key>
|
||||
<string>setTimeout function</string>
|
||||
<key>scope</key>
|
||||
<string>source.js</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>timeout</string>
|
||||
<key>uuid</key>
|
||||
<string>009A3E6C-FE3F-4A18-8759-2DC31F17BBE2</string>
|
||||
</dict>
|
||||
</plist>
|
||||
BIN
bundles/javascript.tmbundle/Support/dev_guru_index.gz
Normal file
BIN
bundles/javascript.tmbundle/Support/dev_guru_index.gz
Normal file
Binary file not shown.
22
bundles/javascript.tmbundle/Support/lib/jsbeautifier-license.txt
Executable file
22
bundles/javascript.tmbundle/Support/lib/jsbeautifier-license.txt
Executable file
@@ -0,0 +1,22 @@
|
||||
Copyright (c) 2009 - 2011, Einar Lielmanis
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation
|
||||
files (the "Software"), to deal in the Software without
|
||||
restriction, including without limitation the rights to use,
|
||||
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
1080
bundles/javascript.tmbundle/Support/lib/jsbeautifier.py
Executable file
1080
bundles/javascript.tmbundle/Support/lib/jsbeautifier.py
Executable file
File diff suppressed because it is too large
Load Diff
712
bundles/javascript.tmbundle/Syntaxes/JavaScript.plist
Normal file
712
bundles/javascript.tmbundle/Syntaxes/JavaScript.plist
Normal file
@@ -0,0 +1,712 @@
|
||||
<?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>comment</key>
|
||||
<string>JavaScript Syntax: version 2.0</string>
|
||||
<key>fileTypes</key>
|
||||
<array>
|
||||
<string>js</string>
|
||||
<string>htc</string>
|
||||
<string>jsx</string>
|
||||
</array>
|
||||
<key>foldingStartMarker</key>
|
||||
<string>^.*\bfunction\s*(\w+\s*)?\([^\)]*\)(\s*\{[^\}]*)?\s*$</string>
|
||||
<key>foldingStopMarker</key>
|
||||
<string>^\s*\}</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>^~J</string>
|
||||
<key>name</key>
|
||||
<string>JavaScript</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>support.class.js</string>
|
||||
</dict>
|
||||
<key>2</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>support.constant.js</string>
|
||||
</dict>
|
||||
<key>3</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>keyword.operator.js</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>comment</key>
|
||||
<string>match stuff like: Sound.prototype = { … } when extending an object</string>
|
||||
<key>match</key>
|
||||
<string>([a-zA-Z_?.$][\w?.$]*)\.(prototype)\s*(=)\s*</string>
|
||||
<key>name</key>
|
||||
<string>meta.class.js</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>support.class.js</string>
|
||||
</dict>
|
||||
<key>2</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>support.constant.js</string>
|
||||
</dict>
|
||||
<key>3</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>entity.name.function.js</string>
|
||||
</dict>
|
||||
<key>4</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>keyword.operator.js</string>
|
||||
</dict>
|
||||
<key>5</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>storage.type.function.js</string>
|
||||
</dict>
|
||||
<key>6</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.parameters.begin.js</string>
|
||||
</dict>
|
||||
<key>7</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>variable.parameter.function.js</string>
|
||||
</dict>
|
||||
<key>8</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.parameters.end.js</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>comment</key>
|
||||
<string>match stuff like: Sound.prototype.play = function() { … }</string>
|
||||
<key>match</key>
|
||||
<string>([a-zA-Z_?.$][\w?.$]*)\.(prototype)\.([a-zA-Z_?.$][\w?.$]*)\s*(=)\s*(function)?\s*(\()(.*?)(\))</string>
|
||||
<key>name</key>
|
||||
<string>meta.function.prototype.js</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>support.class.js</string>
|
||||
</dict>
|
||||
<key>2</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>support.constant.js</string>
|
||||
</dict>
|
||||
<key>3</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>entity.name.function.js</string>
|
||||
</dict>
|
||||
<key>4</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>keyword.operator.js</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>comment</key>
|
||||
<string>match stuff like: Sound.prototype.play = myfunc</string>
|
||||
<key>match</key>
|
||||
<string>([a-zA-Z_?.$][\w?.$]*)\.(prototype)\.([a-zA-Z_?.$][\w?.$]*)\s*(=)\s*</string>
|
||||
<key>name</key>
|
||||
<string>meta.function.js</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>support.class.js</string>
|
||||
</dict>
|
||||
<key>2</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>entity.name.function.js</string>
|
||||
</dict>
|
||||
<key>3</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>keyword.operator.js</string>
|
||||
</dict>
|
||||
<key>4</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>storage.type.function.js</string>
|
||||
</dict>
|
||||
<key>5</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.parameters.begin.js</string>
|
||||
</dict>
|
||||
<key>6</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>variable.parameter.function.js</string>
|
||||
</dict>
|
||||
<key>7</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.parameters.end.js</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>comment</key>
|
||||
<string>match stuff like: Sound.play = function() { … }</string>
|
||||
<key>match</key>
|
||||
<string>([a-zA-Z_?.$][\w?.$]*)\.([a-zA-Z_?.$][\w?.$]*)\s*(=)\s*(function)\s*(\()(.*?)(\))</string>
|
||||
<key>name</key>
|
||||
<string>meta.function.js</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>entity.name.function.js</string>
|
||||
</dict>
|
||||
<key>2</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>keyword.operator.js</string>
|
||||
</dict>
|
||||
<key>3</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>storage.type.function.js</string>
|
||||
</dict>
|
||||
<key>4</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.parameters.begin.js</string>
|
||||
</dict>
|
||||
<key>5</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>variable.parameter.function.js</string>
|
||||
</dict>
|
||||
<key>6</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.parameters.end.js</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>comment</key>
|
||||
<string>match stuff like: play = function() { … }</string>
|
||||
<key>match</key>
|
||||
<string>([a-zA-Z_?$][\w?$]*)\s*(=)\s*(function)\s*(\()(.*?)(\))</string>
|
||||
<key>name</key>
|
||||
<string>meta.function.js</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>storage.type.function.js</string>
|
||||
</dict>
|
||||
<key>2</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>entity.name.function.js</string>
|
||||
</dict>
|
||||
<key>3</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.parameters.begin.js</string>
|
||||
</dict>
|
||||
<key>4</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>variable.parameter.function.js</string>
|
||||
</dict>
|
||||
<key>5</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.parameters.end.js</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>comment</key>
|
||||
<string>match regular function like: function myFunc(arg) { … }</string>
|
||||
<key>match</key>
|
||||
<string>\b(function)\s+([a-zA-Z_$]\w*)?\s*(\()(.*?)(\))</string>
|
||||
<key>name</key>
|
||||
<string>meta.function.js</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>entity.name.function.js</string>
|
||||
</dict>
|
||||
<key>2</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>storage.type.function.js</string>
|
||||
</dict>
|
||||
<key>3</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.parameters.begin.js</string>
|
||||
</dict>
|
||||
<key>4</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>variable.parameter.function.js</string>
|
||||
</dict>
|
||||
<key>5</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.parameters.end.js</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>comment</key>
|
||||
<string>match stuff like: foobar: function() { … }</string>
|
||||
<key>match</key>
|
||||
<string>\b([a-zA-Z_?.$][\w?.$]*)\s*:\s*\b(function)?\s*(\()(.*?)(\))</string>
|
||||
<key>name</key>
|
||||
<string>meta.function.json.js</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>string.quoted.single.js</string>
|
||||
</dict>
|
||||
<key>10</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.parameters.begin.js</string>
|
||||
</dict>
|
||||
<key>11</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>variable.parameter.function.js</string>
|
||||
</dict>
|
||||
<key>12</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.parameters.end.js</string>
|
||||
</dict>
|
||||
<key>2</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.string.begin.js</string>
|
||||
</dict>
|
||||
<key>3</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>entity.name.function.js</string>
|
||||
</dict>
|
||||
<key>4</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.string.end.js</string>
|
||||
</dict>
|
||||
<key>5</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>string.quoted.double.js</string>
|
||||
</dict>
|
||||
<key>6</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.string.begin.js</string>
|
||||
</dict>
|
||||
<key>7</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>entity.name.function.js</string>
|
||||
</dict>
|
||||
<key>8</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.string.end.js</string>
|
||||
</dict>
|
||||
<key>9</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>entity.name.function.js</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>comment</key>
|
||||
<string>Attempt to match "foo": function</string>
|
||||
<key>match</key>
|
||||
<string>(?:((')(.*?)('))|((")(.*?)(")))\s*:\s*\b(function)?\s*(\()(.*?)(\))</string>
|
||||
<key>name</key>
|
||||
<string>meta.function.json.js</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>keyword.operator.new.js</string>
|
||||
</dict>
|
||||
<key>2</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>entity.name.type.instance.js</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>match</key>
|
||||
<string>(new)\s+(\w+(?:\.\w*)?)</string>
|
||||
<key>name</key>
|
||||
<string>meta.class.instance.constructor</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(console)\b</string>
|
||||
<key>name</key>
|
||||
<string>entity.name.type.object.js.firebug</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\.(warn|info|log|error|time|timeEnd|assert)\b</string>
|
||||
<key>name</key>
|
||||
<string>support.function.js.firebug</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b((0(x|X)[0-9a-fA-F]+)|([0-9]+(\.[0-9]+)?))\b</string>
|
||||
<key>name</key>
|
||||
<string>constant.numeric.js</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>'</string>
|
||||
<key>beginCaptures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.string.begin.js</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>'</string>
|
||||
<key>endCaptures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.string.end.js</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>name</key>
|
||||
<string>string.quoted.single.js</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\\(x\h{2}|[0-2][0-7]{,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)</string>
|
||||
<key>name</key>
|
||||
<string>constant.character.escape.js</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>"</string>
|
||||
<key>beginCaptures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.string.begin.js</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>"</string>
|
||||
<key>endCaptures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.string.end.js</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>name</key>
|
||||
<string>string.quoted.double.js</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\\(x\h{2}|[0-2][0-7]{,2}|3[0-6][0-7]|37[0-7]?|[4-7][0-7]?|.)</string>
|
||||
<key>name</key>
|
||||
<string>constant.character.escape.js</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>/\*\*(?!/)</string>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.comment.js</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>\*/</string>
|
||||
<key>name</key>
|
||||
<string>comment.block.documentation.js</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>/\*</string>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.comment.js</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>\*/</string>
|
||||
<key>name</key>
|
||||
<string>comment.block.js</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.comment.js</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>match</key>
|
||||
<string>(//).*$\n?</string>
|
||||
<key>name</key>
|
||||
<string>comment.line.double-slash.js</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.comment.html.js</string>
|
||||
</dict>
|
||||
<key>2</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.comment.html.js</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>match</key>
|
||||
<string>(<!--|-->)</string>
|
||||
<key>name</key>
|
||||
<string>comment.block.html.js</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(boolean|byte|char|class|double|enum|float|function|int|interface|long|short|var|void)\b</string>
|
||||
<key>name</key>
|
||||
<string>storage.type.js</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(const|export|extends|final|implements|native|private|protected|public|static|synchronized|throws|transient|volatile)\b</string>
|
||||
<key>name</key>
|
||||
<string>storage.modifier.js</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(break|case|catch|continue|default|do|else|finally|for|goto|if|import|package|return|switch|throw|try|while)\b</string>
|
||||
<key>name</key>
|
||||
<string>keyword.control.js</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(delete|in|instanceof|new|typeof|with)\b</string>
|
||||
<key>name</key>
|
||||
<string>keyword.operator.js</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\btrue\b</string>
|
||||
<key>name</key>
|
||||
<string>constant.language.boolean.true.js</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\bfalse\b</string>
|
||||
<key>name</key>
|
||||
<string>constant.language.boolean.false.js</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\bnull\b</string>
|
||||
<key>name</key>
|
||||
<string>constant.language.null.js</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(super|this)\b</string>
|
||||
<key>name</key>
|
||||
<string>variable.language.js</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(debugger)\b</string>
|
||||
<key>name</key>
|
||||
<string>keyword.other.js</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(Anchor|Applet|Area|Array|Boolean|Button|Checkbox|Date|document|event|FileUpload|Form|Frame|Function|Hidden|History|Image|JavaArray|JavaClass|JavaObject|JavaPackage|java|Layer|Link|Location|Math|MimeType|Number|navigator|netscape|Object|Option|Packages|Password|Plugin|Radio|RegExp|Reset|Select|String|Style|Submit|screen|sun|Text|Textarea|window|XMLHttpRequest)\b</string>
|
||||
<key>name</key>
|
||||
<string>support.class.js</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(s(h(ift|ow(Mod(elessDialog|alDialog)|Help))|croll(X|By(Pages|Lines)?|Y|To)?|t(op|rike)|i(n|zeToContent|debar|gnText)|ort|u(p|b(str(ing)?)?)|pli(ce|t)|e(nd|t(Re(sizable|questHeader)|M(i(nutes|lliseconds)|onth)|Seconds|Ho(tKeys|urs)|Year|Cursor|Time(out)?|Interval|ZOptions|Date|UTC(M(i(nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(ome|andleEvent)|navigate|c(har(CodeAt|At)|o(s|n(cat|textual|firm)|mpile)|eil|lear(Timeout|Interval)?|a(ptureEvents|ll)|reate(StyleSheet|Popup|EventObject))|t(o(GMTString|S(tring|ource)|U(TCString|pperCase)|Lo(caleString|werCase))|est|a(n|int(Enabled)?))|i(s(NaN|Finite)|ndexOf|talics)|d(isableExternalCapture|ump|etachEvent)|u(n(shift|taint|escape|watch)|pdateCommands)|j(oin|avaEnabled)|p(o(p|w)|ush|lugins.refresh|a(ddings|rse(Int|Float)?)|r(int|ompt|eference))|e(scape|nableExternalCapture|val|lementFromPoint|x(p|ec(Script|Command)?))|valueOf|UTC|queryCommand(State|Indeterm|Enabled|Value)|f(i(nd|le(ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(nt(size|color)|rward)|loor|romCharCode)|watch|l(ink|o(ad|g)|astIndexOf)|a(sin|nchor|cos|t(tachEvent|ob|an(2)?)|pply|lert|b(s|ort))|r(ou(nd|teEvents)|e(size(By|To)|calc|turnValue|place|verse|l(oad|ease(Capture|Events)))|andom)|g(o|et(ResponseHeader|M(i(nutes|lliseconds)|onth)|Se(conds|lection)|Hours|Year|Time(zoneOffset)?|Da(y|te)|UTC(M(i(nutes|lliseconds)|onth)|Seconds|Hours|Da(y|te)|FullYear)|FullYear|A(ttention|llResponseHeaders)))|m(in|ove(B(y|elow)|To(Absolute)?|Above)|ergeAttributes|a(tch|rgins|x))|b(toa|ig|o(ld|rderWidths)|link|ack))\b(?=\()</string>
|
||||
<key>name</key>
|
||||
<string>support.function.js</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(s(ub(stringData|mit)|plitText|e(t(NamedItem|Attribute(Node)?)|lect))|has(ChildNodes|Feature)|namedItem|c(l(ick|o(se|neNode))|reate(C(omment|DATASection|aption)|T(Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(ntityReference|lement)|Attribute))|tabIndex|i(nsert(Row|Before|Cell|Data)|tem)|open|delete(Row|C(ell|aption)|T(Head|Foot)|Data)|focus|write(ln)?|a(dd|ppend(Child|Data))|re(set|place(Child|Data)|move(NamedItem|Child|Attribute(Node)?)?)|get(NamedItem|Element(sBy(Name|TagName)|ById)|Attribute(Node)?)|blur)\b(?=\()</string>
|
||||
<key>name</key>
|
||||
<string>support.function.dom.js</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>(?<=\.)(s(ystemLanguage|cr(ipts|ollbars|een(X|Y|Top|Left))|t(yle(Sheets)?|atus(Text|bar)?)|ibling(Below|Above)|ource|uffixes|e(curity(Policy)?|l(ection|f)))|h(istory|ost(name)?|as(h|Focus))|y|X(MLDocument|SLDocument)|n(ext|ame(space(s|URI)|Prop))|M(IN_VALUE|AX_VALUE)|c(haracterSet|o(n(structor|trollers)|okieEnabled|lorDepth|mp(onents|lete))|urrent|puClass|l(i(p(boardData)?|entInformation)|osed|asses)|alle(e|r)|rypto)|t(o(olbar|p)|ext(Transform|Indent|Decoration|Align)|ags)|SQRT(1_2|2)|i(n(ner(Height|Width)|put)|ds|gnoreCase)|zIndex|o(scpu|n(readystatechange|Line)|uter(Height|Width)|p(sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(i(splay|alog(Height|Top|Width|Left|Arguments)|rectories)|e(scription|fault(Status|Ch(ecked|arset)|View)))|u(ser(Profile|Language|Agent)|n(iqueID|defined)|pdateInterval)|_content|p(ixelDepth|ort|ersonalbar|kcs11|l(ugins|atform)|a(thname|dding(Right|Bottom|Top|Left)|rent(Window|Layer)?|ge(X(Offset)?|Y(Offset)?))|r(o(to(col|type)|duct(Sub)?|mpter)|e(vious|fix)))|e(n(coding|abledPlugin)|x(ternal|pando)|mbeds)|v(isibility|endor(Sub)?|Linkcolor)|URLUnencoded|P(I|OSITIVE_INFINITY)|f(ilename|o(nt(Size|Family|Weight)|rmName)|rame(s|Element)|gColor)|E|whiteSpace|l(i(stStyleType|n(eHeight|kColor))|o(ca(tion(bar)?|lName)|wsrc)|e(ngth|ft(Context)?)|a(st(M(odified|atch)|Index|Paren)|yer(s|X)|nguage))|a(pp(MinorVersion|Name|Co(deName|re)|Version)|vail(Height|Top|Width|Left)|ll|r(ity|guments)|Linkcolor|bove)|r(ight(Context)?|e(sponse(XML|Text)|adyState))|global|x|m(imeTypes|ultiline|enubar|argin(Right|Bottom|Top|Left))|L(N(10|2)|OG(10E|2E))|b(o(ttom|rder(Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(Color|Image)))\b</string>
|
||||
<key>name</key>
|
||||
<string>support.constant.js</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>(?<=\.)(s(hape|ystemId|c(heme|ope|rolling)|ta(ndby|rt)|ize|ummary|pecified|e(ctionRowIndex|lected(Index)?)|rc)|h(space|t(tpEquiv|mlFor)|e(ight|aders)|ref(lang)?)|n(o(Resize|tation(s|Name)|Shade|Href|de(Name|Type|Value)|Wrap)|extSibling|ame)|c(h(ildNodes|Off|ecked|arset)?|ite|o(ntent|o(kie|rds)|de(Base|Type)?|l(s|Span|or)|mpact)|ell(s|Spacing|Padding)|l(ear|assName)|aption)|t(ype|Bodies|itle|Head|ext|a(rget|gName)|Foot)|i(sMap|ndex|d|m(plementation|ages))|o(ptions|wnerDocument|bject)|d(i(sabled|r)|o(c(type|umentElement)|main)|e(clare|f(er|ault(Selected|Checked|Value)))|at(eTime|a))|useMap|p(ublicId|arentNode|r(o(file|mpt)|eviousSibling))|e(n(ctype|tities)|vent|lements)|v(space|ersion|alue(Type)?|Link|Align)|URL|f(irstChild|orm(s)?|ace|rame(Border)?)|width|l(ink(s)?|o(ngDesc|wSrc)|a(stChild|ng|bel))|a(nchors|c(ce(ssKey|pt(Charset)?)|tion)|ttributes|pplets|l(t|ign)|r(chive|eas)|xis|Link|bbr)|r(ow(s|Span|Index)|ules|e(v|ferrer|l|adOnly))|m(ultiple|e(thod|dia)|a(rgin(Height|Width)|xLength))|b(o(dy|rder)|ackground|gColor))\b</string>
|
||||
<key>name</key>
|
||||
<string>support.constant.dom.js</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(ELEMENT_NODE|ATTRIBUTE_NODE|TEXT_NODE|CDATA_SECTION_NODE|ENTITY_REFERENCE_NODE|ENTITY_NODE|PROCESSING_INSTRUCTION_NODE|COMMENT_NODE|DOCUMENT_NODE|DOCUMENT_TYPE_NODE|DOCUMENT_FRAGMENT_NODE|NOTATION_NODE|INDEX_SIZE_ERR|DOMSTRING_SIZE_ERR|HIERARCHY_REQUEST_ERR|WRONG_DOCUMENT_ERR|INVALID_CHARACTER_ERR|NO_DATA_ALLOWED_ERR|NO_MODIFICATION_ALLOWED_ERR|NOT_FOUND_ERR|NOT_SUPPORTED_ERR|INUSE_ATTRIBUTE_ERR)\b</string>
|
||||
<key>name</key>
|
||||
<string>support.constant.dom.js</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\bon(R(ow(s(inserted|delete)|e(nter|xit))|e(s(ize(start|end)?|et)|adystatechange))|Mouse(o(ut|ver)|down|up|move)|B(efore(cut|deactivate|u(nload|pdate)|p(aste|rint)|editfocus|activate)|lur)|S(croll|top|ubmit|elect(start|ionchange)?)|H(over|elp)|C(hange|ont(extmenu|rolselect)|ut|ellchange|l(ick|ose))|D(eactivate|ata(setc(hanged|omplete)|available)|r(op|ag(start|over|drop|en(ter|d)|leave)?)|blclick)|Unload|P(aste|ropertychange)|Error(update)?|Key(down|up|press)|Focus|Load|A(ctivate|fter(update|print)|bort))\b</string>
|
||||
<key>name</key>
|
||||
<string>support.function.event-handler.js</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>!|\$|%|&|\*|\-\-|\-|\+\+|\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|(?<!\()/=|%=|\+=|\-=|&=|\^=|\b(in|instanceof|new|delete|typeof|void)\b</string>
|
||||
<key>name</key>
|
||||
<string>keyword.operator.js</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(Infinity|NaN|undefined)\b</string>
|
||||
<key>name</key>
|
||||
<string>constant.language.js</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>(?<=[=(:]|^|return|&&|\|\||!)\s*(/)(?![/*+{}?])</string>
|
||||
<key>beginCaptures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.string.begin.js</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>(/)[igm]*</string>
|
||||
<key>endCaptures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.string.end.js</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>name</key>
|
||||
<string>string.regexp.js</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\\.</string>
|
||||
<key>name</key>
|
||||
<string>constant.character.escape.js</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\;</string>
|
||||
<key>name</key>
|
||||
<string>punctuation.terminator.statement.js</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>,[ |\t]*</string>
|
||||
<key>name</key>
|
||||
<string>meta.delimiter.object.comma.js</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\.</string>
|
||||
<key>name</key>
|
||||
<string>meta.delimiter.method.period.js</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\{|\}</string>
|
||||
<key>name</key>
|
||||
<string>meta.brace.curly.js</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\(|\)</string>
|
||||
<key>name</key>
|
||||
<string>meta.brace.round.js</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\[|\]</string>
|
||||
<key>name</key>
|
||||
<string>meta.brace.square.js</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>scopeName</key>
|
||||
<string>source.js</string>
|
||||
<key>uuid</key>
|
||||
<string>93E017CC-6F27-11D9-90EB-000D93589AF6</string>
|
||||
</dict>
|
||||
</plist>
|
||||
136
bundles/javascript.tmbundle/info.plist
Normal file
136
bundles/javascript.tmbundle/info.plist
Normal file
@@ -0,0 +1,136 @@
|
||||
<?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>contactEmailRot13</key>
|
||||
<string>boyvivbhf@fhogyrTenqvrag.pbz</string>
|
||||
<key>contactName</key>
|
||||
<string>Thomas Aylott</string>
|
||||
<key>deleted</key>
|
||||
<array>
|
||||
<string>0FE55436-0C29-4545-A3BE-B858EF81E27B</string>
|
||||
</array>
|
||||
<key>description</key>
|
||||
<string>Support for <a href="http://developer.mozilla.org/en/docs/About_JavaScript">JavaScript</a>.</string>
|
||||
<key>mainMenu</key>
|
||||
<dict>
|
||||
<key>items</key>
|
||||
<array>
|
||||
<string>D2E6A1FE-2881-4754-B399-B65F61F29C2F</string>
|
||||
<string>43F40EB6-5839-4BE8-99C8-4976D0534E5D</string>
|
||||
<string>52090C49-D8B2-49A0-9597-80574354B3CD</string>
|
||||
<string>------------------------------------</string>
|
||||
<string>B4874A14-2491-465A-A349-61E4EBCF4700</string>
|
||||
<string>------------------------------------</string>
|
||||
<string>36EC03E9-EFF4-479A-AB90-8DFA16800642</string>
|
||||
<string>20E61C43-B81F-4FB9-9362-BFFE668EB9C9</string>
|
||||
</array>
|
||||
<key>submenus</key>
|
||||
<dict>
|
||||
<key>43F40EB6-5839-4BE8-99C8-4976D0534E5D</key>
|
||||
<dict>
|
||||
<key>items</key>
|
||||
<array>
|
||||
<string>9E0E3BCC-7F20-4D6B-891D-A44D6EC56E31</string>
|
||||
</array>
|
||||
<key>name</key>
|
||||
<string>DOM</string>
|
||||
</dict>
|
||||
<key>52090C49-D8B2-49A0-9597-80574354B3CD</key>
|
||||
<dict>
|
||||
<key>items</key>
|
||||
<array>
|
||||
<string>009A3E6C-FE3F-4A18-8759-2DC31F17BBE2</string>
|
||||
</array>
|
||||
<key>name</key>
|
||||
<string>BOM</string>
|
||||
</dict>
|
||||
<key>66778C58-CE08-4F21-AD36-562149AEEE80</key>
|
||||
<dict>
|
||||
<key>items</key>
|
||||
<array>
|
||||
<string>4C6EDB43-3E2E-411B-A016-13C135C59833</string>
|
||||
<string>F0E4FB6A-4878-48C6-A777-62438DF1E14F</string>
|
||||
<string>------------------------------------</string>
|
||||
<string>73951799-AC15-40A6-81DB-EC051AB4A033</string>
|
||||
<string>1717B5AE-209B-4548-9155-9E88A7230C1C</string>
|
||||
<string>------------------------------------</string>
|
||||
<string>77065D69-742A-4FF0-9A41-AD211DFBE72F</string>
|
||||
<string>7B9AEFCC-B450-416D-8527-430FE2A08568</string>
|
||||
</array>
|
||||
<key>name</key>
|
||||
<string>Function</string>
|
||||
</dict>
|
||||
<key>7699AC1A-80AC-4120-A375-9371D1591F79</key>
|
||||
<dict>
|
||||
<key>items</key>
|
||||
<array>
|
||||
<string>F19F3732-39A7-48EC-A72B-A8F477A01795</string>
|
||||
<string>31964029-9D71-4ADC-8213-DFE5C4E222B3</string>
|
||||
<string>------------------------------------</string>
|
||||
<string>011C4681-FBEC-4891-9326-3DECFCDED6D6</string>
|
||||
<string>C207B7C3-5597-4873-8AAD-C46FB8842AF2</string>
|
||||
</array>
|
||||
<key>name</key>
|
||||
<string>Control</string>
|
||||
</dict>
|
||||
<key>D2E6A1FE-2881-4754-B399-B65F61F29C2F</key>
|
||||
<dict>
|
||||
<key>items</key>
|
||||
<array>
|
||||
<string>7699AC1A-80AC-4120-A375-9371D1591F79</string>
|
||||
<string>EC690F46-1906-4F55-9089-3C2929D5BB69</string>
|
||||
<string>66778C58-CE08-4F21-AD36-562149AEEE80</string>
|
||||
</array>
|
||||
<key>name</key>
|
||||
<string>Core</string>
|
||||
</dict>
|
||||
<key>EC690F46-1906-4F55-9089-3C2929D5BB69</key>
|
||||
<dict>
|
||||
<key>items</key>
|
||||
<array>
|
||||
<string>DC8B46FB-8ADA-45EA-8F36-94C807A0D302</string>
|
||||
<string>AD506BEC-B33C-4168-A900-0A4D386A4B05</string>
|
||||
<string>------------------------------------</string>
|
||||
<string>2F96136B-0193-42F5-90FC-B6F456A3AD77</string>
|
||||
</array>
|
||||
<key>name</key>
|
||||
<string>Language</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>name</key>
|
||||
<string>JavaScript</string>
|
||||
<key>ordering</key>
|
||||
<array>
|
||||
<string>73951799-AC15-40A6-81DB-EC051AB4A033</string>
|
||||
<string>1717B5AE-209B-4548-9155-9E88A7230C1C</string>
|
||||
<string>B4874A14-2491-465A-A349-61E4EBCF4700</string>
|
||||
<string>36EC03E9-EFF4-479A-AB90-8DFA16800642</string>
|
||||
<string>20E61C43-B81F-4FB9-9362-BFFE668EB9C9</string>
|
||||
<string>77065D69-742A-4FF0-9A41-AD211DFBE72F</string>
|
||||
<string>F0E4FB6A-4878-48C6-A777-62438DF1E14F</string>
|
||||
<string>2F96136B-0193-42F5-90FC-B6F456A3AD77</string>
|
||||
<string>4C6EDB43-3E2E-411B-A016-13C135C59833</string>
|
||||
<string>93E017CC-6F27-11D9-90EB-000D93589AF6</string>
|
||||
<string>A67A8BD9-A951-406F-9175-018DD4B52FD1</string>
|
||||
<string>BC062860-3346-4D3B-8421-C5543F83D11F</string>
|
||||
<string>834BC727-6B31-4073-A161-4823227219EF</string>
|
||||
<string>3CEA49B2-A5C5-405C-82E2-B8B668877C37</string>
|
||||
<string>E6EB7CC8-04E8-43A9-93B2-BC9EF5BA862B</string>
|
||||
<string>73557394-4F0F-4DD3-8029-EEE8201AC7F5</string>
|
||||
<string>51841DDB-C2A4-461C-A8AB-6C124AD50EAE</string>
|
||||
<string>F19F3732-39A7-48EC-A72B-A8F477A01795</string>
|
||||
<string>31964029-9D71-4ADC-8213-DFE5C4E222B3</string>
|
||||
<string>011C4681-FBEC-4891-9326-3DECFCDED6D6</string>
|
||||
<string>C207B7C3-5597-4873-8AAD-C46FB8842AF2</string>
|
||||
<string>AD506BEC-B33C-4168-A900-0A4D386A4B05</string>
|
||||
<string>DC8B46FB-8ADA-45EA-8F36-94C807A0D302</string>
|
||||
<string>009A3E6C-FE3F-4A18-8759-2DC31F17BBE2</string>
|
||||
<string>7B9AEFCC-B450-416D-8527-430FE2A08568</string>
|
||||
<string>9E0E3BCC-7F20-4D6B-891D-A44D6EC56E31</string>
|
||||
</array>
|
||||
<key>uuid</key>
|
||||
<string>AAB4FD74-73F9-11D9-B89A-000D93589AF6</string>
|
||||
</dict>
|
||||
</plist>
|
||||
27
bundles/ruby.tmbundle/Commands/Check ERB Syntax.plist
Normal file
27
bundles/ruby.tmbundle/Commands/Check ERB Syntax.plist
Normal file
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//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 ruby
|
||||
require ENV['TM_SUPPORT_PATH'] + '/lib/textmate'
|
||||
puts "using ruby-" + RUBY_VERSION.to_s + ' / erb'
|
||||
result = `"${TM_ERB:=erb}" -T - -x | "${TM_RUBY:=ruby}" -c 2>&1`
|
||||
puts result
|
||||
TextMate.go_to :line => $1 if result =~ /-:(\d+):/</string>
|
||||
<key>input</key>
|
||||
<string>document</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>^V</string>
|
||||
<key>name</key>
|
||||
<string>Validate Syntax (ERB)</string>
|
||||
<key>output</key>
|
||||
<string>showAsTooltip</string>
|
||||
<key>scope</key>
|
||||
<string>text.html.ruby, text.html source.ruby</string>
|
||||
<key>uuid</key>
|
||||
<string>76FCF165-54CB-4213-BC55-BD60B9C6A3EC</string>
|
||||
</dict>
|
||||
</plist>
|
||||
28
bundles/ruby.tmbundle/Commands/Check Ruby Syntax.plist
Normal file
28
bundles/ruby.tmbundle/Commands/Check Ruby Syntax.plist
Normal file
@@ -0,0 +1,28 @@
|
||||
<?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 ruby
|
||||
require ENV['TM_SUPPORT_PATH'] + '/lib/textmate'
|
||||
puts `"${TM_RUBY:=ruby}" -e'puts "Using ruby-" + RUBY_VERSION.to_s'`
|
||||
result = `"${TM_RUBY:=ruby}" -wc 2>&1`
|
||||
puts result
|
||||
TextMate.go_to :line => $1 if result =~ /-:(\d+):/
|
||||
</string>
|
||||
<key>input</key>
|
||||
<string>document</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>^V</string>
|
||||
<key>name</key>
|
||||
<string>Validate Syntax</string>
|
||||
<key>output</key>
|
||||
<string>showAsTooltip</string>
|
||||
<key>scope</key>
|
||||
<string>source.ruby</string>
|
||||
<key>uuid</key>
|
||||
<string>EE5F19BA-6C02-11D9-92BA-0011242E4184</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,72 @@
|
||||
<?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 ruby
|
||||
|
||||
require "#{ENV["TM_SUPPORT_PATH"]}/lib/exit_codes"
|
||||
require "#{ENV["TM_SUPPORT_PATH"]}/lib/ui"
|
||||
|
||||
require "pathname"
|
||||
|
||||
TM_RUBY = ENV["TM_RUBY"] || "ruby"
|
||||
RCODETOOLS = "#{ENV['TM_BUNDLE_SUPPORT']}/vendor/rcodetools"
|
||||
|
||||
RAILS_DIR = nil
|
||||
dir = File.dirname(ENV["TM_FILEPATH"]) rescue ENV["TM_PROJECT_DIRECTORY"]
|
||||
if dir
|
||||
dir = Pathname.new(dir)
|
||||
loop do
|
||||
if (dir + "config/environment.rb").exist?
|
||||
Object.send(:remove_const, :RAILS_DIR)
|
||||
RAILS_DIR = dir.to_s
|
||||
break
|
||||
end
|
||||
|
||||
break if dir.to_s == "/"
|
||||
|
||||
dir += ".."
|
||||
end
|
||||
end
|
||||
|
||||
command = <<END_COMMAND.tr("\n", " ").strip
|
||||
"#{TM_RUBY}"
|
||||
-I "#{RCODETOOLS}/lib"
|
||||
--
|
||||
"#{RCODETOOLS}/bin/rct-complete"
|
||||
#{"-r \"#{RAILS_DIR}/config/environment.rb\"" if RAILS_DIR}
|
||||
--line=#{ENV['TM_LINE_NUMBER']}
|
||||
--column=#{ENV['TM_LINE_INDEX']}
|
||||
2> /dev/null
|
||||
END_COMMAND
|
||||
completions = `#{command}`.split("\n").map { |l| l.strip }.select { |l| l =~ /\S/ }
|
||||
|
||||
if not $?.success?
|
||||
TextMate.exit_show_tool_tip "Parse error."
|
||||
elsif completions.size == 1
|
||||
selected = completions.first
|
||||
elsif completions.size > 1
|
||||
selected = completions[TextMate::UI.menu(completions)] rescue exit
|
||||
else
|
||||
TextMate.exit_show_tool_tip "No matches were found."
|
||||
end
|
||||
|
||||
print selected.sub(/\A#{Regexp.escape(ENV['TM_CURRENT_WORD'].to_s)}/, "")
|
||||
</string>
|
||||
<key>input</key>
|
||||
<string>document</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>~</string>
|
||||
<key>name</key>
|
||||
<string>Completion: Ruby (rcodetools)</string>
|
||||
<key>output</key>
|
||||
<string>afterSelectedText</string>
|
||||
<key>scope</key>
|
||||
<string>source.ruby</string>
|
||||
<key>uuid</key>
|
||||
<string>47D203ED-EB9B-4653-A07B-A897800CEB76</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,29 @@
|
||||
<?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 ruby
|
||||
|
||||
print case str = STDIN.read
|
||||
when /=>/; str.gsub(/:(\w+)[\s]+=>[\s]+/, '\1: ')
|
||||
when /(\w+):/; str.gsub(/(\w+):(\s*(?:"(?:\\"|[^"])*"|'(?:\\'|[^'])*'|\w+\([^)]*\)|[^,]+))/, ":\\1 =>\\2")
|
||||
else; str
|
||||
end
|
||||
</string>
|
||||
<key>fallbackInput</key>
|
||||
<string>line</string>
|
||||
<key>input</key>
|
||||
<string>selection</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>^=</string>
|
||||
<key>name</key>
|
||||
<string>Toggle Ruby Hash 1.8/1.9 Syntax</string>
|
||||
<key>output</key>
|
||||
<string>replaceSelectedText</string>
|
||||
<key>uuid</key>
|
||||
<string>F4EEB2B6-07D8-402F-8FC3-79B7308D2576</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//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 ruby
|
||||
s = STDIN.read
|
||||
case s
|
||||
when /^\w+$/
|
||||
print "*#{s}*$0"
|
||||
when ""
|
||||
print "*$1*$0"
|
||||
else
|
||||
print "<b>#{s}</b>"
|
||||
end</string>
|
||||
<key>fallbackInput</key>
|
||||
<string>word</string>
|
||||
<key>input</key>
|
||||
<string>selection</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>@b</string>
|
||||
<key>name</key>
|
||||
<string>Bold</string>
|
||||
<key>output</key>
|
||||
<string>insertAsSnippet</string>
|
||||
<key>scope</key>
|
||||
<string>source.ruby comment</string>
|
||||
<key>uuid</key>
|
||||
<string>931DD73E-615E-476E-9B0D-8341023AE730</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//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 ruby
|
||||
s = STDIN.read
|
||||
case s
|
||||
when /^\w+$/
|
||||
print "+#{s}+$0"
|
||||
when ""
|
||||
print "+$1+$0"
|
||||
else
|
||||
print "<tt>#{s}</tt>"
|
||||
end</string>
|
||||
<key>fallbackInput</key>
|
||||
<string>word</string>
|
||||
<key>input</key>
|
||||
<string>selection</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>@k</string>
|
||||
<key>name</key>
|
||||
<string>Typewriter</string>
|
||||
<key>output</key>
|
||||
<string>insertAsSnippet</string>
|
||||
<key>scope</key>
|
||||
<string>source.ruby comment</string>
|
||||
<key>uuid</key>
|
||||
<string>2DDB6FE0-6111-4C40-A149-8E67E76F8272</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//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 ruby
|
||||
s = STDIN.read
|
||||
case s
|
||||
when /^\w+$/
|
||||
print "_#{s}_$0"
|
||||
when ""
|
||||
print "_$1_$0"
|
||||
else
|
||||
print "<em>#{s}</em>"
|
||||
end</string>
|
||||
<key>fallbackInput</key>
|
||||
<string>word</string>
|
||||
<key>input</key>
|
||||
<string>selection</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>@i</string>
|
||||
<key>name</key>
|
||||
<string>Italic</string>
|
||||
<key>output</key>
|
||||
<string>insertAsSnippet</string>
|
||||
<key>scope</key>
|
||||
<string>source.ruby comment</string>
|
||||
<key>uuid</key>
|
||||
<string>DAA69A0C-FC1E-4509-9931-DFFB38B4D6AE</string>
|
||||
</dict>
|
||||
</plist>
|
||||
47
bundles/ruby.tmbundle/Commands/Execute Line with Ruby.plist
Normal file
47
bundles/ruby.tmbundle/Commands/Execute Line with Ruby.plist
Normal file
@@ -0,0 +1,47 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//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 ruby
|
||||
|
||||
# be smart, dont print something if we already have..
|
||||
$write_count = 0
|
||||
def STDOUT.write(what)
|
||||
$write_count += 1
|
||||
super(what)
|
||||
end
|
||||
|
||||
# execure the code
|
||||
begin
|
||||
# insert a space if input was a selection, if it was a line insert \n
|
||||
print(ENV['TM_SELECTED_TEXT'] ? " " : "\n")
|
||||
r = eval(STDIN.read)
|
||||
rescue Object
|
||||
r = $!.class.to_s
|
||||
end
|
||||
|
||||
# try to_s, if it doesnt work use inspect
|
||||
# Array and Hash are shown via inspect because they look better with formating
|
||||
# do this just if the script did not print anything itself
|
||||
if $write_count == 1
|
||||
print( (r.class != Hash and r.class != Array and not r.nil? and r.respond_to? :to_s) ? r.to_s : r.inspect )
|
||||
print( "\n" ) unless ENV.has_key?('TM_SELECTED_TEXT')
|
||||
end
|
||||
</string>
|
||||
<key>fallbackInput</key>
|
||||
<string>line</string>
|
||||
<key>input</key>
|
||||
<string>selection</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>^E</string>
|
||||
<key>name</key>
|
||||
<string>Execute Line / Selection as Ruby</string>
|
||||
<key>output</key>
|
||||
<string>afterSelectedText</string>
|
||||
<key>uuid</key>
|
||||
<string>EE5F1FB2-6C02-11D9-92BA-0011242E4184</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,29 @@
|
||||
<?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>export RUBYLIB="$TM_BUNDLE_SUPPORT/vendor/rcodetools/lib${RUBYLIB:+:$RUBYLIB}"
|
||||
export TM_RUBY=$(which "${TM_RUBY:-ruby}")
|
||||
|
||||
|
||||
"${TM_RUBY}" -r "${TM_SUPPORT_PATH}/lib/ruby1.9/add_1.8_features.rb" -- "$TM_BUNDLE_SUPPORT/vendor/rcodetools/bin/xmpfilter"
|
||||
</string>
|
||||
<key>fallbackInput</key>
|
||||
<string>document</string>
|
||||
<key>input</key>
|
||||
<string>selection</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>^@E</string>
|
||||
<key>name</key>
|
||||
<string>Execute and Update ‘# =>’ Markers</string>
|
||||
<key>output</key>
|
||||
<string>replaceSelectedText</string>
|
||||
<key>scope</key>
|
||||
<string>source.ruby</string>
|
||||
<key>uuid</key>
|
||||
<string>FBFC214F-B019-4967-95D2-028F374A3221</string>
|
||||
</dict>
|
||||
</plist>
|
||||
51
bundles/ruby.tmbundle/Commands/Insert Missing Requires.plist
Normal file
51
bundles/ruby.tmbundle/Commands/Insert Missing Requires.plist
Normal file
@@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//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 ruby
|
||||
$: << "#{ENV['TM_SUPPORT_PATH']}/lib"
|
||||
|
||||
require "escape"
|
||||
require "open3"
|
||||
|
||||
# make exceptions in the writing Thread kill the process so we don't hang
|
||||
Thread.abort_on_exception = true
|
||||
|
||||
CURSOR = [0xFFFC].pack("U").freeze
|
||||
line, col = ENV["TM_LINE_NUMBER"].to_i - 1, ENV["TM_LINE_INDEX"].to_i
|
||||
|
||||
stdin, stdout, stderr = Open3.popen3("/usr/bin/env", "ruby", "#{ENV['TM_BUNDLE_SUPPORT']}/bin/insert_requires.rb")
|
||||
Thread.new do
|
||||
code = STDIN.read.to_a
|
||||
unless ENV.has_key?('TM_SELECTED_TEXT')
|
||||
if code[line].nil? # if cursor was on the last line and it was blank
|
||||
code << CURSOR
|
||||
else
|
||||
code[line][col...col] = CURSOR
|
||||
end
|
||||
end
|
||||
stdin.write code.join
|
||||
stdin.close
|
||||
end
|
||||
|
||||
print stdout.read.split(CURSOR).join('${0}')
|
||||
</string>
|
||||
<key>fallbackInput</key>
|
||||
<string>document</string>
|
||||
<key>input</key>
|
||||
<string>selection</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>^#</string>
|
||||
<key>name</key>
|
||||
<string>Insert Missing Requires</string>
|
||||
<key>output</key>
|
||||
<string>insertAsSnippet</string>
|
||||
<key>scope</key>
|
||||
<string>source.ruby</string>
|
||||
<key>uuid</key>
|
||||
<string>9FB64639-F776-499B-BA6F-BB45F86F80FD</string>
|
||||
</dict>
|
||||
</plist>
|
||||
24
bundles/ruby.tmbundle/Commands/Lookup in Documentation.plist
Normal file
24
bundles/ruby.tmbundle/Commands/Lookup in Documentation.plist
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//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>"${TM_BUNDLE_SUPPORT}/bin/linked_ri.rb"</string>
|
||||
<key>fallbackInput</key>
|
||||
<string>word</string>
|
||||
<key>input</key>
|
||||
<string>selection</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>^h</string>
|
||||
<key>name</key>
|
||||
<string>Documentation for Word / Selection</string>
|
||||
<key>output</key>
|
||||
<string>showAsTooltip</string>
|
||||
<key>scope</key>
|
||||
<string>source.ruby, source.ruby.rails</string>
|
||||
<key>uuid</key>
|
||||
<string>63F3B3B7-CBE2-426B-B551-657733F3868B</string>
|
||||
</dict>
|
||||
</plist>
|
||||
29
bundles/ruby.tmbundle/Commands/Make Destructive Call.plist
Normal file
29
bundles/ruby.tmbundle/Commands/Make Destructive Call.plist
Normal file
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//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>res=$(ruby "$TM_BUNDLE_SUPPORT/bin/make_destructive.rb")
|
||||
|
||||
if [ "$res" = "" ]
|
||||
then exit_show_tool_tip "Retry this command without a selection."
|
||||
else echo -n "$res"
|
||||
fi</string>
|
||||
<key>fallbackInput</key>
|
||||
<string>line</string>
|
||||
<key>input</key>
|
||||
<string>selection</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>^!</string>
|
||||
<key>name</key>
|
||||
<string>Add ! to Method in Line / Selection</string>
|
||||
<key>output</key>
|
||||
<string>insertAsSnippet</string>
|
||||
<key>scope</key>
|
||||
<string>source.ruby</string>
|
||||
<key>uuid</key>
|
||||
<string>7F79BC8D-8A4F-4570-973B-05DFEC25747F</string>
|
||||
</dict>
|
||||
</plist>
|
||||
39
bundles/ruby.tmbundle/Commands/New Method.plist
Normal file
39
bundles/ruby.tmbundle/Commands/New Method.plist
Normal file
@@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//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 ruby -wKU
|
||||
|
||||
require "#{ENV['TM_SUPPORT_PATH']}/lib/exit_codes"
|
||||
require "#{ENV['TM_SUPPORT_PATH']}/lib/escape"
|
||||
|
||||
method_name = ENV["TM_SELECTED_TEXT"] || ENV["TM_CURRENT_WORD"] or
|
||||
TextMate.exit_show_tool_tip(
|
||||
"Please type the new function's name or use the def⇥ snippet."
|
||||
)
|
||||
|
||||
print <<END_SNIPPET
|
||||
def #{e_sn method_name}\${1/.+/(/}\${1:args}\${1/.+/)/}
|
||||
\$0
|
||||
end
|
||||
END_SNIPPET
|
||||
</string>
|
||||
<key>fallbackInput</key>
|
||||
<string>word</string>
|
||||
<key>input</key>
|
||||
<string>selection</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>$
|
||||
</string>
|
||||
<key>name</key>
|
||||
<string>New Method</string>
|
||||
<key>output</key>
|
||||
<string>insertAsSnippet</string>
|
||||
<key>scope</key>
|
||||
<string>source.ruby</string>
|
||||
<key>uuid</key>
|
||||
<string>0275EF39-9357-408F-AF20-79E415CA9504</string>
|
||||
</dict>
|
||||
31
bundles/ruby.tmbundle/Commands/Omit from RDoc.tmCommand
Normal file
31
bundles/ruby.tmbundle/Commands/Omit from RDoc.tmCommand
Normal file
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//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 ruby
|
||||
s = STDIN.read
|
||||
puts "\#--"
|
||||
if s== ""
|
||||
puts "\# $0","\#++"
|
||||
else
|
||||
puts s, "\#++", "$0"
|
||||
end</string>
|
||||
<key>fallbackInput</key>
|
||||
<string>line</string>
|
||||
<key>input</key>
|
||||
<string>selection</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>^@O</string>
|
||||
<key>name</key>
|
||||
<string>Omit</string>
|
||||
<key>output</key>
|
||||
<string>insertAsSnippet</string>
|
||||
<key>scope</key>
|
||||
<string>source.ruby</string>
|
||||
<key>uuid</key>
|
||||
<string>BF4CA9F1-51CD-48D4-8357-852234F59046</string>
|
||||
</dict>
|
||||
</plist>
|
||||
65
bundles/ruby.tmbundle/Commands/Open Require.tmCommand
Normal file
65
bundles/ruby.tmbundle/Commands/Open Require.tmCommand
Normal file
@@ -0,0 +1,65 @@
|
||||
<?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 ruby
|
||||
|
||||
require "#{ENV['TM_SUPPORT_PATH']}/lib/ui.rb"
|
||||
require "#{ENV['TM_SUPPORT_PATH']}/lib/textmate.rb"
|
||||
|
||||
REQUIRE_RE = /^\s*(?:require|load)\s*(['"])([^'"#]+?)(?:\.rb)?\1[ \t]*$/
|
||||
|
||||
gems_installed = begin
|
||||
require 'rubygems'
|
||||
true
|
||||
rescue LoadError
|
||||
false
|
||||
end
|
||||
|
||||
requires = if ENV['TM_CURRENT_LINE'].to_s =~ REQUIRE_RE
|
||||
["#{$2}.rb"]
|
||||
else
|
||||
$stdin.read.scan(REQUIRE_RE).map { |_, path| "#{path}.rb" }
|
||||
end
|
||||
abort 'No includes found.' if requires.empty?
|
||||
|
||||
file = if requires.size > 1
|
||||
choice = TextMate::UI.menu(requires) or exit
|
||||
requires[choice]
|
||||
else
|
||||
requires.pop
|
||||
end
|
||||
dir = $LOAD_PATH.find { |dir| File.exist? File.join(dir, file) }
|
||||
if not dir and gems_installed and gem_spec = Gem::GemPathSearcher.new.find(file)
|
||||
dir = File.join(gem_spec.full_gem_path, gem_spec.require_path)
|
||||
end
|
||||
|
||||
if file and dir
|
||||
dir.sub!(%r{\A\.(?=/|\z)}, ENV['TM_DIRECTORY']) if ENV['TM_DIRECTORY']
|
||||
file_path = File.join(dir, file)
|
||||
# puts file_path
|
||||
TextMate.go_to :file => file_path
|
||||
exit
|
||||
else
|
||||
puts "File not found: #{file}"
|
||||
end
|
||||
</string>
|
||||
<key>fallbackInput</key>
|
||||
<string>document</string>
|
||||
<key>input</key>
|
||||
<string>selection</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>@D</string>
|
||||
<key>name</key>
|
||||
<string>Open Require</string>
|
||||
<key>output</key>
|
||||
<string>showAsTooltip</string>
|
||||
<key>scope</key>
|
||||
<string>source.ruby</string>
|
||||
<key>uuid</key>
|
||||
<string>8646378E-91F5-4771-AC7C-43FC49A93576</string>
|
||||
</dict>
|
||||
</plist>
|
||||
27
bundles/ruby.tmbundle/Commands/Run Rake Task.tmCommand
Normal file
27
bundles/ruby.tmbundle/Commands/Run Rake Task.tmCommand
Normal file
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//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>export RUBYLIB="$TM_BUNDLE_SUPPORT/RakeMate${RUBYLIB:+:$RUBYLIB}"
|
||||
export TM_RUBY=$(which "${TM_RUBY:-ruby}")
|
||||
export TM_RAKE=$(which "${TM_RAKE:-rake}")
|
||||
|
||||
"${TM_RUBY}" -- "$TM_BUNDLE_SUPPORT/RakeMate/rake_mate.rb"
|
||||
</string>
|
||||
<key>input</key>
|
||||
<string>none</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>^R</string>
|
||||
<key>name</key>
|
||||
<string>Run Rake Task</string>
|
||||
<key>output</key>
|
||||
<string>showAsHTML</string>
|
||||
<key>scope</key>
|
||||
<string>source.ruby</string>
|
||||
<key>uuid</key>
|
||||
<string>569C9822-8C41-4907-94C7-1A8A0031B66D</string>
|
||||
</dict>
|
||||
</plist>
|
||||
35
bundles/ruby.tmbundle/Commands/Run focused unit test.plist
Normal file
35
bundles/ruby.tmbundle/Commands/Run focused unit test.plist
Normal file
@@ -0,0 +1,35 @@
|
||||
<?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>captureFormatString</key>
|
||||
<string>$0</string>
|
||||
<key>capturePattern</key>
|
||||
<string>(/[^:]+):(\d+)</string>
|
||||
<key>command</key>
|
||||
<string>#!/bin/sh
|
||||
|
||||
export RUBYLIB="$TM_BUNDLE_SUPPORT/RubyMate${RUBYLIB:+:$RUBYLIB}"
|
||||
|
||||
/usr/bin/env ruby -KU -- "$TM_BUNDLE_SUPPORT/RubyMate/run_script.rb" --name=
|
||||
</string>
|
||||
<key>fileCaptureRegister</key>
|
||||
<string>1</string>
|
||||
<key>input</key>
|
||||
<string>document</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>@R</string>
|
||||
<key>lineCaptureRegister</key>
|
||||
<string>2</string>
|
||||
<key>name</key>
|
||||
<string>Run Focused Unit Test</string>
|
||||
<key>output</key>
|
||||
<string>showAsHTML</string>
|
||||
<key>scope</key>
|
||||
<string>source.ruby</string>
|
||||
<key>uuid</key>
|
||||
<string>5289EE40-86B8-11D9-A8D4-000A95E13C98</string>
|
||||
</dict>
|
||||
</plist>
|
||||
29
bundles/ruby.tmbundle/Commands/Run.tmCommand
Normal file
29
bundles/ruby.tmbundle/Commands/Run.tmCommand
Normal file
@@ -0,0 +1,29 @@
|
||||
<?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>autoScrollOutput</key>
|
||||
<true/>
|
||||
<key>beforeRunningCommand</key>
|
||||
<string>nop</string>
|
||||
<key>command</key>
|
||||
<string>#!/bin/sh
|
||||
|
||||
export RUBYLIB="$TM_BUNDLE_SUPPORT/RubyMate${RUBYLIB:+:$RUBYLIB}"
|
||||
|
||||
/usr/bin/env ruby -KU -- "$TM_BUNDLE_SUPPORT/RubyMate/run_script.rb"
|
||||
</string>
|
||||
<key>input</key>
|
||||
<string>document</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>@r</string>
|
||||
<key>name</key>
|
||||
<string>Run</string>
|
||||
<key>output</key>
|
||||
<string>showAsHTML</string>
|
||||
<key>scope</key>
|
||||
<string>source.ruby</string>
|
||||
<key>uuid</key>
|
||||
<string>35222962-C50D-4D58-A6AE-71E7AD980BE4</string>
|
||||
</dict>
|
||||
</plist>
|
||||
37
bundles/ruby.tmbundle/Commands/Show RDoc for this file.plist
Normal file
37
bundles/ruby.tmbundle/Commands/Show RDoc for this file.plist
Normal file
@@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>beforeRunningCommand</key>
|
||||
<string>saveActiveFile</string>
|
||||
<key>command</key>
|
||||
<string>if (( ${#TM_PROJECT_DIRECTORY} != 0 )); then
|
||||
cd "$TM_PROJECT_DIRECTORY"
|
||||
output="`basename "$TM_PROJECT_DIRECTORY"`"
|
||||
input="."
|
||||
else
|
||||
cd "$TM_DIRECTORY"
|
||||
output="$TM_FILENAME"
|
||||
input="$TM_FILENAME"
|
||||
fi
|
||||
|
||||
output_dir="/tmp/rdoc_${output}"
|
||||
|
||||
rm -rf "${output_dir}"
|
||||
|
||||
rdoc -S -N -q -f html --op "${output_dir}" "$input" &>/dev/null
|
||||
|
||||
echo "<html><head><meta http-equiv=\"refresh\" content=\"0;URL=tm-file://${output_dir}/index.html\"></head></html>"
|
||||
</string>
|
||||
<key>input</key>
|
||||
<string>none</string>
|
||||
<key>name</key>
|
||||
<string>Show for Current File / Project</string>
|
||||
<key>output</key>
|
||||
<string>showAsHTML</string>
|
||||
<key>scope</key>
|
||||
<string>source.ruby</string>
|
||||
<key>uuid</key>
|
||||
<string>1AD6A138-2E89-4D6A-AB3F-416BF9CE968D</string>
|
||||
</dict>
|
||||
</plist>
|
||||
59
bundles/ruby.tmbundle/Commands/Toggle ERb Tags.tmCommand
Normal file
59
bundles/ruby.tmbundle/Commands/Toggle ERb Tags.tmCommand
Normal file
@@ -0,0 +1,59 @@
|
||||
<?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 ruby -w
|
||||
|
||||
require "#{ENV["TM_SUPPORT_PATH"]}/lib/escape"
|
||||
require "enumerator"
|
||||
|
||||
TAGS = %w[<%= <%# <%- <%].freeze
|
||||
|
||||
# locate caret (Allan's code)
|
||||
line = ENV['TM_LINE_NUMBER'].to_i - ENV['TM_INPUT_START_LINE'].to_i
|
||||
col = ENV['TM_LINE_INDEX'].to_i
|
||||
if ENV['TM_LINE_NUMBER'].to_i == ENV['TM_INPUT_START_LINE'].to_i
|
||||
col -= ENV['TM_INPUT_START_LINE_INDEX'].to_i
|
||||
end
|
||||
|
||||
# read input
|
||||
input = $stdin.read
|
||||
|
||||
# snippetize output
|
||||
lines = RUBY_VERSION < "1.9" ? input.to_a : input.lines.to_a
|
||||
lines[line] = e_sn(lines[line][0...col]) + "${0}" + e_sn(lines[line][col..-1])
|
||||
enum = RUBY_VERSION < "1.9" ? lines.enum_with_index :
|
||||
lines.each.with_index
|
||||
output = enum.inject(String.new) do |out, (l, i)|
|
||||
i == line ? out + l : out + e_sn(l)
|
||||
end
|
||||
|
||||
# swap ERb tags
|
||||
result = output.sub(/\A<%[-#=]?/) { |match| TAGS[TAGS.index(match) - 1] }
|
||||
if result[2] == ?-
|
||||
result.sub!(/%>\Z/, "-%>")
|
||||
else
|
||||
result.sub!(/-%>\Z/, "%>")
|
||||
end
|
||||
print result</string>
|
||||
<key>disableOutputAutoIndent</key>
|
||||
<true/>
|
||||
<key>fallbackInput</key>
|
||||
<string>scope</string>
|
||||
<key>input</key>
|
||||
<string>selection</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>^></string>
|
||||
<key>name</key>
|
||||
<string>Toggle ERb Tags</string>
|
||||
<key>output</key>
|
||||
<string>insertAsSnippet</string>
|
||||
<key>scope</key>
|
||||
<string>source.ruby.embedded, source.ruby.rails.embedded, comment.block.erb, meta.erb</string>
|
||||
<key>uuid</key>
|
||||
<string>835FAAC6-5431-436C-998B-241F7226B99B</string>
|
||||
</dict>
|
||||
</plist>
|
||||
55
bundles/ruby.tmbundle/Commands/Toggle Quote Style.plist
Normal file
55
bundles/ruby.tmbundle/Commands/Toggle Quote Style.plist
Normal file
@@ -0,0 +1,55 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//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 ruby
|
||||
|
||||
class String
|
||||
def escape(char)
|
||||
gsub(/\\.|#{Regexp.quote(char)}/) { |match| match == char ? "\\#{char}" : match }
|
||||
end
|
||||
|
||||
def unescape(char)
|
||||
gsub(/\\./) { |match| match == "\\#{char}" ? char : match }
|
||||
end
|
||||
end
|
||||
|
||||
print case str = STDIN.read
|
||||
# Handle standard quotes
|
||||
when /\A"(.*)"\z/m; "'" + $1.unescape('"').escape("'") + "'"
|
||||
when /\A'(.*)'\z/m; "%Q{" + $1.unescape("'").escape("}") + "}"
|
||||
when /\A%[Qq]?\{(.*)\}\z/m; '"' + $1.unescape("}").escape('"') + '"'
|
||||
|
||||
# Handle the more esoteric quote styles
|
||||
when /\A%[Qq]?\[(.*)(\])\z/m,
|
||||
/\A%[Qq]?\((.*)(\))\z/m,
|
||||
/\A%[Qq]?<(.*)(>)\z/m; '"' + $1.unescape($2).escape('"') + '"'
|
||||
when /\A%[Qq]?(.)(.*)\1\z/m; '"' + $2.unescape($1).escape('"') + '"'
|
||||
|
||||
# Handle shell escapes
|
||||
when /\A`(.*)`\z/m; "%x{" + $1.unescape("`").escape("}") + "}"
|
||||
when /\A%x\{(.*)\}\z/m; "`" + $1.unescape("}").escape("`") + "`"
|
||||
|
||||
# Default case
|
||||
else str
|
||||
end
|
||||
</string>
|
||||
<key>fallbackInput</key>
|
||||
<string>scope</string>
|
||||
<key>input</key>
|
||||
<string>selection</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>^"</string>
|
||||
<key>name</key>
|
||||
<string>Toggle Quote Style</string>
|
||||
<key>output</key>
|
||||
<string>replaceSelectedText</string>
|
||||
<key>scope</key>
|
||||
<string>source.ruby string.quoted.double, source.ruby string.quoted.single, source.ruby string</string>
|
||||
<key>uuid</key>
|
||||
<string>6519CB08-8326-4B77-A251-54722FFBFC1F</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,35 @@
|
||||
<?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>bundleUUID</key>
|
||||
<string>467B298F-6227-11D9-BFB1-000D93589AF6</string>
|
||||
<key>command</key>
|
||||
<string>#!/usr/bin/env ruby
|
||||
|
||||
print case str = STDIN.read
|
||||
# Handle standard quotes
|
||||
when /\A["'](\w+)["']\z/ then ":" + $1
|
||||
when /\A:(\w+)\z/ then '"' + $1 + '"'
|
||||
# Default case
|
||||
else str
|
||||
end
|
||||
</string>
|
||||
<key>fallbackInput</key>
|
||||
<string>scope</string>
|
||||
<key>input</key>
|
||||
<string>selection</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>^:</string>
|
||||
<key>name</key>
|
||||
<string>Toggle String / Symbol</string>
|
||||
<key>output</key>
|
||||
<string>replaceSelectedText</string>
|
||||
<key>scope</key>
|
||||
<string>source.ruby string.quoted, source.ruby constant.other.symbol.ruby</string>
|
||||
<key>uuid</key>
|
||||
<string>B297E4B8-A8FF-49CE-B9C4-6D4911724D43</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,150 @@
|
||||
<?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 ruby -KU
|
||||
# encoding: UTF-8
|
||||
|
||||
require "rexml/text"
|
||||
require "#{ENV["TM_SUPPORT_PATH"]}/lib/escape"
|
||||
|
||||
# transform XML into normal and sanitized Ruby
|
||||
ruby, safe_ruby, scope = "", "", []
|
||||
STDIN.read.scan(/<(.*?)>|([^<]+)/) do
|
||||
if $1
|
||||
if $1[0] == ?/
|
||||
scope.pop
|
||||
else
|
||||
scope.push($1)
|
||||
end
|
||||
else
|
||||
unescaped = REXML::Text.unnormalize($2)
|
||||
ruby << unescaped
|
||||
# strip strings, regexes, and comments from safe_ruby but leave byte count
|
||||
if scope.any? { |s| s =~ /\A(?:string|comment)\b/ }
|
||||
safe_ruby << " " * unescaped.length
|
||||
else
|
||||
safe_ruby << unescaped
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# find and mark the cursor
|
||||
line_number = ENV["TM_LINE_NUMBER"].to_i
|
||||
input_start_line = ENV["TM_INPUT_START_LINE"].to_i
|
||||
row = line_number - input_start_line
|
||||
col = ENV["TM_LINE_INDEX"].to_i
|
||||
if line_number == input_start_line
|
||||
col -= ENV["TM_INPUT_START_LINE_INDEX"].to_i
|
||||
end
|
||||
cursor = ruby[/\A(?:.*\n){#{row - 1}}.{#{col}}/].size
|
||||
CURSOR = [0xFFFC].pack("U")
|
||||
B = "(?:\\b|#{CURSOR})" # Note: /\w/u includes CURSOR
|
||||
ruby[cursor, 0] = CURSOR
|
||||
safe_ruby[cursor, 0] = CURSOR
|
||||
|
||||
# find the block nearest to the cursor
|
||||
block_start, block_length = nil, nil
|
||||
loop do
|
||||
block_start = safe_ruby.rindex( /(\{|#{B}do#{B})/,
|
||||
block_start.nil? ? cursor : block_start - 1 )
|
||||
if block_start.nil? # block not found: give up and don't change the document
|
||||
print e_sn(ruby).sub(CURSOR, "$0")
|
||||
exit
|
||||
end
|
||||
block_length, nesting = 0, []
|
||||
if $1 == "{"
|
||||
re, starts, stop = /\{|\}|[^{}]+/, ["{"], "}"
|
||||
else
|
||||
re, starts, stop = /#{B}do#{B}|#{B}end#{B}|./m, ["do"], "end"
|
||||
end
|
||||
safe_ruby[block_start..-1].scan(re) do |token|
|
||||
block_length += token.length
|
||||
token.sub!(/\A#{CURSOR}/, "")
|
||||
token.sub!(/#{CURSOR}\z/, "")
|
||||
case token
|
||||
when *starts
|
||||
nesting << token
|
||||
when stop
|
||||
if nesting.last.nil?
|
||||
nesting << nil
|
||||
break
|
||||
else
|
||||
nesting.pop
|
||||
break if nesting.empty?
|
||||
end
|
||||
end
|
||||
end
|
||||
break if nesting.empty? and ruby[block_start, block_length].include? CURSOR
|
||||
end
|
||||
block = ruby[block_start, block_length]
|
||||
|
||||
# toggle the block
|
||||
if block[0] == ?{
|
||||
block = block[1..-2]
|
||||
if block.include? "\n"
|
||||
block[0, 0] = " " if block =~ /\A#{CURSOR}?[A-Za-z0-9_]/
|
||||
block << " " if block =~ /[A-Za-z0-9_]#{CURSOR}?\z/
|
||||
block = "do#{block}end"
|
||||
else # expand the block
|
||||
block.strip!
|
||||
lines = %w[do]
|
||||
if block.sub!(/\A(#{CURSOR}?(\s*)\|[^|]*\|)/, "")
|
||||
lines.first << "#{' ' if $2.empty?}#{$1}"
|
||||
end
|
||||
indent = ruby[0...block_start][/^([ \t]*).*\Z/, 1]
|
||||
tab = ( ENV["TM_SOFT_TABS"] == "YES" ? " " * ENV["TM_TAB_SIZE"].to_i :
|
||||
"\t" )
|
||||
lines << "#{indent}#{tab}#{block.strip}"
|
||||
lines << "#{indent}end"
|
||||
block = lines.join("\n")
|
||||
end
|
||||
else
|
||||
block = block[2..-4]
|
||||
if block.include? "\n" # collapse the block
|
||||
lines = block.send(block.respond_to?(:lines) ? :lines : :to_s).to_a
|
||||
lines.first.send(
|
||||
"#{'r' if lines.first =~ /\A\s*#{CURSOR}?\s*\|[^|]*\|/}strip!"
|
||||
)
|
||||
lines[1..-1].each do |line|
|
||||
line.strip!
|
||||
end
|
||||
lines.first << "; " unless lines.first =~
|
||||
/\A\s*#{CURSOR}?\s*(?:\|[^|]*\|)?\s*#{CURSOR}?\z/
|
||||
lines.first << " " unless lines.first =~ /\s\z/
|
||||
lines[1..-2].each do |line|
|
||||
line << "; "
|
||||
end
|
||||
lines[-2].sub!(/; \z/, "") if lines.size > 2 and lines.last.empty?
|
||||
cursor_by_end = lines.size > 2 && lines.last == CURSOR
|
||||
lines[-2].sub!(/; \z/, " ") if cursor_by_end
|
||||
block = "{#{lines.join}#{' ' unless cursor_by_end}}"
|
||||
else
|
||||
block = "{#{block}}"
|
||||
end
|
||||
end
|
||||
|
||||
# replace document
|
||||
print e_sn(ruby[0...block_start])
|
||||
print e_sn(block).sub(CURSOR, "$0")
|
||||
print e_sn(ruby[(block_start + block_length)..-1])
|
||||
</string>
|
||||
<key>input</key>
|
||||
<string>selection</string>
|
||||
<key>inputFormat</key>
|
||||
<string>xml</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>^{</string>
|
||||
<key>name</key>
|
||||
<string>Toggle ‘do … end’ / ‘{ … }’</string>
|
||||
<key>output</key>
|
||||
<string>insertAsSnippet</string>
|
||||
<key>scope</key>
|
||||
<string>source.ruby</string>
|
||||
<key>uuid</key>
|
||||
<string>59E811FF-E722-46BE-8938-04713612FABB</string>
|
||||
</dict>
|
||||
</plist>
|
||||
31
bundles/ruby.tmbundle/Commands/word_wrap() (worw).plist
Normal file
31
bundles/ruby.tmbundle/Commands/word_wrap() (worw).plist
Normal file
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//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 ruby
|
||||
$: << ENV['TM_SUPPORT_PATH'] + '/lib'
|
||||
require "ui"
|
||||
TextMate::UI.request_string(:title => "Wrap Size",
|
||||
:prompt => "Enter a character width:",
|
||||
:button1 => "Build Snippet") do |col|
|
||||
col = col.to_i
|
||||
print %Q{gsub!(/(.{1,#{col}}|\\S{#{col + 1},})(?: +|$\\n?)/, "\\\\1\\n")}
|
||||
end
|
||||
</string>
|
||||
<key>input</key>
|
||||
<string>none</string>
|
||||
<key>name</key>
|
||||
<string>word_wrap()</string>
|
||||
<key>output</key>
|
||||
<string>afterSelectedText</string>
|
||||
<key>scope</key>
|
||||
<string>source.ruby</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>worw</string>
|
||||
<key>uuid</key>
|
||||
<string>97054C4D-E4A3-45B1-9C00-B82DBCB30CAD</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,39 @@
|
||||
<?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 ruby -wKU
|
||||
|
||||
require 'pathname'
|
||||
|
||||
require "#{ENV['TM_SUPPORT_PATH']}/lib/escape.rb"
|
||||
|
||||
from_path = Pathname.new(ENV['TM_FILEPATH'] || '.').dirname.realpath
|
||||
to_path = Pathname.new(ENV['TM_DROPPED_FILE']).realpath
|
||||
begin
|
||||
path = to_path.relative_path_from(from_path)
|
||||
rescue ArgumentError
|
||||
path = to_path
|
||||
end
|
||||
lib = path.to_s.sub(/\.rb\z/i, '')
|
||||
puts %Q{require "#{e_sn(lib).gsub('"', '\"')}"}
|
||||
</string>
|
||||
<key>draggedFileExtensions</key>
|
||||
<array>
|
||||
<string>rb</string>
|
||||
</array>
|
||||
<key>input</key>
|
||||
<string>selection</string>
|
||||
<key>name</key>
|
||||
<string>Require Ruby File</string>
|
||||
<key>output</key>
|
||||
<string>insertAsSnippet</string>
|
||||
<key>scope</key>
|
||||
<string>source.ruby</string>
|
||||
<key>uuid</key>
|
||||
<string>C122CD92-DDBE-4869-9C7A-CC2B254C9411</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>commands</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>command</key>
|
||||
<string>moveToBeginningOfDocumentAndModifySelection:</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>argument</key>
|
||||
<dict>
|
||||
<key>command</key>
|
||||
<string>insert_requires.rb benchmark</string>
|
||||
<key>input</key>
|
||||
<string>selection</string>
|
||||
<key>output</key>
|
||||
<string>insertAsSnippet</string>
|
||||
</dict>
|
||||
<key>command</key>
|
||||
<string>executeCommandWithOptions:</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>argument</key>
|
||||
<dict>
|
||||
<key>content</key>
|
||||
<string>TESTS = ${1:10_000}
|
||||
Benchmark.bmbm do |results|
|
||||
$0
|
||||
end</string>
|
||||
<key>name</key>
|
||||
<string>Benchmark.bmbm do .. end</string>
|
||||
<key>scope</key>
|
||||
<string>source.ruby</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>bm-</string>
|
||||
<key>uuid</key>
|
||||
<string>942F20E2-C40A-44B8-A3F2-99AAC68CB534</string>
|
||||
</dict>
|
||||
<key>command</key>
|
||||
<string>insertSnippetWithOptions:</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>name</key>
|
||||
<string>Benchmark.bmbm do .. end</string>
|
||||
<key>scope</key>
|
||||
<string>source.ruby</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>bm</string>
|
||||
<key>uuid</key>
|
||||
<string>C649F945-DAB8-4DA2-B73C-2EFF9D7D34F3</string>
|
||||
</dict>
|
||||
</plist>
|
||||
25
bundles/ruby.tmbundle/Macros/Delete forward:backward.tmMacro
Normal file
25
bundles/ruby.tmbundle/Macros/Delete forward:backward.tmMacro
Normal file
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>commands</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>command</key>
|
||||
<string>deleteBackward:</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>command</key>
|
||||
<string>deleteForward:</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>keyEquivalent</key>
|
||||
<string></string>
|
||||
<key>name</key>
|
||||
<string>Delete forward/backward</string>
|
||||
<key>scope</key>
|
||||
<string>source.ruby.embedded.source.empty</string>
|
||||
<key>uuid</key>
|
||||
<string>A83F68A9-F751-4BB4-AE16-56812878C16A</string>
|
||||
</dict>
|
||||
</plist>
|
||||
54
bundles/ruby.tmbundle/Macros/Overwrite } in #{ .. }.plist
Normal file
54
bundles/ruby.tmbundle/Macros/Overwrite } in #{ .. }.plist
Normal file
@@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>commands</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>command</key>
|
||||
<string>moveRightAndModifySelection:</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>argument</key>
|
||||
<dict>
|
||||
<key>action</key>
|
||||
<string>replaceAll</string>
|
||||
<key>findInProjectIgnoreCase</key>
|
||||
<false/>
|
||||
<key>findString</key>
|
||||
<string>((?m:.){2,})|\}|([^}])</string>
|
||||
<key>ignoreCase</key>
|
||||
<false/>
|
||||
<key>regularExpression</key>
|
||||
<true/>
|
||||
<key>replaceAllScope</key>
|
||||
<string>selection</string>
|
||||
<key>replaceString</key>
|
||||
<string>$1}$2</string>
|
||||
<key>wrapAround</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<key>command</key>
|
||||
<string>findWithOptions:</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>command</key>
|
||||
<string>moveLeft:</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>command</key>
|
||||
<string>moveRight:</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>keyEquivalent</key>
|
||||
<string>}</string>
|
||||
<key>name</key>
|
||||
<string>Overwrite '}' in #{ .. }</string>
|
||||
<key>scope</key>
|
||||
<string>source.ruby string.quoted source.ruby.embedded</string>
|
||||
<key>scopeType</key>
|
||||
<string>local</string>
|
||||
<key>uuid</key>
|
||||
<string>E5158F94-CC52-4424-A495-14EF9272653F</string>
|
||||
</dict>
|
||||
</plist>
|
||||
51
bundles/ruby.tmbundle/Macros/PStore_new( __ ).tmMacro
Normal file
51
bundles/ruby.tmbundle/Macros/PStore_new( __ ).tmMacro
Normal file
@@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>commands</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>command</key>
|
||||
<string>moveToBeginningOfDocumentAndModifySelection:</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>argument</key>
|
||||
<dict>
|
||||
<key>command</key>
|
||||
<string>insert_requires.rb pstore</string>
|
||||
<key>input</key>
|
||||
<string>selection</string>
|
||||
<key>output</key>
|
||||
<string>insertAsSnippet</string>
|
||||
</dict>
|
||||
<key>command</key>
|
||||
<string>executeCommandWithOptions:</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>argument</key>
|
||||
<dict>
|
||||
<key>content</key>
|
||||
<string>PStore.new(${1:"${2:file_name.pstore}"})</string>
|
||||
<key>name</key>
|
||||
<string>PStore.new( .. )</string>
|
||||
<key>scope</key>
|
||||
<string>source.ruby</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>Pn-</string>
|
||||
<key>uuid</key>
|
||||
<string>5B46ECFD-23A4-4F0C-9951-F64C19C72C2B</string>
|
||||
</dict>
|
||||
<key>command</key>
|
||||
<string>insertSnippetWithOptions:</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>name</key>
|
||||
<string>PStore.new( .. )</string>
|
||||
<key>scope</key>
|
||||
<string>source.ruby</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>Pn</string>
|
||||
<key>uuid</key>
|
||||
<string>5AE7CFB4-418E-4E00-AD76-06DB755EE876</string>
|
||||
</dict>
|
||||
</plist>
|
||||
57
bundles/ruby.tmbundle/Macros/YAML.dump(.., file) (Yd).plist
Normal file
57
bundles/ruby.tmbundle/Macros/YAML.dump(.., file) (Yd).plist
Normal file
@@ -0,0 +1,57 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>commands</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>command</key>
|
||||
<string>moveToBeginningOfDocumentAndModifySelection:</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>argument</key>
|
||||
<dict>
|
||||
<key>command</key>
|
||||
<string>insert_requires.rb yaml</string>
|
||||
<key>input</key>
|
||||
<string>selection</string>
|
||||
<key>output</key>
|
||||
<string>insertAsSnippet</string>
|
||||
</dict>
|
||||
<key>command</key>
|
||||
<string>executeCommandWithOptions:</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>argument</key>
|
||||
<dict>
|
||||
<key>bundlePath</key>
|
||||
<string>/Users/james/Library/Application Support/TextMate/Bundles/Ruby Idioms.tmbundle</string>
|
||||
<key>content</key>
|
||||
<string>File.open(${1:"${2:path/to/file}.yaml"}, "w") { |${3:file}| YAML.dump(${4:obj}, ${3:file}) }</string>
|
||||
<key>scope</key>
|
||||
<string>source.ruby</string>
|
||||
<key>supportPath</key>
|
||||
<string>/Users/james/Library/Application Support/TextMate/Bundles/Ruby Idioms.tmbundle/Support</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>Yd-</string>
|
||||
<key>uuid</key>
|
||||
<string>3BA6762A-BB6B-489E-8006-F30F386AEF48</string>
|
||||
</dict>
|
||||
<key>command</key>
|
||||
<string>insertSnippetWithOptions:</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>keyEquivalent</key>
|
||||
<string></string>
|
||||
<key>name</key>
|
||||
<string>YAML.dump(.., file)</string>
|
||||
<key>scope</key>
|
||||
<string>source.ruby</string>
|
||||
<key>scopeType</key>
|
||||
<string>local</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>Yd</string>
|
||||
<key>uuid</key>
|
||||
<string>9460392B-C036-4A76-A5AE-1191F10E4B1B</string>
|
||||
</dict>
|
||||
</plist>
|
||||
57
bundles/ruby.tmbundle/Macros/YAML.load(file) (Yl).plist
Normal file
57
bundles/ruby.tmbundle/Macros/YAML.load(file) (Yl).plist
Normal file
@@ -0,0 +1,57 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>commands</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>command</key>
|
||||
<string>moveToBeginningOfDocumentAndModifySelection:</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>argument</key>
|
||||
<dict>
|
||||
<key>command</key>
|
||||
<string>insert_requires.rb yaml</string>
|
||||
<key>input</key>
|
||||
<string>selection</string>
|
||||
<key>output</key>
|
||||
<string>insertAsSnippet</string>
|
||||
</dict>
|
||||
<key>command</key>
|
||||
<string>executeCommandWithOptions:</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>argument</key>
|
||||
<dict>
|
||||
<key>bundlePath</key>
|
||||
<string>/Users/james/Library/Application Support/TextMate/Bundles/Ruby Idioms.tmbundle</string>
|
||||
<key>content</key>
|
||||
<string>File.open(${1:"${2:path/to/file}.yaml"}) { |${3:file}| YAML.load(${3:file}) }</string>
|
||||
<key>scope</key>
|
||||
<string>source.ruby</string>
|
||||
<key>supportPath</key>
|
||||
<string>/Users/james/Library/Application Support/TextMate/Bundles/Ruby Idioms.tmbundle/Support</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>Yl-</string>
|
||||
<key>uuid</key>
|
||||
<string>8343ACF4-EEB7-44B5-B835-94826466D4D5</string>
|
||||
</dict>
|
||||
<key>command</key>
|
||||
<string>insertSnippetWithOptions:</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>keyEquivalent</key>
|
||||
<string></string>
|
||||
<key>name</key>
|
||||
<string>YAML.load(file)</string>
|
||||
<key>scope</key>
|
||||
<string>source.ruby</string>
|
||||
<key>scopeType</key>
|
||||
<string>local</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>Yl</string>
|
||||
<key>uuid</key>
|
||||
<string>2C07D4E7-D74F-4AE4-82BE-B0BA82247AFA</string>
|
||||
</dict>
|
||||
</plist>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user