├── Support ├── bin │ └── convert_to_snippet.rb ├── invert_colors.rb ├── filename_completion.rb ├── replace_colors.rb ├── Balance Jr Help.markdown ├── svn_diff_html.rb ├── show_hex_colors.rb └── show_hex_colors_and_replace.rb ├── Commands ├── Invert Colors.tmCommand ├── Convert to Snippet.tmCommand ├── Show Hex Colors.tmCommand ├── Replace Selected HEX Color.tmCommand ├── Mark Snippet.tmCommand ├── Balance Jr Help.tmCommand ├── Diff With Working Copy as HTML (BASE).tmCommand ├── Filename Completion.tmCommand ├── Replace Hex Colors.tmCommand ├── Strip Matching Lines.tmCommand ├── English Completion.tmCommand ├── Select Theme.tmCommand ├── Relaunch TextMate using WebKit.tmCommand ├── CodeCompletion Ruby.tmCommand ├── Smart Delete Outer Characters.plist ├── View Document as HTML.plist ├── Clock.plist ├── Reformat Long Strings.tmCommand ├── Extend Current Parens.plist └── Complete Local Function.plist ├── Macros ├── Select Folding Group.tmMacro ├── Select Markers and Convert to Snippet.tmMacro ├── Balance Jr Back.tmMacro ├── Balance Jr Foreward.tmMacro ├── Select Content of Balanced (HT|X)ML Tags.tmMacro └── Select Balanced (HT|X)ML Tags.tmMacro ├── info.plist ├── Syntaxes └── XML strict.plist └── Preferences └── CodeCompletions Ruby.tmPreferences /Support/bin/convert_to_snippet.rb: -------------------------------------------------------------------------------- 1 | #!/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby 2 | # encoding: utf-8 3 | 4 | require 'strscan' 5 | 6 | input = STDIN.read.gsub(/([\$\`\\])/, '\\\\\1') 7 | output = String.new 8 | counter = 1 9 | scanner = StringScanner.new(input) 10 | while scanner.scan(/(.*?)‹(.*?)›/m) 11 | prefix, contents = scanner[1], scanner[2] 12 | output << prefix + "$#{counter+=1}${1:#{contents}}" 13 | end 14 | output << "$0" if counter > 1 15 | output << input[(scanner.pos rescue 0)..-1] 16 | 17 | print output -------------------------------------------------------------------------------- /Commands/Invert Colors.tmCommand: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | nop 7 | command 8 | "${TM_RUBY:-ruby}" "$TM_BUNDLE_SUPPORT/invert_colors.rb" 9 | 10 | input 11 | selection 12 | name 13 | Invert HEX Colors 14 | output 15 | replaceSelectedText 16 | uuid 17 | D15DAF9D-80EF-4636-885A-74F64808060A 18 | 19 | 20 | -------------------------------------------------------------------------------- /Commands/Convert to Snippet.tmCommand: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | nop 7 | command 8 | "$TM_BUNDLE_SUPPORT/bin/convert_to_snippet.rb" 9 | fallbackInput 10 | none 11 | input 12 | selection 13 | name 14 | Convert to Snippet 15 | output 16 | insertAsSnippet 17 | uuid 18 | 99D9DBC0-E03E-46B9-9E73-13F58DCDB55B 19 | 20 | 21 | -------------------------------------------------------------------------------- /Commands/Show Hex Colors.tmCommand: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | nop 7 | command 8 | . "$TM_SUPPORT_PATH/lib/webpreview.sh" 9 | html_header "Colors" 10 | "${TM_RUBY:-ruby}" "$TM_BUNDLE_SUPPORT/show_hex_colors.rb" 11 | html_footer 12 | 13 | 14 | input 15 | selection 16 | name 17 | Show Hex Colors 18 | output 19 | showAsHTML 20 | uuid 21 | 7CC7E11B-02BE-4F8D-9E8F-396D2CB74A98 22 | 23 | 24 | -------------------------------------------------------------------------------- /Commands/Replace Selected HEX Color.tmCommand: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | nop 7 | command 8 | "${TM_RUBY:-ruby}" "$TM_BUNDLE_SUPPORT/replace_colors.rb" 9 | 10 | fallbackInput 11 | word 12 | input 13 | selection 14 | name 15 | Replace Selected HEX Color (Every Occurrence) 16 | output 17 | showAsTooltip 18 | uuid 19 | 381FFB1B-0CAE-40AC-A228-B575C6E1C1C4 20 | 21 | 22 | -------------------------------------------------------------------------------- /Commands/Mark Snippet.tmCommand: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | nop 7 | command 8 | #!/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby 9 | print "‹#{ENV['TM_SELECTED_TEXT']}›" 10 | fallbackInput 11 | none 12 | input 13 | selection 14 | name 15 | Mark Snippet 16 | output 17 | replaceSelectedText 18 | uuid 19 | 56B05535-1ACD-4E55-B9FC-3BC1FAA3DBE1 20 | 21 | 22 | -------------------------------------------------------------------------------- /Commands/Balance Jr Help.tmCommand: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | nop 7 | bundleUUID 8 | D99E8C0C-792F-11D9-A212-000D93B3A10E 9 | command 10 | . "$TM_SUPPORT_PATH/lib/webpreview.sh" 11 | html_header "Balance Jr Help" 12 | Markdown.pl "$TM_BUNDLE_SUPPORT/Balance Jr Help.markdown" 13 | html_footer 14 | 15 | input 16 | none 17 | name 18 | Balance Jr Help 19 | output 20 | showAsHTML 21 | uuid 22 | 0F1EF848-5333-4610-96FE-97C180B2653C 23 | 24 | 25 | -------------------------------------------------------------------------------- /Commands/Diff With Working Copy as HTML (BASE).tmCommand: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | nop 7 | bundleUUID 8 | AEAF4DD4-74CD-11D9-BAD4-000A95A89C98 9 | command 10 | . "$TM_SUPPORT_PATH/lib/webpreview.sh" 11 | html_header "Basic Subversion Diff" 12 | "${TM_RUBY:-ruby}" "$TM_BUNDLE_SUPPORT/svn_diff_html.rb" 13 | html_footer 14 | 15 | input 16 | none 17 | name 18 | Diff With Working Copy as HTML (BASE) 19 | output 20 | showAsHTML 21 | uuid 22 | 44AE6B57-2AD5-4D06-972B-EEFA6FC3F266 23 | 24 | 25 | -------------------------------------------------------------------------------- /Commands/Filename Completion.tmCommand: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | nop 7 | bundleUUID 8 | AEAF4DD4-74CD-11D9-BAD4-000A95A89C98 9 | command 10 | "${TM_RUBY:-ruby}" "$TM_BUNDLE_SUPPORT/filename_completion.rb" 11 | 12 | input 13 | none 14 | keyEquivalent 15 | ^ 16 | name 17 | Filename Completion 18 | output 19 | insertAsSnippet 20 | scope 21 | source.shell, string.interpolated.ruby 22 | uuid 23 | 1932A8DB-9670-4CAD-8269-423AD14ADCE4 24 | 25 | 26 | -------------------------------------------------------------------------------- /Commands/Replace Hex Colors.tmCommand: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | nop 7 | command 8 | . "$TM_SUPPORT_PATH/lib/webpreview.sh" 9 | html_header "Replace Colors" 10 | echo '<p>WARNING: Changes you make here are instantly saved to disk. The only way to undo is if you keep the document open in textmate, undo and resave.</p>' 11 | "${TM_RUBY:-ruby}" "$TM_BUNDLE_SUPPORT/show_hex_colors_and_replace.rb" 12 | html_footer 13 | 14 | 15 | input 16 | selection 17 | name 18 | Replace Hex Colors 19 | output 20 | showAsHTML 21 | uuid 22 | BD115447-20FA-43E3-8694-E8B4280C296B 23 | 24 | 25 | -------------------------------------------------------------------------------- /Support/invert_colors.rb: -------------------------------------------------------------------------------- 1 | #!/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby 2 | 3 | def invert_color(color) 4 | return '' unless color 5 | color.gsub!(/^#/, '') 6 | color.gsub!(/(.)(.)(.)/,'\1\1\2\2\3\3') if color.length == 3 7 | 8 | color.gsub!(/(..)(..)(..)/) { invert($1) + invert($2) + invert($3) } 9 | "##{color}" 10 | end 11 | 12 | def invert(color) 13 | color = sprintf("%X", (- color.hex + 255)) 14 | color = "0#{color}" if color.length == 1 15 | color 16 | end 17 | 18 | doc = STDIN.read 19 | 20 | # TEST 21 | 22 | # doc = %{ 23 | # #FFF 24 | # #964 25 | # #37f 26 | # 27 | # #CC8800 28 | # 29 | # #FFFC80 30 | # #FFFFFF 31 | # #CCCCCC 32 | # #123123 33 | # #00807C 34 | # #CDCDCD 35 | # 36 | # #006580 1A #0065801A 37 | # #00807C 4D #00807C4D 38 | # #050505 FA #050505FA 39 | # #666666 33 #66666633 40 | # } 41 | 42 | print doc.gsub(/#([0-9a-fA-F]{3,6})([0-9a-fA-F]{2})?\b/) { |c| 43 | before = $1 || '' 44 | after = $2 || '' 45 | invert_color(before) + after 46 | } 47 | -------------------------------------------------------------------------------- /Commands/Strip Matching Lines.tmCommand: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | nop 7 | command 8 | #!/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby 9 | 10 | require "#{ENV['TM_SUPPORT_PATH']}/lib/exit_codes.rb" 11 | require "#{ENV['TM_SUPPORT_PATH']}/lib/ui.rb" 12 | 13 | regex_string = TextMate::UI.request_string( 14 | :title => 'Strip Matching Lines', 15 | :prompt => 'Regular Expression', 16 | :button1 => 'Strip' 17 | ) 18 | 19 | TextMate.exit_discard if regex_string.nil? 20 | 21 | re = Regexp.new(regex_string) 22 | $stdin.each_line() do |line| 23 | print line if !re.match(line) 24 | end 25 | 26 | fallbackInput 27 | document 28 | input 29 | selection 30 | name 31 | Strip Matching Lines 32 | output 33 | replaceSelectedText 34 | uuid 35 | A1D725D0-E28F-491C-8776-C6FAF0A89DF7 36 | 37 | 38 | -------------------------------------------------------------------------------- /Commands/English Completion.tmCommand: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | nop 7 | bundleUUID 8 | 467B298F-6227-11D9-BFB1-000D93589AF6 9 | command 10 | #!/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby 11 | require "#{ENV['TM_SUPPORT_PATH']}/lib/codecompletion" 12 | 13 | def letsdoit(stdin) 14 | choices = TextmateCompletionsText.new(`cat /usr/share/dict/web2|grep ^#{Regexp.escape ENV['TM_CURRENT_WORD']}|head -n 500`).to_ary 15 | print TextmateCodeCompletion.new(choices,stdin).to_snippet 16 | end 17 | 18 | letsdoit(STDIN.read) 19 | 20 | fallbackInput 21 | line 22 | input 23 | selection 24 | keyEquivalent 25 | ~ 26 | name 27 | English Completion 28 | output 29 | insertAsSnippet 30 | scope 31 | text -source, string -(string source) 32 | uuid 33 | 9AA55A9A-ED50-4494-B814-50FD21CDF535 34 | 35 | 36 | -------------------------------------------------------------------------------- /Commands/Select Theme.tmCommand: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | nop 7 | command 8 | #!/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby 9 | require "#{ENV['TM_SUPPORT_PATH']}/lib/ui" 10 | 11 | @THEMES = [] 12 | def add_themes!(dir) 13 | themes = `ls "#{dir}"`.split("\n") 14 | themes.each do |theme| 15 | @THEMES << { 16 | 'title' => theme.gsub('.tmTheme',''), 17 | 'path' => '' + dir + theme 18 | } 19 | end 20 | 21 | end 22 | 23 | add_themes! "#{ENV['TM_SUPPORT_PATH']}/../Themes/" 24 | add_themes! "$HOME/Library/Application Support/TextMate/Themes/" 25 | 26 | selection = TextMate::UI.menu(@THEMES) 27 | 28 | `open "#{selection['path']}"` 29 | print "Switched to " + selection['title'] 30 | input 31 | none 32 | keyEquivalent 33 | ^~T 34 | name 35 | Select TextMate Theme 36 | output 37 | showAsTooltip 38 | uuid 39 | B98B3ADE-3EAE-4C7B-BBF4-46258CAD9E76 40 | 41 | 42 | -------------------------------------------------------------------------------- /Commands/Relaunch TextMate using WebKit.tmCommand: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | nop 7 | command 8 | { APP_PATH=$(ps -xwwp $PPID -o command|grep -o '.*.app') 9 | osascript -e "tell app \"$(basename "$APP_PATH")\" to quit" 10 | 11 | for (( i = 0; i < 50 && $(echo $(ps -xp $PPID|wc -l))-1; i++ )); do 12 | sleep .2; 13 | done 14 | 15 | if [[ $(ps -xp $PPID|wc -l) -ne 2 ]]; then 16 | DYLD_FRAMEWORK_PATH="$(find_app org.webkit.nightly.WebKit)/Contents/Resources" WEBKIT_UNSET_DYLD_FRAMEWORK_PATH=YES "${APP_PATH}/Contents/MacOS/TextMate" -WebKitScriptDebuggerEnabled YES -WebKitDeveloperExtras YES 17 | else 18 | echo >/dev/console "$(date +%Y-%m-%d\ %H:%M:%S): TextMate is still running. Relaunch aborted." 19 | fi 20 | 21 | } &>/dev/null & 22 | 23 | input 24 | none 25 | keyEquivalent 26 | ^@q 27 | name 28 | Relaunch TextMate using WebKit 29 | output 30 | discard 31 | uuid 32 | A7B73FB6-4C26-4607-8899-9595D7BF3EB1 33 | 34 | 35 | -------------------------------------------------------------------------------- /Macros/Select Folding Group.tmMacro: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | commands 6 | 7 | 8 | command 9 | toggleFolding: 10 | 11 | 12 | command 13 | moveToBeginningOfLine: 14 | 15 | 16 | command 17 | moveDownAndModifySelection: 18 | 19 | 20 | argument 21 | 22 | action 23 | replaceAll 24 | findInProjectIgnoreCase 25 | 26 | findInProjectRegularExpression 27 | 28 | findString 29 | ^ 30 | ignoreCase 31 | 32 | regularExpression 33 | 34 | replaceAllScope 35 | selection 36 | wrapAround 37 | 38 | 39 | command 40 | findWithOptions: 41 | 42 | 43 | keyEquivalent 44 | ^ 45 | name 46 | Select Folding Group 47 | uuid 48 | 5854EC0D-70A8-4A45-ABD6-5654B036F831 49 | 50 | 51 | -------------------------------------------------------------------------------- /Commands/CodeCompletion Ruby.tmCommand: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | nop 7 | bundleUUID 8 | 467B298F-6227-11D9-BFB1-000D93589AF6 9 | command 10 | #!/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby 11 | require "#{ENV['TM_SUPPORT_PATH']}/lib/codecompletion" 12 | preference = 'CodeCompletions Ruby' 13 | choices = [] 14 | 15 | parsed_choices = TextmateCompletionsParser.new(nil, :scope => :ruby).to_ary 16 | choices += parsed_choices if parsed_choices 17 | 18 | choices += ['--'] 19 | 20 | plist_choices = TextmateCompletionsPlist.new( "#{ENV['TM_BUNDLE_PATH']}/Preferences/#{preference}.tmPreferences" ).to_ary 21 | choices += plist_choices if plist_choices 22 | 23 | print TextmateCodeCompletion.new(choices,STDIN.read).to_snippet 24 | 25 | fallbackInput 26 | line 27 | input 28 | selection 29 | keyEquivalent 30 | ~$ 31 | name 32 | Ruby Code Completion 33 | output 34 | insertAsSnippet 35 | scope 36 | source.ruby 37 | uuid 38 | FEFA1349-E915-4C5F-A17B-B268D15E92CB 39 | 40 | 41 | -------------------------------------------------------------------------------- /Commands/Smart Delete Outer Characters.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | nop 7 | command 8 | #!/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby 9 | 10 | MARK = [0xFFFC].pack("U").freeze 11 | def snippet_escape (str); str.gsub(/[$`\\]/, '\\\\\0'); end 12 | 13 | def strip_bracket (txt) 14 | if idx = txt.index(/[\[("']/) then 15 | chr_map = { ?[ => ?], ?( => ?), ?" => ?", ?' => ?' } 16 | if ridx = txt.rindex(chr_map[txt[idx]]) then 17 | txt[ridx, 1] = "" 18 | txt[idx, 1] = "" 19 | txt.insert idx, " " if txt[idx - 1, 1] =~ /[^\[\]\(\)\{\}\s]/ && ENV['TM_SELECTED_TEXT'].nil? 20 | end 21 | end 22 | return txt 23 | end 24 | 25 | line = STDIN.gets 26 | unless ENV.has_key?('TM_SELECTED_TEXT') then 27 | line.insert(ENV['TM_LINE_INDEX'].to_i, MARK) 28 | end 29 | print snippet_escape(strip_bracket(line)).sub(/#{MARK}/, '${0}') 30 | 31 | fallbackInput 32 | line 33 | input 34 | selection 35 | keyEquivalent 36 | ^$ 37 | name 38 | Smart Delete Brackets 39 | output 40 | insertAsSnippet 41 | uuid 42 | AE00FFF1-C436-4826-808A-3AF6C2ABD18B 43 | 44 | 45 | -------------------------------------------------------------------------------- /Support/filename_completion.rb: -------------------------------------------------------------------------------- 1 | #!/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby 2 | line = ENV['TM_CURRENT_LINE'] 3 | 4 | caret_placement = 0 5 | caret_placement = ENV['TM_COLUMN_NUMBER'].to_i - 2 6 | backContext = line[0..caret_placement] 7 | frontContext = line[caret_placement+1..line.length+1] 8 | 9 | backContext.gsub!(/#{Regexp::escape(ENV['TM_SELECTED_TEXT'])}$/,'') if ENV['TM_SELECTED_TEXT'] 10 | backContext.match(/\s*(([^ ]*(\\ )?)*)$/) 11 | context = $1 12 | 13 | words_tmp = `ls -AdFH #{context}* 2>/dev/null`.split("\n") 14 | 15 | context = `ls -AdFH #{context.gsub(/\/$/,'')}`.gsub(/^#{Regexp::escape(ENV['HOME'])}/,'~').chomp if context.match(/\/$/) unless context == '/' 16 | context.gsub!(/\\(.)/,'\1') 17 | 18 | words = [context] 19 | words << nil 20 | words_tmp.each do |w| 21 | w.gsub!(/^#{Regexp::escape(ENV['HOME'])}/,'~') 22 | w.gsub!(/^#{Regexp::escape(context)}/,'') if context 23 | words << w if w and w != '' 24 | end 25 | 26 | begin 27 | require ENV['TM_SUPPORT_PATH'] + "/lib/ui" 28 | abort if words.empty? 29 | 30 | val = TextMate::UI.menu(words) 31 | val = words[val] if val 32 | 33 | val = nil if val == context 34 | 35 | if val 36 | print "${2:" 37 | # print '/' unless context.match(/\/$/) or val.match(/^\//) 38 | val.gsub!(/^#{Regexp::escape(context)}/,'') 39 | val.gsub!(/^#{Regexp::escape(context)}/,'') 40 | val.gsub!(/( |\')/,'\\\\\1') 41 | val.gsub!(/(@|\*)$/,'') 42 | print val 43 | print "}$1$0" 44 | else 45 | print "${1:#{ENV['TM_SELECTED_TEXT']}}$0" if ENV['TM_SELECTED_TEXT'] 46 | end 47 | # rescue 48 | # nil 49 | end 50 | -------------------------------------------------------------------------------- /Commands/View Document as HTML.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | nop 7 | command 8 | cat <<"HTML" 9 | <style type="text/css"> 10 | body { 11 | font-family: "Bitstream Vera Sans Mono", "Monaco", monospace; 12 | } 13 | .comment { 14 | font-style: italic; 15 | color: #AAA; 16 | } 17 | .keyword { 18 | font-weight: bold; 19 | } 20 | .string { 21 | color: #00F; 22 | } 23 | .entity { 24 | text-decoration: underline; 25 | } 26 | .storage { 27 | color: #888; 28 | } 29 | .support { 30 | color: #0F0; 31 | } 32 | .constant, .variable { 33 | color: #F0F; 34 | } 35 | </style> 36 | <body> 37 | <div style="white-space: pre; -khtml-line-break: after-white-space;"> 38 | HTML 39 | 40 | perl -pe 's/<\/[^>]+>/<\/span>/g' \ 41 | | perl -pe 's/<([^\/.>]+)[^>]*>/<span class="$1">/g' \ 42 | | perl -pe 's/\t/&nbsp;&nbsp;&nbsp;/g' 43 | 44 | fallbackInput 45 | document 46 | input 47 | selection 48 | inputFormat 49 | xml 50 | keyEquivalent 51 | 52 | name 53 | View Document as HTML 54 | output 55 | showAsHTML 56 | uuid 57 | BB66B370-D68B-4AFA-A228-C28F34E2AED2 58 | 59 | 60 | -------------------------------------------------------------------------------- /Commands/Clock.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | nop 7 | command 8 | cat <<'PART_1' 9 | <html><head><title>Clock</title><script> 10 | var myCommand = null; 11 | 12 | function start () { 13 | document.getElementById("start").style.display = "none"; 14 | document.getElementById("stop").style.display = "inline"; 15 | var cmd = "while true; do date; sleep 1; done" 16 | myCommand = TextMate.system(cmd, function (task) { }); 17 | myCommand.onreadoutput = output; 18 | } 19 | 20 | function stop () { 21 | document.getElementById("start").style.display = "inline"; 22 | document.getElementById("stop").style.display = "none"; 23 | myCommand.cancel(); 24 | } 25 | 26 | function output (str) { 27 | document.getElementById("date").innerText = str; 28 | } 29 | </script></head> 30 | <body onLoad="window.resizeTo(400, 250); start()" onUnload="stop()"> 31 | <pre><div id="date"> 32 | PART_1 33 | 34 | date|tr -d \\n # to get an initial value (visually more attractive) 35 | 36 | cat <<'PART_2' 37 | </div></pre> 38 | <span id="start"><a onClick="start()" href="#">Start</a></span> 39 | <span id="stop"><a onClick="stop()" href="#">Stop</a></span> 40 | </body></html> 41 | PART_2 42 | 43 | input 44 | none 45 | keyEquivalent 46 | 47 | name 48 | Clock 49 | output 50 | showAsHTML 51 | uuid 52 | 8FC2E9FA-A9CE-42CD-9910-4FC9A9248BF9 53 | 54 | 55 | -------------------------------------------------------------------------------- /Support/replace_colors.rb: -------------------------------------------------------------------------------- 1 | #!/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby 2 | # Replace all of the occurrences of the selected color with the chosen color in the current document. 3 | # Thomas Aylott -- subtleGradient.com 4 | 5 | require ENV['TM_SUPPORT_PATH'] + "/lib/ui" 6 | 7 | FILENAME = ENV['TM_FILEPATH'] 8 | VALID_COLOR = /^#?[0-9a-f]{3,6}$/i 9 | VALID_COLOR_SHORT = /^#?([0-9a-f])([0-9a-f])([0-9a-f])$/i 10 | 11 | def normalize_color(color='#ccc') 12 | return color if color.match(VALID_COLOR) and color.length == 7 13 | if color.match(VALID_COLOR_SHORT) 14 | return ('#'+$1+$1+$2+$2+$3+$3).upcase 15 | end 16 | return false 17 | end 18 | 19 | def error! 20 | print 'No changes made' 21 | abort 22 | end 23 | 24 | @original_color = STDIN.read.chomp #ENV['TM_SELECTED_TEXT'] 25 | unless @original_color and @original_color.match(VALID_COLOR) 26 | print 'You need to select a HEX color to use this command' 27 | abort 28 | end 29 | 30 | @replaced_color = TextMate::UI.request_color(@original_color) 31 | error! if @replaced_color.nil? 32 | 33 | norm = normalize_color(@replaced_color) 34 | error! unless norm 35 | @replaced_color = norm 36 | 37 | @replaced_color = TextMate::UI.request_string( 38 | :title => "#{ENV['TM_FILENAME']}: Replace Color", 39 | :default => @replaced_color, 40 | :prompt => "Replace #@original_color with: this", 41 | :button1 => 'Replace All' 42 | ) 43 | 44 | error! if !@replaced_color 45 | error! if @replaced_color == @original_color 46 | error! if @replaced_color.length < 7 47 | error! if !@replaced_color.match(VALID_COLOR) 48 | 49 | lines = File.readlines(FILENAME) 50 | File.open(FILENAME, 'w') { |file| 51 | lines.each do |line| 52 | line.gsub!(/#@original_color\b/, @replaced_color) 53 | file.write(line) 54 | end 55 | file.close 56 | } 57 | 58 | `osascript -e 'tell the application "finder" to activate' -e 'tell the application "textmate" to activate'` 59 | print "Replaced every occurrence \n of #@original_color with #@replaced_color \n in #{ENV['TM_FILENAME']}" 60 | -------------------------------------------------------------------------------- /Macros/Select Markers and Convert to Snippet.tmMacro: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | commands 6 | 7 | 8 | command 9 | moveToBeginningOfDocument: 10 | 11 | 12 | argument 13 | 14 | action 15 | findNext 16 | findInProjectIgnoreCase 17 | 18 | findInProjectRegularExpression 19 | 20 | findString 21 | (?m:‹.*›) 22 | ignoreCase 23 | 24 | regularExpression 25 | 26 | replaceAllScope 27 | selection 28 | wrapAround 29 | 30 | 31 | command 32 | findWithOptions: 33 | 34 | 35 | argument 36 | 37 | beforeRunningCommand 38 | nop 39 | command 40 | "$TM_BUNDLE_SUPPORT/bin/convert_to_snippet.rb" 41 | disableOutputAutoIndent 42 | 43 | fallbackInput 44 | none 45 | input 46 | selection 47 | keyEquivalent 48 | 49 | name 50 | Convert to Snippet 51 | output 52 | insertAsSnippet 53 | uuid 54 | 99D9DBC0-E03E-46B9-9E73-13F58DCDB55B 55 | 56 | command 57 | executeCommandWithOptions: 58 | 59 | 60 | name 61 | Select Markers and Convert to Snippet 62 | scopeType 63 | local 64 | uuid 65 | C5EF3C38-DED6-4308-90C1-BE75B4430332 66 | 67 | 68 | -------------------------------------------------------------------------------- /Support/Balance Jr Help.markdown: -------------------------------------------------------------------------------- 1 | Balance Jr is basically just a really useful regular expression search. Activate the macro and it'll move your selection forward or backward through your document. 2 | 3 | It comes in the form of two macros. 4 | **Balance Jr Back** & 5 | **Balance Jr Forward** 6 | 7 | I would advise you set them to set their key equivilents to the home and end keys. I also have it mapped to the tiltwheel on my mouse. 8 | 9 | (?xm) 10 | <(\w+)[^>]*>(?>[^<]*?) # HTML Tags Balanced 11 | |(?<=[^/]>)[^><]*(?=Contents) # HTML Comments 13 | |\b[\w-]+\b(?=\s*=) # HTML Attribute name 14 | |\s\b[\w-]+\b=\"[^\"]*\" # HTML Attribute name value pair 15 | |(?<=\")[^\"\n<>]*(?=\") # HTML Compatible String Double 16 | |<[^>\n]*/?> # HTML Tags 17 | 18 | |<%.*?%> # Embedded Source 19 | |(?<=<%[-@#=]\s).*?(?=\s-?%>) # The contents of various other forms of Embedded Source 20 | |(?<=<%\s).*?(?=\s-?%>) # The contents of Embedded Source 21 | 22 | |(?<=/\*).*?(?=\*/) # /* Contents of Comment Blocks */ 23 | |/\*.*?\*/ # /* Comment Blocks */ 24 | 25 | |(?<=\')[^\'\n]*?(?=\') # 'String Single' 26 | |(?<=\")[^\"\n]*(?=\") # String Double 27 | |(?<=\[)[^\[\]\n]*?(?=\]) # [Square Brackets] 28 | |(?<=\{)[^\{\}\n]*?(?=\}) # {Curly Brackets} 29 | 30 | |\#[0-9a-fA-F]{3,6} # Hex Colors 31 | |(? # 36 | # Balance Jr. Regular Expression version 2.8 # -------------------------------------------------------------------------------- /Commands/Reformat Long Strings.tmCommand: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | nop 7 | command 8 | #!/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby 9 | 10 | def doit!(str='') 11 | return str unless ['"',"'","`"].include?(str[0].chr) and str[0] == str[-1] 12 | 13 | column = (ENV['TM_INPUT_START_COLUMN'].to_i||1) - 1 14 | 15 | @quote_char = str[0].chr 16 | str.gsub!(/\A#{Regexp.escape(@quote_char)}|#{Regexp.escape(@quote_char)}\Z/,'') 17 | strs = [] 18 | while str.length != 0 19 | strs << str.slice!(0..(70-column)) 20 | column = 0 21 | end 22 | str = @quote_char + (strs.compact.join %{#@quote_char + \n#@quote_char}) + @quote_char 23 | 24 | str 25 | end 26 | 27 | # print doit!(%{%{Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. asdjfhakldsfhkladjsfhkalsdjfh}}) #for testing 28 | 29 | print doit!(STDIN.read()) 30 | 31 | fallbackInput 32 | scope 33 | input 34 | selection 35 | keyEquivalent 36 | ^q 37 | name 38 | Reformat Long Strings 39 | output 40 | replaceSelectedText 41 | scope 42 | string.quoted.double, string.quoted.single 43 | uuid 44 | 93523AF2-7A9D-4190-A1C9-D510AAB690FB 45 | 46 | 47 | -------------------------------------------------------------------------------- /Macros/Balance Jr Back.tmMacro: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | commands 6 | 7 | 8 | argument 9 | 10 | action 11 | findPrevious 12 | findInProjectIgnoreCase 13 | 14 | findInProjectRegularExpression 15 | 16 | findString 17 | (?xm) 18 | <(\w+)[^>]*>(?>[^<]*?</\1>) # HTML Tags Balanced 19 | |(?<=[^/]>)[^><]*(?=</) # HTML >Contents</ 20 | |(?<=<!--\s).*?(?=\s-->) # HTML Comments 21 | |\b[\w-]+\b(?=\s*=) # HTML Attribute name 22 | |\s\b[\w-]+\b=\"[^\"]*\" # HTML Attribute name value pair 23 | |(?<=\")[^\"\n<>]*(?=\") # HTML Compatible String Double 24 | |<[^>\n]*/?> # HTML Tags 25 | 26 | |<%.*?%> # Embedded Source 27 | |(?<=<%[-@#=]\s).*?(?=\s-?%>) # The contents of various other forms of Embedded Source 28 | |(?<=<%\s).*?(?=\s-?%>) # The contents of Embedded Source 29 | 30 | |(?<=/\*).*?(?=\*/) # /* Contents of Comment Blocks */ 31 | |/\*.*?\*/ # /* Comment Blocks */ 32 | 33 | |(?<=\')[^\'\n]*?(?=\') # 'String Single' 34 | |(?<=\")[^\"\n]*(?=\") # String Double 35 | |(?<=\[)[^\[\]\n]*?(?=\]) # [Square Brackets] 36 | |(?<=\{)[^\{\}\n]*?(?=\}) # {Curly Brackets} 37 | 38 | |\#[0-9a-fA-F]{3,6} # Hex Colors 39 | |(?<![\d])-?\d+(?:\.\d+)?(?!=\d) # Number 123 123.123 -123 40 | |[@$!]\w+\b # @variables $variables !etc 41 | 42 | |(?<=[\(,:])[^\(\),\n]*(?=[\),;]) # Comma Delimitated 43 | # Thomas Aylott <oblivious@subtleGradient.com> # 44 | # Balance Jr. Regular Expression version 2.8 # 45 | ignoreCase 46 | 47 | regularExpression 48 | 49 | replaceAllScope 50 | selection 51 | replaceString 52 | subtleGradient 53 | wrapAround 54 | 55 | 56 | command 57 | findWithOptions: 58 | 59 | 60 | name 61 | Balance Jr Back 62 | scopeType 63 | local 64 | useGlobalClipboard 65 | 66 | uuid 67 | 37FBE527-CE10-42F5-8974-12463404AD23 68 | 69 | 70 | -------------------------------------------------------------------------------- /Macros/Balance Jr Foreward.tmMacro: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | commands 6 | 7 | 8 | argument 9 | 10 | action 11 | findNext 12 | findInProjectIgnoreCase 13 | 14 | findInProjectRegularExpression 15 | 16 | findString 17 | (?xm) 18 | <(\w+)[^>]*>(?>[^<]*?</\1>) # HTML Tags Balanced 19 | |(?<=[^/]>)[^><]*(?=</) # HTML >Contents</ 20 | |(?<=<!--\s).*?(?=\s-->) # HTML Comments 21 | |\b[\w-]+\b(?=\s*=) # HTML Attribute name 22 | |\s\b[\w-]+\b=\"[^\"]*\" # HTML Attribute name value pair 23 | |(?<=\")[^\"\n<>]*(?=\") # HTML Compatible String Double 24 | |<[^>\n]*/?> # HTML Tags 25 | 26 | |<%.*?%> # Embedded Source 27 | |(?<=<%[-@#=]\s).*?(?=\s-?%>) # The contents of various other forms of Embedded Source 28 | |(?<=<%\s).*?(?=\s-?%>) # The contents of Embedded Source 29 | 30 | |(?<=/\*).*?(?=\*/) # /* Contents of Comment Blocks */ 31 | |/\*.*?\*/ # /* Comment Blocks */ 32 | 33 | |(?<=\')[^\'\n]*?(?=\') # 'String Single' 34 | |(?<=\")[^\"\n]*(?=\") # String Double 35 | |(?<=\[)[^\[\]\n]*?(?=\]) # [Square Brackets] 36 | |(?<=\{)[^\{\}\n]*?(?=\}) # {Curly Brackets} 37 | 38 | |\#[0-9a-fA-F]{3,6} # Hex Colors 39 | |(?<![\d])-?\d+(?:\.\d+)?(?!=\d) # Number 123 123.123 -123 40 | |[@$!]\w+\b # @variables $variables !etc 41 | 42 | |(?<=[\(,:])[^\(\),\n]*(?=[\),;]) # Comma Delimitated 43 | # Thomas Aylott <oblivious@subtleGradient.com> # 44 | # Balance Jr. Regular Expression version 2.8 # 45 | ignoreCase 46 | 47 | regularExpression 48 | 49 | replaceAllScope 50 | selection 51 | replaceString 52 | subtleGradient 53 | wrapAround 54 | 55 | 56 | command 57 | findWithOptions: 58 | 59 | 60 | name 61 | Balance Jr Foreward 62 | scopeType 63 | local 64 | useGlobalClipboard 65 | 66 | uuid 67 | A4E0B6D9-F4A7-4A79-902E-C049102BF39A 68 | 69 | 70 | -------------------------------------------------------------------------------- /Commands/Extend Current Parens.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | nop 7 | command 8 | #!/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby 9 | 10 | # short for escape_snippet - escapes special snippet characters in str 11 | def es(str) 12 | str.to_s.gsub(/([$`\\])/, "\\\\\\1") 13 | end 14 | 15 | 16 | # given a string, insert an open parenthesis in the first, best 17 | # spot starting from the end 18 | def insert_open(str) 19 | # this needs to be done as a state machine so we can properly jump 20 | # paren groups 21 | prev = nil 22 | cur = nil 23 | closuredepth = 0 24 | (str.length - 1).downto(0) do |i| 25 | prev = cur 26 | cur = str[i].chr() 27 | 28 | if prev != nil 29 | if prev == '(' 30 | closuredepth -= 1 31 | elsif prev == ')' 32 | closuredepth += 1 33 | end 34 | 35 | # look for the start of a token next to a boundary 36 | if closuredepth == 0 and "#{cur}#{prev}" =~ /(\b|\s)[a-zA-Z0-9\(]$/ 37 | return str[0..i] + '(' + str[i+1..-1] 38 | end 39 | end 40 | end 41 | 42 | # if we bailed, check for start of str positioning 43 | if str =~ /^[a-zA-Z0-9\(]/ 44 | return '(' + str 45 | else 46 | return str 47 | end 48 | end 49 | 50 | 51 | line = $stdin.read() 52 | index = ENV['TM_LINE_INDEX'].to_i() 53 | currentchar = line[index - 1].chr() 54 | 55 | if currentchar == ')' 56 | # backtrack to find the open of this paren 57 | depth = 1 58 | searchline = line[0..(index - 2)].reverse 59 | searchline.split(//).each_index() do |i| 60 | ch = searchline[i].chr() 61 | if ch == ')' 62 | depth += 1 63 | elsif ch == '(' 64 | depth -= 1 65 | end 66 | 67 | # at a depth of zero we should be sitting on the opening paren 68 | if depth == 0 69 | parenindex = [(index - 3 - i), 0].max() 70 | firstpart = line[0].chr() 71 | if parenindex > 0 72 | firstpart = insert_open(line[0..parenindex]) 73 | end 74 | if firstpart == line[0..parenindex] 75 | line = es(line[0..(index)]) + '$0' + es(line[(index + 1)..-1]) 76 | break 77 | end 78 | 79 | secondpart = es(line[(parenindex + 2)..(index - 2)]) + ')$0' + es(line[index..-1]) 80 | line = es(firstpart) + secondpart 81 | break 82 | end 83 | end 84 | else 85 | line = es(insert_open(line[0..(index - 1)])) + ')$0' + es(line[index..-1]) 86 | end 87 | 88 | print "#{line}" 89 | 90 | fallbackInput 91 | line 92 | input 93 | selection 94 | keyEquivalent 95 | @) 96 | name 97 | Extend Current Parens 98 | output 99 | insertAsSnippet 100 | scope 101 | source 102 | uuid 103 | 775D0733-3804-463C-A0EF-65B2998F5CE1 104 | 105 | 106 | -------------------------------------------------------------------------------- /Commands/Complete Local Function.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | nop 7 | command 8 | #!/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby 9 | 10 | require 'rexml/streamlistener' 11 | require 'rexml/parsers/baseparser' 12 | require 'rexml/parsers/streamparser' 13 | 14 | 15 | $noparens = ['source.ocaml'] 16 | $nocommas = ['source.ocaml'] 17 | 18 | 19 | class FunctionExtractor 20 | include REXML::StreamListener 21 | 22 | def initialize(findfunction) 23 | @findfunction = findfunction 24 | @functiontagregex = /^declaration\.function|^meta\.(method|function)/ 25 | @functionnameregex = /^entity\.name\.function/ 26 | @argumentregex = /^variable/ 27 | @infunction = false 28 | @currenttag = "" 29 | @currentfunction = "" 30 | @args = [] 31 | end 32 | 33 | 34 | def tag_start(name, attrs) 35 | if !@infunction and @functiontagregex.match(name) 36 | @infunction = name 37 | elsif @infunction 38 | @currenttag = name 39 | end 40 | end 41 | 42 | 43 | def text(txt) 44 | if @infunction 45 | if @functionnameregex.match(@currenttag) 46 | @currentfunction = txt.strip() 47 | elsif @argumentregex.match(@currenttag) 48 | @args << txt.strip() 49 | end 50 | end 51 | end 52 | 53 | 54 | def tag_end(name) 55 | if @infunction 56 | if name == @infunction 57 | if @currentfunction == @findfunction 58 | print "#{make_args()}$0" 59 | exit(0) 60 | end 61 | 62 | @args = [] 63 | @infunction = false 64 | elsif name == @currenttag 65 | @currenttag = "" 66 | end 67 | end 68 | end 69 | 70 | 71 | private 72 | 73 | def make_args() 74 | scope = ENV['TM_SCOPE'].split(/ /)[0] 75 | joinstr = ", " 76 | if $nocommas.include?(scope) 77 | joinstr = " " 78 | end 79 | 80 | if !$nocommas.include?(scope) 81 | @args = @args.map { |s| s.split(/,/) }.flatten.map { |s| s.strip() } 82 | else 83 | @args = @args.map { |s| s.split(/\s+/) }.flatten.map { |s| s.strip() } 84 | end 85 | 86 | final = [] 87 | @args.each_index() do |i| 88 | final << "${#{i+1}:#{@args[i]}}" 89 | end 90 | 91 | final = final.join(joinstr) 92 | if $noparens.include?(scope) 93 | final = " #{final}" 94 | else 95 | final = "(#{final})" 96 | end 97 | 98 | final 99 | end 100 | 101 | end 102 | 103 | begin 104 | listener = FunctionExtractor.new(ENV['TM_CURRENT_WORD'].strip()) 105 | parser = REXML::Parsers::StreamParser.new($stdin, listener) 106 | parser.parse() 107 | rescue 108 | # if we fail for any reason, we want to fail silently to avoid cluttering up the document 109 | end 110 | input 111 | document 112 | inputFormat 113 | xml 114 | keyEquivalent 115 | ~ 116 | name 117 | Complete Local Function 118 | output 119 | insertAsSnippet 120 | scope 121 | source 122 | uuid 123 | 08741F60-A1F1-4294-B9A9-FFF43253A687 124 | 125 | 126 | -------------------------------------------------------------------------------- /Support/svn_diff_html.rb: -------------------------------------------------------------------------------- 1 | #!/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby 2 | 3 | puts <<-HTML 4 | 39 | HTML 40 | 41 | svn = ENV['TM_SVN'] || 'svn' 42 | require 'cgi' 43 | 44 | StatusMap = {'+' => 'added', 45 | '-' => 'removed'} 46 | 47 | def status_map(status) 48 | StatusMap[status.chr] 49 | rescue 50 | nil 51 | end 52 | 53 | class DiffLine 54 | attr :line_number , true 55 | attr :code , true 56 | attr :status , true 57 | attr :filepath , true 58 | def initialize(line_number , code , filepath , status) 59 | self.line_number = line_number 60 | self.code = code 61 | self.filepath = filepath 62 | self.status = status 63 | end 64 | def link 65 | %{#{line_number} #{hcode}} 66 | end 67 | def hcode 68 | CGI::escapeHTML(self.code).gsub(' ',' ') 69 | end 70 | end 71 | 72 | files = ENV['TM_SELECTED_FILES'] || "'"<<( ENV['TM_PROJECT_DIRECTORY'] || ENV['TM_DIRECTORY'] )<<"'" 73 | puts <<-HTML 74 | 78 | HTML 79 | 80 | command = "#{svn} diff --diff-cmd /usr/bin/diff -x -U0 #{files}" 81 | puts "" 82 | lines = `#{command}`.split("\n") 83 | 84 | line_number = 0 85 | filepath = ENV['TM_FILEPATH'] 86 | difflines = [] 87 | 88 | lines.each do |l| 89 | l.match(/@@.*?\+(\d+).*? @@/) 90 | line_number = $1.to_i-1 if $1 91 | 92 | l.match(/\+{3} (.*?)\s+\(.*?\)$/) 93 | filepath = $1 if $1 94 | 95 | status = status_map(l[0]) 96 | difflines.push(DiffLine.new(line_number, l, filepath, status)) if l.match(/^(\+|-)/) unless l.match(/^(\+|-){3}/) 97 | 98 | line_number = line_number +1 unless l.match(/^-/) 99 | end 100 | 101 | filepath = '' 102 | difflines.each_with_index do |d,i| 103 | puts '' if i > 0 and d.filepath != filepath 104 | puts "

