Skip to content

Commit

Permalink
Update changes before OS X Mountain Lion install
Browse files Browse the repository at this point in the history
  • Loading branch information
kematzy committed Apr 6, 2013
1 parent d0396df commit 403fbd5
Show file tree
Hide file tree
Showing 113 changed files with 2,961 additions and 107 deletions.
1 change: 1 addition & 0 deletions CoffeeScriptBundle.tmbundle
Submodule CoffeeScriptBundle.tmbundle added at a104c3
42 changes: 42 additions & 0 deletions PHP.tmbundle/Preferences/Comments.tmDelta
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>
14 changes: 14 additions & 0 deletions PHP.tmbundle/info.plist
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>
19 changes: 19 additions & 0 deletions _Alt_CSS-Snippets.tmbundle/Snippets/@group css.tmSnippet
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>
2 changes: 2 additions & 0 deletions _Alt_CSS-Snippets.tmbundle/info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,7 @@
<string>7DFC0C81-1F32-493A-BCAA-83D0884D860D</string>
<string>E60AA0EE-C085-4126-9F8F-70BBC985142E</string>
<string>CA5F5D7C-D85F-475E-BB27-D80356667A44</string>
<string>DD468C45-096A-4545-BF15-AD244855BE2D</string>
<string>268DF993-5E3E-4824-88CD-6CF2C5A461EE</string>
<string>6CC78B5A-20C7-4357-BBDE-E157BA4691F4</string>
<string>759CA42E-9BFA-44CD-9BDE-9189F8EBB2BA</string>
Expand Down Expand Up @@ -736,6 +737,7 @@
<string>993CDF1B-CBBB-4147-BB95-BE70849EEC75</string>
<string>1E6E4D5A-F168-4C70-B187-FE8C592B6CA1</string>
<string>3446FFB1-6C4F-4306-862B-7C4058C537E9</string>
<string>F59DA283-EFE5-4516-9232-6E51D12DE605</string>
</array>
<key>uuid</key>
<string>8905C0A9-1964-41CA-B669-21EC18CED481</string>
Expand Down
1 change: 1 addition & 0 deletions _Alt_CoffeeScript.tmbundle/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.cache
159 changes: 159 additions & 0 deletions _Alt_CoffeeScript.tmbundle/Commands/Align Assignments.tmCommand
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) &gt; 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] == '&gt;' ? ":" : ": ")
lines[number-1] = ["#{before}:".ljust(best_column + 2), after].join
end
end
rescue =&gt; e
comments &lt;&lt; "Error: #{e.inspect}"
comments &lt;&lt; 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>
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"
}
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 '&lt;pre style="word-wrap: break-word;"&gt;'
perl -pe '$| = 1; s/&amp;/&amp;amp;/g; s/&lt;/&amp;lt;/g; s/&gt;/&amp;gt;/g; s/$\\n/&lt;br&gt;/'
echo '&lt;/pre&gt;'
}
${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>
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 &lt;&lt;-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>
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 &lt;&lt;-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>
Loading

0 comments on commit 403fbd5

Please sign in to comment.