-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update changes before OS X Mountain Lion install
- Loading branch information
Showing
113 changed files
with
2,961 additions
and
107 deletions.
There are no files selected for viewing
Submodule CoffeeScriptBundle.tmbundle
added at
a104c3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?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>changed</key> | ||
<dict> | ||
<key>settings.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_START_3</string> | ||
<key>value</key> | ||
<string>/*</string> | ||
</dict> | ||
<dict> | ||
<key>name</key> | ||
<string>TM_COMMENT_END_3</string> | ||
<key>value</key> | ||
<string>*/</string> | ||
</dict> | ||
</array> | ||
</dict> | ||
<key>deleted</key> | ||
<array/> | ||
<key>isDelta</key> | ||
<true/> | ||
<key>uuid</key> | ||
<string>06276449-AA4E-424F-A2B6-9F4138416E50</string> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?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>changed</key> | ||
<dict/> | ||
<key>deleted</key> | ||
<array/> | ||
<key>isDelta</key> | ||
<true/> | ||
<key>uuid</key> | ||
<string>467A1966-6227-11D9-BFB1-000D93589AF6</string> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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>/* @group css.${1:section_name} */ | ||
$0 | ||
/* @end css.$1 */ | ||
</string> | ||
<key>name</key> | ||
<string>@group css</string> | ||
<key>scope</key> | ||
<string>source.css, source.scss</string> | ||
<key>tabTrigger</key> | ||
<string>group</string> | ||
<key>uuid</key> | ||
<string>DD468C45-096A-4545-BF15-AD244855BE2D</string> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.cache |
159 changes: 159 additions & 0 deletions
159
_Alt_CoffeeScript.tmbundle/Commands/Align Assignments.tmCommand
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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>04C66A98-AF9B-4192-99F9-A20918D04532</string> | ||
</dict> | ||
</plist> |
6 changes: 6 additions & 0 deletions
6
_Alt_CoffeeScript.tmbundle/Commands/CoffeeScript.sublime-build
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"path": "$HOME/bin:/usr/local/bin:$PATH", | ||
"cmd": ["coffee","-c","$file"], | ||
"file_regex": "^(...*?):([0-9]*):?([0-9]*)", | ||
"selector": "source.coffee" | ||
} |
33 changes: 33 additions & 0 deletions
33
_Alt_CoffeeScript.tmbundle/Commands/Compile and Display JS.tmCommand
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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>F59FAA2D-4EF4-4580-8010-CCE87FB03CEB</string> | ||
</dict> | ||
</plist> |
34 changes: 34 additions & 0 deletions
34
_Alt_CoffeeScript.tmbundle/Commands/Insert Heredoc comment.tmCommand
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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>E5252948-5282-43F6-B8C8-269DDC5AF829</string> | ||
</dict> | ||
</plist> |
34 changes: 34 additions & 0 deletions
34
_Alt_CoffeeScript.tmbundle/Commands/Insert Heredoc triple double quotes.tmCommand
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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>554BA235-1288-484B-BAE7-FE1E05B2D099</string> | ||
</dict> | ||
</plist> |
Oops, something went wrong.