#{d.filepath.gsub(/\b\//,'​/')}

" if d.filepath != filepath
105 |   filepath = d.filepath
106 |   puts d.link
107 | end
108 | puts '
' 109 | -------------------------------------------------------------------------------- /Support/show_hex_colors.rb: -------------------------------------------------------------------------------- 1 | #!/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby 2 | 3 | # TEST 4 | def all_colors 5 | colors = '' 6 | # range = 0..15 7 | range = [0,3,6,9,12,15] 8 | range.each do|a| 9 | range.each do|b| 10 | range.each do|c| 11 | colors << " #%x" % a 12 | colors << "%x" % b 13 | colors << "%x" % c 14 | end 15 | end 16 | end 17 | colors 18 | end 19 | # doc = all_colors 20 | doc = STDIN.read 21 | 22 | VALID_COLOR_BASIC = /#(?:[0-9a-f]{3}|[0-9a-f]{6})\b/i 23 | VALID_COLOR = /^#?(?:[0-9a-f]{3}|[0-9a-f]{6})$/i 24 | class HexColor 25 | attr :color, true 26 | def initialize(c) 27 | self.color = c 28 | end 29 | def rgb 30 | rgb = [0,0,0] 31 | if color.length > 4 32 | self.color.match(/#(..)(..)(..)/) 33 | rgb = [$1.hex, $2.hex, $3.hex] 34 | else 35 | self.color.match(/#(.)(.)(.)/) 36 | rgb = [($1+$1).hex, ($2+$2).hex, ($3+$3).hex] 37 | end 38 | return rgb 39 | end 40 | 41 | def r; rgb[0]; end 42 | def g; rgb[1]; end 43 | def b; rgb[2]; end 44 | 45 | def h; hsl[:h]; end 46 | def s; hsl[:s]; end 47 | def l; hsl[:l]; end 48 | 49 | def to_s 50 | %{
#{c}#{to_hsl}
\n} 51 | end 52 | def hsl 53 | hsl = {:h => nil, 54 | :s => nil, 55 | :l => nil} 56 | 57 | nImax = rgb.max 58 | nImin = rgb.min 59 | nSum = nImin + nImax 60 | nDif = (nImax - nImin).to_f 61 | 62 | hsl[:l] = nSum.to_f / 2 63 | hsl[:s] = 0 if r == g and g == b 64 | 65 | if !hsl[:s] and hsl[:l] < 128 66 | hsl[:s] = 255 * (nDif / nSum) 67 | elsif !hsl[:s] 68 | hsl[:s] = 255 * (nDif / (510 - nSum)) 69 | end 70 | 71 | if hsl[:s] != 0 72 | if nImax == r 73 | hsl[:h] = 60 * (g-b) / nDif 74 | elsif nImax == g 75 | hsl[:h] = 60 * (b-r) / nDif+120 76 | elsif nImax == b 77 | hsl[:h] = 60 * (r-g) / nDif+240 78 | end 79 | 80 | if hsl[:h] < 0 81 | hsl[:h] += 360 82 | end 83 | else 84 | hsl[:h] = -1 85 | end 86 | 87 | # hsl[:h] /= 255 * 3 88 | hsl[:s] /= 255 * 3 89 | hsl[:l] /= 255 * 3 90 | 91 | hsl 92 | end 93 | def to_hsl 94 | return "L #{(l*100).round}%" if h == -1 95 | "HSL #{h.round}°,#{(s*100).round}%,#{(l*100).round}%" 96 | end 97 | 98 | def sort_h; h.round.to_s.rjust(4).gsub(' ','0') ;end 99 | def sort_H; (h/25).round.to_s.rjust(4).gsub(' ','0') ;end 100 | def sort_s; ((s*10000).round * 1000).to_s.rjust(7).gsub(' ','0') ;end 101 | def sort_l; ((l*10000).round * 1000).to_s.rjust(7).gsub(' ','0') ;end 102 | def sort_hsl; return self.l.to_s if s == -1; return sort_h + sort_s + sort_l ;end 103 | def sort_Hsl; return self.l.to_s if s == -1; return sort_H + sort_l + sort_s ;end 104 | def sort_hls; return self.l.to_s if s == -1; return sort_h + sort_l + sort_s ;end 105 | def sort_Hls; return self.l.to_s if s == -1; return sort_H + sort_s + sort_l ;end 106 | 107 | class << self 108 | def show_hex_colors(doc) 109 | colors, hex_colors = [], [] 110 | doc.scan(VALID_COLOR_BASIC) { |c| colors << c unless colors.include?(c) } 111 | colors.each { |c| hex_colors.push(HexColor.new(c)) if HexColor.could_be?(c) } 112 | '
' + hex_colors.sort_by{|c| c.sort_Hsl }.to_s + '
' 113 | end 114 | 115 | def could_be?(color=nil) 116 | r= false 117 | r= true if color =~ VALID_COLOR 118 | r= false if color.length < 3 or color.length > 7 or (color.length > 4 and color.length < 7) 119 | return r 120 | end 121 | end 122 | end 123 | 124 | 125 | 126 | print HexColor::show_hex_colors(doc) 127 | puts <<-HTML 128 | 133 | HTML 134 | -------------------------------------------------------------------------------- /Support/show_hex_colors_and_replace.rb: -------------------------------------------------------------------------------- 1 | #!/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby 2 | # encoding: utf-8 3 | 4 | # TEST 5 | def all_colors 6 | colors = '' 7 | # range = 0..15 8 | range = [0,3,6,9,12,15] 9 | range.each do|a| 10 | range.each do|b| 11 | range.each do|c| 12 | colors << " #%x" % a 13 | colors << "%x" % b 14 | colors << "%x" % c 15 | end 16 | end 17 | end 18 | colors 19 | end 20 | # doc = all_colors 21 | doc = STDIN.read 22 | 23 | VALID_COLOR_BASIC = /#(?:[0-9a-f]{3}|[0-9a-f]{6})\b/i 24 | VALID_COLOR = /^#?(?:[0-9a-f]{3}|[0-9a-f]{6})$/i 25 | class HexColor 26 | attr :color, true 27 | def initialize(c) 28 | self.color = c 29 | end 30 | def rgb 31 | rgb = [0,0,0] 32 | if color.length > 4 33 | self.color.match(/#(..)(..)(..)/) 34 | rgb = [$1.hex, $2.hex, $3.hex] 35 | else 36 | self.color.match(/#(.)(.)(.)/) 37 | rgb = [($1+$1).hex, ($2+$2).hex, ($3+$3).hex] 38 | end 39 | return rgb 40 | end 41 | 42 | def r; rgb[0]; end 43 | def g; rgb[1]; end 44 | def b; rgb[2]; end 45 | 46 | def h; hsl[:h]; end 47 | def s; hsl[:s]; end 48 | def l; hsl[:l]; end 49 | 50 | def to_s 51 | %{
 #{c} #{to_hsl}
\n} 52 | end 53 | def hsl 54 | hsl = {:h => nil, 55 | :s => nil, 56 | :l => nil} 57 | 58 | nImax = rgb.max 59 | nImin = rgb.min 60 | nSum = nImin + nImax 61 | nDif = (nImax - nImin).to_f 62 | 63 | hsl[:l] = nSum.to_f / 2 64 | hsl[:s] = 0 if r == g and g == b 65 | 66 | if !hsl[:s] and hsl[:l] < 128 67 | hsl[:s] = 255 * (nDif / nSum) 68 | elsif !hsl[:s] 69 | hsl[:s] = 255 * (nDif / (510 - nSum)) 70 | end 71 | 72 | if hsl[:s] != 0 73 | if nImax == r 74 | hsl[:h] = 60 * (g-b) / nDif 75 | elsif nImax == g 76 | hsl[:h] = 60 * (b-r) / nDif+120 77 | elsif nImax == b 78 | hsl[:h] = 60 * (r-g) / nDif+240 79 | end 80 | 81 | if hsl[:h] < 0 82 | hsl[:h] += 360 83 | end 84 | else 85 | hsl[:h] = -1 86 | end 87 | 88 | # hsl[:h] /= 255 * 3 89 | hsl[:s] /= 255 * 3 90 | hsl[:l] /= 255 * 3 91 | 92 | hsl 93 | end 94 | def to_hsl 95 | return "L #{(l*100).round}%" if h == -1 96 | "HSL #{h.round}°,#{(s*100).round}%,#{(l*100).round}%" 97 | end 98 | 99 | def sort_h; h.round.to_s.rjust(4).gsub(' ','0') ;end 100 | def sort_H; (h/25).round.to_s.rjust(4).gsub(' ','0') ;end 101 | def sort_s; ((s*10000).round * 1000).to_s.rjust(7).gsub(' ','0') ;end 102 | def sort_l; ((l*10000).round * 1000).to_s.rjust(7).gsub(' ','0') ;end 103 | def sort_hsl; return self.l.to_s if s == -1; return sort_h + sort_s + sort_l ;end 104 | def sort_Hsl; return self.l.to_s if s == -1; return sort_H + sort_l + sort_s ;end 105 | def sort_hls; return self.l.to_s if s == -1; return sort_h + sort_l + sort_s ;end 106 | def sort_Hls; return self.l.to_s if s == -1; return sort_H + sort_s + sort_l ;end 107 | 108 | class << self 109 | def show_hex_colors(doc) 110 | colors, hex_colors = [], [] 111 | doc.scan(VALID_COLOR_BASIC) { |c| colors << c unless colors.include?(c) } 112 | colors.each { |c| hex_colors.push(HexColor.new(c)) if HexColor.could_be?(c) } 113 | '
' + hex_colors.sort_by{|c| c.sort_Hsl }.to_s + '
' 114 | end 115 | 116 | def could_be?(color=nil) 117 | r= false 118 | r= true if color =~ VALID_COLOR 119 | r= false if color.length < 3 or color.length > 7 or (color.length > 4 and color.length < 7) 120 | return r 121 | end 122 | end 123 | end 124 | 125 | ruby_cmd = ENV['TM_RUBY'] || 'ruby' 126 | 127 | print HexColor::show_hex_colors(doc) 128 | puts <<-HTML 129 | 166 | 172 |

173 | HTML 174 | -------------------------------------------------------------------------------- /info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | contactEmailRot13 6 | gz-ohaqyrf@znpebzngrf.pbz 7 | contactName 8 | Allan Odgaard 9 | deleted 10 | 11 | EF9FFCD5-9E68-43B3-BC93-473C596CBA45 12 | 951C6DFE-4652-4300-A220-79B2ABB5AD4A 13 | 13B62383-B246-4925-87A0-4D8CA4B23535 14 | D427FC0C-EF9D-4B94-93F1-64B04553B7C5 15 | 16 | description 17 | Experimental bundle with experimental commands. You probably do not want to install this. 18 | mainMenu 19 | 20 | items 21 | 22 | 8FC2E9FA-A9CE-42CD-9910-4FC9A9248BF9 23 | B98B3ADE-3EAE-4C7B-BBF4-46258CAD9E76 24 | A1D725D0-E28F-491C-8776-C6FAF0A89DF7 25 | BB66B370-D68B-4AFA-A228-C28F34E2AED2 26 | 44AE6B57-2AD5-4D06-972B-EEFA6FC3F266 27 | ------------------------------------ 28 | 775D0733-3804-463C-A0EF-65B2998F5CE1 29 | AE00FFF1-C436-4826-808A-3AF6C2ABD18B 30 | ------------------------------------ 31 | D15DAF9D-80EF-4636-885A-74F64808060A 32 | 7CC7E11B-02BE-4F8D-9E8F-396D2CB74A98 33 | BD115447-20FA-43E3-8694-E8B4280C296B 34 | 381FFB1B-0CAE-40AC-A228-B575C6E1C1C4 35 | ------------------------------------ 36 | E52FCA64-726D-4A9E-849F-C91CC192D790 37 | ------------------------------------ 38 | 8B0407B4-1727-4717-B101-A389794D28A7 39 | FA2D5624-E805-4729-99F4-E54D4CD4E61C 40 | ------------------------------------ 41 | A7B73FB6-4C26-4607-8899-9595D7BF3EB1 42 | 93523AF2-7A9D-4190-A1C9-D510AAB690FB 43 | 44 | submenus 45 | 46 | 8B0407B4-1727-4717-B101-A389794D28A7 47 | 48 | items 49 | 50 | 0F1EF848-5333-4610-96FE-97C180B2653C 51 | 37FBE527-CE10-42F5-8974-12463404AD23 52 | A4E0B6D9-F4A7-4A79-902E-C049102BF39A 53 | ------------------------------------ 54 | 5854EC0D-70A8-4A45-ABD6-5654B036F831 55 | ------------------------------------ 56 | 154ED053-9860-4249-B159-E7A8D7482AE5 57 | A0A40B0E-7E6C-4D71-AF5B-27712243CB08 58 | 59 | name 60 | Selection 61 | 62 | E52FCA64-726D-4A9E-849F-C91CC192D790 63 | 64 | items 65 | 66 | 9AA55A9A-ED50-4494-B814-50FD21CDF535 67 | 1932A8DB-9670-4CAD-8269-423AD14ADCE4 68 | FEFA1349-E915-4C5F-A17B-B268D15E92CB 69 | 08741F60-A1F1-4294-B9A9-FFF43253A687 70 | 71 | name 72 | Completions 73 | 74 | FA2D5624-E805-4729-99F4-E54D4CD4E61C 75 | 76 | items 77 | 78 | 56B05535-1ACD-4E55-B9FC-3BC1FAA3DBE1 79 | 80 | name 81 | MASC 82 | 83 | 84 | 85 | name 86 | Experimental 87 | ordering 88 | 89 | A7B73FB6-4C26-4607-8899-9595D7BF3EB1 90 | D15DAF9D-80EF-4636-885A-74F64808060A 91 | 7CC7E11B-02BE-4F8D-9E8F-396D2CB74A98 92 | BD115447-20FA-43E3-8694-E8B4280C296B 93 | 381FFB1B-0CAE-40AC-A228-B575C6E1C1C4 94 | 775D0733-3804-463C-A0EF-65B2998F5CE1 95 | 8FC2E9FA-A9CE-42CD-9910-4FC9A9248BF9 96 | BB66B370-D68B-4AFA-A228-C28F34E2AED2 97 | AE00FFF1-C436-4826-808A-3AF6C2ABD18B 98 | 08741F60-A1F1-4294-B9A9-FFF43253A687 99 | A1D725D0-E28F-491C-8776-C6FAF0A89DF7 100 | 74AEC234-DD4D-4AB1-B855-253E34E34BFE 101 | 44AE6B57-2AD5-4D06-972B-EEFA6FC3F266 102 | 1932A8DB-9670-4CAD-8269-423AD14ADCE4 103 | FEFA1349-E915-4C5F-A17B-B268D15E92CB 104 | 9AA55A9A-ED50-4494-B814-50FD21CDF535 105 | 546922BF-C276-46B7-9177-3CD36B92D9B8 106 | 0F1EF848-5333-4610-96FE-97C180B2653C 107 | 37FBE527-CE10-42F5-8974-12463404AD23 108 | A4E0B6D9-F4A7-4A79-902E-C049102BF39A 109 | 5854EC0D-70A8-4A45-ABD6-5654B036F831 110 | 56B05535-1ACD-4E55-B9FC-3BC1FAA3DBE1 111 | 99D9DBC0-E03E-46B9-9E73-13F58DCDB55B 112 | C5EF3C38-DED6-4308-90C1-BE75B4430332 113 | 93523AF2-7A9D-4190-A1C9-D510AAB690FB 114 | B98B3ADE-3EAE-4C7B-BBF4-46258CAD9E76 115 | 154ED053-9860-4249-B159-E7A8D7482AE5 116 | A0A40B0E-7E6C-4D71-AF5B-27712243CB08 117 | 118 | uuid 119 | 3AFF45C9-82BD-4AC9-8817-7BE8ED73D505 120 | 121 | 122 | -------------------------------------------------------------------------------- /Macros/Select Content of Balanced (HT|X)ML Tags.tmMacro: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | bundleUUID 6 | B5A22967-2E6A-4B66-9C71-DA8762C01E27 7 | commands 8 | 9 | 10 | argument 11 | 12 | action 13 | findNext 14 | findInProjectIgnoreCase 15 | 16 | findInProjectRegularExpression 17 | 18 | findString 19 | 20 | ignoreCase 21 | 22 | regularExpression 23 | 24 | replaceAllScope 25 | document 26 | replaceString 27 | $1 28 | wrapAround 29 | 30 | 31 | command 32 | findWithOptions: 33 | 34 | 35 | argument 36 | 37 | beforeRunningCommand 38 | nop 39 | command 40 | export __CF_USER_TEXT_ENCODING=0x1F5:0x8000100:0x8000100 41 | perl -Xe ' 42 | ########################################## 43 | ## Select Content of Balanced (HT|X)ML Tags: bug report/feature request to Hans-Jörg Bibiko bibiko@eva.mpg.de 44 | ########################################### 45 | BEGIN { 46 | if (!eval { require HTML::Parser}) { 47 | print STDERR "The Perl package HTML::Parser is not installed!\n\nExecute in Terminal:\nsudo -H cpan -i HTML::Parser\n\nHint: You need install Apple\x27s developer toolkit (gcc compiler)."; 48 | exit 1; 49 | } 50 | } 51 | 52 | our @stack = (); our $start; our $end; 53 | 54 | $utf8a = q{ 55 | [\x00-\x7F] 56 | | [\xC2-\xDF][\x80-\xBF] 57 | | \xE0[\xA0-\xBF][\x80-\xBF] 58 | | [\xE1-\xEF][\x80-\xBF][\x80-\xBF] 59 | | \xF0[\x90-\xBF][\x80-\xBF][\x80-\xBF] 60 | | [\xF1-\xF7][\x80-\xBF][\x80-\xBF][\x80-\xBF] 61 | | \xF8[\x88-\xBF][\x80-\xBF][\x80-\xBF][\x80-\xBF] 62 | | [\xF9-\xFB][\x88-\xBF][\x88-\xBF][\x88-\xBF][\x88-\xBF] 63 | | \xFC[\x84-\xBF][\x88-\xBF][\x88-\xBF][\x88-\xBF][\x88-\xBF] 64 | | \xFD[\x88-\xBF][\x88-\xBF][\x88-\xBF][\x88-\xBF][\x88-\xBF] 65 | }; 66 | 67 | undef $/; 68 | $org = <>; 69 | if(defined($ENV{"TM_INPUT_START_LINE"})) { 70 | $line = $ENV{"TM_INPUT_START_LINE"}-1; 71 | $line_index = $ENV{"TM_INPUT_START_LINE_INDEX"}+0; 72 | } else { 73 | $line = $ENV{"TM_LINE_NUMBER"}-1; 74 | $line_index = $ENV{"TM_LINE_INDEX"}+0; 75 | } 76 | 77 | # get position of the caret and set it to $curindex 78 | our $curindex = 0; $count = $line; 79 | while($count--){ 80 | $curindex = index($org,"\n",$curindex); 81 | $curindex++; 82 | } 83 | $curindex += $line_index; 84 | # avoid endless loop for a selection 85 | $curindex-- if(defined($ENV{"TM_INPUT_START_LINE"})); 86 | @ign_tag = (); 87 | if(defined($ENV{"TM_HTML_EMPTY_TAGS"})) { 88 | @ign_tag = split(/\|/, $ENV{"TM_HTML_EMPTY_TAGS"}); 89 | push(@ign_tag,map{$_."/"}@ign_tag); 90 | } 91 | $xmlmode = ($ENV{"TM_MODE"} =~ m/(xml|property list|xlst)/i) ? 1 : 0; 92 | 93 | ###### parse left from caret 94 | 95 | # start parse left from caret 96 | @stack = (); 97 | $p = HTML::Parser->new( api_version => 3, 98 | start_h => [\&starttag_left,"tagname, offset, line, offset_end"], 99 | end_h => [\&endtag_left, "tagname"], 100 | ); 101 | $p->ignore_tags( @ign_tag ); 102 | $p->xml_mode($xmlmode); 103 | $text = substr($org,0,$curindex); 104 | $p->parse($text); 105 | 106 | $start = shift(@stack); 107 | # calculate $column for setting the caret 108 | $offset = rindex(substr($text,0,$start->[3]), "\n"); 109 | $offtext = substr($org, $offset+1, $start->[3]-$offset); 110 | @len = $offtext =~ /$utf8a/gox; 111 | $column = $#len + 1; 112 | 113 | undef $text; 114 | 115 | ####### search right from caret 116 | @stack = (); 117 | 118 | $p = HTML::Parser->new( api_version => 3, 119 | start_h => [\&starttag_right,"tagname"], 120 | end_h => [\&endtag_right, "tagname, offset"], 121 | ); 122 | 123 | $p->ignore_tags( @ign_tag ); 124 | $p->xml_mode($xmlmode); 125 | 126 | # readjust caret 127 | $curindex = $start->[3]; 128 | 129 | $p->parse(substr($org,$curindex,length($org)-$curindex)); 130 | 131 | # exit if no open tag is found 132 | if(!length($start->[0])){ print STDERR "No balanced tags found!"; exit 1; } 133 | 134 | # warn if open and close tag names differ 135 | print STDERR "Please verify start/end tag:\n\n\x27$start->[0]\x27 ≠ \x27$end->[0]\x27" if($start->[0] ne $end->[0]); 136 | 137 | # set the caret and return the chunk 138 | system("open \"txmt://open/?line=$start->[2]&column=$column\""); 139 | print substr($org,$start->[3],$end->[1]+$curindex-$start->[3]); 140 | 141 | sub starttag_left { unshift(@stack, [@_]); } 142 | sub endtag_left { ($tag) = @_; while(@stack) { last if (shift(@stack)->[0] eq $tag) }; } 143 | sub starttag_right { unshift(@stack, [@_]); } 144 | sub endtag_right { 145 | ($tag, $offset) = @_; 146 | if(!@stack){ $end = [$tag,$offset]; $p->eof() if ($end->[0] eq $tag); } 147 | else { while(@stack) { last if (shift(@stack)->[0] eq $tag) }; } 148 | } 149 | 150 | ' | pbcopy -pboard find 151 | input 152 | document 153 | keyEquivalent 154 | ^1 155 | name 156 | start 157 | output 158 | showAsTooltip 159 | uuid 160 | 44875D0C-086B-4B25-9F6F-79B9BAA1C03A 161 | 162 | command 163 | executeCommandWithOptions: 164 | 165 | 166 | command 167 | findNext: 168 | 169 | 170 | keyEquivalent 171 | ~@B 172 | name 173 | Select Content of Balanced (HT|X)ML Tags 174 | scope 175 | text.html -(comment.block.html) -(text.html source), text.xml -(comment.block.xml) -(text.xml source) 176 | uuid 177 | A0A40B0E-7E6C-4D71-AF5B-27712243CB08 178 | 179 | 180 | -------------------------------------------------------------------------------- /Syntaxes/XML strict.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | fileTypes 6 | 7 | foldingStartMarker 8 | ^\s*(<[^!?%/](?!.+?(/>|</.+?>))|<[!%]--(?!.+?--%?>)|<%[!]?(?!.+?%>)) 9 | foldingStopMarker 10 | ^\s*(</[^>]+>|[/%]>|-->)\s*$ 11 | keyEquivalent 12 | ^~X 13 | name 14 | XML strict 15 | patterns 16 | 17 | 18 | begin 19 | <\? 20 | captures 21 | 22 | 0 23 | 24 | name 25 | punctuation.definition.tag.xml 26 | 27 | 28 | end 29 | > 30 | name 31 | meta.tag.processing-instruction.xml 32 | 33 | 34 | begin 35 | <! 36 | captures 37 | 38 | 0 39 | 40 | name 41 | punctuation.definition.tag.xml 42 | 43 | 44 | end 45 | > 46 | name 47 | meta.tag.sgml.xml 48 | 49 | 50 | begin 51 | (<)(?:([-_[:alnum:]]+)((:)))?([-_.:[:alnum:]]+) 52 | beginCaptures 53 | 54 | 1 55 | 56 | name 57 | punctuation.definition.tag.xml 58 | 59 | 2 60 | 61 | name 62 | entity.name.tag.namespace.xml 63 | 64 | 3 65 | 66 | name 67 | entity.name.tag.xml 68 | 69 | 4 70 | 71 | name 72 | punctuation.separator.namespace.xml 73 | 74 | 5 75 | 76 | name 77 | entity.name.tag.localname.xml 78 | 79 | 6 80 | 81 | name 82 | invalid.illegal.unexpected-end-tag.xml 83 | 84 | 85 | end 86 | (/>)|(</)(\2)((\4))(\5)(>)|(</[-_.:[:alnum:]]+>) 87 | endCaptures 88 | 89 | 1 90 | 91 | name 92 | punctuation.definition.tag.xml 93 | 94 | 2 95 | 96 | name 97 | punctuation.definition.tag.xml 98 | 99 | 3 100 | 101 | name 102 | entity.name.tag.namespace.xml 103 | 104 | 4 105 | 106 | name 107 | entity.name.tag.xml 108 | 109 | 5 110 | 111 | name 112 | punctuation.separator.namespace.xml 113 | 114 | 6 115 | 116 | name 117 | entity.name.tag.localname.xml 118 | 119 | 7 120 | 121 | name 122 | punctuation.definition.tag.xml 123 | 124 | 8 125 | 126 | name 127 | invalid.illegal.unexpected-end-tag.xml 128 | 129 | 130 | name 131 | meta.tag.xml 132 | patterns 133 | 134 | 135 | captures 136 | 137 | 1 138 | 139 | name 140 | entity.other.attribute-name.namespace.xml 141 | 142 | 2 143 | 144 | name 145 | entity.other.attribute-name.xml 146 | 147 | 3 148 | 149 | name 150 | punctuation.separator.namespace.xml 151 | 152 | 4 153 | 154 | name 155 | entity.other.attribute-name.localname.xml 156 | 157 | 158 | match 159 | \s+(?:([-_a-zA-Z0-9]+)((:)))?([a-zA-Z-]+)= 160 | 161 | 162 | begin 163 | " 164 | beginCaptures 165 | 166 | 0 167 | 168 | name 169 | punctuation.definition.string.begin.xml 170 | 171 | 172 | end 173 | " 174 | endCaptures 175 | 176 | 0 177 | 178 | name 179 | punctuation.definition.string.end.xml 180 | 181 | 182 | name 183 | string.quoted.double.xml 184 | 185 | 186 | begin 187 | ' 188 | beginCaptures 189 | 190 | 0 191 | 192 | name 193 | punctuation.definition.string.begin.xml 194 | 195 | 196 | end 197 | ' 198 | endCaptures 199 | 200 | 0 201 | 202 | name 203 | punctuation.definition.string.end.xml 204 | 205 | 206 | name 207 | string.quoted.single.xml 208 | 209 | 210 | begin 211 | > 212 | beginCaptures 213 | 214 | 0 215 | 216 | name 217 | punctuation.definition.tag.xml 218 | 219 | 220 | end 221 | (?=</) 222 | name 223 | meta.tag-content.xml 224 | patterns 225 | 226 | 227 | include 228 | $self 229 | 230 | 231 | 232 | 233 | 234 | 235 | scopeName 236 | text.xml.strict 237 | uuid 238 | 74AEC234-DD4D-4AB1-B855-253E34E34BFE 239 | 240 | 241 | -------------------------------------------------------------------------------- /Macros/Select Balanced (HT|X)ML Tags.tmMacro: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | bundleUUID 6 | B5A22967-2E6A-4B66-9C71-DA8762C01E27 7 | commands 8 | 9 | 10 | argument 11 | 12 | action 13 | findNext 14 | findInProjectIgnoreCase 15 | 16 | findInProjectRegularExpression 17 | 18 | findString 19 | 20 | ignoreCase 21 | 22 | regularExpression 23 | 24 | replaceAllScope 25 | document 26 | replaceString 27 | $1 28 | wrapAround 29 | 30 | 31 | command 32 | findWithOptions: 33 | 34 | 35 | argument 36 | 37 | beforeRunningCommand 38 | nop 39 | command 40 | export __CF_USER_TEXT_ENCODING=0x1F5:0x8000100:0x8000100 41 | perl -Xe ' 42 | ########################################## 43 | ## Select Balanced (HT|X)ML Tags: bug report/feature request to Hans-Jörg Bibiko bibiko@eva.mpg.de 44 | ########################################### 45 | BEGIN { 46 | if (!eval { require HTML::Parser}) { 47 | print STDERR "The Perl package HTML::Parser is not installed!\n\nExecute in Terminal:\nsudo -H cpan -i HTML::Parser\n\nHint: You need install Apple\x27s developer toolkit (gcc compiler)."; 48 | exit 1; 49 | } 50 | } 51 | 52 | our @stack = (); our $start; our $end; 53 | 54 | $utf8a = q{ 55 | [\x00-\x7F] 56 | | [\xC2-\xDF][\x80-\xBF] 57 | | \xE0[\xA0-\xBF][\x80-\xBF] 58 | | [\xE1-\xEF][\x80-\xBF][\x80-\xBF] 59 | | \xF0[\x90-\xBF][\x80-\xBF][\x80-\xBF] 60 | | [\xF1-\xF7][\x80-\xBF][\x80-\xBF][\x80-\xBF] 61 | | \xF8[\x88-\xBF][\x80-\xBF][\x80-\xBF][\x80-\xBF] 62 | | [\xF9-\xFB][\x88-\xBF][\x88-\xBF][\x88-\xBF][\x88-\xBF] 63 | | \xFC[\x84-\xBF][\x88-\xBF][\x88-\xBF][\x88-\xBF][\x88-\xBF] 64 | | \xFD[\x88-\xBF][\x88-\xBF][\x88-\xBF][\x88-\xBF][\x88-\xBF] 65 | }; 66 | 67 | undef $/; 68 | $org = <>; 69 | if(defined($ENV{"TM_INPUT_START_LINE"})) { 70 | $line = $ENV{"TM_INPUT_START_LINE"}-1; 71 | $line_index = $ENV{"TM_INPUT_START_LINE_INDEX"}+0; 72 | } else { 73 | $line = $ENV{"TM_LINE_NUMBER"}-1; 74 | $line_index = $ENV{"TM_LINE_INDEX"}+0; 75 | } 76 | 77 | # get position of the caret and set it to $curindex 78 | our $curindex = 0; $count = $line; 79 | while($count--){ 80 | $curindex = index($org,"\n",$curindex); 81 | $curindex++; 82 | } 83 | $curindex += $line_index; 84 | 85 | @ign_tag = (); 86 | if(defined($ENV{"TM_HTML_EMPTY_TAGS"})) { 87 | @ign_tag = split(/\|/, $ENV{"TM_HTML_EMPTY_TAGS"}); 88 | push(@ign_tag,map{$_."/"}@ign_tag); 89 | } 90 | $xmlmode = ($ENV{"TM_MODE"} =~ m/(xml|property list|xlst)/i) ? 1 : 0; 91 | 92 | ###### parse left from caret 93 | 94 | # adjust curindex if curindex is inside of a tag 95 | our $p = HTML::Parser->new( api_version => 3, 96 | start_h => [\&starttag_l0,"offset, offset_end"], 97 | end_h => [\&endtag_l0, "offset_end"], 98 | ); 99 | 100 | $p->ignore_tags( @ign_tag ); 101 | $p->xml_mode($xmlmode); 102 | $p->parse($org); 103 | 104 | # start parse left from caret 105 | @stack = (); 106 | $p = HTML::Parser->new( api_version => 3, 107 | start_h => [\&starttag_left,"tagname, offset, line, offset_end"], 108 | end_h => [\&endtag_left, "tagname"], 109 | ); 110 | $p->ignore_tags( @ign_tag ); 111 | $p->xml_mode($xmlmode); 112 | $text = substr($org,0,$curindex); 113 | $p->parse($text); 114 | 115 | $start = shift(@stack); 116 | 117 | # calculate $column for setting the caret and check for the very left edge of a multi-line block 118 | $offset = rindex(substr($text,0,$start->[1]), "\n"); 119 | $offtext = substr($org, $offset+1, $start->[1]-$offset); 120 | $offtext =~ m/^([ \t]*?)<$/;$a=$1; 121 | $offtext =~ m/^(.*?)<$/; $b=$1; 122 | ## in case that close tag is not the very right edge 123 | @len = $offtext =~ /$utf8a/gox; 124 | $column_temp = $#len+1; 125 | $column = $column_temp; 126 | $start_temp = $start->[1]; 127 | $is_edge = 0; 128 | if(length($a)==length($b)) { $start->[1] -= length($a); $column = 1; $is_edge = 1; } 129 | undef $text; 130 | 131 | ####### search right from caret 132 | @stack = (); 133 | 134 | $p = HTML::Parser->new( api_version => 3, 135 | start_h => [\&starttag_right,"tagname"], 136 | end_h => [\&endtag_right, "tagname, offset_end"], 137 | ); 138 | 139 | $p->ignore_tags( @ign_tag ); 140 | $p->xml_mode($xmlmode); 141 | 142 | # readjust caret 143 | $curindex = $start->[3]; 144 | 145 | $p->parse(substr($org,$curindex,length($org)-$curindex)); 146 | 147 | # check for the very right edge of a multi-line block 148 | if($is_edge) { 149 | $offtext = substr($org,$end->[1]+$curindex,length($org)-$end->[1]-$curindex); 150 | $offtext = substr($offtext,0,index($offtext,"\n")); 151 | $offtext =~ m/^([ \t]*$)/m; $a=$1; 152 | $offtext =~ m/^(.*?)$/m; $b=$1; 153 | if(length($a)==length($b)){ 154 | $end->[1] += length($1)+1; 155 | } else { 156 | $column = $column_temp; 157 | $start->[1] = $start_temp; 158 | } 159 | } 160 | 161 | # exit if no open tag is found 162 | if(!length($start->[0])){ print STDERR "No balanced tags found!"; exit 1; } 163 | 164 | # warn if open and close tag names differ 165 | print STDERR "Please verify start/end tag:\n\n\x27$start->[0]\x27 ≠ \x27$end->[0]\x27" if($start->[0] ne $end->[0]); 166 | 167 | # set the caret and return the chunk 168 | system("open \"txmt://open/?line=$start->[2]&column=$column\""); 169 | print substr($org,$start->[1],$end->[1]+$curindex-$start->[1]); 170 | 171 | sub starttag_l0 { 172 | ($offset, $offset_end) = @_; 173 | if($offset>=$curindex) { 174 | $curindex = $adjustindex + 1; 175 | $p->eof(); return; 176 | } 177 | $adjustindex = $offset_end; 178 | } 179 | sub endtag_l0 { 180 | ($offset_end) = @_; 181 | if($offset_end>$curindex) { 182 | $curindex = $adjustindex + 1; 183 | $p->eof(); return; 184 | } 185 | $adjustindex = $offset_end; 186 | } 187 | sub starttag_left { unshift(@stack, [@_]); } 188 | sub endtag_left { ($tag) = @_; while(@stack) { last if (shift(@stack)->[0] eq $tag) }; } 189 | sub starttag_right { unshift(@stack, [@_]); } 190 | sub endtag_right { 191 | ($tag, $offset_end) = @_; 192 | if(!@stack){ $end = [$tag,$offset_end]; $p->eof() if ($end->[0] eq $tag); } 193 | else { while(@stack) { last if (shift(@stack)->[0] eq $tag) }; } 194 | } 195 | 196 | ' | pbcopy -pboard find 197 | input 198 | document 199 | keyEquivalent 200 | ^1 201 | name 202 | start 203 | output 204 | showAsTooltip 205 | uuid 206 | 44875D0C-086B-4B25-9F6F-79B9BAA1C03A 207 | 208 | command 209 | executeCommandWithOptions: 210 | 211 | 212 | command 213 | findNext: 214 | 215 | 216 | keyEquivalent 217 | @B 218 | name 219 | Select Balanced (HT|X)ML Tags 220 | scope 221 | text.html -(comment.block.html) -(text.html source), text.xml -(comment.block.xml) -(text.xml source) 222 | uuid 223 | 154ED053-9860-4249-B159-E7A8D7482AE5 224 | 225 | 226 | -------------------------------------------------------------------------------- /Preferences/CodeCompletions Ruby.tmPreferences: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | bundleUUID 6 | 467B298F-6227-11D9-BFB1-000D93589AF6 7 | name 8 | CodeCompletions Ruby 9 | scope 10 | source.ruby 11 | settings 12 | 13 | completions 14 | 15 | a 16 | abbrev 17 | abort 18 | abort_on_exception 19 | abort_on_exception= 20 | abs 21 | abs2 22 | absolute 23 | absolute? 24 | absoluteChildNumber 25 | acos 26 | acos! 27 | acosh 28 | acosh! 29 | add 30 | add! 31 | add? 32 | add_builtin_type 33 | add_domain_type 34 | add_finalizer 35 | add_observer 36 | add_private_type 37 | add_ruby_type 38 | adler 39 | adler32 40 | ajd 41 | ajd_to_amjd 42 | ajd_to_jd 43 | alive? 44 | all? 45 | allocate 46 | all_symbols 47 | all_waits 48 | amjd 49 | amjd_to_ajd 50 | ancestorChildNumber 51 | ancestors 52 | angle 53 | any? 54 | appendChild 55 | appendData 56 | append_features 57 | arg 58 | args 59 | arity 60 | asctime 61 | asin 62 | asin! 63 | asinh 64 | asinh! 65 | assoc 66 | async 67 | async= 68 | at 69 | atan 70 | atan! 71 | atan2 72 | atan2! 73 | atanh 74 | atanh! 75 | atime 76 | attributes 77 | attributes= 78 | at_exit 79 | autoload 80 | autoload? 81 | avail_in 82 | avail_out 83 | avail_out= 84 | b64encode 85 | backtrace 86 | base 87 | baseName 88 | basename 89 | beginning_of_line? 90 | benchmark 91 | between? 92 | bind 93 | binding 94 | binmode 95 | blksize 96 | blockdev? 97 | blockquote 98 | blocks 99 | block_given? 100 | bm 101 | bmbm 102 | bol? 103 | broadcast 104 | build 105 | build2 106 | call 107 | callcc 108 | caller 109 | call_finalizer 110 | capitalize 111 | capitalize! 112 | caption 113 | captures 114 | casecmp 115 | casefold? 116 | cd 117 | ceil 118 | center 119 | changed 120 | changed? 121 | change_privilege 122 | chardev? 123 | charset 124 | charset= 125 | charset_map 126 | chdir 127 | check 128 | checkbox 129 | checkbox_group 130 | check_until 131 | childNodes 132 | childNumber 133 | children 134 | chmod 135 | chmod_R 136 | chomp 137 | chomp! 138 | chop 139 | chop! 140 | chown 141 | chown_R 142 | chr 143 | chroot 144 | civil 145 | civil_to_jd 146 | class 147 | classify 148 | class_eval 149 | class_name 150 | class_variables 151 | class_variable_get 152 | class_variable_set 153 | cleanpath 154 | clear 155 | clone 156 | cloneNode 157 | close 158 | close! 159 | closed? 160 | closed_read? 161 | closed_write? 162 | close_read 163 | close_write 164 | cmp 165 | codepage 166 | codepage= 167 | coerce 168 | collect 169 | collect! 170 | collect2 171 | column 172 | columns 173 | column_size 174 | column_vector 175 | column_vectors 176 | comment 177 | comment= 178 | commercial 179 | commercial_to_jd 180 | commit 181 | compact 182 | compact! 183 | compare_by 184 | compare_by_row_vectors 185 | compare_file 186 | compare_stream 187 | compile 188 | component 189 | component_ary 190 | concat 191 | conj 192 | conjugate 193 | connect 194 | constants 195 | const_defined? 196 | const_get 197 | const_load 198 | const_missing 199 | const_set 200 | conv 201 | copy 202 | copy_entry 203 | copy_file 204 | copy_stream 205 | coredump? 206 | cos 207 | cos! 208 | cosh 209 | cosh! 210 | count 211 | count_observers 212 | covector 213 | cp 214 | cp_r 215 | crc 216 | crc32 217 | crc_table 218 | createAttribute 219 | createCDATASection 220 | createComment 221 | createDocumentFragment 222 | createElement 223 | createEntityReference 224 | createNode 225 | createProcessingInstruction 226 | createTextNode 227 | create_docfile 228 | create_win32ole_makefile 229 | critical 230 | critical= 231 | crypt 232 | ctime 233 | current 234 | cwday 235 | cweek 236 | cwyear 237 | data 238 | data= 239 | dataType 240 | dataType= 241 | data_type 242 | datetime_format 243 | datetime_format= 244 | day 245 | day_fraction 246 | day_fraction_to_time 247 | debug 248 | debug? 249 | decode 250 | decode64 251 | decode_b 252 | default 253 | default= 254 | default_handler 255 | default_port 256 | default_proc 257 | define_class 258 | define_define_define_instance_variables 259 | define_finalizer 260 | define_method 261 | define_method_missing 262 | define_module 263 | definition 264 | deflate 265 | def_delegator 266 | def_delegators 267 | def_instance_delegator 268 | def_instance_delegators 269 | def_singleton_delegator 270 | def_singleton_delegators 271 | delete 272 | delete! 273 | delete? 274 | deleteData 275 | delete_at 276 | delete_if 277 | delete_observer 278 | delete_observers 279 | denominator 280 | depth 281 | deq 282 | det 283 | detach 284 | detect 285 | detect_implicit 286 | determinant 287 | dev 288 | dev_major 289 | dev_minor 290 | diagonal 291 | difference 292 | directory? 293 | dirname 294 | dir_foreach 295 | disable 296 | dispid 297 | display 298 | div 299 | divide 300 | divmod 301 | dn 302 | dn= 303 | doctype 304 | documentElement 305 | downcase 306 | downcase! 307 | downto 308 | dst? 309 | dump 310 | dump_stream 311 | dup 312 | each 313 | each2 314 | each_byte 315 | each_cons 316 | each_document 317 | each_entry 318 | each_filename 319 | each_index 320 | each_key 321 | each_line 322 | each_node 323 | each_object 324 | each_pair 325 | each_slice 326 | each_value 327 | each_with_index 328 | egid= 329 | eid 330 | eid= 331 | elements 332 | emitter 333 | empty? 334 | enable 335 | enclose 336 | enclosed? 337 | encode 338 | encode64 339 | end 340 | end? 341 | ended? 342 | england 343 | enq 344 | entities 345 | entries 346 | enum_cons 347 | enum_for 348 | enum_slice 349 | enum_with_index 350 | eof 351 | eof? 352 | eos? 353 | eql? 354 | eqn? 355 | equal? 356 | erf 357 | erfc 358 | errno 359 | error 360 | error? 361 | errorCode 362 | escape 363 | escapeElement 364 | escapeHTML 365 | euid 366 | euid= 367 | eval 368 | event? 369 | event_interface 370 | exception 371 | exclude_end? 372 | exclusive 373 | exclusive_unlock 374 | exec 375 | executable? 376 | executable_real? 377 | exist? 378 | exists? 379 | exit 380 | exit! 381 | exited? 382 | exitstatus 383 | exit_value 384 | exp 385 | exp! 386 | expand_path 387 | extended 388 | extend_object 389 | extensions 390 | extensions= 391 | extname 392 | extract 393 | fail 394 | failed 395 | fatal 396 | fatal? 397 | fcntl 398 | fetch 399 | file? 400 | fileno 401 | filepos 402 | file_field 403 | fill 404 | filter 405 | filter= 406 | finalizers 407 | find 408 | find_all 409 | finish 410 | finished? 411 | finite? 412 | first 413 | firstChild 414 | flatten 415 | flatten! 416 | flatten_merge 417 | flock 418 | floor 419 | flush 420 | flush_next_in 421 | flush_next_out 422 | fnmatch 423 | fnmatch? 424 | foreach 425 | foreachline 426 | fork 427 | form 428 | format 429 | formatDate 430 | formatIndex 431 | formatNumber 432 | formatTime 433 | for_fd 434 | fragment= 435 | freeze 436 | frexp 437 | frozen? 438 | fsync 439 | ftype 440 | fu_have_symlink? 441 | fu_world_writable? 442 | garbage_collect 443 | gcd 444 | gcdlcm 445 | generate 446 | generate_args 447 | generate_argtype 448 | generate_argtypes 449 | generate_class 450 | generate_constants 451 | generate_func_methods 452 | generate_method 453 | generate_methods 454 | generate_method_args_help 455 | generate_method_body 456 | generate_method_help 457 | generate_properties_with_args 458 | generate_propget_methods 459 | generate_propputref_methods 460 | generate_propput_methods 461 | generic_parser 462 | getAllResponseHeaders 463 | getAttribute 464 | getAttributeNode 465 | getbyte 466 | getc 467 | getch 468 | getegid 469 | getElementsByTagName 470 | geteuid 471 | getgid 472 | getgm 473 | getlocal 474 | getNamedItem 475 | getpgid 476 | getpgrp 477 | getpriority 478 | getQualifiedItem 479 | getResponseHeader 480 | gets 481 | getuid 482 | getutc 483 | getwd 484 | get_byte 485 | gid 486 | gid= 487 | glob 488 | global_variables 489 | gm 490 | gmt? 491 | gmtime 492 | gmtoff 493 | gmt_offset 494 | grant_privilege 495 | gregorian 496 | gregorian_leap? 497 | grep 498 | group 499 | groups 500 | groups= 501 | grpowned? 502 | gsub 503 | gsub! 504 | guess 505 | guess1 506 | guess2 507 | guess_old 508 | guid 509 | h 510 | handler1 511 | handler2 512 | handler3 513 | hasChildNodes 514 | hasFeature 515 | hash 516 | has_key? 517 | has_value? 518 | header 519 | headers= 520 | helpcontext 521 | helpfile 522 | helpstring 523 | hex 524 | hidden 525 | hierarchical? 526 | host= 527 | hour 528 | html 529 | html_escape 530 | httpdate 531 | hypot 532 | iconv 533 | id 534 | id2name 535 | identical? 536 | identity 537 | im 538 | imag 539 | image 540 | image_button 541 | img 542 | implementation 543 | include? 544 | included 545 | included_modules 546 | index 547 | indexes 548 | indices 549 | induced_from 550 | infinite? 551 | inflate 552 | info 553 | info? 554 | inherited 555 | initgroups 556 | initialize_copy 557 | init_elements 558 | inject 559 | inner_product 560 | ino 561 | input? 562 | insert 563 | insertBefore 564 | insertData 565 | inspect 566 | install 567 | instance_eval 568 | instance_method 569 | instance_methods 570 | instance_of? 571 | instance_variables 572 | instance_variable_get 573 | instance_variable_set 574 | integer? 575 | intern 576 | intersection 577 | inv 578 | inverse 579 | inverse_from 580 | invert 581 | invkind 582 | invoke 583 | invoke_kind 584 | ioctl 585 | isatty 586 | isdst 587 | iseuc 588 | iso8601 589 | issetugid 590 | issjis 591 | isutf8 592 | is_a? 593 | italy 594 | item 595 | iterator? 596 | jd 597 | jd_to_ajd 598 | jd_to_civil 599 | jd_to_commercial 600 | jd_to_ld 601 | jd_to_mjd 602 | jd_to_ordinal 603 | jd_to_wday 604 | join 605 | join_nowait 606 | julian 607 | julian_leap? 608 | kcode 609 | kconv 610 | key? 611 | keys 612 | kill 613 | kind_of? 614 | lambda 615 | last 616 | lastChild 617 | last_match 618 | lchmod 619 | lchown 620 | lcm 621 | ld 622 | ldexp 623 | ld_to_jd 624 | leap? 625 | length 626 | level 627 | level= 628 | line 629 | lineno 630 | lineno= 631 | linepos 632 | link 633 | list 634 | listup 635 | ljust 636 | ln 637 | ln_s 638 | ln_sf 639 | load 640 | loadXML 641 | load_documents 642 | load_file 643 | load_stream 644 | local 645 | localtime 646 | local_variables 647 | lock 648 | locked? 649 | log 650 | log! 651 | log10 652 | log10! 653 | log= 654 | lstat 655 | lstrip 656 | lstrip! 657 | main 658 | major_version 659 | makedirs 660 | make_link 661 | make_symlink 662 | map 663 | map! 664 | map2 665 | marshal_dump 666 | marshal_load 667 | match 668 | match? 669 | matched 670 | matched? 671 | matchedsize 672 | matched_size 673 | max 674 | max= 675 | maxgroups 676 | maxgroups= 677 | mday 678 | measure 679 | member? 680 | members 681 | memberwise 682 | merge 683 | merge! 684 | message_message 685 | method 686 | methods 687 | method_added 688 | method_defined? 689 | method_missing 690 | method_removed 691 | method_undefined 692 | min 693 | minor 694 | minor_version 695 | mjd 696 | mjd_to_jd 697 | mkdir 698 | mkdir_p 699 | mkpath 700 | mktime 701 | mode 702 | module_eval 703 | modulo 704 | mon 705 | month 706 | mountpoint? 707 | move 708 | mtime 709 | mtime= 710 | multipart? 711 | multipart_form 712 | must_C_version 713 | mv 714 | name 715 | namespaceURI 716 | nan? 717 | navigate 718 | nesting 719 | new! 720 | new2 721 | new_start 722 | next 723 | next! 724 | next? 725 | nextNode 726 | nextSibling 727 | next_wait 728 | nil? 729 | nitems 730 | nkf 731 | nlink 732 | nodeFromID 733 | nodeName 734 | nodeType 735 | nodeTypedValue 736 | nodeTypedValue= 737 | nodeTypeString 738 | nodeValue 739 | nodeValue= 740 | nonzero? 741 | normalize 742 | normalize! 743 | notationName 744 | notations 745 | notify_observers 746 | now 747 | ns? 748 | numerator 749 | num_waiting 750 | object_id 751 | object_maker 752 | oct 753 | offset 754 | offset_vtbl 755 | oletypelib_name 756 | ole_classes 757 | ole_free 758 | ole_func_methods 759 | ole_get_methods 760 | ole_method 761 | ole_methods 762 | ole_method_help 763 | ole_obj_help 764 | ole_put_methods 765 | ole_reference_count 766 | ole_show_help 767 | ole_type 768 | ole_type_detail 769 | ondataavailable 770 | ondataavailable= 771 | onreadystatechange 772 | onreadystatechange= 773 | ontransformnode= 774 | on_event 775 | on_event_with_outargs 776 | opaque= 777 | open 778 | opendir 779 | optional? 780 | options 781 | ordinal 782 | ordinal_to_jd 783 | orig_name 784 | orig_name= 785 | os? 786 | os_code 787 | out 788 | output? 789 | owned? 790 | ownerDocument 791 | p 792 | pack 793 | params 794 | params= 795 | parent 796 | parentNode 797 | parse 798 | parsed 799 | parseError 800 | parser 801 | parse_documents 802 | parse_file 803 | partition 804 | pass 805 | password 806 | password= 807 | password_field 808 | path 809 | path= 810 | peek 811 | peep 812 | pid 813 | pipe 814 | pipe? 815 | pointer 816 | pointer= 817 | polar 818 | pop 819 | popen 820 | popup_menu 821 | port= 822 | pos 823 | pos= 824 | post_match 825 | power! 826 | ppid 827 | prec 828 | prec_f 829 | prec_i 830 | prefix 831 | preserveWhiteSpace 832 | preserveWhiteSpace= 833 | pretty 834 | previousSibling 835 | pre_match 836 | print 837 | printf 838 | priority 839 | priority= 840 | private_class_method 841 | private_instance_methods 842 | private_methods 843 | private_method_defined? 844 | proc 845 | progid 846 | progids 847 | proper_subset? 848 | proper_superset? 849 | protected_instance_methods 850 | protected_methods 851 | protected_method_defined? 852 | prune 853 | publicId 854 | public_class_method 855 | public_instance_methods 856 | public_methods 857 | public_method_defined? 858 | push 859 | putc 860 | puts 861 | pwd 862 | query= 863 | quick_emit 864 | quo 865 | quote 866 | r 867 | radio_button 868 | radio_group 869 | rand 870 | rank 871 | rassoc 872 | raw_cookie 873 | raw_cookie2 874 | rdev 875 | rdev_major 876 | rdev_minor 877 | rdiv 878 | read 879 | readable? 880 | readable_real? 881 | readchar 882 | readline 883 | readlines 884 | readlink 885 | readpartial 886 | readyState 887 | read_type_class 888 | real 889 | realpath 890 | realtime 891 | reason 892 | reduce 893 | regexp 894 | registry= 895 | regular? 896 | rehash 897 | reject 898 | reject! 899 | relative? 900 | relative_path_from 901 | remainder 902 | remove 903 | removeAttribute 904 | removeAttributeNode 905 | removeChild 906 | removeNamedItem 907 | removeQualifiedItem 908 | remove_class_variable 909 | remove_const 910 | remove_dir 911 | remove_entry 912 | remove_entry_secure 913 | remove_file 914 | remove_finalizer 915 | remove_instance_variable 916 | remove_method 917 | rename 918 | reopen 919 | replace 920 | replaceChild 921 | replaceData 922 | request_uri 923 | require 924 | reset 925 | resolveExternals 926 | resolveExternals= 927 | resolver 928 | respond_to? 929 | responseBody 930 | responseStream 931 | responseText 932 | responseXML 933 | rest 934 | rest? 935 | restore 936 | restsize 937 | rest_size 938 | result 939 | return_type 940 | return_type_detail 941 | return_vtype 942 | retval? 943 | reverse 944 | reverse! 945 | reverse_each 946 | rewind 947 | re_exchange 948 | re_exchangeable? 949 | rfc1123_date 950 | rfc2822 951 | rfc822 952 | rid 953 | rindex 954 | rjust 955 | rm 956 | rmdir 957 | rmtree 958 | rm_f 959 | rm_r 960 | rm_rf 961 | root 962 | root? 963 | roots 964 | round 965 | route_from 966 | route_to 967 | row 968 | rows 969 | row_size 970 | row_vector 971 | row_vectors 972 | rpower 973 | rstrip 974 | rstrip! 975 | run 976 | run= 977 | run? 978 | safe_level 979 | safe_unlink 980 | save 981 | scalar 982 | scan 983 | scan_full 984 | scan_until 985 | scheme= 986 | scope 987 | scope= 988 | scrolling_list 989 | search_full 990 | sec 991 | secure= 992 | seek 993 | select 994 | selectNodes 995 | selectSingleNode 996 | send 997 | setAttribute 998 | setAttributeNode 999 | setegid 1000 | seteuid 1001 | setgid 1002 | setgid? 1003 | setNamedItem 1004 | setpgid 1005 | setpgrp 1006 | setpriority 1007 | setproperty 1008 | setregid 1009 | setRequestHeader 1010 | setresgid 1011 | setresuid 1012 | setreuid 1013 | setrgid 1014 | setruid 1015 | setsid 1016 | setuid 1017 | setuid? 1018 | setup 1019 | set_attributes 1020 | set_backtrace 1021 | set_dictionary 1022 | set_dn 1023 | set_eoutvar 1024 | set_extensions 1025 | set_filter 1026 | set_fragment 1027 | set_headers 1028 | set_host 1029 | set_log 1030 | set_opaque 1031 | set_password 1032 | set_path 1033 | set_port 1034 | set_query 1035 | set_registry 1036 | set_scheme 1037 | set_scope 1038 | set_to 1039 | set_trace_func 1040 | set_typecode 1041 | set_user 1042 | set_userinfo 1043 | shellwords 1044 | shift 1045 | sid_available? 1046 | signal 1047 | signaled? 1048 | sin 1049 | sin! 1050 | singleton_methods 1051 | singleton_method_added 1052 | singleton_method_removed 1053 | singleton_method_undefined 1054 | singular? 1055 | sinh 1056 | sinh! 1057 | size 1058 | size? 1059 | size_opt_params 1060 | size_params 1061 | skip 1062 | skip_until 1063 | sleep 1064 | slice 1065 | slice! 1066 | socket? 1067 | sort 1068 | sort! 1069 | sort_by 1070 | source 1071 | specified 1072 | split 1073 | splitText 1074 | sprintf 1075 | sqrt 1076 | sqrt! 1077 | square? 1078 | squeeze 1079 | squeeze! 1080 | srand 1081 | srcText 1082 | src_type 1083 | start 1084 | stat 1085 | status 1086 | statusText 1087 | step 1088 | sticky? 1089 | stop 1090 | stop? 1091 | stopped? 1092 | stop_msg_stopsig 1093 | store 1094 | stream_end? 1095 | strftime 1096 | string 1097 | string= 1098 | strip 1099 | strip! 1100 | strptime 1101 | sub 1102 | sub! 1103 | submit 1104 | subset? 1105 | substringData 1106 | subtract 1107 | succ 1108 | succ! 1109 | success 1110 | success? 1111 | sum 1112 | superclass 1113 | superset? 1114 | swapcase 1115 | swapcase! 1116 | switch 1117 | symlink 1118 | symlink? 1119 | sync 1120 | sync= 1121 | synchronize 1122 | sync_point? 1123 | syscall 1124 | sysopen 1125 | sysread 1126 | sysseek 1127 | system 1128 | systemId 1129 | syswrite 1130 | t 1131 | tagName 1132 | tagurize 1133 | taint 1134 | tainted? 1135 | tan 1136 | tan! 1137 | tanh 1138 | tanh! 1139 | target 1140 | teardown 1141 | tell 1142 | terminate 1143 | termsig 1144 | test 1145 | test_bracket_equal_with_arg 1146 | test_class_to_s 1147 | test_const_CP_ACP 1148 | test_const_CP_MACCP 1149 | test_const_CP_OEMCP 1150 | test_const_CP_SYMBOL 1151 | test_const_CP_THREAD_ACP 1152 | test_const_CP_UTF7 1153 | test_const_CP_UTF8 1154 | test_convert_bignum 1155 | test_dispid 1156 | test_each 1157 | test_event 1158 | test_event_interface 1159 | test_get_win32ole_object 1160 | test_helpcontext 1161 | test_helpfile 1162 | test_helpstring 1163 | test_input 1164 | test_invoke 1165 | test_invoke_kind 1166 | test_name 1167 | test_no_exist_property 1168 | test_offset_vtbl 1169 | test_ole_func_methods 1170 | test_ole_get_methods 1171 | test_ole_invoke_with_named_arg 1172 | test_ole_invoke_with_named_arg_last 1173 | test_ole_methods 1174 | test_ole_method_help 1175 | test_ole_put_methods 1176 | test_ole_type 1177 | test_ole_type_detail 1178 | test_on_event 1179 | test_on_event2 1180 | test_on_event3 1181 | test_on_event4 1182 | test_openSchema 1183 | test_optional 1184 | test_output 1185 | test_return_type 1186 | test_return_type_detail 1187 | test_return_vtype 1188 | test_setproperty 1189 | test_setproperty_bracket 1190 | test_setproperty_with_equal 1191 | test_src_type 1192 | test_s_codepage 1193 | test_s_codepage_changed 1194 | test_s_codepage_set 1195 | test_s_connect 1196 | test_s_const_load 1197 | test_s_new_from_clsid 1198 | test_s_ole_classes 1199 | test_s_progids 1200 | test_s_test_s_new_DCOM 1201 | test_s_typelibs 1202 | test_to_s 1203 | test_typekind 1204 | test_value 1205 | test_variables 1206 | test_variant 1207 | test_visible 1208 | test__invoke 1209 | text 1210 | text= 1211 | textarea 1212 | text_field 1213 | timeout 1214 | times 1215 | time_to_day_fraction 1216 | tmpdir 1217 | to= 1218 | today 1219 | toeuc 1220 | tojis 1221 | tosjis 1222 | total_in 1223 | total_out 1224 | touch 1225 | toutf16 1226 | toutf8 1227 | to_a 1228 | to_ary 1229 | to_enum 1230 | to_f 1231 | to_hash 1232 | to_i 1233 | to_int 1234 | to_io 1235 | to_mailtext 1236 | to_proc 1237 | to_r 1238 | to_rfc822text 1239 | to_s 1240 | to_set 1241 | to_str 1242 | to_sym 1243 | tr 1244 | tr! 1245 | trace 1246 | trace_var 1247 | transaction 1248 | transfer 1249 | transformNode 1250 | transformNodeToObject 1251 | transpose 1252 | trap 1253 | truncate 1254 | try_implicit 1255 | try_lock 1256 | tr_s 1257 | tr_s! 1258 | tty? 1259 | tv_sec 1260 | tv_usec 1261 | type 1262 | typecode= 1263 | typekind 1264 | typelibs 1265 | u 1266 | uid 1267 | uid= 1268 | umask 1269 | unbind 1270 | undefine_finalizer 1271 | undef_method 1272 | unescape 1273 | unescapeElement 1274 | unescapeHTML 1275 | ungetc 1276 | union 1277 | uniq 1278 | uniq! 1279 | uniqueID 1280 | unknown 1281 | unlink 1282 | unlock 1283 | unpack 1284 | unscan 1285 | unshift 1286 | untaint 1287 | untrace_var 1288 | unused 1289 | upcase 1290 | upcase! 1291 | update 1292 | upto 1293 | uptodate? 1294 | url 1295 | url= 1296 | url_encode 1297 | usec 1298 | user 1299 | user= 1300 | userinfo 1301 | userinfo= 1302 | use_registry 1303 | utc 1304 | utc? 1305 | utc_offset 1306 | utime 1307 | validateOnParse 1308 | validateOnParse= 1309 | valid_civil? 1310 | valid_commercial? 1311 | valid_jd? 1312 | valid_ordinal? 1313 | valid_time? 1314 | value 1315 | value= 1316 | value? 1317 | values 1318 | values_at 1319 | variables 1320 | variable_kind 1321 | varkind 1322 | version 1323 | visible? 1324 | wait 1325 | wait2 1326 | waitall 1327 | waitpid 1328 | waitpid2 1329 | wakeup 1330 | warn 1331 | warn? 1332 | wday 1333 | wrap 1334 | writable? 1335 | writable_real? 1336 | write 1337 | xml 1338 | xmlschema 1339 | yday 1340 | year 1341 | yield 1342 | zero 1343 | zero? 1344 | zip 1345 | zlib_version 1346 | zone 1347 | zone_offset 1348 | _dump 1349 | _getproperty 1350 | _id2ref 1351 | _invoke 1352 | _load 1353 | _setproperty 1354 | __getobj__ 1355 | __id__ 1356 | __init__ 1357 | __send__ 1358 | __setobj__ 1359 | 1360 | 1361 | uuid 1362 | 546922BF-C276-46B7-9177-3CD36B92D9B8 1363 | 1364 | 1365 | --------------------------------------------------------------------------------