diff --git a/EthanBrown.SublimeText2.EditorPackages/EthanBrown.SublimeText2.EditorPackages.nuspec b/EthanBrown.SublimeText2.EditorPackages/EthanBrown.SublimeText2.EditorPackages.nuspec index 67abfc9..f47b9c3 100644 --- a/EthanBrown.SublimeText2.EditorPackages/EthanBrown.SublimeText2.EditorPackages.nuspec +++ b/EthanBrown.SublimeText2.EditorPackages/EthanBrown.SublimeText2.EditorPackages.nuspec @@ -3,7 +3,7 @@ EthanBrown.SublimeText2.EditorPackages Sublime Text 2 - Editor Enhancing Packages - 0.0.5 + 0.1.0 Various Ethan Brown A number of packages helpful for increased editor productivity. @@ -91,7 +91,7 @@ --> false https://raw.github.com/Iristyle/ChocolateyPackages/master/SublimeText2.app/Sublime_Text.png - + * Use a local package cache to prevent first-time package restore / load errors diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Abacus/.gitignore b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Abacus/.gitignore new file mode 100644 index 0000000..e43b0f9 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Abacus/.gitignore @@ -0,0 +1 @@ +.DS_Store diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Abacus/Abacus.py b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Abacus/Abacus.py new file mode 100644 index 0000000..1a994cf --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Abacus/Abacus.py @@ -0,0 +1,212 @@ +import sublime, sublime_plugin, re, sys +from string import Template + +class AbacusCommand(sublime_plugin.TextCommand): + """ + Main entry point. Find candidates for alignment, + calculate appropriate column widths, and then + perform a series of replacements. + """ + def run(self, edit): + candidates = [] + separators = sublime.load_settings("Abacus.sublime-settings").get("com.khiltd.abacus.separators") + indentor = Template("$indentation$left_col") + lg_aligner = Template("$left_col$separator") + rg_aligner = Template("$left_col$gutter$separator_padding$separator") + + #Run through the separators accumulating alignment candidates + #starting with the longest ones i.e. '==' before '='. + longest_first = self.sort_separators(separators) + + #Favor those that lean right so assignments with slice notation in them + #get handled sanely + for separator in [righty for righty in longest_first if righty["gravity"] == "right"]: + self.find_candidates_for_separator(separator, candidates) + + for separator in [lefty for lefty in longest_first if lefty["gravity"] == "left"]: + self.find_candidates_for_separator(separator, candidates) + + #After accumulation is done, figure out what the minimum required + #indentation and column width is going to have to be to make every + #candidate happy. + max_indent, max_left_col_width = self.calc_left_col_width(candidates) + + #Perform actual alignments based on gravitational affinity of separators + for candidate in candidates: + indent = 0 + if not candidate["preserve_indent"]: + indent = max_indent + else: + indent = candidate["adjusted_indent"] + + sep_width = len(candidate["separator"]) + right_col = candidate["right_col"].strip() + left_col = indentor.substitute( indentation = " " * indent, + left_col = candidate["left_col"] ) + #Marry the separator to the proper column + if candidate["gravity"] == "left": + #Separator sits flush left + left_col = lg_aligner.substitute(left_col = left_col, + separator = candidate["separator"] ) + elif candidate["gravity"] == "right": + gutter_width = max_left_col_width + max_indent - len(left_col) - len(candidate["separator"]) + #Push the separator ONE separator's width over the tab boundary + left_col = rg_aligner.substitute( left_col = left_col, + gutter = " " * gutter_width, + separator_padding = " " * sep_width, + separator = candidate["separator"] ) + #Most sane people will want a space between the operator and the value. + right_col = " %s" % right_col + #Snap the left side together + left_col = left_col.ljust(max_indent + max_left_col_width) + candidate["replacement"] = "%s%s\n" % (left_col, right_col) + + #Replace each line in its entirety + full_line = self.region_from_line_number(candidate["line"]) + #sys.stdout.write(candidate["replacement"]) + self.view.replace(edit, full_line, candidate["replacement"]) + + #Scroll and muck with the selection + if candidates: + self.view.sel().clear() + for region in [self.region_from_line_number(changed["line"]) for changed in candidates]: + start_of_right_col = region.begin() + max_indent + max_left_col_width + insertion_point = sublime.Region(start_of_right_col, start_of_right_col) + self.view.sel().add(insertion_point) + #self.view.show_at_center(insertion_point) + else: + sublime.status_message('Abacus - no alignment token found on selected line(s)') + + def sort_separators(self, separators): + return sorted(separators, key=lambda sep: -len(sep["token"])) + + def find_candidates_for_separator(self, separator, candidates): + """ + Given a particular separator, loop through every + line in the current selection looking for it and + add unique matches to a list. + """ + debug = sublime.load_settings("Abacus.sublime-settings").get("com.khiltd.abacus.debug") + token = separator["token"] + selection = self.view.sel() + new_candidates = [] + for region in selection: + for line in self.view.lines(region): + line_no = self.view.rowcol(line.begin())[0] + + #Never match a line more than once + if len([match for match in candidates if match["line"] == line_no]): + continue + + #Collapse any string literals that might + #also contain our separator token so that + #we can reliably find the location of the + #real McCoy. + line_content = self.view.substr(line) + collapsed = line_content + + for match in re.finditer(r"(\"[^\"]*(?' + #And remember that quoted strings were collapsed + #up above! + token_pos = None + safe_token = re.escape(token) + token_matcher = re.compile(r"(?= self.tab_width / 2: + initial_indent = self.snap_to_next_boundary(initial_indent, self.tab_width) + else: + initial_indent -= initial_indent % self.tab_width + candidate = { "line": line_no, + "original": line_content, + "separator": sep, + "gravity": separator["gravity"], + "adjusted_indent": initial_indent, + "preserve_indent": separator.get("preserve_indentation", False), + "left_col": left_col.lstrip(), + "right_col": right_col.rstrip() } + new_candidates.append(candidate) + #Poke more stuff in the accumulator + candidates.extend(new_candidates) + + def calc_left_col_width(self, candidates): + """ + Given a list of lines we've already matched against + one or more separators, loop through them all to + normalize their indentation and determine the minimum + possible column width that will accomodate them all + when aligned to a tab stop boundary. + """ + max_width = 0 + max_indent = 0 + max_sep_width = 0 + + for candidate in candidates: + max_indent = max([candidate["adjusted_indent"], max_indent]) + max_sep_width = max([len(candidate["separator"]), max_sep_width]) + max_width = max([len(candidate["left_col"].rstrip()), max_width]) + + max_width += max_sep_width + + #Bump up to the next multiple of tab_width + max_width = self.snap_to_next_boundary(max_width, self.tab_width) + + return max_indent, max_width + + @property + def tab_width(self): + """ + Exceptionally inefficient + """ + return int(self.view.settings().get('tab_size', 4)) + + def detab(self, input): + """ + Goodbye tabs! + """ + return input.expandtabs(self.tab_width) + + def region_from_line_number(self, line_number): + """ + Given a zero-based line number, return a region + encompassing it (including the newline). + """ + return self.view.full_line(self.view.text_point(line_number, 0)) + + def snap_to_next_boundary(self, value, interval): + """ + Alignment voodoo + """ + return value + (interval - value % interval) diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Abacus/Abacus.sublime-settings b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Abacus/Abacus.sublime-settings new file mode 100644 index 0000000..9c4843a --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Abacus/Abacus.sublime-settings @@ -0,0 +1,56 @@ +{ + "com.khiltd.abacus.debug": true, + "com.khiltd.abacus.separators": + [ + { + "token": ":", + "gravity": "left", + "preserve_indentation": true + }, + { + "token": "=", + "gravity": "right", + "preserve_indentation": true + }, + { + "token": "+=", + "gravity": "right", + "preserve_indentation": true + }, + { + "token": "-=", + "gravity": "right", + "preserve_indentation": true + }, + { + "token": "*=", + "gravity": "right", + "preserve_indentation": true + }, + { + "token": "/=", + "gravity": "right", + "preserve_indentation": true + }, + { + "token": "?=", + "gravity": "right", + "preserve_indentation": true + }, + { + "token": "||=", + "gravity": "right", + "preserve_indentation": true + }, + { + "token": "%=", + "gravity": "right", + "preserve_indentation": true + }, + { + "token": "==", + "gravity": "right", + "preserve_indentation": true + } + ] +} diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Abacus/CSS.sublime-settings b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Abacus/CSS.sublime-settings new file mode 100644 index 0000000..dbb14e7 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Abacus/CSS.sublime-settings @@ -0,0 +1,10 @@ +{ + "com.khiltd.abacus.separators": + [ + { + "token": ":", + "gravity": "left", + "preserve_indentation": false + } + ] +} \ No newline at end of file diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Abacus/Default (Linux).sublime-keymap b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Abacus/Default (Linux).sublime-keymap new file mode 100644 index 0000000..34bd3cb --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Abacus/Default (Linux).sublime-keymap @@ -0,0 +1,6 @@ +[ + { + "keys": ["ctrl+alt+]"], "command": "abacus" + } +] + diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Abacus/Default (OSX).sublime-keymap b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Abacus/Default (OSX).sublime-keymap new file mode 100644 index 0000000..5a36030 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Abacus/Default (OSX).sublime-keymap @@ -0,0 +1,6 @@ +[ + { + "keys": ["super+ctrl+alt+]"], "command": "abacus" + } +] + diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Abacus/Default (Windows).sublime-keymap b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Abacus/Default (Windows).sublime-keymap new file mode 100644 index 0000000..34bd3cb --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Abacus/Default (Windows).sublime-keymap @@ -0,0 +1,6 @@ +[ + { + "keys": ["ctrl+alt+]"], "command": "abacus" + } +] + diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Abacus/Default.sublime-commands b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Abacus/Default.sublime-commands new file mode 100644 index 0000000..2737802 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Abacus/Default.sublime-commands @@ -0,0 +1,6 @@ +[ + { + "caption": "Abacus: align selection", + "command": "abacus" + } +] \ No newline at end of file diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Abacus/Main.sublime-menu b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Abacus/Main.sublime-menu new file mode 100644 index 0000000..98f7058 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Abacus/Main.sublime-menu @@ -0,0 +1,97 @@ +[ + { + "id": "selection", + "children": + [ + { "id": "abacus" }, + { + "command": "abacus", + "caption": "Abacus Align" + } + ] + }, + { + "caption": "Preferences", + "mnemonic": "n", + "id": "preferences", + "children": + [ + { + "caption": "Package Settings", + "mnemonic": "P", + "id": "package-settings", + "children": + [ + { + "caption": "Abacus", + "children": + [ + { + "command": "open_file", + "args": { "file": "${packages}/Abacus/Abacus.sublime-settings" }, + "caption": "Settings - Default" + }, + { + "command": "open_file", + "args": { "file": "${packages}/User/Abacus.sublime-settings" }, + "caption": "Settings - User" + }, + { + "command": "open_file_settings", + "caption": "Settings - Syntax Specific - User" + }, + { + "command": "open_file", + "args": { + "file": "${packages}/Abacus/Default (Windows).sublime-keymap", + "platform": "Windows" + }, + "caption": "Key Bindings – Default" + }, + { + "command": "open_file", + "args": { + "file": "${packages}/Abacus/Default (OSX).sublime-keymap", + "platform": "OSX" + }, + "caption": "Key Bindings – Default" + }, + { + "command": "open_file", + "args": { + "file": "${packages}/Abacus/Default (Linux).sublime-keymap", + "platform": "Linux" + }, + "caption": "Key Bindings – Default" + }, + { + "command": "open_file", + "args": { + "file": "${packages}/User/Default (Windows).sublime-keymap", + "platform": "Windows" + }, + "caption": "Key Bindings – User" + }, + { + "command": "open_file", + "args": { + "file": "${packages}/User/Default (OSX).sublime-keymap", + "platform": "OSX" + }, + "caption": "Key Bindings – User" + }, + { + "command": "open_file", + "args": { + "file": "${packages}/User/Default (Linux).sublime-keymap", + "platform": "Linux" + }, + "caption": "Key Bindings – User" + } + ] + } + ] + } + ] + } +] \ No newline at end of file diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Abacus/README.md b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Abacus/README.md new file mode 100644 index 0000000..a1f9bfc --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Abacus/README.md @@ -0,0 +1,59 @@ +Abacus Alignment Plugin for Sublime Text 2 +================ + +![This work?](http://dl.dropbox.com/u/5514249/Abacus.gif) + +I'm pretty anal about aligning things in my code, but the alignment plugins I tried were more-or-less one-trick-ponies, and I didn't like any of their tricks, so I made my own. + +My one anal pony trick involves allowing you to slide the operator like an abacus bead, toward either the left or the right hand side, by giving each possible token a `gravity` property like so: + +``` json +{ + "com.khiltd.abacus.separators": + [ + { + "token": ":", + "gravity": "left", + "preserve_indentation": true + }, + { + "token": "=", + "gravity": "right", + "preserve_indentation": true + } + ] +} +``` + +Abacus focuses on aligning assignments in as language-agnostic a manner as possible and strives to address most of the open issues in that other, more popular plugin (it won't even jack up your Backbone routes!). It is, however, an *alignment* tool and *not* a full-blown beautifier. It works best when there's one assignment per line; if you like shoving dozens of CSS or JSON declarations on a single line then you are an enemy of readability and this plugin will make every effort to hinder and harm your creature on Earth as far as it is able. + +`preserve_indentation` is a tip that you might be working in a language where whitespace is significant, thereby suggesting that Abacus should make no effort to normalize indentation across lines. It's not foolproof, especially if you set your tab width really, really low, but it tries harder than Cory Doctorow ever has. OK, you're right... It would be impossible for anyone to try harder than that. + +Usage +============ + +Make a selection, then `command + option + control + ]`. + +Think the plugin's crazy? Add the following to your config: + +``` +"com.khiltd.abacus.debug": true +``` + +and Abacus will dump its thoughts out to Sublime Text's console like so: + +``` + margin:0; + ^ + padding:0; + ^ + border-style:none; + ^ +``` + +Caveats +============ + +I've used nothing but Macs since 1984 and do absolutely **no** testing in Windows or Ububian's window manager of the minute. If something's broken in some OS I don't own, you'll need to have a suggestion as to how it can be fixed as I'm unlikely to have any idea what you're talking about. + +I don't care if you like real tabs or Windows line endings and don't bother with handling them. Seriously, what year is this? diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Abacus/Ruby.sublime-settings b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Abacus/Ruby.sublime-settings new file mode 100644 index 0000000..60f1a00 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Abacus/Ruby.sublime-settings @@ -0,0 +1,10 @@ +{ + "com.khiltd.abacus.separators": + [ + { + "token": "=>", + "gravity": "right", + "preserve_indentation": true + } + ] +} \ No newline at end of file diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Abacus/package-metadata.json b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Abacus/package-metadata.json new file mode 100644 index 0000000..e7f9187 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Abacus/package-metadata.json @@ -0,0 +1 @@ +{"url": "https://github.com/khiltd/Abacus", "version": "2013.01.11.00.24.46", "description": "An Alignment Plugin for Sublime Text 2 that actually works `\u2318\u2325^ ]`"} \ No newline at end of file diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Block Cursor Everywhere/.gitignore b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Block Cursor Everywhere/.gitignore new file mode 100644 index 0000000..47748ac --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Block Cursor Everywhere/.gitignore @@ -0,0 +1,5 @@ +*.pyc +*.cache +*.sublime-project +.DS_store +.c9revisions \ No newline at end of file diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Block Cursor Everywhere/README.md b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Block Cursor Everywhere/README.md new file mode 100644 index 0000000..2575d03 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Block Cursor Everywhere/README.md @@ -0,0 +1,48 @@ +# BlockCursorEverywhere # + +![Screenshot](http://f.cl.ly/items/42131K2X1h0j0P2m1O2B/Screen%20Shot%202011-12-02%20at%202.36.54%20AM.png) + +It can become very difficult to keep track of your cursor location. This is solved by having a "block" cursor, which is very easy to spot no matter where it is on screen. Unfortunately, Sublime Text 2 does not (yet) support this feature natively. This Plugin mimics this functionality by highlighting the area behind the cursor whenever it moves (similar to how you might highlight syntax errors, or color a comment). + +## Installation ## + +### With Package Control ### + +If you have the [Package Control][package_control] installed, you can install BlockCursorEverywhere from inside Sublime Text itself. Open the Command Palette and select "Package Control: Install Package", then search for BlockCursorEverywhere and you’re done! + +### Without Package Control ### + +Go to your Sublime Text 2 Packages directory: + + Windows: %USERPROFILE%\AppData\Roaming\Sublime Text 2\Packages\ + Mac: ~/Library/Application Support/Sublime Text 2/Packages/ + +and clone the repository there + + git clone git://github.com/ingshtrom/BlockCursorEverywhere + + +## Configuration ## + +These are the settings that I prefer. You can change the style of the block cursor by adding a section to your theme file like so: + +```xml + + name + Block Cursor + scope + block_cursor + settings + + foreground + #000000 + background + #FF1111 + + +``` + +--------- + +[sublime]: http://www.sublimetext.com/2 +[package_control]: http://wbond.net/sublime_packages/package_control diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Block Cursor Everywhere/SublimeBlockCursor.py b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Block Cursor Everywhere/SublimeBlockCursor.py new file mode 100644 index 0000000..0336494 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Block Cursor Everywhere/SublimeBlockCursor.py @@ -0,0 +1,38 @@ +import sublime +import sublime_plugin + + +class BlockCursorEverywhere(sublime_plugin.EventListener): + def view_is_widget(self, view): + settings = view.settings() + return bool(settings.get('is_widget')) + + def show_block_cursor(self, view): + validRegions = [] + for s in view.sel(): + if s.a != s.b: + continue + validRegions.append(sublime.Region(s.a, s.a + 1)) + if validRegions.__len__: + view.add_regions('BlockCursorListener', validRegions, 'block_cursor') + else: + view.erase_regions('BlockCursorListener') + + def on_selection_modified(self, view): + if view.settings().get('is_widget') or not("Vintage" in view.settings().get('ignored_packages') or view.settings().get('command_mode')): + view.erase_regions('BlockCursorListener') + return + self.show_block_cursor(view) + + def on_deactivated(self, view): + view.erase_regions('BlockCursorListener') + view.settings().clear_on_change('command_mode') + self.current_view = None + + def on_activated(self, view): + self.on_selection_modified(view) + view.settings().add_on_change('command_mode', self.on_command_mode_change) + self.current_view = view + + def on_command_mode_change(self): + self.on_selection_modified(self.current_view) diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Block Cursor Everywhere/package-metadata.json b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Block Cursor Everywhere/package-metadata.json new file mode 100644 index 0000000..d22c40a --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Block Cursor Everywhere/package-metadata.json @@ -0,0 +1 @@ +{"url": "https://github.com/ingshtrom/BlockCursorEverywhere", "version": "2013.01.20.10.51.30", "description": "Sublime Text 2 plugin to mimic a block cursor in Vintage command mode."} \ No newline at end of file diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/.gitignore b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/.gitignore new file mode 100644 index 0000000..043d1e9 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/.gitignore @@ -0,0 +1,3 @@ +*.pyc + +.DS_Store diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/CHANGELOG.md b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/CHANGELOG.md new file mode 100644 index 0000000..94f2f51 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/CHANGELOG.md @@ -0,0 +1,68 @@ +# Version 1.9.0 +- Add experimental CFML support (defaulted off) +- Add auto-detection of self-closing tags (defaulted on) + +# Version 1.8.0 +- Add new commands: "Show Bracket String Escape Mode" and "Toggle Bracket String Escape Mode". Default is "regex" + +# Version 1.7.2 +- Feed general bracket type to bracket plugins +- Adjust bracket select plugin to better handle HTML tags + +# Version 1.7.1 +- Reorganize some settings +- Limit auto-highlight selections by configurable threshold setting + +# Version 1.7.0 +- Hide parent quote highlighting when child quotes are highlighted +- Allow the searching for brackets in non-quoted code scoped as strings (like regex) +- Add setting "highlight_string_brackets_only" which allows never highlighting quotes but leaves internal string bracket highlighting on +- deprecate "enable_forward_slash_regex_strings" in favor of "find_brackets_in any_strings" + +# Version 1.6.2 +- Fix adjacent_only with multi_select + +# Version 1.6.1 +- Suppress string highlighting when adjacent_only is set, but allow internal string brackets to still get highlighted with adjacent_only settings if match_string_brackets is true + +# Version 1.6.0 +- Add setting to match only when cursor is between brackets + +# Version 1.5.3 +- Allow turning off gutter icons for multi-select via settings +- Fix multi-select detection +- Default the internal settings if setting is not found + +# Version 1.5.2 +- Use tiny icons when line height is less than 16 +- Use no icon if icon cannot be found +- Optimize png icons + +# Version 1.5.1 +- Ignore selection/edit events inside the main routine + +# Version 1.5.0 +- More responsive highlighting (thanks tito); delay setting no longer needed +- Organize bracket plugins +- Included more configurable custom gutter icons + +# Version 1.4.1 +- Make adjusment to regex modifier code to correctly count back modifiers in perl + +# Version 1.4.0 +- Account for perl regex, substitutions, and translations surrounded by "/" for string bracket matching +- Account for regex modifiers when matching regex surrounded by "/" in javascript and perl + +# Version 1.3.0 +- Fixed escaped brackets in string handling. Also a bit more efficient. + +# Version 1.2.0 +- Fix angle bracket avoidance when finding brackets inside strings, and make it cleaner + +# Version 1.1.0 +- Add python raw string support for quote highlighting +- Add highlighting of brackets in strings; will work in all strings, but mainly meant for regex. True by default +- Add support for targetting regex strings like in javascript that are scoped as strings, but are not quoted, but use '/'s. True by default + +# Version 1.0.0 +- All previous work and releases diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/Default.sublime-commands b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/Default.sublime-commands new file mode 100644 index 0000000..b9bdfc7 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/Default.sublime-commands @@ -0,0 +1,152 @@ +[ + // Toggle Global Enable + { + "caption": "BracketHighlighter: Toggle Global Enable", + "command": "bh_toggle_enable" + }, + // Search to end of file for bracket + { + "caption": "BracketHighlighter: Match Brackets (ignore threshold)", + "command": "bh_key", + "args": {"lines" : true} + }, + // Remove brackets + { + "caption": "BracketHighlighter: Remove Brackets", + "command": "bh_remove_brackets" + }, + // Go to left bracket + { + "caption": "BracketHighlighter: Jump to Left Bracket", + "command": "bh_key", + "args": + { + "lines" : true, + "plugin": + { + "type": ["__all__"], + "command": "bh_modules.bracketselect", + "args": {"select": "left"} + } + } + }, + // Go to right bracket + { + "caption": "BracketHighlighter: Jump to Right Bracket", + "command": "bh_key", + "args": + { + "lines" : true, + "plugin": + { + "type": ["__all__"], + "command": "bh_modules.bracketselect", + "args": {"select": "right"} + } + } + }, + // Select text between brackets + { + "caption": "BracketHighlighter: Select Bracket Content", + "command": "bh_key", + "args": + { + "lines" : true, + "plugin": + { + "type": ["__all__"], + "command": "bh_modules.bracketselect" + } + } + }, + // Fold contents between brackets + { + "caption": "BracketHighlighter: Fold Bracket Content", + "command": "bh_key", + "args": + { + "plugin": { + "type": ["__all__"], + "command" : "bh_modules.foldbracket" + } + } + }, + { "caption": "-" }, + // Toggle between string and regex escape mode for string brackets + { + "caption": "BracketHighlighter: Toggle String Bracket Escape Mode", + "command": "bh_toggle_string_escape_mode" + }, + // Toggle high visibility mode + { + "caption": "BracketHighlighter: Toggle High Visibility Mode", + "command": "bh_toggle_high_visibility" + }, + { "caption": "-" }, + // Select tag name of HTML/XML tag (both opening name and closing) + { + "caption": "BracketHighlighter: Select Tag Name (closing and opening)", + "command": "bh_key", + "args": + { + "plugin": + { + "type": ["cfml", "html", "angle"], + "command": "bh_modules.tagnameselect" + } + } + }, + // Select the attribute to the right of the cursor (will wrap inside the tag) + { + "caption": "BracketHighlighter: Select Next Attribute (right)", + "command": "bh_key", + "args": + { + "plugin": + { + "type": ["cfml", "html", "angle"], + "command": "bh_modules.tagattrselect", + "args": {"direction": "right"} + } + } + }, + // Select the attribute to the left of the cursor (will wrap inside the tag) + { + "caption": "BracketHighlighter: Select Next Attribute (left)", + "command": "bh_key", + "args": + { + "plugin": + { + "type": ["cfml", "html", "angle"], + "command": "bh_modules.tagattrselect", + "args": {"direction": "left"} + } + } + }, + // Convert single quote string to double quoted string and vice versa + // Will handle escaping or unescaping quotes within the string + { + "caption": "BracketHighlighter: Swap Quotes", + "command": "bh_key", + "args": + { + "lines" : true, + "plugin": + { + "type": ["single_quote", "double_quote", "py_single_quote", "py_double_quote"], + "command": "bh_modules.swapquotes" + } + } + }, + // Swap Brackets + { + "caption": "BracketHighlighter: Swap Brackets", + "command": "swap_brackets" + }, + // Surround selection with brackets from quick panel + { + "caption": "BracketHighlighter: Wrap Selections with Brackets", + "command": "wrap_brackets" + } +] diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/Default.sublime-keymap b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/Default.sublime-keymap new file mode 100644 index 0000000..5421945 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/Default.sublime-keymap @@ -0,0 +1,16 @@ +[ + // Navigate tabstops in wrapped selection + { + "keys": ["tab"], + "command": "bh_next_wrap_sel", + "context": + [ + { + "operand": true, + "operator": "equal", + "match_all": true, + "key": "bh_wrapping" + } + ] + } +] diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/Example.sublime-keymap b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/Example.sublime-keymap new file mode 100644 index 0000000..ef99e15 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/Example.sublime-keymap @@ -0,0 +1,153 @@ +[ + // Toggle Global Enable + { + "keys": ["ctrl+alt+super+e"], + "command": "bh_toggle_enable" + }, + // Search to end of file for bracket + { + "keys": ["ctrl+alt+super+b"], + "command": "bh_key", + "args": + { + "lines" : true + } + }, + // Go to left bracket + { + "keys": ["ctrl+alt+super+up"], + "command": "bh_key", + "args": + { + "lines" : true, + "plugin": + { + "type": ["__all__"], + "command": "bh_modules.bracketselect", + "args": {"select": "left"} + } + } + }, + // Go to right bracket + { + "keys": ["ctrl+alt+super+down"], + "command": "bh_key", + "args": + { + "lines" : true, + "plugin": + { + "type": ["__all__"], + "command": "bh_modules.bracketselect", + "args": {"select": "right"} + } + } + }, + // Remove brackets + { + "keys": ["ctrl+alt+super+r"], + "command": "bh_remove_brackets" + }, + // Toggle string escape mode for sub bracket search in strings + { + "keys": ["ctrl+alt+super+x"], + "command": "bh_toggle_string_escape_mode" + }, + // Select text between brackets + { + "keys": ["ctrl+alt+super+s"], + "command": "bh_key", + "args": + { + "lines" : true, + "plugin": + { + "type": ["__all__"], + "command": "bh_modules.bracketselect" + } + } + }, + // Select tag name of HTML/XML tag (both opening name and closing) + { + "keys": ["ctrl+alt+super+t"], + "command": "bh_key", + "args": + { + "plugin": + { + "type": ["cfml", "html", "angle"], + "command": "bh_modules.tagnameselect" + } + } + }, + // Select the attribute to the right of the cursor (will wrap inside the tag) + { + "keys": ["ctrl+alt+super+right"], + "command": "bh_key", + "args": + { + "plugin": + { + "type": ["cfml", "html", "angle"], + "command": "bh_modules.tagattrselect", + "args": {"direction": "right"} + } + } + }, + // Select the attribute to the left of the cursor (will wrap inside the tag) + { + "keys": ["ctrl+alt+super+left"], + "command": "bh_key", + "args": + { + "plugin": + { + "type": ["cfml", "html", "angle"], + "command": "bh_modules.tagattrselect", + "args": {"direction": "left"} + } + } + }, + // Convert single quote string to double quoted string and vice versa + // Will handle escaping or unescaping quotes within the string + { + "keys": ["ctrl+alt+super+q"], + "command": "bh_key", + "args": + { + "lines" : true, + "plugin": + { + "type": ["single_quote", "double_quote", "py_single_quote", "py_double_quote"], + "command": "bh_modules.swapquotes" + } + } + }, + // Fold contents between brackets + { + "keys": ["ctrl+alt+super+["], + "command": "bh_key", + "args": + { + "plugin": { + "type": ["__all__"], + "command" : "bh_modules.foldbracket" + } + } + }, + // Swap brackets with another type + { + "keys": ["ctrl+alt+super+e"], + "command": "swap_brackets" + }, + // Surround selection with brackets from quick panel + { + "keys": ["ctrl+alt+super+w"], + "command": "wrap_brackets" + }, + // Toggle high visibility mode + { + "keys": ["ctrl+alt+super+v"], + "command": "bh_toggle_high_visibility" + } +] diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/Main.sublime-menu b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/Main.sublime-menu new file mode 100644 index 0000000..1c2a3b8 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/Main.sublime-menu @@ -0,0 +1,260 @@ +[ + { + "id": "tools", + "caption": "Tools", + "children": + [ + { + "id": "packages", + "caption": "Packages", + "children": + [ + { + "id": "brackethighlighter", + "caption": "BracketHighlighter", + "children": + [ + // Toggle Global Enable + { + "caption": "BracketHighlighter: Toggle Global Enable", + "command": "bh_toggle_enable" + }, + { "caption": "-" }, + // Search to end of file for bracket + { + "caption": "Match Brackets (ignore threshold)", + "command": "bh_key", + "args": {"lines" : true} + }, + // Remove brackets + { + "caption": "Remove Brackets", + "command": "bh_remove_brackets" + }, + // Go to left bracket + { + "caption": "Jump to Left Bracket", + "command": "bh_key", + "args": + { + "lines" : true, + "plugin": + { + "type": ["__all__"], + "command": "bh_modules.bracketselect", + "args": {"select": "left"} + } + } + }, + // Go to right bracket + { + "caption": "Jump to Right Bracket", + "command": "bh_key", + "args": + { + "lines" : true, + "plugin": + { + "type": ["__all__"], + "command": "bh_modules.bracketselect", + "args": {"select": "right"} + } + } + }, + // Select text between brackets + { + "caption": "Select Bracket Content", + "command": "bh_key", + "args": + { + "lines" : true, + "plugin": + { + "type": ["__all__"], + "command": "bh_modules.bracketselect" + } + } + }, + // Fold contents between brackets + { + "caption": "Fold Bracket Content", + "command": "bh_key", + "args": + { + "plugin": { + "type": ["__all__"], + "command" : "bh_modules.foldbracket" + } + } + }, + { "caption": "-" }, + // Toggle between string and regex escape mode for string brackets + { + "caption": "Toggle String Bracket Escape Mode", + "command": "bh_toggle_string_escape_mode" + }, + // Toggle high visibility mode + { + "caption": "Toggle High Visibility Mode", + "command": "bh_toggle_high_visibility" + }, + { "caption": "-" }, + // Select tag name of HTML/XML tag (both opening name and closing) + { + "caption": "Select Tag Name (closing and opening)", + "command": "bh_key", + "args": + { + "plugin": + { + "type": ["cfml", "html", "angle"], + "command": "bh_modules.tagnameselect" + } + } + }, + // Select the attribute to the right of the cursor (will wrap inside the tag) + { + "caption": "Select Next Attribute (right)", + "command": "bh_key", + "args": + { + "plugin": + { + "type": ["cfml", "html", "angle"], + "command": "bh_modules.tagattrselect", + "args": {"direction": "right"} + } + } + }, + // Select the attribute to the left of the cursor (will wrap inside the tag) + { + "caption": "Select Next Attribute (left)", + "command": "bh_key", + "args": + { + "plugin": + { + "type": ["cfml", "html", "angle"], + "command": "bh_modules.tagattrselect", + "args": {"direction": "left"} + } + } + }, + { "caption": "-" }, + // Convert single quote string to double quoted string and vice versa + // Will handle escaping or unescaping quotes within the string + { + "caption": "Swap Quotes", + "command": "bh_key", + "args": + { + "lines" : true, + "plugin": + { + "type": ["single_quote", "double_quote", "py_single_quote", "py_double_quote"], + "command": "bh_modules.swapquotes" + } + } + }, + // Swap brackets + { + "caption": "Swap Brackets", + "command": "swap_brackets" + }, + // Surround selection with brackets from quick panel + { + "caption": "Wrap Selections with Brackets", + "command": "wrap_brackets" + } + ] + } + ] + } + ] + }, + { + "caption": "Preferences", + "mnemonic": "n", + "id": "preferences", + "children": + [ + { + "caption": "Package Settings", + "mnemonic": "P", + "id": "package-settings", + "children": + [ + { + "caption": "Bracket Highlighter", + "children": + [ + { + "command": "open_file", + "args": {"file": "${packages}/BracketHighlighter/bh_core.sublime-settings"}, + "caption": "Bracket Settings – Default" + }, + { + "command": "open_file", + "args": {"file": "${packages}/User/bh_core.sublime-settings"}, + "caption": "Bracket Settings – User" + }, + { "caption": "-" }, + { + "command": "open_file", + "args": {"file": "${packages}/BracketHighlighter/bh_wrapping.sublime-settings"}, + "caption": "Wrap Settings – Default" + }, + { + "command": "open_file", + "args": {"file": "${packages}/User/bh_wrapping.sublime-settings"}, + "caption": "Wrap Settings – User" + }, + { "caption": "-" }, + { + "command": "open_file", + "args": {"file": "${packages}/BracketHighlighter/bh_swapping.sublime-settings"}, + "caption": "Swap Settings – Default" + }, + { + "command": "open_file", + "args": {"file": "${packages}/User/bh_swapping.sublime-settings"}, + "caption": "Swap Settings – User" + }, + { "caption": "-" }, + { + "command": "open_file", + "args": {"file": "${packages}/BracketHighlighter/Example.sublime-keymap"}, + "caption": "Example Key Bindings" + }, + { + "command": "open_file", + "args": { + "file": "${packages}/User/Default (Windows).sublime-keymap", + "platform": "Windows" + }, + "caption": "Key Bindings – User" + }, + { + "command": "open_file", + "args": { + "file": "${packages}/User/Default (OSX).sublime-keymap", + "platform": "OSX" + }, + "caption": "Key Bindings – User" + }, + { + "command": "open_file", + "args": { + "file": "${packages}/User/Default (Linux).sublime-keymap", + "platform": "Linux" + }, + "caption": "Key Bindings – User" + }, + { "caption": "-" } + ] + } + ] + } + ] + } +] diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/bh_core.py b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/bh_core.py new file mode 100644 index 0000000..8e644b6 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/bh_core.py @@ -0,0 +1,1405 @@ +from os.path import basename, exists, join, normpath +import sublime +import sublime_plugin +from time import time, sleep +import thread +import re +from bh_plugin import BracketPlugin, BracketRegion, ImportModule +from collections import namedtuple +import traceback + +BH_MATCH_TYPE_NONE = 0 +BH_MATCH_TYPE_SELECTION = 1 +BH_MATCH_TYPE_EDIT = 2 +DEFAULT_STYLES = { + "default": { + "icon": "dot", + "color": "brackethighlighter.default", + "style": "underline" + }, + "unmatched": { + "icon": "question", + "color": "brackethighlighter.unmatched", + "style": "outline" + } +} +HV_RSVD_VALUES = ["__default__", "__bracket__"] + +HIGH_VISIBILITY = False + +GLOBAL_ENABLE = True + + +def bh_logging(msg): + print("BracketHighlighter: %s" % msg) + + +def bh_debug(msg): + if sublime.load_settings("bh_core.sublime-settings").get('debug_enable', False): + bh_logging(msg) + + +def underline(regions): + """ + Convert sublime regions into underline regions + """ + + r = [] + for region in regions: + start = region.begin() + end = region.end() + while start < end: + r.append(sublime.Region(start)) + start += 1 + return r + + +def load_modules(obj, loaded): + """ + Load bracket plugin modules + """ + + plib = obj.get("plugin_library") + if plib is None: + return + + try: + module = ImportModule.import_module(plib, loaded) + obj["compare"] = getattr(module, "compare", None) + obj["post_match"] = getattr(module, "post_match", None) + loaded.add(plib) + except: + bh_logging("Could not load module %s\n%s" % (plib, str(traceback.format_exc()))) + raise + + +def select_bracket_style(option): + """ + Configure style of region based on option + """ + + style = sublime.HIDE_ON_MINIMAP + if option == "outline": + style |= sublime.DRAW_OUTLINED + elif option == "none": + style |= sublime.HIDDEN + elif option == "underline": + style |= sublime.DRAW_EMPTY_AS_OVERWRITE + return style + + +def select_bracket_icons(option, icon_path): + """ + Configure custom gutter icons if they can be located. + """ + + icon = "" + small_icon = "" + open_icon = "" + small_open_icon = "" + close_icon = "" + small_close_icon = "" + # Icon exist? + if not option == "none" and not option == "": + if exists(normpath(join(sublime.packages_path(), icon_path, option + ".png"))): + icon = "../%s/%s" % (icon_path, option) + if exists(normpath(join(sublime.packages_path(), icon_path, option + "_small.png"))): + small_icon = "../%s/%s" % (icon_path, option + "_small") + if exists(normpath(join(sublime.packages_path(), icon_path, option + "_open.png"))): + open_icon = "../%s/%s" % (icon_path, option + "_open") + else: + open_icon = icon + if exists(normpath(join(sublime.packages_path(), icon_path, option + "_open_small.png"))): + small_open_icon = "../%s/%s" % (icon_path, option + "_open_small") + else: + small_open_icon = small_icon + if exists(normpath(join(sublime.packages_path(), icon_path, option + "_close.png"))): + close_icon = "../%s/%s" % (icon_path, option + "_close") + else: + close_icon = icon + if exists(normpath(join(sublime.packages_path(), icon_path, option + "_close_small.png"))): + small_close_icon = "../%s/%s" % (icon_path, option + "_close_small") + else: + small_close_icon = small_icon + + return icon, small_icon, open_icon, small_open_icon, close_icon, small_close_icon + + +def exclude_bracket(enabled, filter_type, language_list, language): + """ + Exclude or include brackets based on filter lists. + """ + + exclude = True + if enabled: + # Black list languages + if filter_type == 'blacklist': + exclude = False + if language != None: + for item in language_list: + if language == item.lower(): + exclude = True + break + #White list languages + elif filter_type == 'whitelist': + if language != None: + for item in language_list: + if language == item.lower(): + exclude = False + break + return exclude + + +class BhEventMgr(object): + """ + Object to manage when bracket events should be launched. + """ + + @classmethod + def load(cls): + """ + Initialize variables for determining + when to initiate a bracket matching event. + """ + + cls.wait_time = 0.12 + cls.time = time() + cls.modified = False + cls.type = BH_MATCH_TYPE_SELECTION + cls.ignore_all = False + +BhEventMgr.load() + + +class BhThreadMgr(object): + """ + Object to help track when a new thread needs to be started. + """ + + restart = False + + +class BhEntry(object): + """ + Generic object for bracket regions. + """ + + def move(self, begin, end): + """ + Create a new object with the points moved to the specified locations. + """ + + return self._replace(begin=begin, end=end) + + def size(self): + """ + Size of bracket selection. + """ + + return abs(self.begin - self.end) + + def toregion(self): + """ + Convert to sublime Region. + """ + + return sublime.Region(self.begin, self.end) + + +class BracketEntry(namedtuple('BracketEntry', ['begin', 'end', 'type'], verbose=False), BhEntry): + """ + Bracket object. + """ + + pass + + +class ScopeEntry(namedtuple('ScopeEntry', ['begin', 'end', 'scope', 'type'], verbose=False), BhEntry): + """ + Scope bracket object. + """ + + pass + + +class BracketSearchSide(object): + """ + Userful structure to specify bracket matching direction. + """ + + left = 0 + right = 1 + + +class BracektSearchType(object): + """ + Userful structure to specify bracket matching direction. + """ + + opening = 0 + closing = 1 + + +class BracketSearch(object): + """ + Object that performs regex search on the view's buffer and finds brackets. + """ + + def __init__(self, bfr, window, center, pattern, scope_check, scope): + """ + Prepare the search object + """ + + self.center = center + self.pattern = pattern + self.bfr = bfr + self.scope = scope + self.scope_check = scope_check + self.prev_match = [None, None] + self.return_prev = [False, False] + self.done = [False, False] + self.start = [None, None] + self.left = [[], []] + self.right = [[], []] + self.findall(window) + + def reset_end_state(self): + """ + Reset the the current search flags etc. + This is usually done before searching the other direction. + """ + + self.start = [None, None] + self.done = [False, False] + self.prev_match = [None, None] + self.return_prev = [False, False] + + def remember(self, match_type): + """ + Remember the current match. + Don't get the next bracket on the next + request, but return the current one again. + """ + + self.return_prev[match_type] = True + self.done[match_type] = False + + def findall(self, window): + """ + Find all of the brackets and sort them + to "left of the cursor" and "right of the cursor" + """ + + for m in self.pattern.finditer(self.bfr, window[0], window[1]): + g = m.lastindex + try: + start = m.start(g) + end = m.end(g) + except: + continue + + match_type = int(not bool(g % 2)) + bracket_id = (g / 2) - match_type + + if not self.scope_check(start, bracket_id, self.scope): + if (end <= self.center if match_type else start < self.center): + self.left[match_type].append(BracketEntry(start, end, bracket_id)) + elif (end > self.center if match_type else start >= self.center): + self.right[match_type].append(BracketEntry(start, end, bracket_id)) + + def get_open(self, bracket_code): + """ + Get opening bracket. Accepts a bracket code that + determines which side of the cursor the next match is returned from. + """ + + for b in self._get_bracket(bracket_code, BracektSearchType.opening): + yield b + + def get_close(self, bracket_code): + """ + Get closing bracket. Accepts a bracket code that + determines which side of the cursor the next match is returned from. + """ + + for b in self._get_bracket(bracket_code, BracektSearchType.closing): + yield b + + def is_done(self, match_type): + """ + Retrieve done flag. + """ + + return self.done[match_type] + + def _get_bracket(self, bracket_code, match_type): + """ + Get the next bracket. Accepts bracket code that determines + which side of the cursor the next match is returned from and + the match type which determines whether a opening or closing + bracket is desired. + """ + + if self.done[match_type]: + return + if self.return_prev[match_type]: + self.return_prev[match_type] = False + yield self.prev_match[match_type] + if bracket_code == BracketSearchSide.left: + if self.start[match_type] is None: + self.start[match_type] = len(self.left[match_type]) + for x in reversed(range(0, self.start[match_type])): + b = self.left[match_type][x] + self.prev_match[match_type] = b + self.start[match_type] -= 1 + yield b + else: + if self.start[match_type] is None: + self.start[match_type] = 0 + for x in range(self.start[match_type], len(self.right[match_type])): + b = self.right[match_type][x] + self.prev_match[match_type] = b + self.start[match_type] += 1 + yield b + + self.done[match_type] = True + + +class BracketDefinition(object): + """ + Normal bracket definition. + """ + + def __init__(self, bracket): + """ + Setup the bracket object by reading the passed in dictionary. + """ + + self.name = bracket["name"] + self.style = bracket.get("style", "default") + self.compare = bracket.get("compare") + sub_search = bracket.get("find_in_sub_search", "false") + self.find_in_sub_search_only = sub_search == "only" + self.find_in_sub_search = sub_search == "true" or self.find_in_sub_search_only + self.post_match = bracket.get("post_match") + self.scope_exclude_exceptions = bracket.get("scope_exclude_exceptions", []) + self.scope_exclude = bracket.get("scope_exclude", []) + self.ignore_string_escape = bracket.get("ignore_string_escape", False) + + +class ScopeDefinition(object): + """ + Scope bracket definition. + """ + + def __init__(self, bracket): + """ + Setup the bracket object by reading the passed in dictionary. + """ + + self.style = bracket.get("style", "default") + self.open = re.compile("\\A" + bracket.get("open", "."), re.MULTILINE | re.IGNORECASE) + self.close = re.compile(bracket.get("close", ".") + "\\Z", re.MULTILINE | re.IGNORECASE) + self.name = bracket["name"] + sub_search = bracket.get("sub_bracket_search", "false") + self.sub_search_only = sub_search == "only" + self.sub_search = self.sub_search_only == True or sub_search == "true" + self.compare = bracket.get("compare") + self.post_match = bracket.get("post_match") + self.scopes = bracket["scopes"] + + +class StyleDefinition(object): + """ + Styling definition. + """ + + def __init__(self, name, style, default_highlight, icon_path): + """ + Setup the style object by reading the + passed in dictionary. And other parameters. + """ + + self.name = name + self.selections = [] + self.open_selections = [] + self.close_selections = [] + self.center_selections = [] + self.color = style.get("color", default_highlight["color"]) + self.style = select_bracket_style(style.get("style", default_highlight["style"])) + self.underline = self.style & sublime.DRAW_EMPTY_AS_OVERWRITE + ( + self.icon, self.small_icon, self.open_icon, + self.small_open_icon, self.close_icon, self.small_close_icon + ) = select_bracket_icons(style.get("icon", default_highlight["icon"]), icon_path) + self.no_icon = "" + + +class BhToggleStringEscapeModeCommand(sublime_plugin.TextCommand): + """ + Toggle between regex escape and + string escape for brackets in strings. + """ + + def run(self, edit): + default_mode = sublime.load_settings("bh_core.sublime-settings").get('bracket_string_escape_mode', 'string') + if self.view.settings().get('bracket_string_escape_mode', default_mode) == "regex": + self.view.settings().set('bracket_string_escape_mode', "string") + sublime.status_message("Bracket String Escape Mode: string") + else: + self.view.settings().set('bracket_string_escape_mode', "regex") + sublime.status_message("Bracket String Escape Mode: regex") + + +class BhShowStringEscapeModeCommand(sublime_plugin.TextCommand): + """ + Shoe current string escape mode for sub brackets in strings. + """ + + def run(self, edit): + default_mode = sublime.load_settings("BracketHighlighter.sublime-settings").get('bracket_string_escape_mode', 'string') + sublime.status_message("Bracket String Escape Mode: %s" % self.view.settings().get('bracket_string_escape_mode', default_mode)) + + +class BhToggleHighVisibilityCommand(sublime_plugin.ApplicationCommand): + """ + Toggle a high visibility mode that + highlights the entire bracket extent. + """ + + def run(self): + global HIGH_VISIBILITY + HIGH_VISIBILITY = not HIGH_VISIBILITY + + +class BhToggleEnableCommand(sublime_plugin.ApplicationCommand): + """ + Toggle global enable for BracketHighlighter. + """ + + def run(self): + global GLOBAL_ENABLE + GLOBAL_ENABLE = not GLOBAL_ENABLE + + +class BhKeyCommand(sublime_plugin.WindowCommand): + """ + Command to process shortcuts, menu calls, and command palette calls. + This is how BhCore is called with different options. + """ + + def run(self, threshold=True, lines=False, adjacent=False, ignore={}, plugin={}): + # Override events + BhEventMgr.ignore_all = True + BhEventMgr.modified = False + self.bh = BhCore( + threshold, + lines, + adjacent, + ignore, + plugin, + True + ) + self.view = self.window.active_view() + sublime.set_timeout(self.execute, 100) + + def execute(self): + bh_debug("Key Event") + self.bh.match(self.view) + BhEventMgr.ignore_all = False + BhEventMgr.time = time() + + +class BhCore(object): + """ + Bracket matching class. + """ + plugin_reload = False + + def __init__(self, override_thresh=False, count_lines=False, adj_only=None, ignore={}, plugin={}, keycommand=False): + """ + Load settings and setup reload events if settings changes. + """ + + self.settings = sublime.load_settings("bh_core.sublime-settings") + self.keycommand = keycommand + if not keycommand: + self.settings.clear_on_change('reload') + self.settings.add_on_change('reload', self.setup) + self.setup(override_thresh, count_lines, adj_only, ignore, plugin) + + def setup(self, override_thresh=False, count_lines=False, adj_only=None, ignore={}, plugin={}): + """ + Initialize class settings from settings file and inputs. + """ + + # Init view params + self.last_id_view = None + self.last_id_sel = None + self.view_tracker = (None, None) + self.ignore_threshold = override_thresh + self.adj_only = adj_only if adj_only is not None else bool(self.settings.get("match_only_adjacent", False)) + self.auto_selection_threshold = int(self.settings.get("auto_selection_threshold", 10)) + self.no_multi_select_icons = bool(self.settings.get("no_multi_select_icons", False)) + self.count_lines = count_lines + self.default_string_escape_mode = str(self.settings.get('bracket_string_escape_mode', "string")) + self.show_unmatched = bool(self.settings.get("show_unmatched", True)) + + # Init bracket objects + self.bracket_types = self.settings.get("brackets", []) + self.scope_types = self.settings.get("scope_brackets", []) + + # Init selection params + self.use_selection_threshold = True + self.selection_threshold = int(self.settings.get("search_threshold", 5000)) + self.new_select = False + self.loaded_modules = set([]) + + # High Visibility options + self.hv_style = select_bracket_style(self.settings.get("high_visibility_style", "outline")) + self.hv_underline = self.hv_style & sublime.DRAW_EMPTY_AS_OVERWRITE + self.hv_color = self.settings.get("high_visibility_color", HV_RSVD_VALUES[1]) + + # Init plugin + self.plugin = None + self.transform = set([]) + if 'command' in plugin: + self.plugin = BracketPlugin(plugin, self.loaded_modules) + self.new_select = True + if 'type' in plugin: + for t in plugin["type"]: + self.transform.add(t) + + def init_bracket_regions(self): + """ + Load up styled regions for brackets to use. + """ + + self.bracket_regions = {} + styles = self.settings.get("bracket_styles", DEFAULT_STYLES) + icon_path = self.settings.get("icon_path", "Theme - Default").replace('\\', '/').strip('/') + # Make sure default and unmatched styles in styles + for key, value in DEFAULT_STYLES.items(): + if key not in styles: + styles[key] = value + continue + for k, v in value.items(): + if k not in styles[key]: + styles[key][k] = v + # Initialize styles + default_settings = styles["default"] + for k, v in styles.items(): + self.bracket_regions[k] = StyleDefinition(k, v, default_settings, icon_path) + + def is_valid_definition(self, params, language): + """ + Ensure bracket definition should be and can be loaded. + """ + + return ( + not exclude_bracket( + params.get("enabled", True), + params.get("language_filter", "blacklist"), + params.get("language_list", []), + language + ) and + params["open"] is not None and params["close"] is not None + ) + + def init_brackets(self, language): + """ + Initialize bracket match definition objects from settings file. + """ + + self.find_regex = [] + self.sub_find_regex = [] + self.index_open = {} + self.index_close = {} + self.brackets = [] + self.scopes = [] + self.view_tracker = (language, self.view.id()) + self.enabled = False + self.sels = [] + self.multi_select = False + scopes = {} + loaded_modules = self.loaded_modules.copy() + + for params in self.bracket_types: + if self.is_valid_definition(params, language): + try: + load_modules(params, loaded_modules) + entry = BracketDefinition(params) + self.brackets.append(entry) + if not entry.find_in_sub_search_only: + self.find_regex.append(params["open"]) + self.find_regex.append(params["close"]) + else: + self.find_regex.append(r"([^\s\S])") + self.find_regex.append(r"([^\s\S])") + + if entry.find_in_sub_search: + self.sub_find_regex.append(params["open"]) + self.sub_find_regex.append(params["close"]) + else: + self.sub_find_regex.append(r"([^\s\S])") + self.sub_find_regex.append(r"([^\s\S])") + except Exception, e: + bh_logging(e) + + scope_count = 0 + for params in self.scope_types: + if self.is_valid_definition(params, language): + try: + load_modules(params, loaded_modules) + entry = ScopeDefinition(params) + for x in entry.scopes: + if x not in scopes: + scopes[x] = scope_count + scope_count += 1 + self.scopes.append({"name": x, "brackets": [entry]}) + else: + self.scopes[scopes[x]]["brackets"].append(entry) + except Exception, e: + bh_logging(e) + + if len(self.brackets): + bh_debug( + "Search patterns:\n" + + "(?:%s)\n" % '|'.join(self.find_regex) + + "(?:%s)" % '|'.join(self.sub_find_regex) + ) + self.sub_pattern = re.compile("(?:%s)" % '|'.join(self.sub_find_regex), re.MULTILINE | re.IGNORECASE) + self.pattern = re.compile("(?:%s)" % '|'.join(self.find_regex), re.MULTILINE | re.IGNORECASE) + self.enabled = True + + def init_match(self): + """ + Initialize matching for the current view's syntax. + """ + + self.chars = 0 + self.lines = 0 + syntax = self.view.settings().get('syntax') + language = basename(syntax).replace('.tmLanguage', '').lower() if syntax != None else "plain text" + + if language != self.view_tracker[0] or self.view.id() != self.view_tracker[1]: + self.init_bracket_regions() + self.init_brackets(language) + else: + for r in self.bracket_regions.values(): + r.selections = [] + r.open_selections = [] + r.close_selections = [] + r.center_selections = [] + + def unique(self): + """ + Check if the current selection(s) is different from the last. + """ + + id_view = self.view.id() + id_sel = "".join([str(sel.a) for sel in self.view.sel()]) + is_unique = False + if id_view != self.last_id_view or id_sel != self.last_id_sel: + self.last_id_view = id_view + self.last_id_sel = id_sel + is_unique = True + return is_unique + + def store_sel(self, regions): + """ + Store the current selection selection to be set at the end. + """ + + if self.new_select: + for region in regions: + self.sels.append(region) + + def change_sel(self): + """ + Change the view's selections. + """ + + if self.new_select and len(self.sels) > 0: + if self.multi_select == False: + self.view.show(self.sels[0]) + self.view.sel().clear() + map(lambda x: self.view.sel().add(x), self.sels) + + def hv_highlight_color(self, b_value): + """ + High visibility highlight decesions. + """ + + color = self.hv_color + if self.hv_color == HV_RSVD_VALUES[0]: + color = self.bracket_regions["default"].color + elif self.hv_color == HV_RSVD_VALUES[1]: + color = b_value + return color + + def highlight_regions(self, name, icon_type, selections, bracket, regions): + """ + Apply the highlightes for the highlight region. + """ + + if len(selections): + self.view.add_regions( + name, + getattr(bracket, selections), + self.hv_highlight_color(bracket.color) if HIGH_VISIBILITY else bracket.color, + getattr(bracket, icon_type), + self.hv_style if HIGH_VISIBILITY else bracket.style + ) + regions.append(name) + + def highlight(self, view): + """ + Highlight all bracket regions. + """ + + for region_key in self.view.settings().get("bh_regions", []): + self.view.erase_regions(region_key) + + regions = [] + icon_type = "no_icon" + open_icon_type = "no_icon" + close_icon_type = "no_icon" + if not self.no_multi_select_icons or not self.multi_select: + icon_type = "small_icon" if self.view.line_height() < 16 else "icon" + open_icon_type = "small_open_icon" if self.view.line_height() < 16 else "open_icon" + close_icon_type = "small_close_icon" if self.view.line_height() < 16 else "close_icon" + for name, r in self.bracket_regions.items(): + self.highlight_regions("bh_" + name, icon_type, "selections", r, regions) + self.highlight_regions("bh_" + name + "_center", "no_icon", "center_selections", r, regions) + self.highlight_regions("bh_" + name + "_open", open_icon_type, "open_selections", r, regions) + self.highlight_regions("bh_" + name + "_close", close_icon_type, "close_selections", r, regions) + # Track which regions were set in the view so that they can be cleaned up later. + self.view.settings().set("bh_regions", regions) + + def get_search_bfr(self, sel): + """ + Read in the view's buffer for scanning for brackets etc. + """ + + # Determine how much of the buffer to search + view_min = 0 + view_max = self.view.size() + if not self.ignore_threshold: + left_delta = sel.a - view_min + right_delta = view_max - sel.a + limit = self.selection_threshold / 2 + rpad = limit - left_delta if left_delta < limit else 0 + lpad = limit - right_delta if right_delta < limit else 0 + llimit = limit + lpad + rlimit = limit + rpad + self.search_window = ( + sel.a - llimit if left_delta >= llimit else view_min, + sel.a + rlimit if right_delta >= rlimit else view_max + ) + else: + self.search_window = (0, view_max) + + # Search Buffer + return self.view.substr(sublime.Region(0, view_max)) + + def match(self, view, force_match=True): + """ + Preform matching brackets surround the selection(s) + """ + + if view == None: + return + if not GLOBAL_ENABLE: + for region_key in view.settings().get("bh_regions", []): + view.erase_regions(region_key) + return + + if self.keycommand: + BhCore.plugin_reload = True + + if not self.keycommand and BhCore.plugin_reload: + self.setup() + BhCore.plugin_reload = False + + # Setup views + self.view = view + self.last_view = view + num_sels = len(view.sel()) + self.multi_select = (num_sels > 1) + + if self.unique() or force_match: + # Initialize + self.init_match() + + # Nothing to search for + if not self.enabled: + return + + # Abort if selections are beyond the threshold + if self.use_selection_threshold and num_sels >= self.selection_threshold: + self.highlight(view) + return + + multi_select_count = 0 + # Process selections. + for sel in view.sel(): + bfr = self.get_search_bfr(sel) + if not self.ignore_threshold and multi_select_count >= self.auto_selection_threshold: + self.store_sel([sel]) + multi_select_count += 1 + continue + if not self.find_scopes(bfr, sel): + self.sub_search_mode = False + self.find_matches(bfr, sel) + multi_select_count += 1 + + # Highlight, focus, and display lines etc. + self.change_sel() + self.highlight(view) + if self.count_lines: + sublime.status_message('In Block: Lines ' + str(self.lines) + ', Chars ' + str(self.chars)) + + def save_incomplete_regions(self, left, right, regions): + """ + Store single incomplete brackets for highlighting. + """ + + found = left if left is not None else right + bracket = self.bracket_regions["unmatched"] + if bracket.underline: + bracket.selections += underline((found.toregion(),)) + else: + bracket.selections += [found.toregion()] + self.store_sel(regions) + + def save_regions(self, left, right, regions): + """ + Saved matched regions. Perform any special considerations for region formatting. + """ + + bracket = self.bracket_regions.get(self.bracket_style, self.bracket_regions["default"]) + lines = abs(self.view.rowcol(right.begin)[0] - self.view.rowcol(left.end)[0] + 1) + if self.count_lines: + self.chars += abs(right.begin - left.end) + self.lines += lines + if HIGH_VISIBILITY: + if lines <= 1: + if self.hv_underline: + bracket.selections += underline((sublime.Region(left.begin, right.end),)) + else: + bracket.selections += [sublime.Region(left.begin, right.end)] + else: + bracket.open_selections += [sublime.Region(left.begin)] + if self.hv_underline: + bracket.center_selections += underline((sublime.Region(left.begin + 1, right.end - 1),)) + else: + bracket.center_selections += [sublime.Region(left.begin, right.end)] + bracket.close_selections += [sublime.Region(right.begin)] + elif bracket.underline: + if lines <= 1: + bracket.selections += underline((left.toregion(), right.toregion())) + else: + bracket.open_selections += [sublime.Region(left.begin)] + bracket.close_selections += [sublime.Region(right.begin)] + if left.size(): + bracket.center_selections += underline((sublime.Region(left.begin + 1, left.end),)) + if right.size(): + bracket.center_selections += underline((sublime.Region(right.begin + 1, right.end),)) + else: + if lines <= 1: + bracket.selections += [left.toregion(), right.toregion()] + else: + bracket.open_selections += [left.toregion()] + bracket.close_selections += [right.toregion()] + self.store_sel(regions) + + def sub_search(self, sel, search_window, bfr, scope=None): + """ + Search a scope bracket match for bracekts within. + """ + + bracket = None + left, right = self.match_brackets(bfr, search_window, sel, scope) + + regions = [sublime.Region(sel.a, sel.b)] + + if left is not None and right is not None: + bracket = self.brackets[left.type] + left, right, regions = self.run_plugin(bracket.name, left, right, regions) + + # Matched brackets + if left is not None and right is not None and bracket is not None: + self.save_regions(left, right, regions) + return True + return False + + def find_scopes(self, bfr, sel): + """ + Find brackets by scope definition. + """ + + # Search buffer + left, right, bracket, sub_matched = self.match_scope_brackets(bfr, sel) + if sub_matched: + return True + regions = [sublime.Region(sel.a, sel.b)] + + if left is not None and right is not None: + left, right, regions = self.run_plugin(bracket.name, left, right, regions) + if left is None and right is None: + self.store_sel(regions) + return True + + if left is not None and right is not None: + self.save_regions(left, right, regions) + return True + elif (left is not None or right is not None) and self.show_invalid: + self.save_incomplete_regions(left, right, regions) + return True + return False + + def find_matches(self, bfr, sel): + """ + Find bracket matches + """ + + bracket = None + left, right = self.match_brackets(bfr, self.search_window, sel) + + regions = [sublime.Region(sel.a, sel.b)] + + if left is not None and right is not None: + bracket = self.brackets[left.type] + left, right, regions = self.run_plugin(bracket.name, left, right, regions) + + # Matched brackets + if left is not None and right is not None and bracket is not None: + self.save_regions(left, right, regions) + + # Unmatched brackets + elif (left is not None or right is not None) and self.show_unmatched: + self.save_incomplete_regions(left, right, regions) + + else: + self.store_sel(regions) + + def escaped(self, pt, ignore_string_escape, scope): + """ + Check if sub bracket in string scope is escaped. + """ + + if not ignore_string_escape: + return False + if scope and scope.startswith("string"): + return self.string_escaped(pt) + return False + + def string_escaped(self, pt): + """ + Check if bracket is follows escaping characters. + Account for if in string or regex string scope. + """ + + escaped = False + start = pt - 1 + first = False + if self.view.settings().get("bracket_string_escape_mode", self.default_string_escape_mode) == "string": + first = True + while self.view.substr(start) == "\\": + if first: + first = False + else: + escaped = False if escaped else True + start -= 1 + return escaped + + def is_illegal_scope(self, pt, bracket_id, scope=None): + """ + Check if scope at pt X should be ignored. + """ + + bracket = self.brackets[bracket_id] + if self.sub_search_mode and not bracket.find_in_sub_search: + return True + illegal_scope = False + # Scope sent in, so we must be scanning whatever this scope is + if scope != None: + if self.escaped(pt, bracket.ignore_string_escape, scope): + illegal_scope = True + return illegal_scope + # for exception in bracket.scope_exclude_exceptions: + elif len(bracket.scope_exclude_exceptions) and self.view.match_selector(pt, ", ".join(bracket.scope_exclude_exceptions)): + pass + elif len(bracket.scope_exclude) and self.view.match_selector(pt, ", ".join(bracket.scope_exclude)): + illegal_scope = True + return illegal_scope + + def compare(self, first, second, bfr, scope_bracket=False): + """ + Compare brackets. This function allows bracket plugins to add aditional logic. + """ + + if scope_bracket: + match = first is not None and second is not None + else: + match = first.type == second.type + if match: + bracket = self.scopes[first.scope]["brackets"][first.type] if scope_bracket else self.brackets[first.type] + try: + if bracket.compare is not None and match: + match = bracket.compare( + bracket.name, + BracketRegion(first.begin, first.end), + BracketRegion(second.begin, second.end), + bfr + ) + except: + bh_logging("Plugin Compare Error:\n%s" % str(traceback.format_exc())) + return match + + def post_match(self, left, right, center, bfr, scope_bracket=False): + """ + Peform special logic after a match has been made. + This function allows bracket plugins to add aditional logic. + """ + + if left is not None: + if scope_bracket: + bracket = self.scopes[left.scope]["brackets"][left.type] + bracket_scope = left.scope + else: + bracket = self.brackets[left.type] + bracket_type = left.type + elif right is not None: + if scope_bracket: + bracket = self.scopes[right.scope]["brackets"][right.type] + bracket_scope = right.scope + else: + bracket = self.brackets[right.type] + bracket_type = right.type + else: + return left, right + + self.bracket_style = bracket.style + + if bracket.post_match is not None: + try: + lbracket, rbracket, self.bracket_style = bracket.post_match( + self.view, + bracket.name, + bracket.style, + BracketRegion(left.begin, left.end) if left is not None else None, + BracketRegion(right.begin, right.end) if right is not None else None, + center, + bfr, + self.search_window + ) + + if scope_bracket: + left = ScopeEntry(lbracket.begin, lbracket.end, bracket_scope, bracket_type) if lbracket is not None else None + right = ScopeEntry(rbracket.begin, rbracket.end, bracket_scope, bracket_type) if rbracket is not None else None + else: + left = BracketEntry(lbracket.begin, lbracket.end, bracket_type) if lbracket is not None else None + right = BracketEntry(rbracket.begin, rbracket.end, bracket_type) if rbracket is not None else None + except: + bh_logging("Plugin Post Match Error:\n%s" % str(traceback.format_exc())) + return left, right + + def run_plugin(self, name, left, right, regions): + """ + Run a bracket plugin. + """ + + lbracket = BracketRegion(left.begin, left.end) + rbracket = BracketRegion(right.begin, right.end) + + if ( + ("__all__" in self.transform or name in self.transform) and + self.plugin != None and + self.plugin.is_enabled() + ): + lbracket, rbracket, regions = self.plugin.run_command(self.view, name, lbracket, rbracket, regions) + left = left.move(lbracket.begin, lbracket.end) if lbracket is not None else None + right = right.move(rbracket.begin, rbracket.end) if rbracket is not None else None + return left, right, regions + + def match_scope_brackets(self, bfr, sel): + """ + See if scope should be searched, and then check + endcaps to determine if valid scope bracket. + """ + + center = sel.a + left = None + right = None + scope_count = 0 + before_center = center - 1 + bracket_count = 0 + partial_find = None + max_size = self.view.size() - 1 + selected_scope = None + bracket = None + + # Cannot be inside a bracket pair if cursor is at zero + if center == 0: + return left, right, selected_scope, False + + # Identify if the cursor is in a scope with bracket definitions + for s in self.scopes: + scope = s["name"] + extent = None + exceed_limit = False + if self.view.match_selector(center, scope) and self.view.match_selector(before_center, scope): + extent = self.view.extract_scope(center) + while not exceed_limit and extent.begin() != 0: + if self.view.match_selector(extent.begin() - 1, scope): + extent = extent.cover(self.view.extract_scope(extent.begin() - 1)) + if extent.begin() < self.search_window[0] or extent.end() > self.search_window[1]: + extent = None + exceed_limit = True + else: + break + while not exceed_limit and extent.end() != max_size: + if self.view.match_selector(extent.end(), scope): + extent = extent.cover(self.view.extract_scope(extent.end())) + if extent.begin() < self.search_window[0] or extent.end() > self.search_window[1]: + extent = None + exceed_limit = True + else: + break + + if extent is None: + scope_count += 1 + continue + + # Search the bracket patterns of this scope + # to determine if this scope matches the rules. + bracket_count = 0 + scope_bfr = bfr[extent.begin():extent.end()] + for b in s["brackets"]: + m = b.open.search(scope_bfr) + if m and m.group(1): + left = ScopeEntry(extent.begin() + m.start(1), extent.begin() + m.end(1), scope_count, bracket_count) + m = b.close.search(scope_bfr) + if m and m.group(1): + right = ScopeEntry(extent.begin() + m.start(1), extent.begin() + m.end(1), scope_count, bracket_count) + if not self.compare(left, right, bfr, scope_bracket=True): + left, right = None, None + # Track partial matches. If a full match isn't found, + # return the first partial match at the end. + if partial_find is None and bool(left) != bool(right): + partial_find = (left, right) + left = None + right = None + if left and right: + break + bracket_count += 1 + if left and right: + break + scope_count += 1 + + # Full match not found. Return partial match (if any). + if (left is None or right is None) and partial_find is not None: + left, right = partial_find[0], partial_find[1] + + # Make sure cursor in highlighted sub group + if (left and center <= left.begin) or (right and center >= right.end): + left, right = None, None + + if left is not None: + selected_scope = self.scopes[left.scope]["name"] + elif right is not None: + selected_scope = self.scopes[right.scope]["name"] + + if left is not None and right is not None: + bracket = self.scopes[left.scope]["brackets"][left.type] + if bracket.sub_search: + self.sub_search_mode = True + if self.sub_search(sel, (left.begin, right.end), bfr, scope): + return left, right, self.brackets[left.type], True + elif bracket.sub_search_only: + left, right, bracket = None, None, None + + if self.adj_only: + left, right = self.adjacent_check(left, right, center) + + left, right = self.post_match(left, right, center, bfr, scope_bracket=True) + return left, right, bracket, False + + def match_brackets(self, bfr, window, sel, scope=None): + """ + Regex bracket matching. + """ + + center = sel.a + left = None + right = None + stack = [] + pattern = self.pattern if not self.sub_search_mode else self.sub_pattern + bsearch = BracketSearch(bfr, window, center, pattern, self.is_illegal_scope, scope) + for o in bsearch.get_open(BracketSearchSide.left): + if len(stack) and bsearch.is_done(BracektSearchType.closing): + if self.compare(o, stack[-1], bfr): + stack.pop() + continue + for c in bsearch.get_close(BracketSearchSide.left): + if o.end <= c.begin: + stack.append(c) + continue + elif len(stack): + bsearch.remember(BracektSearchType.closing) + break + + if len(stack): + b = stack.pop() + if self.compare(o, b, bfr): + continue + else: + left = o + break + + bsearch.reset_end_state() + stack = [] + + # Grab each closest closing right side bracket and attempt to match it. + # If the closing bracket cannot be matched, select it. + for c in bsearch.get_close(BracketSearchSide.right): + if len(stack) and bsearch.is_done(BracektSearchType.opening): + if self.compare(stack[-1], c, bfr): + stack.pop() + continue + for o in bsearch.get_open(BracketSearchSide.right): + if o.end <= c.begin: + stack.append(o) + continue + else: + bsearch.remember(BracektSearchType.opening) + break + + if len(stack): + b = stack.pop() + if self.compare(b, c, bfr): + continue + else: + if left is None or self.compare(left, c, bfr): + right = c + break + + if self.adj_only: + left, right = self.adjacent_check(left, right, center) + + return self.post_match(left, right, center, bfr) + + def adjacent_check(self, left, right, center): + if left and right: + if left.end < center < right.begin: + left, right = None, None + elif (left and left.end < center) or (right and center < right.begin): + left, right = None, None + return left, right + +bh_match = BhCore().match +bh_debug("Match object loaded.") + + +class BhListenerCommand(sublime_plugin.EventListener): + """ + Manage when to kick off bracket matching. + Try and reduce redundant requests by letting the + background thread ensure certain needed match occurs + """ + + def on_load(self, view): + """ + Search brackets on view load. + """ + + if self.ignore_event(view): + return + BhEventMgr.type = BH_MATCH_TYPE_SELECTION + sublime.set_timeout(bh_run, 0) + + def on_modified(self, view): + """ + Update highlighted brackets when the text changes. + """ + + if self.ignore_event(view): + return + BhEventMgr.type = BH_MATCH_TYPE_EDIT + BhEventMgr.modified = True + BhEventMgr.time = time() + + def on_activated(self, view): + """ + Highlight brackets when the view gains focus again. + """ + + if self.ignore_event(view): + return + BhEventMgr.type = BH_MATCH_TYPE_SELECTION + sublime.set_timeout(bh_run, 0) + + def on_selection_modified(self, view): + """ + Highlight brackets when the selections change. + """ + + if self.ignore_event(view): + return + if BhEventMgr.type != BH_MATCH_TYPE_EDIT: + BhEventMgr.type = BH_MATCH_TYPE_SELECTION + now = time() + if now - BhEventMgr.time > BhEventMgr.wait_time: + sublime.set_timeout(bh_run, 0) + else: + BhEventMgr.modified = True + BhEventMgr.time = now + + def ignore_event(self, view): + """ + Ignore request to highlight if the view is a widget, + or if it is too soon to accept an event. + """ + + return (view.settings().get('is_widget') or BhEventMgr.ignore_all) + + +def bh_run(): + """ + Kick off matching of brackets + """ + + BhEventMgr.modified = False + window = sublime.active_window() + view = window.active_view() if window != None else None + BhEventMgr.ignore_all = True + bh_match(view, True if BhEventMgr.type == BH_MATCH_TYPE_EDIT else False) + BhEventMgr.ignore_all = False + BhEventMgr.time = time() + + +def bh_loop(): + """ + Start thread that will ensure highlighting happens after a barage of events + Initial highlight is instant, but subsequent events in close succession will + be ignored and then accounted for with one match by this thread + """ + + while not BhThreadMgr.restart: + if BhEventMgr.modified == True and time() - BhEventMgr.time > BhEventMgr.wait_time: + sublime.set_timeout(bh_run, 0) + sleep(0.5) + + if BhThreadMgr.restart: + BhThreadMgr.restart = False + sublime.set_timeout(lambda: thread.start_new_thread(bh_loop, ()), 0) + +if not 'running_bh_loop' in globals(): + running_bh_loop = True + thread.start_new_thread(bh_loop, ()) + bh_debug("Starting Thread") +else: + bh_debug("Restarting Thread") + BhThreadMgr.restart = True diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/bh_core.sublime-settings b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/bh_core.sublime-settings new file mode 100644 index 0000000..de60409 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/bh_core.sublime-settings @@ -0,0 +1,372 @@ +{ + //Debug logging + "debug_enable": false, + + // Path to find icons at + "icon_path": "BracketHighlighter/icons", + + // When only either the left or right bracket can be found + // this defines if the unmatched bracket should be shown. + "show_unmatched" : true, + + // High visibilty style and color for high visibility mode + // (solid|outline|underline) + "high_visibility_style": "outline", + // (scope|__default__|__bracket__) + "high_visibility_color": "__bracket__", + + // Match brackets only when the cursor is touching the inside of the bracket + "match_only_adjacent": false, + + // Character threshold to search + "search_threshold": 5000, + + // Set mode for string escapes to ignore (regex|string) + "bracket_string_escape_mode": "string", + + // Set max number of multi-select brackets that will be searched automatically + "auto_selection_threshold" : 10, + + // Disable gutter icons when doing multi-select + "no_multi_select_icons": false, + + // Rules that define the finding and matching of brackets + // that are contained in a common scope. + // Useful for bracket pairs that are the same but + // share a common scope. Brackets are found by + // Finding the extent of the scope and using regex + // to look at the beginning and end to identify bracket. + // Use only if they cannot be targeted with traditional bracket + // rules. + "scope_brackets": [ + // Quotes + { + "name": "py_single_quote", + "open": "u?r?((?:'')?')", + "close": "((?:'')?')", + "style": "single_quote", + "scopes": ["string"], + "language_filter": "whitelist", + "language_list": ["Python"], + "sub_bracket_search": "true", + "enabled": true + }, + { + "name": "py_double_quote", + "open": "u?r?((?:\"\")?\")", + "close": "((?:\"\")?\")", + "style": "double_quote", + "scopes": ["string"], + "language_filter": "whitelist", + "language_list": ["Python"], + "sub_bracket_search": "true", + "enabled": true + }, + { + "name": "single_quote", + "open": "(')", + "close": "(')", + "style": "single_quote", + "scopes": ["string"], + "language_filter": "blacklist", + "language_list": ["Plain text"], + "sub_bracket_search": "true", + "enabled": true + }, + { + "name": "double_quote", + "open": "(\")", + "close": "(\")", + "style": "double_quote", + "scopes": ["string"], + "language_filter": "blacklist", + "language_list": ["Plain text"], + "sub_bracket_search": "true", + "enabled": true + }, + // Regex for different Languages + { + "name": "jsregex", + "open": " *(/)", + "close": "(/)[igm]*", + "style": "regex", + "scopes": ["string"], + "language_filter": "whitelist", + "language_list": ["JavaScript"], + "sub_bracket_search": "true", + "enabled": true + }, + { + "name": "perlregex", + "open": "(?:m|s|tr)(.|\n)", + "close": "(.|\n)(?:[igmos]*)", + "style": "regex", + "scopes": ["string.regexp"], + "language_filter": "whitelist", + "language_list": ["Perl"], + "sub_bracket_search": "true", + "enabled": true + }, + { + "name": "rubyregex", + "open": " *(/)", + "close": "(/)[imxo]*", + "style": "regex", + "scopes": ["string"], + "language_filter": "whitelist", + "language_list": ["Ruby"], + "sub_bracket_search": "true", + "enabled": true + }, + // Markdown + { + "name": "mditalic", + "open": "(\\*|_)", + "close": "(\\*|_)", + "style": "default", + "scopes": ["markup.italic"], + "language_filter": "whitelist", + "language_list": ["Markdown"], + "sub_bracket_search": "true", + "enabled": true + }, + { + "name": "mdbold", + "open": "(\\*\\*|__)", + "close": "(\\*\\*|__)", + "style": "default", + "scopes": ["markup.bold"], + "language_filter": "whitelist", + "language_list": ["Markdown"], + "sub_bracket_search": "true", + "enabled": true + } + ], + + // Rule definitions for finding and matching brackets. + // Brackets are found by using regex and can use scope + // qualifiers exclude certain matches. + // Once all matches are found, the closest pair surrounding + // the cursor are selected. + "brackets": [ + // Basic brackets + { + "name": "curly", + "open": "(\\{)", + "close": "(\\})", + "style": "curly", + "scope_exclude": ["string", "comment"], + "scope_exclude_exceptions": ["string.other.math.block.environment.latex"], + "language_filter": "blacklist", + "language_list": ["Plain text"], + "find_in_sub_search": "true", + "ignore_string_escape": true, + "enabled": true + }, + { + "name": "round", + "open": "(\\()", + "close": "(\\))", + "style": "round", + "scope_exclude_exceptions": ["string.other.math.block.environment.latex"], + "scope_exclude": ["string", "comment"], + "language_filter": "blacklist", + "language_list": ["Plain text"], + "find_in_sub_search": "true", + "ignore_string_escape": true, + "enabled": true + }, + { + "name": "square", + "open": "(\\[)", + "close": "(\\])", + "style": "square", + "scope_exclude": ["string", "comment"], + "scope_exclude_exceptions": ["string.other.math.block.environment.latex"], + "language_filter": "blacklist", + "language_list": ["Plain text"], + "find_in_sub_search": "true", + "ignore_string_escape": true, + "enabled": true + }, + // HTML + { + "name": "html", + "open": "(<)(?=[\\w\\:\\-]+(?:(?:\\s+[\\w\\-:]+(?:\\s*=\\s*(?:\"[^\"]*\"|'[^']*'|[^>\\s]+))?)*)\\s*\\/?>|\\/[\\w\\:\\-]+[^>]*>)", + "close": "(?<=<)(?:[\\w\\:\\-]+(?:(?:\\s+[\\w\\-:]+(?:\\s*=\\s*(?:\"[^\"]*\"|'[^']*'|[^>\\s]+))?)*)\\s*\\/?|\\/[\\w\\:\\-]+[^>]*)(>)", + "style": "tag", + "scope_exclude": ["string", "comment"], + "language_filter": "whitelist", + "language_list": ["HTML", "HTML 5", "XML", "PHP"], + "plugin_library": "bh_modules.tags", + "find_in_sub_search": "only", + "enabled": false + }, + // CFML + { + "name": "cfml", + "open": "(<)(?=[\\w\\:\\-]+(?:(?:\\s+[\\w\\-\\.:]+(?:\\s*=\\s*(?:\"[^\"]*\"|'[^']*'|[^>\\s]+))?)*|(?:(?<=cfif)|(?<=cfelseif))[^>]+)\\s*\\/?>|\\/[\\w\\:\\-]+[^>]*>)", + "close": "(?<=<)(?:[\\w\\:\\-]+(?:(?:\\s+[\\w\\-\\.:]+(?:\\s*=\\s*(?:\"[^\"]*\"|'[^']*'|[^>\\s]+))?)*|(?:(?<=cfif)|(?<=cfelseif))[^>]+)\\s*\\/?|\\/[\\w\\:\\-]+[^>]*)(>)", + "style": "tag", + "scope_exclude": ["string", "comment"], + "language_filter": "whitelist", + "language_list": ["HTML+CFML", "ColdFusion", "ColdFusionCFC"], + "plugin_library": "bh_modules.tags", + "find_in_sub_search": "only", + "enabled": false + }, + // Angle + { + "name": "angle", + "open": "(<)", + "close": "(>)", + "style": "angle", + "scope_exclude": ["string", "comment", "keyword.operator"], + "language_filter": "whitelist", + "language_list": ["HTML", "HTML 5", "XML", "PHP", "HTML+CFML", "ColdFusion", "ColdFusionCFC"], + "plugin_library": "bh_modules.tags", + "enabled": true + }, + // CSSedit groups + { + "name": "cssedit_groups", + "open": "(/\\* *@group .*\\*/)", + "close": "(/\\* *@end *\\*/)", + "style": "default", + "scope_exclude": [], + "language_filter": "whitelist", + "language_list": ["CSS"], + "enabled": true + }, + // Ruby conditional statements + { + "name": "ruby", + "open": "(^\\s*\\b(?:if|case|until|unless|while|begin|class|module|def\\b\\s*[a-zA-Z_\\d]+)|\\bdo)\\b", + "close": "\\b(end)\\b", + "style": "default", + "scope_exclude": ["string", "comment"], + "plugin_library": "bh_modules.rubykeywords", + "language_filter": "whitelist", + "language_list": ["Ruby", "Ruby on Rails", "HTML (Rails)"], + "enabled": true + }, + // C/C++ compile switches + { + "name": "c_compile_switch", + "open": "(\\#(?:if|ifdef|ifndef))\\b", + "close": "(\\#endif)\\b", + "style": "default", + "scope_exclude": ["string", "comment"], + "language_filter": "whitelist", + "language_list": ["C++", "C", "Objective-C"], + "enabled": true + }, + // PHP conditional keywords + { + "name": "php_keywords", + "open": "(?:^\\s*|<\\?(?:php)?\\s*)?\\b(if|foreach|for|while|switch)\\b(?=.*:\\s*(?:\\?>\\s*)?$)", + "close": "(?:^\\s*|<\\?(?:php)?\\s*)?\\b(endif|endfor|endforeach|endwhile|endswitch)\\b(?=\\s*;\\s*(?:\\?>\\s*)?$)", + "style": "default", + "language_filter": "whitelist", + "scope_exclude": ["string", "comment"], + "plugin_library": "bh_modules.phpkeywords", + "language_list": ["HTML", "HTML 5", "XML", "PHP", "HTML+CFML", "ColdFusion", "ColdFusionCFC"], + "enabled": true + }, + // Erlang conditional statements + { + "name": "erlang", + "open": "\\s*(\\b(?:if|case|begin|try|fun(?=\\s*\\()|receive)\\b)", + "close": "\\b(end)\\b", + "style": "default", + "scope_exclude": ["string", "comment"], + "language_filter": "whitelist", + "language_list": ["Erlang", "HTML (Erlang)"], + "enabled": true + } + ], + + // Define region highlight styles + "bracket_styles": { + // "default" and "unmatched" styles are special + // styles. If they are not defined here, + // they will be generated internally with + // internal defaults. + + // "default" style defines attributes that + // will be used for any style that does not + // explicitly define that attribute. So if + // a style does not define a color, it will + // use the color from the "default" style. + "default": { + "icon": "dot", + "color": "brackethighlighter.default", + "style": "underline" + }, + + // This particular style is used to highlight + // unmatched bracekt pairs. It is a special + // style. + "unmatched": { + "icon": "question", + // "color": "brackethighlighter.unmatched", + "style": "outline" + }, + // User defined region styles + "curly": { + "icon": "curly_bracket" + // "color": "brackethighlighter.curly", + // "style": "underline" + }, + "round": { + "icon": "round_bracket" + // "color": "brackethighlighter.round", + // "style": "underline" + }, + "square": { + "icon": "square_bracket" + // "color": "brackethighlighter.square", + // "style": "underline" + }, + "angle": { + "icon": "angle_bracket" + // "color": "brackethighlighter.angle", + // "style": "underline" + }, + "tag": { + "icon": "tag", + // "color": "brackethighlighter.tag", + "style": "outline" + }, + "single_quote": { + "icon": "single_quote" + // "color": "brackethighlighter.quote", + // "style": "underline" + }, + "double_quote": { + "icon": "double_quote" + // "color": "brackethighlighter.quote", + // "style": "underline" + }, + "regex": { + "icon": "regex" + // "color": "brackethighlighter.quote", + // "style": "underline" + } + }, + + /* Plugin settings */ + + // Style to use for matched tags + "tag_style": "tag", + + // Scopes to exclude from tag searches + "tag_scope_exclude": ["string", "comment"], + + // Determine which style of tag-matching to use in which syntax + "tag_mode": { + "xhtml": ["XML"], + "html": ["HTML", "HTML 5", "PHP"], + "cfml": ["HTML+CFML", "ColdFusion", "ColdFusionCFC"] + } +} diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/bh_modules/__init__.py b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/bh_modules/__init__.py new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/bh_modules/__init__.py @@ -0,0 +1 @@ + diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/bh_modules/bracketremove.py b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/bh_modules/bracketremove.py new file mode 100644 index 0000000..3e62d38 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/bh_modules/bracketremove.py @@ -0,0 +1,41 @@ +import bh_plugin +import re +import sublime + + +class BracketRemove(bh_plugin.BracketPluginCommand): + def decrease_indent_level(self, edit, row_first, row_last): + tab_size = self.view.settings().get("tab_size", 4) + indents = re.compile(r"^(?:\t| {%d}| *)((?:\t| {%d}| )*)([\s\S]*)" % (tab_size, tab_size)) + if not self.single_line: + for x in reversed(range(row_first, row_last + 1)): + line = self.view.full_line(self.view.text_point(x, 0)) + text = self.view.substr(line) + m = indents.match(text) + if m: + self.view.replace(edit, line, m.group(1) + m.group(2)) + + def run(self, edit, name, remove_content=False, remove_indent=False, remove_block=False): + if remove_content: + self.view.replace(edit, sublime.Region(self.left.begin, self.right.end), "") + else: + row_first = self.view.rowcol(self.left.end)[0] + 1 + row_last = self.view.rowcol(self.right.begin)[0] - 1 + self.single_line = not row_first <= row_last + if remove_block and not self.single_line: + self.view.replace(edit, self.view.full_line(self.right.toregion()), "") + else: + self.view.replace(edit, self.right.toregion(), "") + if remove_indent: + self.decrease_indent_level(edit, row_first, row_last) + if remove_block and not self.single_line: + self.view.replace(edit, self.view.full_line(self.left.toregion()), "") + else: + self.view.replace(edit, self.left.toregion(), "") + + self.left = None + self.right = None + + +def plugin(): + return BracketRemove diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/bh_modules/bracketselect.py b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/bh_modules/bracketselect.py new file mode 100644 index 0000000..99e1db0 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/bh_modules/bracketselect.py @@ -0,0 +1,33 @@ +import bh_plugin +import sublime + +DEFAULT_TAGS = ["cfml", "html", "angle"] + + +class SelectBracket(bh_plugin.BracketPluginCommand): + def run(self, edit, name, select='', tags=DEFAULT_TAGS): + left, right = self.left, self.right + first, last = left.end, right.begin + if select == 'left': + if name in tags and left.size() > 1: + first, last = left.begin + 1, left.begin + 1 + else: + first, last = left.end, left.end + elif select == 'right': + if left.end != right.end: + if name in tags and left.size() > 1: + first, last = right.begin + 1, right.begin + 1 + else: + first, last = right.begin, right.begin + else: + # There is no second bracket, so just select the first + if name in tags and left.size() > 1: + first, last = left.begin + 1, left.begin + 1 + else: + first, last = right.end, right.end + + self.selection = [sublime.Region(first, last)] + + +def plugin(): + return SelectBracket diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/bh_modules/foldbracket.py b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/bh_modules/foldbracket.py new file mode 100644 index 0000000..adead9b --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/bh_modules/foldbracket.py @@ -0,0 +1,16 @@ +import bh_plugin +import sublime + + +class FoldBrackets(bh_plugin.BracketPluginCommand): + def run(self, edit, name): + content = sublime.Region(self.left.end, self.right.begin) + new_content = [content] + if content.size > 0: + if self.view.fold(content) == False: + new_content = self.view.unfold(content) + self.selection = new_content + + +def plugin(): + return FoldBrackets diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/bh_modules/phpkeywords.py b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/bh_modules/phpkeywords.py new file mode 100644 index 0000000..cf49e3a --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/bh_modules/phpkeywords.py @@ -0,0 +1,2 @@ +def compare(name, first, second, bfr): + return "end" + bfr[first.begin:first.end].lower() == bfr[second.begin:second.end].lower() diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/bh_modules/rubykeywords.py b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/bh_modules/rubykeywords.py new file mode 100644 index 0000000..e4684f3 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/bh_modules/rubykeywords.py @@ -0,0 +1,12 @@ +import re + + +def post_match(view, name, style, first, second, center, bfr, threshold): + if first is not None: + # Strip whitespace from the beginning of first bracket + open_bracket = bfr[first.begin:first.end] + if open_bracket != "do": + m = re.match(r"^(\s*\b)[\w\W]*", open_bracket) + if m: + first = first.move(first.begin + m.end(1), first.end) + return first, second, style diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/bh_modules/swapbrackets.py b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/bh_modules/swapbrackets.py new file mode 100644 index 0000000..9ed3abe --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/bh_modules/swapbrackets.py @@ -0,0 +1,14 @@ +import sublime +from bh_plugin import ImportModule as ImpMod +BracketRemove = ImpMod.import_from("bh_modules.bracketremove", "BracketRemove") + + +class SwapBrackets(BracketRemove): + def run(self, edit, name, remove_content=False, remove_indent=False, remove_block=False): + offset = self.left.toregion().size() + self.selection = [sublime.Region(self.left.begin, self.right.begin - offset)] + super(SwapBrackets, self).run(edit, name) + + +def plugin(): + return SwapBrackets diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/bh_modules/swapquotes.py b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/bh_modules/swapquotes.py new file mode 100644 index 0000000..42793b7 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/bh_modules/swapquotes.py @@ -0,0 +1,46 @@ +import bh_plugin +import sublime + + +class SwapQuotes(bh_plugin.BracketPluginCommand): + def escaped(self, idx): + view = self.view + escaped = False + while idx >= 0 and view.substr(idx) == '\\': + escaped = ~escaped + idx -= 1 + return escaped + + def run(self, edit, name): + view = self.view + quote = view.substr(self.left.begin) + if quote != "'" and quote != '"': + return + new = "'" if (quote == '"') else '"' + old = quote + begin = self.left.end + end = self.right.begin + content_end = self.right.begin + + view.replace(edit, self.left.toregion(), view.substr(self.left.toregion()).replace(old, new)) + view.replace(edit, self.right.toregion(), view.substr(self.right.toregion()).replace(old, new)) + + offset = 0 + while begin < end + offset: + char = view.substr(begin) + if char == old and self.escaped(begin - 1): + view.replace(edit, sublime.Region(begin - 1, begin), '') + offset -= 1 + content_end -= 1 + elif char == new and not self.escaped(begin - 1): + view.insert(edit, begin, "\\") + offset += 1 + content_end += 1 + begin += 1 + + self.right = self.right.move(content_end, end + offset) + self.selection = [sublime.Region(content_end)] + + +def plugin(): + return SwapQuotes diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/bh_modules/tagattrselect.py b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/bh_modules/tagattrselect.py new file mode 100644 index 0000000..a4319ec --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/bh_modules/tagattrselect.py @@ -0,0 +1,54 @@ +import bh_plugin + + +class SelectAttr(bh_plugin.BracketPluginCommand): + def run(self, edit, name, direction='right'): + if self.left.size() <= 1: + return + tag_name = r'[\w\:\-]+' + attr_name = r'''([\w\-\.:]+)(?:\s*=\s*(?:(?:"((?:\.|[^"])*)")|(?:'((?:\.|[^'])*)')|([^>\s]+)))?''' + tname = self.view.find(tag_name, self.left.begin) + current = self.selection[0].b + region = self.view.find(attr_name, tname.b) + selection = self.selection + + if direction == 'left': + last = None + + # Keep track of last attr + if region != None and current <= region.b and region.b < self.left.end: + last = region + + while region != None and region.b < self.left.end: + # Select attribute until you have closest to the left of selection + if current > region.b: + selection = [region] + last = None + # Update last attr + elif last != None: + last = region + region = self.view.find(attr_name, region.b) + # Wrap right + if last != None: + selection = [last] + else: + first = None + # Keep track of first attr + if region != None and region.b < self.left.end: + first = region + + while region != None and region.b < self.left.end: + # Select closest attr to the right of the selection + if current < region.b: + selection = [region] + first = None + break + region = self.view.find(attr_name, region.b) + # Wrap left + if first != None: + selection = [first] + self.selection = selection + + +def plugin(): + return SelectAttr diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/bh_modules/tagnameselect.py b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/bh_modules/tagnameselect.py new file mode 100644 index 0000000..77b8fe9 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/bh_modules/tagnameselect.py @@ -0,0 +1,14 @@ +import bh_plugin + + +class TagNameSelect(bh_plugin.BracketPluginCommand): + def run(self, edit, name): + if self.left.size() > 1: + tag_name = '[\w\:\-]+' + region1 = self.view.find(tag_name, self.left.begin) + region2 = self.view.find(tag_name, self.right.begin) + self.selection = [region1, region2] + + +def plugin(): + return TagNameSelect diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/bh_modules/tags.py b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/bh_modules/tags.py new file mode 100644 index 0000000..47c2972 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/bh_modules/tags.py @@ -0,0 +1,243 @@ +import re +from collections import namedtuple +import sublime +from os.path import basename + +FLAGS = re.MULTILINE | re.IGNORECASE +HTML_START = re.compile(r'''<([\w\:\-]+)((?:\s+[\w\-:]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^>\s]+))?)*)\s*(\/?)>''', FLAGS) +CFML_START = re.compile(r'''<([\w\:\-]+)((?:\s+[\w\-\.:]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^>\s]+))?)*|(?:(?<=cfif)|(?<=cfelseif))[^>]+)\s*(\/?)>''', FLAGS) +START_TAG = { + "html": HTML_START, + "xhtml": HTML_START, + "cfml": CFML_START +} +END_TAG = re.compile(r'<\/([\w\:\-]+)[^>]*>', FLAGS) + +self_closing_tags = set("colgroup dd dt li options p td tfoot th thead tr".split()) +single_tags = set("area base basefont br col frame hr img input isindex link meta param embed".split()) + + +class TagEntry(namedtuple('TagEntry', ['begin', 'end', 'name', 'self_closing', 'single'], verbose=False)): + def move(self, begin, end): + return self._replace(begin=begin, end=end) + + +def compare_languge(language, lang_list): + found = False + for l in lang_list: + if language == l.lower(): + found = True + break + return found + + +def get_tag_mode(view, tag_mode_config): + default_mode = None + syntax = view.settings().get('syntax') + language = basename(syntax).replace('.tmLanguage', '').lower() if syntax != None else "plain text" + for mode in ["html", "xhtml", "cfml"]: + if compare_languge(language, tag_mode_config.get(mode, [])): + return mode + return default_mode + + +def post_match(view, name, style, first, second, center, bfr, threshold): + left, right = first, second + threshold = [0, len(bfr)] if threshold is None else threshold + tag_settings = sublime.load_settings("bh_core.sublime-settings") + tag_mode = get_tag_mode(view, tag_settings.get("tag_mode", {})) + tag_style = tag_settings.get("tag_style", "angle") + bracket_style = style + + if first is not None and tag_mode is not None: + matcher = TagMatch(view, bfr, threshold, first, second, center, tag_mode) + left, right = matcher.match() + if not matcher.no_tag: + bracket_style = tag_style + + return left, right, bracket_style + + +class TagSearch(object): + def __init__(self, view, bfr, window, center, pattern, match_type): + self.start = window[0] + self.end = window[1] + self.center = center + self.pattern = pattern + self.match_type = match_type + self.bfr = bfr + self.prev_match = None + self.return_prev = False + self.done = False + self.view = view + self.scope_exclude = sublime.load_settings("bh_core.sublime-settings").get("tag_scope_exclude") + + def scope_check(self, pt): + illegal_scope = False + for exclude in self.scope_exclude: + illegal_scope |= bool(self.view.score_selector(pt, exclude)) + return illegal_scope + + def reset_end_state(self): + self.done = False + self.prev_match = None + self.return_prev = False + + def remember(self): + self.return_prev = True + self.done = False + + def get_tags(self, bracket_code): + if self.done: + return + if self.return_prev: + self.return_prev = False + yield self.prev_match + for m in self.pattern.finditer(self.bfr, self.start, self.end): + name = m.group(1).lower() + if not self.match_type: + single = bool(m.group(3) != "" or name in single_tags) + self_closing = name in self_closing_tags or name.startswith("cf") + else: + single = False + self_closing = False + start = m.start(0) + end = m.end(0) + if not self.scope_check(start): + self.prev_match = TagEntry(start, end, name, self_closing, single) + self.start = end + yield self.prev_match + self.done = True + + +class TagMatch(object): + def __init__(self, view, bfr, threshold, first, second, center, mode): + self.view = view + self.bfr = bfr + self.mode = mode + tag, tag_type, tag_end = self.get_first_tag(first[0]) + self.left, self.right = None, None + self.window = None + self.no_tag = False + if tag and first[0] < center < tag_end: + if tag.single: + self.left = tag + self.right = tag + else: + if tag_type == "open": + self.left = tag + self.window = (tag_end, len(bfr) if threshold is None else threshold[1]) + else: + self.right = tag + self.window = (0 if threshold is None else threshold[0], first[0]) + else: + self.left = first + self.right = second + self.no_tag = True + + def get_first_tag(self, offset): + tag = None + tag_type = None + self_closing = False + single = False + m = START_TAG[self.mode].match(self.bfr[offset:]) + end = None + if m: + name = m.group(1).lower() + single = bool(m.group(3) != "" or name in single_tags) + if self.mode == "html": + self_closing = name in self_closing_tags + elif self.mode == "cfml": + self_closing = name in self_closing_tags or name.startswith("cf") + start = m.start(0) + offset + end = m.end(0) + offset + tag = TagEntry(start, end, name, self_closing, single) + tag_type = "open" + self.center = end + else: + m = END_TAG.match(self.bfr[offset:]) + if m: + name = m.group(1).lower() + start = m.start(0) + offset + end = m.end(0) + offset + tag = TagEntry(start, end, name, self_closing, single) + tag_type = "close" + self.center = offset + return tag, tag_type, end + + def compare_tags(self, left, right): + return left.name == right.name + + def resolve_self_closing(self, stack, c): + found_tag = None + b = stack[-1] + if self.compare_tags(b, c): + found_tag = b + stack.pop() + else: + while b is not None and b.self_closing: + stack.pop() + if len(stack): + b = stack[-1] + if self.compare_tags(b, c): + found_tag = b + stack.pop() + break + else: + b = None + return found_tag + + def match(self): + stack = [] + + # No tags to search for + if self.no_tag or (self.left and self.right): + return self.left, self.right + + # Init tag matching objects + osearch = TagSearch(self.view, self.bfr, self.window, self.center, START_TAG[self.mode], 0) + csearch = TagSearch(self.view, self.bfr, self.window, self.center, END_TAG, 1) + + # Searching for opening or closing tag to match + match_type = 0 if self.right else 1 + + # Match the tags + for c in csearch.get_tags(match_type): + if len(stack) and osearch.done: + if self.resolve_self_closing(stack, c): + continue + for o in osearch.get_tags(match_type): + if o.end <= c.begin: + if not o.single: + stack.append(o) + continue + else: + osearch.remember() + break + + if len(stack): + if self.resolve_self_closing(stack, c): + continue + elif match_type == 0 and not osearch.done: + continue + if match_type == 1: + if self.left is None or self.compare_tags(self.left, c): + self.right = c + elif self.left.self_closing: + self.right = self.left + break + + if match_type == 0: + # Find the rest of the the unmatched left side open brackets + # approaching the cursor if all closing brackets were matched + # Select the most recent open bracket on the stack. + for o in osearch.get_tags(0): + if not o.single: + stack.append(o) + if len(stack): + self.left = self.resolve_self_closing(stack, self.right) + elif self.right is None and self.left is not None and self.left.self_closing: + # Account for the opening tag that was found being a self closing + self.right = self.left + + return self.left, self.right diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/bh_plugin.py b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/bh_plugin.py new file mode 100644 index 0000000..cd3bafb --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/bh_plugin.py @@ -0,0 +1,140 @@ +import sublime +from os.path import normpath, join +import imp +from collections import namedtuple +import sys +import traceback +import warnings + + +class BracketRegion (namedtuple('BracketRegion', ['begin', 'end'], verbose=False)): + """ + Bracket Regions for plugins + """ + + def move(self, begin, end): + """ + Move bracket region to different points + """ + + return self._replace(begin=begin, end=end) + + def size(self): + """ + Get the size of the region + """ + + return abs(self.begin - self.end) + + def toregion(self): + """ + Convert to sublime region + """ + + return sublime.Region(self.begin, self.end) + + +def is_bracket_region(obj): + """ + Check if object is a BracketRegion + """ + + return isinstance(obj, BracketRegion) + + +class ImportModule(object): + @classmethod + def import_module(cls, module_name, loaded=None): + # Pull in built-in and custom plugin directory + if module_name.startswith("bh_modules."): + path_name = join(sublime.packages_path(), "BracketHighlighter", normpath(module_name.replace('.', '/'))) + else: + path_name = join(sublime.packages_path(), normpath(module_name.replace('.', '/'))) + path_name += ".py" + if loaded is not None and module_name in loaded: + module = sys.modules[module_name] + else: + with warnings.catch_warnings(record=True) as w: + # Ignore warnings about plugin folder not being a python package + warnings.simplefilter("always") + module = imp.new_module(module_name) + sys.modules[module_name] = module + source = None + with open(path_name) as f: + source = f.read().replace('\r', '') + cls.__execute_module(source, module_name) + w = filter(lambda i: issubclass(i.category, UserWarning), w) + return module + + @classmethod + def __execute_module(cls, source, module_name): + exec(compile(source, module_name, 'exec'), sys.modules[module_name].__dict__) + + @classmethod + def import_from(cls, module_name, attribute): + return getattr(cls.import_module(module_name), attribute) + + +class BracketPlugin(object): + """ + Class for preparing and running plugins + """ + + def __init__(self, plugin, loaded): + """ + Load plugin module + """ + + self.enabled = False + self.args = plugin['args'] if ("args" in plugin) else {} + self.plugin = None + if 'command' in plugin: + plib = plugin['command'] + try: + module = ImportModule.import_module(plib, loaded) + self.plugin = getattr(module, 'plugin')() + loaded.add(plib) + self.enabled = True + except Exception: + print 'BracketHighlighter: Load Plugin Error: %s\n%s' % (plugin['command'], traceback.format_exc()) + + def is_enabled(self): + """ + Check if plugin is enabled + """ + + return self.enabled + + def run_command(self, view, name, left, right, selection): + """ + Load arguments into plugin and run + """ + + plugin = self.plugin() + setattr(plugin, "left", left) + setattr(plugin, "right", right) + setattr(plugin, "view", view) + setattr(plugin, "selection", selection) + edit = view.begin_edit() + self.args["edit"] = edit + self.args["name"] = name + try: + plugin.run(**self.args) + left, right, selection = plugin.left, plugin.right, plugin.selection + except Exception: + print "BracketHighlighter: Plugin Run Error:\n%s" % str(traceback.format_exc()) + view.end_edit(edit) + return left, right, selection + + +class BracketPluginCommand(object): + """ + Bracket Plugin base class + """ + + def run(self, bracket, content, selection): + """ + Runs the plugin class + """ + + pass diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/bh_remove.py b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/bh_remove.py new file mode 100644 index 0000000..ed1da63 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/bh_remove.py @@ -0,0 +1,51 @@ +import sublime_plugin +from collections import namedtuple + +MENU = namedtuple("Menu", "simple content block block_indent")( + "Remove Brackets", + "Remove Brackets and Content", + "Remove Brackets: Block", + "Remove Brackets: Indented Block" +) + + +class BhRemoveBracketsCommand(sublime_plugin.WindowCommand): + """ + Command to remove current highlighted brackets and optionally content + """ + + def remove_brackets(self, value): + """ + Perform removal of brackets + """ + + if value != -1: + menu_item = MENU[value] + indent = menu_item == MENU.block_indent + block = menu_item == MENU.block or menu_item == MENU.block_indent + content = menu_item == MENU.content + + self.window.run_command( + "bh_key", + { + "plugin": { + "type": ["__all__"], + "command": "bh_modules.bracketremove", + "args": { + "remove_indent": indent, + "remove_block": block, + "remove_content": content + } + } + } + ) + + def run(self): + """ + Show menu of removal options + """ + + self.window.show_quick_panel( + list(MENU), + self.remove_brackets + ) diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/bh_swapping.py b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/bh_swapping.py new file mode 100644 index 0000000..7516406 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/bh_swapping.py @@ -0,0 +1,44 @@ +import sublime_plugin +import bh_wrapping + + +class SwapBrackets(bh_wrapping.WrapBrackets): + def wrap(self, wrap_entry): + if wrap_entry < 0: + return + + self._style = ["inline"] + + self.brackets = self._brackets[wrap_entry] + self.wrap_brackets(0) + + +class SwapBracketsCommand(sublime_plugin.WindowCommand): + def swap_brackets(self, value): + if value < 0: + return + + self.brackets = self.wrap._brackets[value] + + self.window.run_command( + "bh_key", + { + "plugin": { + "type": ["__all__"], + "command": "bh_modules.swapbrackets" + } + } + ) + self.wrap.wrap(value) + + def run(self): + view = self.window.active_view() + if view is None: + return + self.wrap = SwapBrackets(view, "bh_swapping.sublime-settings", "swapping") + + if len(self.wrap._menu): + self.window.show_quick_panel( + self.wrap._menu, + self.swap_brackets + ) diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/bh_swapping.sublime-settings b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/bh_swapping.sublime-settings new file mode 100644 index 0000000..09e583e --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/bh_swapping.sublime-settings @@ -0,0 +1,46 @@ +{ + "swapping": [ + { + "enabled": true, "language_list": [], "language_filter": "whitelist", "entries": [ + {"name": "<> Angle", "brackets": ["<", ">${BH_SEL}"]} + ] + }, + { + "enabled": true, "language_list": ["Plain text"], "language_filter": "blacklist", "entries": [ + {"name": "{} Curly", "brackets": ["{", "}${BH_SEL}"]} + ] + }, + { + "enabled": true, "language_list": ["Plain text"], "language_filter": "blacklist", "entries": [ + {"name": "() Round", "brackets": ["(", ")${BH_SEL}"]} + ] + }, + { + "enabled": true, "language_list": ["Plain text"], "language_filter": "blacklist", "entries": [ + {"name": "[] Square", "brackets": ["[", "]${BH_SEL}"]} + ] + }, + { + "enabled": true, "language_list": ["HTML", "HTML 5", "XML", "PHP", "HTML+CFML", "ColdFusion", "ColdFusionCFC"], "language_filter": "whitelist", "entries": [ + {"name": "HTML/XML Tag", "brackets": ["<${BH_SEL:NAME}>", ""]} + ] + }, + { + "enabled": true, "language_list": ["Markdown"], "language_filter": "whitelist", "entries": [ + {"name": "Mardown: Bold", "brackets": ["**", "**${BH_SEL}"]}, + {"name": "Mardown: Italic", "brackets": ["_", "_${BH_SEL}"]} + ] + }, + { + "enabled": true, "language_list": ["C++", "C"], "language_filter": "whitelist", "entries": [ + {"name": "C/C++: #if", "brackets": ["#if ${BH_SEL}", "#endif"]}, + {"name": "C/C++: #if, #else", "brackets": ["#if${BH_SEL}", "#else\n${BH_TAB:/* CODE */}\n#endif"]}, + {"name": "C/C++: #if, #elif", "brackets": ["#if${BH_SEL}", "#elif ${BH_TAB:/* CONDITION */}\n${BH_TAB:/* CODE */}\n#endif"]}, + {"name": "C/C++: #ifdef", "brackets": ["#ifdef${BH_SEL}", "#endif"]}, + {"name": "C/C++: #ifdef, #else", "brackets": ["#ifdef${BH_SEL}", "#else\n${BH_TAB:/* CODE */}\n#endif"]}, + {"name": "C/C++: #ifndef", "brackets": ["#ifndef${BH_SEL}", "#endif"]}, + {"name": "C/C++: #ifndef, #else", "brackets": ["#ifndef${BH_SEL}", "#else\n${BH_TAB:/* CODE */}\n#endif"]} + ] + } + ] +} diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/bh_wrapping.py b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/bh_wrapping.py new file mode 100644 index 0000000..fc58251 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/bh_wrapping.py @@ -0,0 +1,368 @@ +import sublime +import sublime_plugin +from os.path import basename +import re + + +BH_TABSTOPS = re.compile(r"(\$\{BH_(SEL|TAB)(?:\:([^\}]+))?\})") +TAB_REGION = "bh_plugin_wrapping_tabstop" +SEL_REGION = "bh_plugin_wrapping_select" +OUT_REGION = "bh_plugin_wrapping_outlier" + +VALID_INSERT_STYLES = ( + ("inline", "Inline Insert"), + ("block", "Block Insert"), + ("indent_block", "Indented Block Insert") +) + + +def exclude_entry(enabled, filter_type, language_list, language): + """ + Exclude bracket wrapping entry by filter + """ + + exclude = True + if enabled: + # Black list languages + if filter_type == 'blacklist': + exclude = False + if language != None: + for item in language_list: + if language == item.lower(): + exclude = True + break + #White list languages + elif filter_type == 'whitelist': + if language != None: + for item in language_list: + if language == item.lower(): + exclude = False + break + return exclude + + +class TextInsertion(object): + """ + Wrapper class for inserting text + """ + + def __init__(self, view, edit): + """ + Store view and edit objects + """ + + self.view = view + self.edit = edit + + def insert(self, pt, text): + """ + Peform insertion + """ + + return self.view.insert(self.edit, pt, text) + + +class WrapBrackets(object): + """ + Wrap the current selection(s) with the defined wrapping options + """ + + def __init__(self, view, setting_file, attribute): + self.view = view + self._menu = [] + self._brackets = [] + self._insert = [] + self._style = [] + self.read_wrap_entries(setting_file, attribute) + + def inline(self, edit, sel): + """ + Inline wrap + """ + + ti = TextInsertion(self.view, edit) + + offset1 = ti.insert(sel.begin(), self.brackets[0]) + self.insert_regions.append(sublime.Region(sel.begin(), sel.begin() + offset1)) + offset2 = ti.insert(sel.end() + offset1, self.brackets[1]) + self.insert_regions.append(sublime.Region(sel.end() + offset1, sel.end() + offset1 + offset2)) + + def block(self, edit, sel, indent=False): + """ + Wrap brackets around selection and block off the content + """ + + # Calculate number of lines between brackets + self.calculate_lines(sel) + # Calculate the current indentation of first bracket + self.calculate_indentation(sel) + + ti = TextInsertion(self.view, edit) + + line_offset = 0 + first_end = 0 + second_end = 0 + second_start = sel.end() + + for b in reversed(self.brackets[1].split('\n')): + second_end += ti.insert(sel.end(), "\n" + self.indent_to_col + b) + num_open_lines = self.brackets[0].count('\n') + for b in reversed(self.brackets[0].split('\n')): + if line_offset == num_open_lines: + line = b + "\n" + else: + line = self.indent_to_col + b + "\n" + first_end += ti.insert(sel.begin(), line) + line_offset += 1 + self.insert_regions.append(sublime.Region(sel.begin(), sel.begin() + first_end)) + + if indent: + second_start += self.indent_content(ti, line_offset) + else: + pt = self.view.text_point(self.first_line + line_offset, 0) + second_start += ti.insert(pt, self.indent_to_col) + + self.insert_regions.append(sublime.Region(first_end + second_start, first_end + second_start + second_end)) + + def indent_content(self, ti, line_offset): + """ + Indent the block content + """ + + first = True + offset = 0 + for l in range(line_offset, self.total_lines + line_offset): + pt = self.view.text_point(self.first_line + l, 0) + if first: + offset += ti.insert(pt, self.indent_to_col + "\t") + first = False + else: + offset += ti.insert(pt, "\t") + return offset + + def calculate_lines(self, sel): + """ + Calculate lines between brackets + """ + + self.first_line, self.col_position = self.view.rowcol(sel.begin()) + last_line = self.view.rowcol(sel.end())[0] + self.total_lines = last_line - self.first_line + 1 + + def calculate_indentation(self, sel): + """ + Calculate how much lines should be indented + """ + + tab_size = self.view.settings().get("tab_size", 4) + tab_count = self.view.substr(sublime.Region(sel.begin() - self.col_position, sel.begin())).count('\t') + spaces = self.col_position - tab_count + self.indent_to_col = "\t" * tab_count + "\t" * (spaces / tab_size) + " " * (spaces % tab_size if spaces >= tab_size else spaces) + + def select(self, edit): + """ + Select defined regions after wrapping + """ + + self.view.sel().clear() + map(lambda x: self.view.sel().add(x), self.insert_regions) + + final_sel = [] + initial_sel = [] + for s in self.view.sel(): + string = self.view.substr(s) + matches = [m for m in BH_TABSTOPS.finditer(string)] + multi_offset = 0 + if matches: + for m in matches: + r = sublime.Region(s.begin() + multi_offset + m.start(1), s.begin() + multi_offset + m.end(1)) + if m.group(3): + replace = m.group(3) + self.view.erase(edit, r) + added = self.view.insert(edit, r.begin(), replace) + final_sel.append(sublime.Region(s.begin() + multi_offset + m.start(1), s.begin() + multi_offset + m.start(1) + added)) + multi_offset += added - r.size() + else: + self.view.erase(edit, r) + final_sel.append(sublime.Region(s.begin() + multi_offset + m.start(1))) + multi_offset -= r.size() + if m.group(2) == "SEL": + initial_sel.append(final_sel[-1]) + + if len(initial_sel) != len(final_sel): + self.view.add_regions(TAB_REGION, final_sel, "", "", sublime.HIDDEN) + + # Re-position cursor + self.view.sel().clear() + if len(initial_sel): + map(lambda x: self.view.sel().add(x), initial_sel) + elif len(final_sel): + self.view.sel().add(final_sel[0]) + + def read_wrap_entries(self, setting_file, attribute): + """ + Read wrap entries from the settings file + """ + + settings = sublime.load_settings(setting_file) + syntax = self.view.settings().get('syntax') + language = basename(syntax).replace('.tmLanguage', '').lower() if syntax != None else "plain text" + wrapping = settings.get(attribute, []) + for i in wrapping: + if not exclude_entry(i["enabled"], i["language_filter"], i["language_list"], language): + for j in i.get("entries", []): + try: + menu_entry = j["name"] + bracket_entry = j["brackets"] + insert_style = j.get("insert_style", ["inline"]) + self._menu.append(menu_entry) + self._brackets.append(bracket_entry) + self._insert.append(insert_style) + except Exception: + pass + + def wrap_brackets(self, value): + """ + Wrap selection(s) with defined brackets + """ + + if value < 0: + return + + # Use new edit object since the main run has already exited + # and the old edit is more than likely closed now + edit = self.view.begin_edit() + + # Wrap selections with brackets + style = self._style[value] + self.insert_regions = [] + + for sel in self.view.sel(): + # Determine indentation style + if style == "indent_block": + self.block(edit, sel, True) + elif style == "block": + self.block(edit, sel) + else: + self.inline(edit, sel) + + self.select(edit) + + self.view.end_edit(edit) + + def wrap_style(self, value): + """ + Choose insert style for wrapping. + """ + + if value < 0: + return + + style = [] + + self.brackets = self._brackets[value] + for s in VALID_INSERT_STYLES: + if s[0] in self._insert[value]: + self._style.append(s[0]) + style.append(s[1]) + + if len(style) > 1: + self.view.window().show_quick_panel( + style, + self.wrap_brackets + ) + else: + self.wrap_brackets(0) + + +class WrapBracketsCommand(sublime_plugin.TextCommand, WrapBrackets): + def run(self, edit): + """ + Display the wrapping menu + """ + + self._menu = [] + self._brackets = [] + self._insert = [] + self._style = [] + self.read_wrap_entries("bh_wrapping.sublime-settings", "wrapping") + + if len(self._menu): + self.view.window().show_quick_panel( + self._menu, + self.wrap_style + ) + + +class BhNextWrapSelCommand(sublime_plugin.TextCommand): + """ + Navigate wrapping tab stop regions + """ + + def run(self, edit): + """ + Look for the next wrapping tab stop region + """ + + regions = self.view.get_regions(SEL_REGION) + self.view.get_regions(OUT_REGION) + if len(regions): + self.view.sel().clear() + map(lambda x: self.view.sel().add(x), regions) + + # Clean up unneed sections + self.view.erase_regions(SEL_REGION) + self.view.erase_regions(OUT_REGION) + + +class BhWrapListener(sublime_plugin.EventListener): + """ + Listen for wrapping tab stop tabbing + """ + + def on_query_context(self, view, key, operator, operand, match_all): + """ + Mark the next regions to navigate to. + """ + + accept_query = False + if key == "bh_wrapping": + select = [] + outlier = [] + regions = view.get_regions(TAB_REGION) + tabstop = [] + sels = view.sel() + + if len(regions) == 0: + return False + + for s in sels: + count = 0 + found = False + for r in regions[:]: + if found: + select.append(r) + tabstop.append(r) + del regions[count] + break + if r.begin() <= s.begin() <= r.end(): + del regions[count] + found = True + continue + count += 1 + if not found: + outlier.append(s) + tabstop += regions + + if len(tabstop) == len(select): + if len(tabstop): + tabstop = [] + accept_query = True + elif len(tabstop) != 0: + accept_query = True + + # Mark regions to make the "next" command aware of what to do + view.add_regions(SEL_REGION, select, "", "", sublime.HIDDEN) + view.add_regions(OUT_REGION, outlier, "", "", sublime.HIDDEN) + view.add_regions(TAB_REGION, tabstop, "", "", sublime.HIDDEN) + + return accept_query diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/bh_wrapping.sublime-settings b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/bh_wrapping.sublime-settings new file mode 100644 index 0000000..a2899bd --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/bh_wrapping.sublime-settings @@ -0,0 +1,71 @@ +{ + "wrapping": [ + { + "enabled": true, "language_list": [], "language_filter": "whitelist", "entries": [ + {"name": "<> Angle", "brackets": ["<", ">${BH_SEL}"]} + ] + }, + { + "enabled": true, "language_list": ["Plain text"], "language_filter": "blacklist", "entries": [ + {"name": "{} Curly", "brackets": ["{", "}${BH_SEL}"]} + ] + }, + { + "enabled": true, "language_list": ["Plain text"], "language_filter": "blacklist", "entries": [ + {"name": "() Round", "brackets": ["(", ")${BH_SEL}"]} + ] + }, + { + "enabled": true, "language_list": ["Plain text"], "language_filter": "blacklist", "entries": [ + {"name": "[] Square", "brackets": ["[", "]${BH_SEL}"]} + ] + }, + { + "enabled": true, "language_list": ["Plain text"], "language_filter": "blacklist", "entries": [ + {"name": "'' Single Quotes", "brackets": ["'", "'${BH_SEL}"], "insert_style": ["inline"]}, + {"name": "\"\" Double Quotes", "brackets": ["\"", "\"${BH_SEL}"], "insert_style": ["inline"]} + ] + }, + { + "enabled": true, "language_list": ["Python"], "language_filter": "whitelist", "entries": [ + {"name": "'''''' Triple Single Quotes", "brackets": ["'''", "'''${BH_SEL}"], "insert_style": ["inline", "block"]}, + {"name": "\"\"\"\"\"\" Triple Double Quotes", "brackets": ["\"\"\"", "\"\"\"${BH_SEL}"], "insert_style": ["inline", "block"]} + ] + }, + { + "enabled": true, "language_list": ["HTML", "HTML 5", "XML", "PHP", "HTML+CFML", "ColdFusion", "ColdFusionCFC"], "language_filter": "whitelist", "entries": [ + {"name": "HTML/XML Tag", "brackets": ["<${BH_SEL:NAME}>", ""], "insert_style": ["inline", "block", "indent_block"]} + ] + }, + { + "enabled": true, "language_list": ["Markdown"], "language_filter": "whitelist", "entries": [ + {"name": "Mardown: Bold", "brackets": ["**", "**${BH_SEL}"]}, + {"name": "Mardown: Italic", "brackets": ["_", "_${BH_SEL}"]} + ] + }, + { + "enabled": true, "language_list": ["C++", "C"], "language_filter": "whitelist", "entries": [ + {"name": "C/C++: #if", "brackets": ["#if ${BH_SEL:/* CONDITION */}", "#endif"], "insert_style": ["block"]}, + {"name": "C/C++: #if, #else", "brackets": ["#if ${BH_SEL:/* CONDITION */}", "#else\n${BH_TAB:/* CODE */}\n#endif"], "insert_style": ["block"]}, + {"name": "C/C++: #if, #elif", "brackets": ["#if ${BH_SEL:/* CONDITION */}", "#elif ${BH_TAB:/* CONDITION */}\n${BH_TAB:/* CODE */}\n#endif"], "insert_style": ["block"]}, + {"name": "C/C++: #ifdef", "brackets": ["#ifdef ${BH_SEL:/* DEFINE */}", "#endif"], "insert_style": ["block"]}, + {"name": "C/C++: #ifdef, #else", "brackets": ["#ifdef ${BH_SEL:/* DEFINE */}", "#else\n${BH_TAB:/* CODE */}\n#endif"], "insert_style": ["block"]}, + {"name": "C/C++: #ifndef", "brackets": ["#ifndef ${BH_SEL:/* DEFINE */}", "#endif"], "insert_style": ["block"]}, + {"name": "C/C++: #ifndef, #else", "brackets": ["#ifndef ${BH_SEL:/* DEFINE */}", "#else\n${BH_TAB:/* CODE */}\n#endif"], "insert_style": ["block"]} + ] + }, + { + "enabled": true, "language_list": ["Ruby"], "language_filter": "whitelist", "entries": [ + {"name": "Ruby: if", "brackets": ["if ${BH_SEL:CONDITION}", "end"], "insert_style": ["indent_block"]}, + {"name": "Ruby: until", "brackets": ["until ${BH_SEL:CONDITION}", "end"], "insert_style": ["indent_block"]}, + {"name": "Ruby: while", "brackets": ["while ${BH_SEL:CONDITION}", "end"], "insert_style": ["indent_block"]}, + {"name": "Ruby: def", "brackets": ["def ${BH_SEL:NAME}", "end"], "insert_style": ["indent_block"]} + ] + }, + { + "enabled": true, "language_list": ["CSS"], "language_filter": "whitelist", "entries": [ + {"name": "CSS: @group", "brackets": ["/* @group ${BH_SEL:NAME} */", "/* @end */"], "insert_style": ["block"]} + ] + } + ] +} diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/angle_bracket.png b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/angle_bracket.png new file mode 100644 index 0000000..eb72330 Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/angle_bracket.png differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/angle_bracket_close.png b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/angle_bracket_close.png new file mode 100644 index 0000000..d638c0e Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/angle_bracket_close.png differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/angle_bracket_close_small.png b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/angle_bracket_close_small.png new file mode 100644 index 0000000..724eb34 Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/angle_bracket_close_small.png differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/angle_bracket_open.png b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/angle_bracket_open.png new file mode 100644 index 0000000..bed5b16 Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/angle_bracket_open.png differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/angle_bracket_open_small.png b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/angle_bracket_open_small.png new file mode 100644 index 0000000..dc7be3d Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/angle_bracket_open_small.png differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/angle_bracket_small.png b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/angle_bracket_small.png new file mode 100644 index 0000000..d55828a Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/angle_bracket_small.png differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/bookmark.png b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/bookmark.png new file mode 100644 index 0000000..0ca4952 Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/bookmark.png differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/bookmark_small.png b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/bookmark_small.png new file mode 100644 index 0000000..4aa0a12 Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/bookmark_small.png differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/circle.png b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/circle.png new file mode 100644 index 0000000..8073357 Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/circle.png differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/circle_small.png b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/circle_small.png new file mode 100644 index 0000000..da6d4b4 Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/circle_small.png differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/curly_bracket.png b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/curly_bracket.png new file mode 100644 index 0000000..66b8817 Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/curly_bracket.png differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/curly_bracket_close.png b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/curly_bracket_close.png new file mode 100644 index 0000000..b16d320 Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/curly_bracket_close.png differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/curly_bracket_close_small.png b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/curly_bracket_close_small.png new file mode 100644 index 0000000..fde34df Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/curly_bracket_close_small.png differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/curly_bracket_open.png b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/curly_bracket_open.png new file mode 100644 index 0000000..49f90ab Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/curly_bracket_open.png differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/curly_bracket_open_small.png b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/curly_bracket_open_small.png new file mode 100644 index 0000000..9a7584e Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/curly_bracket_open_small.png differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/curly_bracket_small.png b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/curly_bracket_small.png new file mode 100644 index 0000000..b8a4d91 Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/curly_bracket_small.png differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/dot.png b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/dot.png new file mode 100644 index 0000000..95f2c7d Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/dot.png differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/dot_small.png b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/dot_small.png new file mode 100644 index 0000000..32c26d2 Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/dot_small.png differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/double_quote.png b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/double_quote.png new file mode 100644 index 0000000..e9c96d1 Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/double_quote.png differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/double_quote_close.png b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/double_quote_close.png new file mode 100644 index 0000000..7c25d76 Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/double_quote_close.png differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/double_quote_close_small.png b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/double_quote_close_small.png new file mode 100644 index 0000000..71af73b Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/double_quote_close_small.png differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/double_quote_offset.png b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/double_quote_offset.png new file mode 100644 index 0000000..403cbfc Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/double_quote_offset.png differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/double_quote_offset_open.png b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/double_quote_offset_open.png new file mode 100644 index 0000000..aaaa8b6 Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/double_quote_offset_open.png differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/double_quote_offset_open_small.png b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/double_quote_offset_open_small.png new file mode 100644 index 0000000..d5f4f84 Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/double_quote_offset_open_small.png differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/double_quote_offset_small.png b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/double_quote_offset_small.png new file mode 100644 index 0000000..131c95b Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/double_quote_offset_small.png differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/double_quote_open.png b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/double_quote_open.png new file mode 100644 index 0000000..aaaa8b6 Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/double_quote_open.png differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/double_quote_open_small.png b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/double_quote_open_small.png new file mode 100644 index 0000000..d5f4f84 Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/double_quote_open_small.png differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/double_quote_small.png b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/double_quote_small.png new file mode 100644 index 0000000..3d4daeb Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/double_quote_small.png differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/question.png b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/question.png new file mode 100644 index 0000000..fc0bf7a Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/question.png differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/question_small.png b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/question_small.png new file mode 100644 index 0000000..434dc2c Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/question_small.png differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/quote.png b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/quote.png new file mode 100644 index 0000000..d4fe698 Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/quote.png differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/quote_small.png b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/quote_small.png new file mode 100644 index 0000000..414e6ba Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/quote_small.png differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/round_bracket.png b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/round_bracket.png new file mode 100644 index 0000000..92e3c48 Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/round_bracket.png differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/round_bracket_close.png b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/round_bracket_close.png new file mode 100644 index 0000000..1c23aee Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/round_bracket_close.png differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/round_bracket_close_small.png b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/round_bracket_close_small.png new file mode 100644 index 0000000..231cecf Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/round_bracket_close_small.png differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/round_bracket_open.png b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/round_bracket_open.png new file mode 100644 index 0000000..6bea404 Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/round_bracket_open.png differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/round_bracket_open_small.png b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/round_bracket_open_small.png new file mode 100644 index 0000000..74e7ab6 Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/round_bracket_open_small.png differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/round_bracket_small.png b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/round_bracket_small.png new file mode 100644 index 0000000..b119830 Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/round_bracket_small.png differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/single_quote.png b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/single_quote.png new file mode 100644 index 0000000..a69f2c0 Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/single_quote.png differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/single_quote_close.png b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/single_quote_close.png new file mode 100644 index 0000000..1e1e7f0 Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/single_quote_close.png differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/single_quote_close_small.png b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/single_quote_close_small.png new file mode 100644 index 0000000..ddd2499 Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/single_quote_close_small.png differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/single_quote_offset.png b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/single_quote_offset.png new file mode 100644 index 0000000..bc59327 Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/single_quote_offset.png differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/single_quote_offset_open.png b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/single_quote_offset_open.png new file mode 100644 index 0000000..7c08844 Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/single_quote_offset_open.png differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/single_quote_offset_open_small.png b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/single_quote_offset_open_small.png new file mode 100644 index 0000000..8a159e3 Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/single_quote_offset_open_small.png differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/single_quote_offset_small.png b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/single_quote_offset_small.png new file mode 100644 index 0000000..98460c6 Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/single_quote_offset_small.png differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/single_quote_open.png b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/single_quote_open.png new file mode 100644 index 0000000..7c08844 Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/single_quote_open.png differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/single_quote_open_small.png b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/single_quote_open_small.png new file mode 100644 index 0000000..8a159e3 Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/single_quote_open_small.png differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/single_quote_small.png b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/single_quote_small.png new file mode 100644 index 0000000..f21e44e Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/single_quote_small.png differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/square_bracket.png b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/square_bracket.png new file mode 100644 index 0000000..84bdf1c Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/square_bracket.png differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/square_bracket_close.png b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/square_bracket_close.png new file mode 100644 index 0000000..3e86fbc Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/square_bracket_close.png differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/square_bracket_close_small.png b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/square_bracket_close_small.png new file mode 100644 index 0000000..c743d19 Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/square_bracket_close_small.png differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/square_bracket_open.png b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/square_bracket_open.png new file mode 100644 index 0000000..0281a63 Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/square_bracket_open.png differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/square_bracket_open_small.png b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/square_bracket_open_small.png new file mode 100644 index 0000000..470ed3c Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/square_bracket_open_small.png differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/square_bracket_small.png b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/square_bracket_small.png new file mode 100644 index 0000000..d96bd87 Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/square_bracket_small.png differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/star.png b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/star.png new file mode 100644 index 0000000..a754806 Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/star.png differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/star_small.png b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/star_small.png new file mode 100644 index 0000000..eec374d Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/star_small.png differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/tag.png b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/tag.png new file mode 100644 index 0000000..7e8f47c Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/tag.png differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/tag_small.png b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/tag_small.png new file mode 100644 index 0000000..46fad36 Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/icons/tag_small.png differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/package-metadata.json b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/package-metadata.json new file mode 100644 index 0000000..b699bc8 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/package-metadata.json @@ -0,0 +1 @@ +{"url": "https://github.com/facelessuser/BracketHighlighter", "version": "2013.03.27.09.00.08", "description": "Bracket and tag highlighter for Sublime Text 2"} \ No newline at end of file diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/readme.md b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/readme.md new file mode 100644 index 0000000..f9067f3 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/readme.md @@ -0,0 +1,470 @@ +# About +This is a fork of pyparadigm's _SublimeBrackets_ and _SublimeTagmatcher_ (both are no longer available). I forked this to fix some issues I had and to add some features I wanted. I also wanted to improve the efficiency of the matching. This cuts down on the parallel searching that is now streamlined in one search. Since then, I have rewritten the entire code base to bring more flexibility, speed, and features. + + + +## Sublime Text 3 Support? +ST3 support is found here (at the present time): https://github.com/facelessuser/BracketHighlighter/tree/BH2ST3 + +## Overview +Bracket Highlighter matches a variety of brackets such as: ```[]```, ```()```, ```{}```, ```""```, ```''```, ``````, and even custom brackets. + +# FeatureList +- Customizable to highlight almost any bracket +- Customizable bracket highlight style +- High visibility bracket highlight mode +- Selectively disable or enable specific matching of tags, brackets, or quotes +- Selectively whitelist or blacklist matching of specific tags, brackets, or quotes based on language +- When bound to a shortcut, allow option to show line count and char count between match in the status bar +- Highlight basic brackets within strings +- Works with multi-select +- Configurable custom gutter icons +- Toggle bracket escape mode for string brackets (regex|string) +- Bracket plugins that can jump between bracket ends, select content, remove brackets and/or content, wrap selectios with brackets, swap brackets, swap quotes (handling quote escaping between the main quotes), fold/unfold conent between brackets, toggle through tag attribute selecection, select both the opening and closing tag name to change both simultaneously. + +# General Use +In general BracketHighligher (BH) will automatically highlight brackets (or defined bracket like start and end blocks) its between. By default, BH will but opening and closing icons in the gutter of the corresponding line containing open or closising bracket. BH, by default, will underline the closing and opening bracket as well. + +## Built-in Supported brackets +Currently BH supports the following brackets out of the box: + +- round +- square +- curly +- angle +- single and double quotes +- python single and double quotes (unicode and raw) +- python tripple single and double quotes (unicode and raw) +- Javascript regex +- Perl regex +- Ruby regex +- Markdown italic +- Markdown bold +- CSSedit groups +- Ruby conditional statements +- C/C++ compiler switches +- PHP conditional keywords +- Erlang conditional statements +- HTML/ColdFusion/XML tags + +BH also supports highlighting basic sub brackets ```(), [], {}``` within supported regex and strings. + +## Additional Features +BH has a couple of additonal features built-in. + +### Toggle Global Enable (bh_toggle_enable) +This command enables and disables BH globally + +### Toggle String Bracket Escape Mode (bh_toggle_string_escape_mode) +This toggles BH's recognition mode of escaped sub brackets in strings and regex. The modes are string escape mode and regex escape mode. + +### Settings +When changing settings, you should copy the entire ```bh_core.sublime-settings``` to your ```User``` folder before changing. Style and color will be discussed in greater depth in the ```Configuring Highlight Style``` section. + +These are the basic settings you can change: +```javascript + //Debug logging + "debug_enable": false, + + // When only either the left or right bracket can be found + // this defines if the unmatched bracket should be shown. + "show_unmatched" : true, + + // High visibilty style and color for high visibility mode + // (solid|outline|underline) + "high_visibility_style": "outline", + // (scope|__default__|__bracket__) + "high_visibility_color": "__bracket__", + + // Match brackets only when the cursor is touching the inside of the bracket + "match_only_adjacent": false, + + // Character threshold to search + "search_threshold": 5000, + + // Set mode for string escapes to ignore (regex|string) + "bracket_string_escape_mode": "string", + + // Set max number of multi-select brackets that will be searched automatically + "auto_selection_threshold" : 10, + + // Disable gutter icons when doing multi-select + "no_multi_select_icons": false, +``` + +### Bracket Plugins +Bh is also extendable via plugins and provides an number of plugins by default. See ```Bracket Plugins``` to learn more about the included plugins. + +## Bracket Plugin +BH provides a number of built in Bracket Plugins that take advantage of BH's matching to provide additional features. Most plugin features are available via the Tools->Packages->BracketHighlighter menu or the command palette. To see how to configure shortcuts, see the ```Example.sublime-settings``` file. + +### Bracket Select Plugin +This plugin changes the selection inside between the brackets. It can select the content or move the bracket to the opening and closing bracket. Behavior is slightly modified for tags. + +### Bracket Remove Plugin +Removes the surrounding brackets. + +### Fold Bracket Plugin +Folds the content of the current surrounding brackets. + +### Swap Quotes Plugin +Swap the quotes style of surrounding quotes from double to single or vice versa. It also handlings escaping and unescaping of sub quotes. + +### Tag Plugin +Plugin used to help highlight tags + +Additional tag settings found in ```bh_core.sublime-settings```: +```javascript + /* Plugin settings */ + + // Style to use for matched tags + "tag_style": "tag", + + // Scopes to exclude from tag searches + "tag_scope_exclude": ["string", "comment"], + + // Determine which style of tag-matching to use in which syntax + "tag_mode": { + "xhtml": ["XML"], + "html": ["HTML", "HTML 5", "PHP"], + "cfml": ["HTML+CFML", "ColdFusion", "ColdFusionCFC"] + } +``` + +### Tag Attribute Select Plugin +Cycle through selecting tag attributes of tags. + +### Tag Name Select Plugin +Select the opening and closing tag name of current tag. + +### Bracket Wrapping Plugin +Wrap the current selection with supported bracket of your choice. Wrapping definitions are configured in ```bh_wrapping.sublime-settings```. + +### Bracket Swapping Plugin +Swap the current surrounding bracket with supported bracket of your choice. Swapping definitions are configured in ```bh_swapping.sublime-settings```. + +## Shortcuts +By default BH provides no shortcuts to avoid shortcut conflicts, but you can view the included ```Example.sublime-keymaps``` file to get an idea how to set up your own. + +# Customizing BracketHighligher +BH is extremely flexible and be customized and extended to fit a User's needs. The first step is to copy the ```bh_core.sublime-settings``` to your ```User``` folder. + +## Configuring Brackets +BH has been written to allow users to define any brackets they would like to have highlighted. There are two kinds of brackets you can define ```scope_brackets``` (search file for scope regions and then use regex to test for opening and closing brackets) and ```brackets``` (use regex to find opening and closing brackets). ```bracket``` type should usually be the preferred type. ```scope_brackets``` are usually used for brackets whose opening and closing are the same and not distinguishable form one another by regex; scope brackets must be contained in a continuous scope region like string for quotes etc. + +### Configuring Brackets +Brackets are defined under ```brackets``` in ```bh_core.sublime-settings```. + +Angle and Curly bracket will be used as an eample (not all options may be shown in these examples): + +```javascript + { + "name": "angle", + "open": "(<)", + "close": "(>)", + "style": "angle", + "scope_exclude": ["string", "comment", "keyword.operator"], + "language_filter": "whitelist", + "language_list": ["HTML", "HTML 5", "XML", "PHP", "HTML+CFML", "ColdFusion", "ColdFusionCFC"], + "plugin_library": "bh_modules.tags", + "enabled": true + }, + { + "name": "curly", + "open": "(\\{)", + "close": "(\\})", + "style": "curly", + "scope_exclude": ["string", "comment"], + "scope_exclude_exceptions": ["string.other.math.block.environment.latex"], + "language_filter": "blacklist", + "language_list": ["Plain text"], + "find_in_sub_search": "true", + "ignore_string_escape": true, + "enabled": true + }, +``` + +- **name**: the name of the bracket (should be unique) +- **open**: defines the opening bracket (one and only one captureing group must be present) +- **close**: defines the closing bracket (one and only one captureing group must be present) +- **style**: Name of style definition to be used to highlight the brackets. See ```Configuring Bracket Styles``` for more info. +- **scope_exclude**: Scopes where the opening and closing brackets should be ignored. +- **language_filter**: This works in conjunction with ```language_list```. It specifies whether ```language_list``` is a ```blacklist``` or ```whitelist```. +- **language_list**: an array of tmLanguage file names that should be avoided or included for highlighting. Looks to ```language_filter``` to determine if avoidance or inclusion is used. +- **enabled**: disable or enable rule +- **scope_exclude_exceptions (optional)***: used to ignore exluding of sub scopes such as in the curly example above where ```string``` is excluded, but not ```string.other.math.block.environment.latex```. +- **plugin_library (optional)**: defines plugin to use for determining matches (see Bracket Plugin API for more info on matching plugins) +- **find_in_sub_search (optional)**: this rule should be included when doing sub bracket matching in ```scope_brackets``` (like finding round brackets between quotes etc.). The setting must be as string and can be either (true|false|only); only means this bracket is only matched as a sub bracket of a ```scope_bracket```. +- **ignore_string_escape (optional)**: Do not ignore sub brackets found in strings and regex when escaped, but use internal escape logic to determine if the brackets should be ignored based on whether regex or string escape mode is set. + +### Configuring Scope Brackets +Scope Brackets are defined under ```scope_brackets``` in ```bh_core.sublime-settings```. + +Python Single Quote bracket will be used as an eample (not all options are shown in this example): + +```javascript + { + "name": "py_single_quote", + "open": "u?r?((?:'')?')", + "close": "((?:'')?')", + "style": "single_quote", + "scopes": ["string"], + "language_filter": "whitelist", + "language_list": ["Python"], + "sub_bracket_search": "true", + "enabled": true + }, +``` + +- **name**: the name of the bracket (should be unique) +- **open**: defines the opening bracket (one and only one captureing group must be present) +- **close**: defines the closing bracket (one and only one captureing group must be present) +- **style**: Name of style definition to be used to highlight the brackets. See ```Configuring Bracket Styles``` for more info. +- **scopes**: scope that should be searched to find the opening and closing brackets. +- **language_filter**: This works in conjunction with ```language_list```. It specifies whether ```language_list``` is a ```blacklist``` or ```whitelist```. +- **language_list**: an array of tmLanguage file names that should be avoided or included for highlighting. Looks to ```language_filter``` to determine if avoidance or inclusion is used. +- **sub_bracket_search**: should this scope bracket also search for sub brackets (like curly brackets in strings etc.). +- **enabled**: disable or enable rule +- **plugin_library (optional)**: defines plugin to use for determining matches (see Bracket Plugin API for more info on matching plugins) + +## Configuring Highlight Style +Each bracket definition (described in ```Configuring Scope Brackets``` and ```Configuring Brackets```) has a ```style``` setting that you give a style definition to. Style definitions are defined under ```bracket_styles``` in ```bh_core.sublime-settings```. + +There are two special style definitions whose names are reserved: ```default``` and ```unmatched```, but you can configure them. All other custom style definitions follow the same pattern (see ```curly``` below and compare to the special style defintions; format is the same) All custom styles follow this pattern. See description below: + +```javascript + // "default" style defines attributes that + // will be used for any style that does not + // explicitly define that attribute. So if + // a style does not define a color, it will + // use the color from the "default" style. + "default": { + "icon": "dot", + "color": "brackethighlighter.default", + "style": "underline" + }, + + // This particular style is used to highlight + // unmatched bracekt pairs. It is a special + // style. + "unmatched": { + "icon": "question", + // "color": "brackethighlighter.unmatched", + "style": "outline" + }, + // User defined region styles + "curly": { + "icon": "curly_bracket" + // "color": "brackethighlighter.curly", + // "style": "underline" + }, +``` + +- **icon**: icon to show in gutter. Available options are (angle|round|curly|square|tag|star|dot|bookmark|question|quote|double_quote|single_quote|single_quote_offset|double_quote_offset|none) +- **color**: scope to define color +- **style**: higlight style. Available options are (solid|outline|underline|none) + +As shown in the example above, if an option is omitted, it will use the setting in ```default```. So ```curly```, in this example, defines ```icon```, but will use ```default``` for the ```color``` and ```style```. + +To customize the color for ```curly``` you can create your own custom scope. + +Add this to your color scheme: +```XML + + name + Bracket Curly + scope + brackethighlighter.curly + settings + + foreground + #CC99CC + + +``` + +And then use the scope: +```javascript + "curly": { + "icon": "curly_bracket" + "color": "brackethighlighter.curly", + // "style": "underline" + }, +``` + +# Bracket Plugin API +There are two kinds of plugins that can be written ```definition``` plugins (plugins attached to bracket definitions via the ```plugin_library``` option) or ```run instance``` plugins (plugins that are that are fed in the BracketHighligher via the command parameter ```plugin```). + +Bracket plugins use ```BracketRegions```. ```BracketRegions``` are simple objects containing a begin pt and end pt of a bracket. + +Class: + +- **BracketRegion(begin_pt, end_pt)** + +Attributes of BracketRegion: + +- **begin**: the start pt of the BracketRegion +- **end**: the end pt of the BracketRegion + +Methods of BracketRegion: + +- **size()**: returns size of region +- **move(begin_pt, end_pt)**: returns a new BracketRegion object with the points moved as specified by the parameters +- **toregion**: returns a sublime Region() object + +## 'Defintion' Plugins +These are plugins that are attached to the bracket definition and aid in processing the brackets. These kids of plugins have two methods you can provide ```post_match``` and/or ```compare```. + +### compare +```compare``` is run when comparing the opening bracket with closing brackets. This allows you to provide logic to accept or regect a the pairing of an opening bracket with a closing bracket. You should not change the text in the view during this operation. + +The ```compare``` method receives the following paramters: + +- **name**: the name of the bracket definition being evaluated +- **first**: a bracket region for the opening bracket +- **second**: a bracket region for the closing bracket +- **bfr**: the file buffer + +Returns: + +- **Boolean**: indicating whether the the comparison yields a suitable match + +Example (from phphekywords.py): +```python +def compare(name, first, second, bfr): + return "end" + bfr[first.begin:first.end].lower() == bfr[second.begin:second.end].lower() +``` + +### post_match +```post_match``` is run after the brackets have been matched. You can do things like alter the highlighting region and change the bracket_style if needed. You should not change the text in the view during this operation. + +The ```post_match``` method receives the following parameters: + +- **name**: the name of the bracket definition being evaluated +- **style**: the style definition name that is to be used to highlight the region +- **first**: a bracket region for the opening bracket +- **second**: a bracket region for the closing bracket +- **center**: position (pt) of cursor (in retrospect, probably not the most intuitive name; not sure why I named it such) +- **bfr**: the file buffer +- **threshold**: the calculated search window of the buffer that is being searched + +Returns: + +- **BracketRegion**: opening bracket region +- **BracketRegion**: closing bracekt region +- **style**: the name of the style definition to use + +Example (from rubykeywords.py): +```python +import re + + +def post_match(view, name, style, first, second, center, bfr, threshold): + if first is not None: + # Strip whitespace from the beginning of first bracket + open_bracket = bfr[first.begin:first.end] + if open_bracket != "do": + m = re.match(r"^(\s*\b)[\w\W]*", open_bracket) + if m: + first = first.move(first.begin + m.end(1), first.end) + return first, second, style +``` + +Example (snippet from tags.py) +```python +def post_match(view, name, style, first, second, center, bfr, threshold): + left, right = first, second + threshold = [0, len(bfr)] if threshold is None else threshold + tag_settings = sublime.load_settings("bh_core.sublime-settings") + tag_mode = get_tag_mode(view, tag_settings.get("tag_mode", {})) + tag_style = tag_settings.get("tag_style", "angle") + bracket_style = style + + if first is not None and tag_mode is not None: + matcher = TagMatch(view, bfr, threshold, first, second, center, tag_mode) + left, right = matcher.match() + if not matcher.no_tag: + bracket_style = tag_style + + return left, right, bracket_style +``` + +## Run Instance Plugins +```Run instance``` plugins are fed into the command executing a BracketHighlighter match via the ```plugin``` parameter. + +Example of run instance plugin getting called: +```javascript +// Go to left bracket + { + "caption": "BracketHighlighter: Jump to Left Bracket", + "command": "bh_key", + "args": + { + "lines" : true, + "plugin": + { + "type": ["__all__"], + "command": "bh_modules.bracketselect", + "args": {"select": "left"} + } + } + }, +``` + +The ```plugin``` paramter is a dictionary that contains 3 parameters to define what plugin should get run, with what arguments, and on what bracket defintion. + +- **type**: an array containing the bracket definition names that the plugin should be run on. Use ```__all__``` for all bracket definitions. +- **command**: the plugin to run. For internal plugins, they are referenced by ```bh_modules.```. For custom plugins, you should use the folder path releative to ```Packages```. So if I had a plugin called ```myplugin.py``` in my ```User``` folder, I would use ```User.myplugin```. +- **args**: a dictionary contianing the arguments to feed into the plugin. + +You create ```run instance``` plugins by deriving a class from the ```BracketPluginCommand``` class. Then you provide a method called ```plugin``` that returns the class. + +Class: + +- **BracketPluginCommand()** + +Parameters of BracketPluginCommand: + +- **edit**: sublime edit object +- **name**: name of tag definition being evaluated + +Attributes of BracketPluginCommand: + +- **view**: the sublime view containg the bracket (don't change this) +- **left**: a bracket region for the opening bracket (can be changed) +- **right**: a bracket region for the closing bracket (can be changed) +- **selection**: an array containing the selection that triggered the match (can be changed) + +Methods of BracketPluginCommand: + +- **run(edit, name, )**: (edit is a sublime edit object and name is the bracket definition being evaluated) + +Example (from foldbracket.py): +```python +import BracketHighlighter.bh_plugin as bh_plugin +import sublime + + +class FoldBrackets(bh_plugin.BracketPluginCommand): + def run(self, edit, name): + content = sublime.Region(self.left.end, self.right.begin) + new_content = [content] + if content.size() > 0: + if self.view.fold(content) == False: + new_content = self.view.unfold(content) + self.selection = new_content + + +def plugin(): + return FoldBrackets +``` + +# Credits +- pyparadigm: for his original efforts with SublimeBrackets and SublimeTagmatcher which originally BracketHighlighter was built off of and the inspiration behind the current implementation. +- BoundInCode: for his Tag icon + +# Version 2.0.0 +- Re-write of BracketHighlighter + +# Version Older +- See [Complete Changelog](https://github.com/facelessuser/BracketHighlighter/blob/BH2/CHANGELOG.md) diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Bracketeer/Default.sublime-commands b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Bracketeer/Default.sublime-commands new file mode 100644 index 0000000..ebd4a05 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Bracketeer/Default.sublime-commands @@ -0,0 +1,25 @@ +[ + { + "caption": "Bracketeer: Indent Text", + "command": "bracketeer_indent" + }, + { + "caption": "Bracketeer: Select Inside Braces", + "command": "bracketeer_select" + }, + { + "caption": "Bracketeer: Insert curly brackets", + "command": "bracketeer", + "args": { "braces": "{}" } + }, + { + "caption": "Bracketeer: Insert square brackets", + "command": "bracketeer", + "args": { "braces": "[]" } + }, + { + "caption": "Bracketeer: Insert round brackets, aka parentheses", + "command": "bracketeer", + "args": { "braces": "()" } + } +] diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Bracketeer/Example.sublime-keymap b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Bracketeer/Example.sublime-keymap new file mode 100644 index 0000000..7d87ac3 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Bracketeer/Example.sublime-keymap @@ -0,0 +1,276 @@ +[ + { "keys": ["super+]"], "command": "bracketeer_indent" }, + { "keys": ["ctrl+shift+["], "command": "bracketeer_select" }, + + { "keys": ["ctrl+["], "command": "bracketeer_goto", "args": { "goto": "left" } }, + { "keys": ["ctrl+]"], "command": "bracketeer_goto", "args": { "goto": "right" } }, + { "keys": ["ctrl+alt+["], "command": "bracketeer_goto", "args": { "goto": "both" } }, + { "keys": ["ctrl+alt+]"], "command": "bracketeer_goto", "args": { "goto": "both" } }, + //| + //| BRACKETEER + //| + { "keys": ["{"], "command": "bracketeer", "args": { "braces": "{}", "unindent": true } }, + { "keys": ["}"], "command": "bracketeer", "args": { "braces": "{}", "pressed": "}", "unindent": true } }, + { "keys": ["["], "command": "bracketeer", "args": { "braces": "[]" } }, + { "keys": ["]"], "command": "bracketeer", "args": { "braces": "[]", "pressed": "]" } }, + { "keys": ["("], "command": "bracketeer", "args": { "braces": "()" } }, + { "keys": [")"], "command": "bracketeer", "args": { "braces": "()", "pressed": ")" } }, + + //| reStructured Text + { "keys": ["alt+`"], "command": "bracketeer", "args": { "braces": "````", "pressed": "``" }, "context": + [ + { "key": "selector", "operator": "equal", "operand": "text.restructuredtext" } + ] + }, + { "keys": ["*"], "command": "bracketeer", "args": { "braces": "**", "pressed": "*" }, "context": + [ + { "key": "selector", "operator": "equal", "operand": "text.restructuredtext" } + ] + }, + + //| DJANGO CURLIES + // For django, liquid, jinja. All the grammars *I* have list 'source.smarty' as + // when the cursor is inside "{}"s + { "keys": ["{"], "command": "bracketeer", "args": { "braces": "{ }" }, "context": + [{ "key": "selector", "operator": "equal", "operand": "source.smarty" }] + }, + { "keys": ["{"], "command": "bracketeer", "args": { "braces": "{ }" }, "context": + [{ "key": "selector", "operator": "equal", "operand": "meta.brace.curly" }] + }, + { "keys": ["%"], "command": "bracketeer", "args": { "braces": "% %" }, "context": + [{ "key": "selector", "operator": "equal", "operand": "source.smarty" }] + }, + { "keys": ["%"], "command": "bracketeer", "args": { "braces": "% %" }, "context": + [ + { "key": "selector", "operator": "equal", "operand": "meta.brace.curly" }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "<$", "match_all": true } + ] + }, + { "keys": ["%"], "command": "insert_snippet", "args": { "contents": " $1 %>$0" }, "context": + [ + { "key": "selector", "operator": "equal", "operand": "source.ruby" }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "<%$", "match_all": true } + ] + }, + { "keys": [">"], "command": "insert_snippet", "args": { "contents": ">$1<% $0" }, "context": + [ + { "key": "selector", "operator": "equal", "operand": "source.ruby" }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "%$", "match_all": true } + ] + }, + { "keys": ["="], "command": "insert_snippet", "args": { "contents": "= $1 %>$0" }, "context": + [ + { "key": "selector", "operator": "equal", "operand": "source.ruby" }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "<%$", "match_all": true } + ] + }, + { "keys": ["-"], "command": "insert_snippet", "args": { "contents": "- $1 %>$0" }, "context": + [ + { "key": "selector", "operator": "equal", "operand": "source.ruby" }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "<%$", "match_all": true } + ] + }, + { "keys": ["#"], "command": "bracketeer", "args": { "braces": "# #" }, "context": + [{ "key": "selector", "operator": "equal", "operand": "source.smarty" }] + }, + + //| QUOTES + { "keys": ["\""], "command": "bracketeer", "args": { "braces": "\"\"", "pressed": "\"" } }, + { "keys": ["ctrl+'","ctrl+'"], "command": "bracketeer", "args": { "braces": "\"\"\"\n\n\"\"\"" } }, + { "keys": ["'"], "command": "bracketeer", "args": { "braces": "''", "pressed": "'" } }, + { "keys": ["ctrl+'","'"], "command": "bracketeer", "args": { "braces": "'''\n\n'''" } }, + { "keys": ["`"], "command": "bracketeer", "args": { "braces": "``", "pressed": "`" } }, + { "keys": ["ctrl+'","`"], "command": "insert_snippet", "args": { "contents": "```${1:syntax}\n$0\n```" } }, + { "keys": ["«"], "command": "bracketeer", "args": { "braces": "«»" } }, + { "keys": ["»"], "command": "bracketeer", "args": { "braces": "«»", "pressed": "»" } }, + { "keys": ["‹"], "command": "bracketeer", "args": { "braces": "‹›" } }, + { "keys": ["›"], "command": "bracketeer", "args": { "braces": "‹›", "pressed": "›" } }, + { "keys": ["“"], "command": "bracketeer", "args": { "braces": "“”" } }, + { "keys": ["”"], "command": "bracketeer", "args": { "braces": "“”", "pressed": "”" } }, + { "keys": ["‘"], "command": "bracketeer", "args": { "braces": "‘’" } }, + { "keys": ["’"], "command": "bracketeer", "args": { "braces": "‘’", "pressed": "’" } }, + + //| + //| AUTO DELETE MATCHING '', "", [], etc. + //| + { "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Left Right.sublime-macro"}, "context": + [ + { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "\"$" }, + { "key": "following_text", "operator": "regex_contains", "operand": "^\"" } + ] + }, + { "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Left Right.sublime-macro"}, "context": + [ + { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "'$" }, + { "key": "following_text", "operator": "regex_contains", "operand": "^'" } + ] + }, + { "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Left Right.sublime-macro"}, "context": + [ + { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "`$" }, + { "key": "following_text", "operator": "regex_contains", "operand": "^`" } + ] + }, + { "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Left Right.sublime-macro"}, "context": + [ + { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "«$" }, + { "key": "following_text", "operator": "regex_contains", "operand": "^»" } + ] + }, + { "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Left Right.sublime-macro"}, "context": + [ + { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "‹$" }, + { "key": "following_text", "operator": "regex_contains", "operand": "^›" } + ] + }, + { "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Left Right.sublime-macro"}, "context": + [ + { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "“$" }, + { "key": "following_text", "operator": "regex_contains", "operand": "^”" } + ] + }, + { "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Left Right.sublime-macro"}, "context": + [ + { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "‘$" }, + { "key": "following_text", "operator": "regex_contains", "operand": "^’" } + ] + }, + { "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Left Right.sublime-macro"}, "context": + [ + { "key": "selector", "operator": "equal", "operand": "text.restructuredtext" }, + { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "\\*$" }, + { "key": "following_text", "operator": "regex_contains", "operand": "^\\*" } + ] + }, + + //| + //| Bracket and select + //| + { "keys": ["ctrl+alt+[", "backspace"], "command": "bracketeer", "args": { "braces": "", "select": true, "replace": true }, "context": + [{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }] + }, + { "keys": ["ctrl+[", "d"], "command": "bracketeer", "args": { "braces": ["do", "end"], "select": true }, "context": + [{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }] + }, + { "keys": ["ctrl+alt+[", "d"], "command": "bracketeer", "args": { "braces": ["do", "end"], "select": true, "replace": true }, "context": + [{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }] + }, + { "keys": ["ctrl+[", "{"], "command": "bracketeer", "args": { "braces": "{}", "select": true }, "context": + [{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }] + }, + { "keys": ["ctrl+alt+[", "{"], "command": "bracketeer", "args": { "braces": "{}", "select": true, "replace": true }, "context": + [{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }] + }, + { "keys": ["ctrl+[", " "], "command": "bracketeer", "args": { "braces": " ", "select": true }, "context": + [{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }] + }, + { "keys": ["ctrl+alt+[", " "], "command": "bracketeer", "args": { "braces": " ", "select": true, "replace": true }, "context": + [{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }] + }, + { "keys": ["ctrl+[", "["], "command": "bracketeer", "args": { "braces": "[]", "select": true }, "context": + [{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }] + }, + { "keys": ["ctrl+alt+[", "["], "command": "bracketeer", "args": { "braces": "[]", "select": true, "replace": true }, "context": + [{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }] + }, + { "keys": ["ctrl+[", "("], "command": "bracketeer", "args": { "braces": "()", "select": true }, "context": + [{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }] + }, + { "keys": ["ctrl+alt+[", "("], "command": "bracketeer", "args": { "braces": "()", "select": true, "replace": true }, "context": + [{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }] + }, + { "keys": ["ctrl+[", "\""], "command": "bracketeer", "args": { "braces": "\"\"", "select": true }, "context": + [{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }] + }, + { "keys": ["ctrl+alt+[", "\""], "command": "bracketeer", "args": { "braces": "\"\"", "select": true, "replace": true }, "context": + [{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }] + }, + { "keys": ["ctrl+[", "ctrl+shift+'"], "command": "bracketeer", "args": { "braces": "\"\"\"\"\"\"", "select": true }, "context": + [{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }] + }, + { "keys": ["ctrl+alt+[", "ctrl+shift+'"], "command": "bracketeer", "args": { "braces": "\"\"\"\"\"\"", "select": true, "replace": true }, "context": + [{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }] + }, + { "keys": ["ctrl+[", "'"], "command": "bracketeer", "args": { "braces": "''", "select": true }, "context": + [{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }] + }, + { "keys": ["ctrl+alt+[", "'"], "command": "bracketeer", "args": { "braces": "''", "select": true, "replace": true }, "context": + [{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }] + }, + { "keys": ["ctrl+[", "ctrl+'"], "command": "bracketeer", "args": { "braces": "''''''", "select": true }, "context": + [{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }] + }, + { "keys": ["ctrl+alt+[", "ctrl+'"], "command": "bracketeer", "args": { "braces": "''''''", "select": true, "replace": true }, "context": + [{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }] + }, + { "keys": ["ctrl+[", "`"], "command": "bracketeer", "args": { "braces": "``", "select": true }, "context": + [{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }] + }, + { "keys": ["ctrl+alt+[", "`"], "command": "bracketeer", "args": { "braces": "``", "select": true, "replace": true }, "context": + [{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }] + }, + { "keys": ["ctrl+[", "ctrl+`"], "command": "bracketeer", "args": { "braces": "``````", "select": true }, "context": + [{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }] + }, + { "keys": ["ctrl+alt+[", "ctrl+`"], "command": "bracketeer", "args": { "braces": "``````", "select": true, "replace": true }, "context": + [{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }] + }, + { "keys": ["ctrl+[", "«"], "command": "bracketeer", "args": { "braces": "«»", "select": true }, "context": + [{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }] + }, + { "keys": ["ctrl+alt+[", "«"], "command": "bracketeer", "args": { "braces": "«»", "select": true, "replace": true }, "context": + [{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }] + }, + { "keys": ["ctrl+[", "‹"], "command": "bracketeer", "args": { "braces": "‹›", "select": true }, "context": + [{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }] + }, + { "keys": ["ctrl+alt+[", "‹"], "command": "bracketeer", "args": { "braces": "‹›", "select": true, "replace": true }, "context": + [{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }] + }, + { "keys": ["ctrl+[", "“"], "command": "bracketeer", "args": { "braces": "“”", "select": true }, "context": + [{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }] + }, + { "keys": ["ctrl+alt+[", "“"], "command": "bracketeer", "args": { "braces": "“”", "select": true, "replace": true }, "context": + [{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }] + }, + { "keys": ["ctrl+[", "‘"], "command": "bracketeer", "args": { "braces": "‘’", "select": true }, "context": + [{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }] + }, + { "keys": ["ctrl+alt+[", "‘"], "command": "bracketeer", "args": { "braces": "‘’", "select": true, "replace": true }, "context": + [{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }] + }, + { "keys": ["ctrl+[", "alt+`"], "command": "bracketeer", "args": { "braces": "````", "select": true }, "context": + [{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }] + }, + { "keys": ["ctrl+alt+[", "alt+`"], "command": "bracketeer", "args": { "braces": "````", "select": true, "replace": true }, "context": + [{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }] + }, + { "keys": ["ctrl+[", "*"], "command": "bracketeer", "args": { "braces": "**", "select": true }, "context": + [ + { "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }, + { "key": "selector", "operator": "equal", "operand": "text.restructuredtext" } + ] + }, + { "keys": ["ctrl+alt+[", "*"], "command": "bracketeer", "args": { "braces": "**", "select": true, "replace": true }, "context": + [ + { "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }, + { "key": "selector", "operator": "equal", "operand": "text.restructuredtext" } + ] + } +] diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Bracketeer/README.md b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Bracketeer/README.md new file mode 100644 index 0000000..ef342ae --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Bracketeer/README.md @@ -0,0 +1,133 @@ +Bracketeer plugin for Sublime Text 2 +===================================== + +Some bracket manipulation, selection, and insertion commands. + + +Installation +------------ + +1. Using Package Control, install "Bracketeer" + +Or: + +1. Open the Sublime Text 2 Packages folder + + - OS X: ~/Library/Application Support/Sublime Text 2/Packages/ + - Windows: %APPDATA%/Sublime Text 2/Packages/ + - Linux: ~/.Sublime Text 2/Packages/ + +2. clone this repo +3. Install keymaps for the commands (see Example.sublime-keymap for my preferred keys) + +Commands +-------- + +`bracketeer`: Surrounds selected text with braces (or quotes - anything, really), and prevents indentation mishaps. + +`bracketeer_indent`: Indents sensibly - allows a clever use of enter, indent, and '{' to surround code in '{}'. See example below. + +`bracketeer_goto`: Goes to the matching bracket - either opener (ctrl+[), closer (ctrl+]), or *both* (ctrl+alt+[). + +`bracketeer_select`: Searches for matching brackets and selects what is inside, or expands the selection to include the brackets. + + +### bracketeer + + +Required args: + +`braces`: Two characters. Default key bindings support: + +* `{}` +* `[]` +* `()` +* `<>` +* `«»` +* `‹›` +* `""` +* `''` +* `“”` +* `‘’` +* `\`\`` + +Select some text and press one of these keys. The default Sublime Text braces will re-indent the text, and it looks really silly. This plugin indents sensibly. Helpful in languages that use curlies, e.g. `C`, `Java`, `PHP`. + +In addition, the "super+]" indent command is modified (using `bracketeer_indent`) so that the first and last lines are not indented. Makes it easy to add curly braces. Select some lines of code, with a blank line above and below. Or, if you like your braces on the same line as the `if|while|do`, put the start of the selection at the end of that line. + +Press `super+]`, then press "{". The block of code will be indented, leaving the code highlighted, then you can surround it in braces. + + 1. if ( a ) + 2. echo NULL; + + # add blank lines + 1. if ( a ) + 2. + 3. echo NULL; + 4. + + # select text + 1. if ( a ) + 2. | + 3. echo NULL; + 4. | + + # press super+] + 1. if ( a ) + 2. | + 3. echo NULL; + 4. | + + # press { + 1. if ( a ) + 2. { + 3. echo NULL; + 4. }| + + +### bracketeer_indent + + +Default key combination is super+] + +If the first line of selected text is empty (and keep in mind this *ignores* whatever text is to the left of the selection, so not necessarily an empty line), that line will not be indented. See example usage above. + + +### bracketeer_select + + +Default key combination is ctrl+shift+[ + +Expands the current region to include text *within* brackets, and if pressed again to include the brackets themselves. + +I will use '|' as the caret or selection start and end points: + + 1. do_something([1, '[', {'brace':'{', 'test'}])| + + # move caret into the 'test' string + 1. do_something([1, '[', {'brace':'{', 'te|st'}]) + + # press ctrl+shift+[ + # the first bracket it finds is the '}', so it will match {}s + # notice it will ignore the '{', which would otherwise look like the matching brace + 1. do_something([1, '[', {|'brace':'{', 'test'|}]) + + # press ctrl+shift+[ + # adds the {} to the selection + 1. do_something([1, '[', |{'brace':'{', 'test'}|]) + + # press ctrl+shift+[ + # selects between the []s. + 1. do_something([|1, '[', {'brace':'{', 'test'}|]) + + # press ctrl+shift+[ + # selects the []s. + 1. do_something(|[1, '[', {'brace':'{', 'test'}]|) + + # press ctrl+shift+[ + # selects the ()s. It would have expanded to select *between* the (), but that is what the selection already *was to start with* + 1. do_something|([1, '[', {'brace':'{', 'test'}])| + + # press ctrl+shift+[ + # does nothing. No more brackets to match! + 1. do_something|([1, '[', {'brace':'{', 'test'}])| diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Bracketeer/bracketeer.py b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Bracketeer/bracketeer.py new file mode 100644 index 0000000..372450b --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Bracketeer/bracketeer.py @@ -0,0 +1,393 @@ +# coding: utf8 +import sublime +import sublime_plugin +from sublime import Region +import re + +# for detecting "real" brackets in BracketeerCommand, and bracket matching in BracketeerBracketMatcher +OPENING_BRACKETS = ['{', '[', '('] +OPENING_BRACKET_LIKE = ['{', '[', '(', '"', "'", u'“', '‘', '«', '‹'] +CLOSING_BRACKETS = ['}', ']', ')'] +CLOSING_BRACKET_LIKE = ['}', ']', ')', '"', "'", u'”', '’', '»', '›'] +QUOTING_BRACKETS = ['\'', "\""] + + +class BracketeerCommand(sublime_plugin.TextCommand): + def run(self, edit, **kwargs): + e = self.view.begin_edit('bracketeer') + regions = [region for region in self.view.sel()] + + # sort by region.end() DESC + def get_end(region): + return region.end() + regions.sort(key=get_end, reverse=True) + + for region in regions: + self.run_each(edit, region, **kwargs) + + self.view.end_edit(e) + + def complicated_quote_checker(self, insert_braces, region, pressed, after, r_brace): + in_string_scope = self.view.score_selector(region.a, 'string') + in_double_string_scope = in_string_scope and self.view.score_selector(region.a, 'string.quoted.double') + in_single_string_scope = in_string_scope and self.view.score_selector(region.a, 'string.quoted.single') + at_eol = region.a == self.view.line(region.a).b + in_comment_scope = self.view.score_selector(region.a, 'comment') + in_text_scope = self.view.score_selector(region.a, 'text') + in_embedded_scope = self.view.score_selector(region.a, 'source.php') + self.view.score_selector(region.a, 'source.js') + in_text_scope = in_text_scope and not in_embedded_scope + + if pressed and pressed in QUOTING_BRACKETS and (in_comment_scope or in_text_scope or in_string_scope): + # if the cursor: + # (a) is preceded by odd numbers of '\'s? + if in_comment_scope: + scope_test = 'comment' + else: + scope_test = 'string' + begin_of_string = region.a + while begin_of_string and self.view.score_selector(begin_of_string - 1, scope_test): + begin_of_string -= 1 + check_a = self.view.substr(Region(begin_of_string, region.a)) + check_a = len(re.search(r'[\\]*$', check_a).group(0)) + check_a = check_a % 2 + + # (b) is an apostrophe and (inside double quotes or in text or comment scope) + check_b = (in_double_string_scope or in_text_scope or in_comment_scope) and pressed == "'" + + # (c) we are at the end of the line and pressed the closing quote + check_c = at_eol and ( + in_single_string_scope and pressed == "'" + or + in_double_string_scope and pressed == '"' + ) + + # then don't insert both, just insert the one. + if check_a or check_b or check_c: + return pressed + + def run_each(self, edit, region, braces='{}', pressed=None, unindent=False, select=False, replace=False): + self.view.sel().subtract(region) + if self.view.settings().get('translate_tabs_to_spaces'): + tab = ' ' * self.view.settings().get('tab_size') + else: + tab = "\t" + + row, col = self.view.rowcol(region.begin()) + indent_point = self.view.text_point(row, 0) + if indent_point < region.begin(): + indent = self.view.substr(Region(indent_point, region.begin())) + indent = re.match('[ \t]*', indent).group(0) + else: + indent = '' + line = self.view.substr(self.view.line(region.a)) + selection = self.view.substr(region) + + # for braces that have newlines ("""), insert the current line's indent + if isinstance(braces, list): + l_brace = braces[0] + r_brace = braces[1] + braces = ''.join(braces) + braces = braces.replace("\n", "\n" + indent) + length = len(l_brace) + else: + braces = braces.replace("\n", "\n" + indent) + length = len(braces) / 2 + l_brace = braces[:length] + r_brace = braces[length:] + + if region.empty(): + after = self.view.substr(Region(region.a, region.a + length)) + + insert_braces = braces + complicated_check = self.complicated_quote_checker(insert_braces, region, pressed, after, r_brace) + + if complicated_check: + insert_braces = complicated_check + elif pressed and after == r_brace and r_brace[-1] == pressed: # and (pressed not in QUOTING_BRACKETS or in_string_scope): + # in this case we pressed the closing character, and that's the character that is to the right + # so do nothing except advance cursor position + insert_braces = False + elif unindent and row > 0 and indent and line == indent: + # indent has the current line's indent + # get previous line's indent: + prev_point = self.view.text_point(row - 1, 0) + prev_line = self.view.line(prev_point) + prev_indent = self.view.substr(prev_line) + prev_indent = re.match('[ \t]*', prev_indent).group(0) + + if (not pressed or pressed == l_brace) and len(indent) > len(prev_indent) and indent[len(prev_indent):] == tab: + # move region.a back by 'indent' amount + region = Region(region.a - len(tab), region.b - len(tab)) + # and remove the tab + self.view.replace(edit, Region(region.a, region.a + len(tab) - 1), '') + elif pressed and pressed == r_brace: + if len(indent) == len(prev_indent): + # move region.a back by 'indent' amount + region = Region(region.a - len(tab), region.b - len(tab)) + # and remove the tab + self.view.replace(edit, Region(region.a, region.a + len(tab) - 1), '') + insert_braces = r_brace + elif pressed and pressed != l_brace: + # we pressed the closing bracket or quote. This *never* + insert_braces = r_brace + + if insert_braces: + self.view.insert(edit, region.a, insert_braces) + self.view.sel().add(Region(region.a + length, region.a + length)) + elif selection in QUOTING_BRACKETS and pressed in QUOTING_BRACKETS and selection != pressed: + # changing a quote from single <=> double, just insert the quote. + self.view.replace(edit, region, pressed) + self.view.sel().add(Region(region.end(), region.end())) + elif pressed and pressed != l_brace: + b = region.begin() + len(r_brace) + self.view.replace(edit, region, r_brace) + self.view.sel().add(Region(b, b)) + else: + substitute = self.view.substr(region) + replacement = l_brace + substitute + r_brace + # if we're inserting "real" brackets, not quotes: + real_brackets = l_brace in OPENING_BRACKETS and r_brace in CLOSING_BRACKETS + # check to see if entire lines are selected, and if so do some smart indenting + bol_is_nl = region.begin() == 0 or self.view.substr(region.begin() - 1) == "\n" + eol_is_nl = region.end() == self.view.size() - 1 or self.view.substr(region.end() - 1) == "\n" + if real_brackets and bol_is_nl and eol_is_nl: + indent = '' + final = '' + m = re.match('([ \t]*)' + tab, self.view.substr(region)) + if m: + indent = m.group(1) + final = "\n" + else: + substitute = tab + substitute + replacement = indent + l_brace + "\n" + substitute + indent + r_brace + final + b = region.begin() + len(replacement) - len("\n" + indent + r_brace + final) + else: + b = region.begin() + len(replacement) + + if replace and self.view.substr(region.begin() - 1) in OPENING_BRACKET_LIKE and self.view.substr(region.end()) in CLOSING_BRACKET_LIKE: + b -= 1 + self.view.replace(edit, Region(region.begin() - 1, region.end() + 1), replacement) + elif replace and self.view.substr(region.begin()) in OPENING_BRACKET_LIKE and self.view.substr(region.end() - 1) in CLOSING_BRACKET_LIKE: + replacement = l_brace + replacement[2:-2] + r_brace + b -= 2 + self.view.replace(edit, region, replacement) + l_brace = r_brace = '' + else: + self.view.replace(edit, region, replacement) + + if select: + self.view.sel().add(Region(b - len(replacement) + len(l_brace), b - len(r_brace))) + else: + self.view.sel().add(Region(b, b)) + + +class BracketeerIndentCommand(sublime_plugin.TextCommand): + def run(self, edit): + e = self.view.begin_edit('bracketeer') + if self.view.settings().get('translate_tabs_to_spaces'): + tab = ' ' * self.view.settings().get('tab_size') + else: + tab = "\t" + + regions = [region for region in self.view.sel()] + + # sort by region.end() DESC + def get_end(region): + return region.end() + regions.sort(key=get_end, reverse=True) + + for region in regions: + if region.empty(): + # insert tab at beginning of line + point = self.view.text_point(self.view.rowcol(region.a)[0], 0) + self.view.insert(edit, point, tab) + else: + # insert tab in front of lines 1:-1 + lines = self.view.substr(region).split("\n") + # just one line? indent it + if len(lines) == 1: + substitute = tab + lines[0] + "\n" + else: + default_settings = sublime.load_settings("bracketeer.sublime-settings") + dont_indent_list = default_settings.get('dont_indent') + + # lines that start with these strings don't get indented + def dont_indent(line): + return any(dont for dont in dont_indent_list if line[:len(dont)] == dont) + + # cursor is at start of line? indent that, too + if len(lines[0]) > 0 and not dont_indent(lines[0]): + substitute = tab + else: + substitute = '' + substitute += lines[0] + "\n" + + for line in lines[1:-1]: + if len(line): + if not dont_indent(line): + substitute += tab + substitute += line + substitute += "\n" + substitute += lines[-1] + self.view.replace(edit, region, substitute) + + self.view.end_edit(e) + + +class BracketeerBracketMatcher(sublime_plugin.TextCommand): + def find_brackets(self, region, closing_search_brackets=None): + match_map = { + '}': '{', + ']': '[', + ')': '(', + } + # find next brace in closing_search_brackets + if not closing_search_brackets: + closing_search_brackets = CLOSING_BRACKETS + elif isinstance(closing_search_brackets, basestring): + closing_search_brackets = [closing_search_brackets] + + opening_search_brackets = [match_map[bracket] for bracket in closing_search_brackets] + begin_point = region.begin() - 1 + end_point = region.end() + + # LaTEX: if selection directly preceeds \right, examine the string that includes \right instead of the actual selection + if self.view.substr( Region(end_point, min(end_point+6,self.view.size())) ) == '\\right': end_point += 6 + # /LaTEX + + # end_point gets incremented immediately, which skips the first + # character, *unless* the selection is empty, in which case the + # inner contents should be selected before scanning past + if region.empty(): + # if the current character is a bracket, and the character to the left is the + # *matching* bracket, don't match the empty contents + c = self.view.substr(end_point) + if c in closing_search_brackets and self.view.substr(end_point - 1) == match_map[c]: + # cursor is between two brackets - select them and return + return Region(begin_point, end_point + 1) + + else: + # if the selection is inside two brackets, select them and return + c1 = self.view.substr(begin_point) + c2 = self.view.substr(end_point) + + if c2 in closing_search_brackets and c1 == match_map[c2]: + # LaTEX: if \left preceeds selection, select it as well + if self.view.substr(Region(max(begin_point-5,0), begin_point))=='\left': begin_point -= 5 + # /LaTEX + return Region(begin_point, end_point + 1) + + # scan forward searching for a closing bracket. + started_in_string = bool(self.view.score_selector(end_point, 'string') or self.view.score_selector(begin_point, 'string')) + bracket_count = 0 + while True: + c = self.view.substr(end_point) + if started_in_string or not self.view.score_selector(end_point, 'string'): + if bracket_count <= 0 and c in closing_search_brackets: + break + elif c in opening_search_brackets and c in OPENING_BRACKETS: + bracket_count += 1 + elif c in closing_search_brackets and c in CLOSING_BRACKETS: + bracket_count -= 1 + + end_point += 1 + if end_point >= self.view.size(): + return None + + # found a bracket, scan backwards until matching bracket is found. + # matching bracket is determined by counting closing brackets (+1) + # and opening brackets (-1) and when the count is zero and the + # matching opening bracket is found + look_for = match_map[c] + while True: + c = self.view.substr(begin_point) + if started_in_string or not self.view.score_selector(begin_point, 'string'): + if bracket_count == 0 and c == look_for: + break + elif c in opening_search_brackets and c in OPENING_BRACKETS: + bracket_count += 1 + elif c in closing_search_brackets and c in CLOSING_BRACKETS: + bracket_count -= 1 + begin_point -= 1 + if begin_point < 0: + return None + # the current point is to the left of the opening bracket, + # I want it to be to the right. + begin_point += 1 + + # LaTEX: if selection ends in \right, don't select it + if self.view.substr( Region(max(end_point-6,0), end_point) ) == '\\right': end_point -= 6 + # /LaTEX + return Region(begin_point, end_point) + + +class BracketeerGotoCommand(BracketeerBracketMatcher): + def run(self, edit, **kwargs): + e = self.view.begin_edit('bracketeer') + regions = [region for region in self.view.sel()] + + # sort by region.end() DESC + def get_end(region): + return region.end() + regions.sort(key=get_end, reverse=True) + + for region in regions: + self.run_each(edit, region, **kwargs) + self.view.end_edit(e) + + def run_each(self, edit, region, goto): + cursor = region.b + if goto == "left" and self.view.substr(cursor - 1) == '{': + cursor -= 1 + elif goto == "both" and self.view.substr(cursor) == '{': + cursor += 1 + elif goto in ["left", "both"] and self.view.substr(cursor - 1) == '}': + cursor -= 1 + + new_region = self.find_brackets(Region(cursor, cursor), '}') + + if new_region: + self.view.sel().subtract(region) + a = new_region.begin() + b = new_region.end() + if self.view.substr(a) in OPENING_BRACKETS: + a += 1 + if self.view.substr(b) in CLOSING_BRACKETS: + b += 1 + + if goto == "left": + new_region = Region(a, a) + self.view.sel().add(new_region) + self.view.show(new_region) + elif goto == "right": + new_region = Region(b, b) + self.view.sel().add(new_region) + self.view.show(new_region) + elif goto == "both": + self.view.sel().add(Region(a, a)) + self.view.sel().add(Region(b, b)) + self.view.show(new_region.b) + else: + raise ValueError("`goto` should have a value of 'left', 'right', or 'both'), not '" + goto + '"') + + +class BracketeerSelectCommand(BracketeerBracketMatcher): + def run(self, edit, **kwargs): + e = self.view.begin_edit('bracketeer') + regions = [region for region in self.view.sel()] + + # sort by region.end() DESC + def get_end(region): + return region.end() + regions.sort(key=get_end, reverse=True) + + for region in regions: + self.run_each(edit, region, **kwargs) + self.view.end_edit(e) + + def run_each(self, edit, region): + new_region = self.find_brackets(region) + if new_region: + self.view.sel().subtract(region) + self.view.sel().add(new_region) + self.view.show(new_region.b) diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Bracketeer/bracketeer.sublime-settings b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Bracketeer/bracketeer.sublime-settings new file mode 100644 index 0000000..e525157 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Bracketeer/bracketeer.sublime-settings @@ -0,0 +1,3 @@ +{ + "dont_indent": ["", "{%", "%}", "{#", "#}"] +} \ No newline at end of file diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Bracketeer/package-metadata.json b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Bracketeer/package-metadata.json new file mode 100644 index 0000000..9406bac --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Bracketeer/package-metadata.json @@ -0,0 +1 @@ +{"url": "https://github.com/colinta/SublimeBracketeer", "version": "1.5.2", "description": "Some bracket manipulation, selection, and insertion commands."} \ No newline at end of file diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Bracketeer/package.json b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Bracketeer/package.json new file mode 100644 index 0000000..1c084b6 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Bracketeer/package.json @@ -0,0 +1,7 @@ +{ + "repo": "SublimeBracketeer", + "name": "Bracketeer", + "description": "Some bracket manipulation, selection, and insertion commands.", + "author": "Colin Thomas-Arnold (colinta)", + "homepage": "https://github.com/colinta/SublimeBracketeer" +} \ No newline at end of file diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Clipboard Manager/Default.sublime-commands b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Clipboard Manager/Default.sublime-commands new file mode 100644 index 0000000..f519741 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Clipboard Manager/Default.sublime-commands @@ -0,0 +1,42 @@ +[ + { + "caption": "Clipboard Manager: Cut", + "command": "clipboard_manager_cut" + }, + { + "caption": "Clipboard Manager: Copy", + "command": "clipboard_manager_copy" + }, + { + "caption": "Clipboard Manager: Paste", + "command": "clipboard_manager_paste" + }, + { + "caption": "Clipboard Manager: Next & Paste", + "command": "clipboard_manager_next_and_paste" + }, + { + "caption": "Clipboard Manager: Previous & Paste", + "command": "clipboard_manager_previous_and_paste" + }, + { + "caption": "Clipboard Manager: Next", + "command": "clipboard_manager_next" + }, + { + "caption": "Clipboard Manager: Previous", + "command": "clipboard_manager_previous" + }, + { + "caption": "Clipboard Manager: Choose & Paste", + "command": "clipboard_manager_choose_and_paste" + }, + { + "caption": "Clipboard Manager: Show History", + "command": "clipboard_manager_show" + }, + { + "caption": "Clipboard Manager: Show Registers", + "command": "clipboard_manager_show_registers" + } +] diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Clipboard Manager/Example.sublime-keymap b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Clipboard Manager/Example.sublime-keymap new file mode 100644 index 0000000..f9dbca8 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Clipboard Manager/Example.sublime-keymap @@ -0,0 +1,96 @@ +[ + { "keys": ["super+x"], "command": "clipboard_manager_cut" }, + { "keys": ["super+c"], "command": "clipboard_manager_copy" }, + + { "keys": ["super+v"], "command": "clipboard_manager_paste", "args": { "indent": true } }, + { "keys": ["super+ctrl+v"], "command": "clipboard_manager_paste", "args": { "indent": false } }, + + { "keys": ["super+alt+v"], "command": "clipboard_manager_next_and_paste" }, + { "keys": ["super+shift+v"], "command": "clipboard_manager_previous_and_paste" }, + + { "keys": ["super+pageup"], "command": "clipboard_manager_next" }, + { "keys": ["super+pagedown"], "command": "clipboard_manager_previous" }, + { "keys": ["super+home"], "command": "clipboard_manager_show" }, + { "keys": ["super+end"], "command": "clipboard_manager_show_registers" }, + + { "keys": ["super+alt+ctrl+v"], "command": "clipboard_manager_choose_and_paste" }, + + { "keys": ["super+ctrl+shift+v", "?"], "command": "clipboard_manager_show_registers" }, + { "keys": ["super+ctrl+shift+v", "/"], "command": "clipboard_manager_show" }, + + { "keys": ["super+ctrl+shift+c", "1"], "command": "clipboard_manager_copy_to_register", "args": { "register": "1" } }, + { "keys": ["super+ctrl+shift+c", "2"], "command": "clipboard_manager_copy_to_register", "args": { "register": "2" } }, + { "keys": ["super+ctrl+shift+c", "3"], "command": "clipboard_manager_copy_to_register", "args": { "register": "3" } }, + { "keys": ["super+ctrl+shift+c", "4"], "command": "clipboard_manager_copy_to_register", "args": { "register": "4" } }, + { "keys": ["super+ctrl+shift+c", "5"], "command": "clipboard_manager_copy_to_register", "args": { "register": "5" } }, + { "keys": ["super+ctrl+shift+c", "6"], "command": "clipboard_manager_copy_to_register", "args": { "register": "6" } }, + { "keys": ["super+ctrl+shift+c", "7"], "command": "clipboard_manager_copy_to_register", "args": { "register": "7" } }, + { "keys": ["super+ctrl+shift+c", "8"], "command": "clipboard_manager_copy_to_register", "args": { "register": "8" } }, + { "keys": ["super+ctrl+shift+c", "9"], "command": "clipboard_manager_copy_to_register", "args": { "register": "9" } }, + { "keys": ["super+ctrl+shift+c", "0"], "command": "clipboard_manager_copy_to_register", "args": { "register": "0" } }, + + { "keys": ["super+ctrl+shift+c", "a"], "command": "clipboard_manager_copy_to_register", "args": { "register": "a" } }, + { "keys": ["super+ctrl+shift+c", "b"], "command": "clipboard_manager_copy_to_register", "args": { "register": "b" } }, + { "keys": ["super+ctrl+shift+c", "c"], "command": "clipboard_manager_copy_to_register", "args": { "register": "c" } }, + { "keys": ["super+ctrl+shift+c", "d"], "command": "clipboard_manager_copy_to_register", "args": { "register": "d" } }, + { "keys": ["super+ctrl+shift+c", "e"], "command": "clipboard_manager_copy_to_register", "args": { "register": "e" } }, + { "keys": ["super+ctrl+shift+c", "f"], "command": "clipboard_manager_copy_to_register", "args": { "register": "f" } }, + { "keys": ["super+ctrl+shift+c", "g"], "command": "clipboard_manager_copy_to_register", "args": { "register": "g" } }, + { "keys": ["super+ctrl+shift+c", "h"], "command": "clipboard_manager_copy_to_register", "args": { "register": "h" } }, + { "keys": ["super+ctrl+shift+c", "i"], "command": "clipboard_manager_copy_to_register", "args": { "register": "i" } }, + { "keys": ["super+ctrl+shift+c", "j"], "command": "clipboard_manager_copy_to_register", "args": { "register": "j" } }, + { "keys": ["super+ctrl+shift+c", "k"], "command": "clipboard_manager_copy_to_register", "args": { "register": "k" } }, + { "keys": ["super+ctrl+shift+c", "l"], "command": "clipboard_manager_copy_to_register", "args": { "register": "l" } }, + { "keys": ["super+ctrl+shift+c", "m"], "command": "clipboard_manager_copy_to_register", "args": { "register": "m" } }, + { "keys": ["super+ctrl+shift+c", "n"], "command": "clipboard_manager_copy_to_register", "args": { "register": "n" } }, + { "keys": ["super+ctrl+shift+c", "o"], "command": "clipboard_manager_copy_to_register", "args": { "register": "o" } }, + { "keys": ["super+ctrl+shift+c", "p"], "command": "clipboard_manager_copy_to_register", "args": { "register": "p" } }, + { "keys": ["super+ctrl+shift+c", "q"], "command": "clipboard_manager_copy_to_register", "args": { "register": "q" } }, + { "keys": ["super+ctrl+shift+c", "r"], "command": "clipboard_manager_copy_to_register", "args": { "register": "r" } }, + { "keys": ["super+ctrl+shift+c", "s"], "command": "clipboard_manager_copy_to_register", "args": { "register": "s" } }, + { "keys": ["super+ctrl+shift+c", "t"], "command": "clipboard_manager_copy_to_register", "args": { "register": "t" } }, + { "keys": ["super+ctrl+shift+c", "u"], "command": "clipboard_manager_copy_to_register", "args": { "register": "u" } }, + { "keys": ["super+ctrl+shift+c", "v"], "command": "clipboard_manager_copy_to_register", "args": { "register": "v" } }, + { "keys": ["super+ctrl+shift+c", "w"], "command": "clipboard_manager_copy_to_register", "args": { "register": "w" } }, + { "keys": ["super+ctrl+shift+c", "x"], "command": "clipboard_manager_copy_to_register", "args": { "register": "x" } }, + { "keys": ["super+ctrl+shift+c", "y"], "command": "clipboard_manager_copy_to_register", "args": { "register": "y" } }, + { "keys": ["super+ctrl+shift+c", "z"], "command": "clipboard_manager_copy_to_register", "args": { "register": "z" } }, + + { "keys": ["super+ctrl+shift+v", "1"], "command": "clipboard_manager_paste_from_register", "args": { "register": "1" } }, + { "keys": ["super+ctrl+shift+v", "2"], "command": "clipboard_manager_paste_from_register", "args": { "register": "2" } }, + { "keys": ["super+ctrl+shift+v", "3"], "command": "clipboard_manager_paste_from_register", "args": { "register": "3" } }, + { "keys": ["super+ctrl+shift+v", "4"], "command": "clipboard_manager_paste_from_register", "args": { "register": "4" } }, + { "keys": ["super+ctrl+shift+v", "5"], "command": "clipboard_manager_paste_from_register", "args": { "register": "5" } }, + { "keys": ["super+ctrl+shift+v", "6"], "command": "clipboard_manager_paste_from_register", "args": { "register": "6" } }, + { "keys": ["super+ctrl+shift+v", "7"], "command": "clipboard_manager_paste_from_register", "args": { "register": "7" } }, + { "keys": ["super+ctrl+shift+v", "8"], "command": "clipboard_manager_paste_from_register", "args": { "register": "8" } }, + { "keys": ["super+ctrl+shift+v", "9"], "command": "clipboard_manager_paste_from_register", "args": { "register": "9" } }, + { "keys": ["super+ctrl+shift+v", "0"], "command": "clipboard_manager_paste_from_register", "args": { "register": "0" } }, + + { "keys": ["super+ctrl+shift+v", "a"], "command": "clipboard_manager_paste_from_register", "args": { "register": "a" } }, + { "keys": ["super+ctrl+shift+v", "b"], "command": "clipboard_manager_paste_from_register", "args": { "register": "b" } }, + { "keys": ["super+ctrl+shift+v", "c"], "command": "clipboard_manager_paste_from_register", "args": { "register": "c" } }, + { "keys": ["super+ctrl+shift+v", "d"], "command": "clipboard_manager_paste_from_register", "args": { "register": "d" } }, + { "keys": ["super+ctrl+shift+v", "e"], "command": "clipboard_manager_paste_from_register", "args": { "register": "e" } }, + { "keys": ["super+ctrl+shift+v", "f"], "command": "clipboard_manager_paste_from_register", "args": { "register": "f" } }, + { "keys": ["super+ctrl+shift+v", "g"], "command": "clipboard_manager_paste_from_register", "args": { "register": "g" } }, + { "keys": ["super+ctrl+shift+v", "h"], "command": "clipboard_manager_paste_from_register", "args": { "register": "h" } }, + { "keys": ["super+ctrl+shift+v", "i"], "command": "clipboard_manager_paste_from_register", "args": { "register": "i" } }, + { "keys": ["super+ctrl+shift+v", "j"], "command": "clipboard_manager_paste_from_register", "args": { "register": "j" } }, + { "keys": ["super+ctrl+shift+v", "k"], "command": "clipboard_manager_paste_from_register", "args": { "register": "k" } }, + { "keys": ["super+ctrl+shift+v", "l"], "command": "clipboard_manager_paste_from_register", "args": { "register": "l" } }, + { "keys": ["super+ctrl+shift+v", "m"], "command": "clipboard_manager_paste_from_register", "args": { "register": "m" } }, + { "keys": ["super+ctrl+shift+v", "n"], "command": "clipboard_manager_paste_from_register", "args": { "register": "n" } }, + { "keys": ["super+ctrl+shift+v", "o"], "command": "clipboard_manager_paste_from_register", "args": { "register": "o" } }, + { "keys": ["super+ctrl+shift+v", "p"], "command": "clipboard_manager_paste_from_register", "args": { "register": "p" } }, + { "keys": ["super+ctrl+shift+v", "q"], "command": "clipboard_manager_paste_from_register", "args": { "register": "q" } }, + { "keys": ["super+ctrl+shift+v", "r"], "command": "clipboard_manager_paste_from_register", "args": { "register": "r" } }, + { "keys": ["super+ctrl+shift+v", "s"], "command": "clipboard_manager_paste_from_register", "args": { "register": "s" } }, + { "keys": ["super+ctrl+shift+v", "t"], "command": "clipboard_manager_paste_from_register", "args": { "register": "t" } }, + { "keys": ["super+ctrl+shift+v", "u"], "command": "clipboard_manager_paste_from_register", "args": { "register": "u" } }, + { "keys": ["super+ctrl+shift+v", "v"], "command": "clipboard_manager_paste_from_register", "args": { "register": "v" } }, + { "keys": ["super+ctrl+shift+v", "w"], "command": "clipboard_manager_paste_from_register", "args": { "register": "w" } }, + { "keys": ["super+ctrl+shift+v", "x"], "command": "clipboard_manager_paste_from_register", "args": { "register": "x" } }, + { "keys": ["super+ctrl+shift+v", "y"], "command": "clipboard_manager_paste_from_register", "args": { "register": "y" } }, + { "keys": ["super+ctrl+shift+v", "z"], "command": "clipboard_manager_paste_from_register", "args": { "register": "z" } } +] diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Clipboard Manager/README.md b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Clipboard Manager/README.md new file mode 100644 index 0000000..2878e59 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Clipboard Manager/README.md @@ -0,0 +1,123 @@ +Clipboard Manager plugin for Sublime Text 2 +=========================================== + +A version of the Sublime Text 2 plugin at +that makes for TextMate-like clipboard history. + +Originally written by AJ Palkovic ([ajpalkovic](https://github.com/ajpalkovic/SublimePlugins)), +modified by Martin Aspeli ([optilude](https://gist.github.com/1132507)), and +further modified and packaged for `Package Control` by Colin Thomas-Arnold +([colinta](https://github.com/colinta/SublimeClipboardManager)) + +My version of this plugin *does not use* `clipboard_history` as the prefix. See +the full command-list below. + +Installation +------------ + +1. Using Package Control, install "Clipboard Manager" + +Or: + +1. Open the Sublime Text 2 Packages folder + + - OS X: ~/Library/Application Support/Sublime Text 2/Packages/ + - Windows: %APPDATA%/Sublime Text 2/Packages/ + - Linux: ~/.Sublime Text 2/Packages/ + +2. clone this repo +3. Install keymaps for the commands (see Example.sublime-keymap for my preferred keys) + +Commands +-------- + +**The basics** + +`clipboard_manager_cut`: Self Explanatory + +`clipboard_manager_copy`: Self Explanatory + +`clipboard_manager_paste`: Self Explanatory. + +*Options*: indent (default: False): Determines whether to use the `paste` or +`paste_and_indent` built-in command. + +- - - - - - + +**Navigating clipboard history** + +`clipboard_manager_next_and_paste` (`super+alt+v`) + +Goes to the next entry in the history and pastes it. +*Options*: indent (default: `False`) + +`clipboard_manager_previous_and_paste` (`super+shift+v`) + +Goes to the previous entry in the history and pastes it. +*Options*: indent (default: `False`) + +`clipboard_manager_next` (`super+pageup` aka `super+fn+up`) + +Goes to the next entry in the history, but doesn't paste. (the content will +appear as a status message) + +`clipboard_manager_previous` (`super+pagedown` aka `super+fn+down`) + +Goes to the previous entry in the history, but doesn't paste. (the content will +appear as a status message) + +`clipboard_manager_choose_and_paste` (`super+ctrl+alt+v`) + +Shows the clipboard history in a "quick panel". + +`clipboard_manager_show` (`super+ctrl+shift+v, /`) + +Shows the clipboard history in an "output panel", and points to the current +clipboard item. This was mostly useful for development, but you might find it +beneficial as well. + +- - - - - - + +**Registers** + +Right now registers do not add/remove from the clipboard history. *This may +change!!* I would appreciate feedback about this feature. + +`clipboard_manager_copy_to_register` (there are a ton, e.g. `super+ctrl+shift+c, 1`, `super+ctrl+shift+c, a`) + +Puts the selection into a `register`. The example keymap includes a register +binding for every number and letter. Register keys should be single characters. + +`clipboard_manager_paste_from_register` (`super+ctrl+shift+v, 1`, `super+ctrl+shift+v, a`) + +Pastes the contents of a `register`. Again, there are lots of example key +bindings. + +`clipboard_manager_show_registers` (`super+ctrl+shift+v, ?`) + +Shows the clipboard registers in an "output panel", similar to +`clipboard_manager_show`. + +- - - - - - + +**Helpful Tips** + +There are two ways to find out what you've got hanging out in your clipboard +history, you should use both. The `clipboard_manager_choose_and_paste` command +is your goto. It uses the fuzzy finder input panel, so you can quickly find and +paste the entry you want. + +The other useful trick is to use `clipboard_manager_show` to show an output +panel at the bottom of the screen. As you scroll through history using +`clipboard_manager_next` and `clipboard_manager_previous`, it will update that +panel, with an arrow pointing the current entry. Then you can +`clipboard_manager_next_and_paste`, and it will get updated then, too. Keeps +you sane if you're doing something crazy. + +If you've got a repetive task to do, with lots of copy/pastes, use registers. +They do not get affected by usual copy/pasting, so you can rest assured that +your work flow will not get affected. The keyboard shortcuts are unfortunately +quite verbose (`super+ctrl+shift+c, letter/digit`), but look at +Example.sublime-keymap and you'll see that it is easy to assign a quicker +shortcut for registers you like to use. Registers do not have to be one letter, +any string can be used as the key. diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Clipboard Manager/clipboard_manager.py b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Clipboard Manager/clipboard_manager.py new file mode 100644 index 0000000..272d0ca --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Clipboard Manager/clipboard_manager.py @@ -0,0 +1,230 @@ +import sublime +import sublime_plugin + + +class HistoryList(list): + """ + List type for storing the history. + Maintains a "pointer" to the current clipboard item + """ + registers = {} + SIZE = 256 + __index = 0 + + def show(self): + ret = "" + ret += " CLIPBOARD HISTORY (%d)\n" % len(self) + ret += "====================%s==\n" % ("=" * len(str(len(self)))) + for i, item in enumerate(self): + if i == self.__index: + ret += '--> ' + else: + ret += ' ' + item = item.replace("\t", '\\t') + item = item.replace("\r\n", "\n") + item = item.replace("\r", "\n") + item = item.replace("\n", "\n" + ' > ') + ret += u'{i:>3}. {item}\n'.format(i=str(i + 1)[-3:], item=item) + return ret + + def show_registers(self): + ret = "" + ret += " CLIPBOARD REGISTERS (%d)\n" % len(self.registers.items()) + ret += "=====================%s==\n" % ("=" * len(str(len(self.registers.items())))) + for key, item in self.registers.iteritems(): + item = item.replace("\t", '\\t') + item = item.replace("\r\n", "\n") + item = item.replace("\r", "\n") + item = item.replace("\n", "\n" + ' > ') + ret += u'{key:<1}: {item}\n'.format(key=key, item=item) + return ret + + def register(self, register, *args): + if args: + if len(args) == 1: + copy = args[0] + else: + copy = "\n".join(args) + self.registers[register] = copy + copy = copy.replace("\t", "\\t") + copy = copy.replace("\n", "\\n") + copy = copy.replace("\r", "\\r") + sublime.status_message('Set Clipboard Register "{0}" to "{1}"'.format(register, copy)) + else: + return self.registers[register] + + def append(self, item): + """ + Appends to the history only if it isn't the current item. + """ + if not self or self[self.__index] != item: + self.insert(0, item) + self.__index = 0 + if len(self) > self.SIZE: + del self[self.SIZE:] + + def current(self): + if len(self) == 0: + return None + return self[self.__index] + + def at(self, idx): + self.__index = (idx if idx < len(self) else 0) + self.status() + + def next(self): + if self.__index > 0: + self.__index -= 1 + self.status() + + def previous(self): + if self.__index < len(self) - 1: + self.__index += 1 + self.status() + + def first(self): + """"first" actually kind of means "last", since this is a FIFO stack""" + self.__index = len(self) - 1 + self.status() + + def last(self): + """"last" actually kind of means "first", since this is a FIFO stack""" + self.__index = 0 + self.status() + + def status(self): + copy = self.current() + copy = copy.replace("\t", "\\t") + copy = copy.replace("\n", "\\n") + copy = copy.replace("\r", "\\r") + sublime.status_message(u'Set Clipboard to "{copy}"'.format(copy=copy)) + sublime.set_clipboard(self.current()) + + +HISTORY = HistoryList([sublime.get_clipboard()]) + + +def append_clipboard(): + # append the contents of the clipboard to the history + HISTORY.append(sublime.get_clipboard()) + + +class ClipboardManagerPaste(sublime_plugin.TextCommand): + def run(self, edit, indent=False): + if indent: + self.view.run_command('paste_and_indent') + else: + self.view.run_command('paste') + + +class ClipboardManagerCut(sublime_plugin.TextCommand): + def run(self, edit): + # First run sublime's command to extract the selected text. + # This will set the cut/copy'd data on the clipboard which we can easily steal without recreating the cut/copy logic. + self.view.run_command('cut') + append_clipboard() + self.view.window().run_command('clipboard_manager_show', {'show': False}) + + +class ClipboardManagerCopy(sublime_plugin.TextCommand): + def run(self, edit): + self.view.run_command('copy') + append_clipboard() + self.view.window().run_command('clipboard_manager_show', {'show': False}) + + +class ClipboardManagerCopyToRegister(sublime_plugin.TextCommand): + def run(self, edit, register): + self.view.run_command('copy') + HISTORY.register(register, sublime.get_clipboard()) + self.view.window().run_command('clipboard_manager_show_registers', {'show': False}) + + +class ClipboardManagerPasteFromRegister(sublime_plugin.TextCommand): + def run(self, edit, register): + sublime.set_clipboard(HISTORY.register(register)) + self.view.run_command('paste') + + +class ClipboardManagerNext(sublime_plugin.TextCommand): + def run(self, edit): + HISTORY.next() + self.view.window().run_command('clipboard_manager_show', {'show': False}) + + +class ClipboardManagerNextAndPaste(sublime_plugin.TextCommand): + def run(self, edit, indent=False): + HISTORY.next() + if indent: + self.view.run_command('paste_and_indent') + else: + self.view.run_command('paste') + self.view.window().run_command('clipboard_manager_show', {'show': False}) + + +class ClipboardManagerPrevious(sublime_plugin.TextCommand): + def run(self, edit): + HISTORY.previous() + self.view.window().run_command('clipboard_manager_show', {'show': False}) + + +class ClipboardManagerPreviousAndPaste(sublime_plugin.TextCommand): + def run(self, edit, indent=False): + HISTORY.previous() + if indent: + self.view.run_command('paste_and_indent') + else: + self.view.run_command('paste') + self.view.window().run_command('clipboard_manager_show', {'show': False}) + + +class ClipboardManagerShow(sublime_plugin.WindowCommand): + def run(self, show=True): + v = self.window.get_output_panel('clipboard_manager') + e = v.begin_edit('clipboard_manager') + v.replace(e, sublime.Region(0, v.size()), '') + v.insert(e, 0, HISTORY.show()) + v.end_edit(e) + if show: + self.window.run_command('show_panel', {'panel': 'output.clipboard_manager'}) + + +class ClipboardManagerShowRegisters(sublime_plugin.WindowCommand): + def run(self, show=True): + v = self.window.get_output_panel('clipboard_manager') + e = v.begin_edit('clipboard_manager') + v.replace(e, sublime.Region(0, v.size()), '') + v.insert(e, 0, HISTORY.show_registers()) + v.end_edit(e) + if show: + self.window.run_command('show_panel', {'panel': 'output.clipboard_manager'}) + + +class ClipboardManagerChooseAndPaste(sublime_plugin.TextCommand): + def run(self, edit): + def format(line): + return line.replace('\n', '\\n')[:64] + + lines = [] + line_map = {} + # filter out duplicates, keeping the first instance, and format + for i, line in enumerate(HISTORY): + if i == HISTORY.index(line): + line_map[len(lines)] = i + lines.append(format(line)) + + def on_done(idx): + if idx >= 0: + idx = line_map[idx] + HISTORY.at(idx) + self.view.run_command('paste') + + if lines: + sublime.active_window().show_quick_panel(lines, on_done) + else: + sublime.status_message('Nothing in history') + + +class ClipboardManagerEventListener(sublime_plugin.EventListener): + def on_activated(self, view): + append_clipboard() diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Clipboard Manager/package-metadata.json b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Clipboard Manager/package-metadata.json new file mode 100644 index 0000000..11a74c2 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Clipboard Manager/package-metadata.json @@ -0,0 +1 @@ +{"url": "https://gist.github.com/1590661", "version": "1.2.3", "description": "A version of the Sublime Text 2 plugin at that makes for TextMate-like clipboard history."} \ No newline at end of file diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Clipboard Manager/package.json b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Clipboard Manager/package.json new file mode 100644 index 0000000..ea57497 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Clipboard Manager/package.json @@ -0,0 +1,7 @@ +{ + "repo": "SublimeClipboardManager", + "name": "Clipboard Manager", + "description": "A version of the Sublime Text 2 plugin at that makes for TextMate-like clipboard history.", + "author": "AJ Palkovic (ajpalkovic), Martin Aspeli (optilude) and Colin Thomas-Arnold (colinta)", + "homepage": "https://gist.github.com/1590661" +} \ No newline at end of file diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/EasyMotion/.gitignore b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/EasyMotion/.gitignore new file mode 100644 index 0000000..7e99e36 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/EasyMotion/.gitignore @@ -0,0 +1 @@ +*.pyc \ No newline at end of file diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/EasyMotion/Default (Linux).sublime-keymap b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/EasyMotion/Default (Linux).sublime-keymap new file mode 100644 index 0000000..e86b53b --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/EasyMotion/Default (Linux).sublime-keymap @@ -0,0 +1,22 @@ +[ + { + "keys": ["ctrl+;", ""], + "command": "easy_motion", + "args": {"select_text": false} + }, + { + "keys": ["ctrl+;", "enter"], + "command": "easy_motion", + "args": {"select_text": false, "character": "enter"} + }, + { + "keys": ["ctrl+shift+;", ""], + "command": "easy_motion", + "args": {"select_text": true} + }, + { + "keys": ["ctrl+shift+;", "enter"], + "command": "easy_motion", + "args": {"select_text": true, "character": "enter"} + } +] diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/EasyMotion/Default (OSX).sublime-keymap b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/EasyMotion/Default (OSX).sublime-keymap new file mode 100644 index 0000000..83db6b5 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/EasyMotion/Default (OSX).sublime-keymap @@ -0,0 +1,22 @@ +[ + { + "keys": ["super+;", ""], + "command": "easy_motion", + "args": {"select_text": false} + }, + { + "keys": ["super+;", "enter"], + "command": "easy_motion", + "args": {"select_text": false, "character": "enter"} + }, + { + "keys": ["super+shift+;", ""], + "command": "easy_motion", + "args": {"select_text": true} + }, + { + "keys": ["super+shift+;", "enter"], + "command": "easy_motion", + "args": {"select_text": true, "character": "enter"} + } +] diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/EasyMotion/Default (Windows).sublime-keymap b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/EasyMotion/Default (Windows).sublime-keymap new file mode 100644 index 0000000..e86b53b --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/EasyMotion/Default (Windows).sublime-keymap @@ -0,0 +1,22 @@ +[ + { + "keys": ["ctrl+;", ""], + "command": "easy_motion", + "args": {"select_text": false} + }, + { + "keys": ["ctrl+;", "enter"], + "command": "easy_motion", + "args": {"select_text": false, "character": "enter"} + }, + { + "keys": ["ctrl+shift+;", ""], + "command": "easy_motion", + "args": {"select_text": true} + }, + { + "keys": ["ctrl+shift+;", "enter"], + "command": "easy_motion", + "args": {"select_text": true, "character": "enter"} + } +] diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/EasyMotion/Default.sublime-keymap b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/EasyMotion/Default.sublime-keymap new file mode 100644 index 0000000..8d1e0de --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/EasyMotion/Default.sublime-keymap @@ -0,0 +1,23 @@ +[ + /* haven't figured out why yet, but for some reason you need to hit ctrl+c or escape twice to get it to deactivate jump targets */ + { + "keys": ["ctrl+c"], + "command": "deactivate_jump_targets", "context": [{"key": "setting.easy_motion_mode"}] + }, + { + "keys": ["escape"], + "command": "deactivate_jump_targets", "context": [{"key": "setting.easy_motion_mode"}] + }, + { + "keys": [""], + "command": "jump_to", "context": [{"key": "setting.easy_motion_mode"}] + }, + { + "keys": ["enter"], + "command": "show_jump_group", "context": [{"key": "setting.easy_motion_mode"}] + }, + { + "keys": ["shift+enter"], + "command": "show_jump_group", "context": [{"key": "setting.easy_motion_mode"}], "args": {"next": false} + } +] \ No newline at end of file diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/EasyMotion/EasyMotion.sublime-settings b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/EasyMotion/EasyMotion.sublime-settings new file mode 100644 index 0000000..164c331 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/EasyMotion/EasyMotion.sublime-settings @@ -0,0 +1,11 @@ +{ + // defines syntax highlighting scope that will be used to highlight matched jump targets + // other examples include: keyword, string, number + "jump_target_scope" : "entity.name.class", + + // define the characters that we can jump to, in the order that they'll appear, they should be unique + "placeholder_chars" : "abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ", + + // searches are case sensitive by default + "case_sensitive" : true +} \ No newline at end of file diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/EasyMotion/LICENSE b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/EasyMotion/LICENSE new file mode 100644 index 0000000..5aeb903 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/EasyMotion/LICENSE @@ -0,0 +1,203 @@ +/* +* Apache License +* Version 2.0, January 2004 +* http://www.apache.org/licenses/ +* +* TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION +* +* 1. Definitions. +* +* "License" shall mean the terms and conditions for use, reproduction, +* and distribution as defined by Sections 1 through 9 of this document. +* +* "Licensor" shall mean the copyright owner or entity authorized by +* the copyright owner that is granting the License. +* +* "Legal Entity" shall mean the union of the acting entity and all +* other entities that control, are controlled by, or are under common +* control with that entity. For the purposes of this definition, +* "control" means (i) the power, direct or indirect, to cause the +* direction or management of such entity, whether by contract or +* otherwise, or (ii) ownership of fifty percent (50%) or more of the +* outstanding shares, or (iii) beneficial ownership of such entity. +* +* "You" (or "Your") shall mean an individual or Legal Entity +* exercising permissions granted by this License. +* +* "Source" form shall mean the preferred form for making modifications, +* including but not limited to software source code, documentation +* source, and configuration files. +* +* "Object" form shall mean any form resulting from mechanical +* transformation or translation of a Source form, including but +* not limited to compiled object code, generated documentation, +* and conversions to other media types. +* +* "Work" shall mean the work of authorship, whether in Source or +* Object form, made available under the License, as indicated by a +* copyright notice that is included in or attached to the work +* (an example is provided in the Appendix below). +* +* "Derivative Works" shall mean any work, whether in Source or Object +* form, that is based on (or derived from) the Work and for which the +* editorial revisions, annotations, elaborations, or other modifications +* represent, as a whole, an original work of authorship. For the purposes +* of this License, Derivative Works shall not include works that remain +* separable from, or merely link (or bind by name) to the interfaces of, +* the Work and Derivative Works thereof. +* +* "Contribution" shall mean any work of authorship, including +* the original version of the Work and any modifications or additions +* to that Work or Derivative Works thereof, that is intentionally +* submitted to Licensor for inclusion in the Work by the copyright owner +* or by an individual or Legal Entity authorized to submit on behalf of +* the copyright owner. For the purposes of this definition, "submitted" +* means any form of electronic, verbal, or written communication sent +* to the Licensor or its representatives, including but not limited to +* communication on electronic mailing lists, source code control systems, +* and issue tracking systems that are managed by, or on behalf of, the +* Licensor for the purpose of discussing and improving the Work, but +* excluding communication that is conspicuously marked or otherwise +* designated in writing by the copyright owner as "Not a Contribution." +* +* "Contributor" shall mean Licensor and any individual or Legal Entity +* on behalf of whom a Contribution has been received by Licensor and +* subsequently incorporated within the Work. +* +* 2. Grant of Copyright License. Subject to the terms and conditions of +* this License, each Contributor hereby grants to You a perpetual, +* worldwide, non-exclusive, no-charge, royalty-free, irrevocable +* copyright license to reproduce, prepare Derivative Works of, +* publicly display, publicly perform, sublicense, and distribute the +* Work and such Derivative Works in Source or Object form. +* +* 3. Grant of Patent License. Subject to the terms and conditions of +* this License, each Contributor hereby grants to You a perpetual, +* worldwide, non-exclusive, no-charge, royalty-free, irrevocable +* (except as stated in this section) patent license to make, have made, +* use, offer to sell, sell, import, and otherwise transfer the Work, +* where such license applies only to those patent claims licensable +* by such Contributor that are necessarily infringed by their +* Contribution(s) alone or by combination of their Contribution(s) +* with the Work to which such Contribution(s) was submitted. If You +* institute patent litigation against any entity (including a +* cross-claim or counterclaim in a lawsuit) alleging that the Work +* or a Contribution incorporated within the Work constitutes direct +* or contributory patent infringement, then any patent licenses +* granted to You under this License for that Work shall terminate +* as of the date such litigation is filed. +* +* 4. Redistribution. You may reproduce and distribute copies of the +* Work or Derivative Works thereof in any medium, with or without +* modifications, and in Source or Object form, provided that You +* meet the following conditions: +* +* (a) You must give any other recipients of the Work or +* Derivative Works a copy of this License; and +* +* (b) You must cause any modified files to carry prominent notices +* stating that You changed the files; and +* +* (c) You must retain, in the Source form of any Derivative Works +* that You distribute, all copyright, patent, trademark, and +* attribution notices from the Source form of the Work, +* excluding those notices that do not pertain to any part of +* the Derivative Works; and +* +* (d) If the Work includes a "NOTICE" text file as part of its +* distribution, then any Derivative Works that You distribute must +* include a readable copy of the attribution notices contained +* within such NOTICE file, excluding those notices that do not +* pertain to any part of the Derivative Works, in at least one +* of the following places: within a NOTICE text file distributed +* as part of the Derivative Works; within the Source form or +* documentation, if provided along with the Derivative Works; or, +* within a display generated by the Derivative Works, if and +* wherever such third-party notices normally appear. The contents +* of the NOTICE file are for informational purposes only and +* do not modify the License. You may add Your own attribution +* notices within Derivative Works that You distribute, alongside +* or as an addendum to the NOTICE text from the Work, provided +* that such additional attribution notices cannot be construed +* as modifying the License. +* +* You may add Your own copyright statement to Your modifications and +* may provide additional or different license terms and conditions +* for use, reproduction, or distribution of Your modifications, or +* for any such Derivative Works as a whole, provided Your use, +* reproduction, and distribution of the Work otherwise complies with +* the conditions stated in this License. +* +* 5. Submission of Contributions. Unless You explicitly state otherwise, +* any Contribution intentionally submitted for inclusion in the Work +* by You to the Licensor shall be under the terms and conditions of +* this License, without any additional terms or conditions. +* Notwithstanding the above, nothing herein shall supersede or modify +* the terms of any separate license agreement you may have executed +* with Licensor regarding such Contributions. +* +* 6. Trademarks. This License does not grant permission to use the trade +* names, trademarks, service marks, or product names of the Licensor, +* except as required for reasonable and customary use in describing the +* origin of the Work and reproducing the content of the NOTICE file. +* +* 7. Disclaimer of Warranty. Unless required by applicable law or +* agreed to in writing, Licensor provides the Work (and each +* Contributor provides its Contributions) on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +* implied, including, without limitation, any warranties or conditions +* of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A +* PARTICULAR PURPOSE. You are solely responsible for determining the +* appropriateness of using or redistributing the Work and assume any +* risks associated with Your exercise of permissions under this License. +* +* 8. Limitation of Liability. In no event and under no legal theory, +* whether in tort (including negligence), contract, or otherwise, +* unless required by applicable law (such as deliberate and grossly +* negligent acts) or agreed to in writing, shall any Contributor be +* liable to You for damages, including any direct, indirect, special, +* incidental, or consequential damages of any character arising as a +* result of this License or out of the use or inability to use the +* Work (including but not limited to damages for loss of goodwill, +* work stoppage, computer failure or malfunction, or any and all +* other commercial damages or losses), even if such Contributor +* has been advised of the possibility of such damages. +* +* 9. Accepting Warranty or Additional Liability. While redistributing +* the Work or Derivative Works thereof, You may choose to offer, +* and charge a fee for, acceptance of support, warranty, indemnity, +* or other liability obligations and/or rights consistent with this +* License. However, in accepting such obligations, You may act only +* on Your own behalf and on Your sole responsibility, not on behalf +* of any other Contributor, and only if You agree to indemnify, +* defend, and hold each Contributor harmless for any liability +* incurred by, or claims asserted against, such Contributor by reason +* of your accepting any such warranty or additional liability. +* +* END OF TERMS AND CONDITIONS +* +* APPENDIX: How to apply the Apache License to your work. +* +* To apply the Apache License to your work, attach the following +* boilerplate notice, with the fields enclosed by brackets "[]" +* replaced with your own identifying information. (Don't include +* the brackets!) The text should be enclosed in the appropriate +* comment syntax for the file format. We also recommend that a +* file or class name and description of purpose be included on the +* same "printed page" as the copyright notice for easier +* identification within third-party archives. +* +* Copyright [yyyy] [name of copyright owner] +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/EasyMotion/Main.sublime-menu b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/EasyMotion/Main.sublime-menu new file mode 100644 index 0000000..45795cf --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/EasyMotion/Main.sublime-menu @@ -0,0 +1,90 @@ +[ + { + "id": "preferences", + "children": + [ + { + "id": "package-settings", + "children": + [ + { + "caption": "EasyMotion", + "children": + [ + // README + { + "caption": "View README", + "command": "open_file", "args": {"file": "${packages}/EasyMotion/README.md"} + }, + { "caption": "-" }, + + // Settings + { + "caption": "Settings – Default", + "command": "open_file", "args": {"file": "${packages}/EasyMotion/EasyMotion.sublime-settings"} + }, + { + "caption": "Settings – User", + "command": "open_file", "args": {"file": "${packages}/User/EasyMotion.sublime-settings"} + }, + { "caption": "-" }, + + // Keybindings - Default + { + "caption": "Key Bindings – Default", + "command": "open_file", + "args": { + "file": "${packages}/EasyMotion/Default (OSX).sublime-keymap", + "platform": "OSX" + } + }, + { + "caption": "Key Bindings – Default", + "command": "open_file", + "args": { + "file": "${packages}/EasyMotion/Default (Linux).sublime-keymap", + "platform": "Linux" + } + }, + { + "caption": "Key Bindings – Default", + "command": "open_file", + "args": { + "file": "${packages}/EasyMotion/Default (Windows).sublime-keymap", + "platform": "Windows" + } + }, + + // Keybindings - User + { + "caption": "Key Bindings – User", + "command": "open_file", + "args": { + "file": "${packages}/User/Default (OSX).sublime-keymap", + "platform": "OSX" + } + }, + { + "caption": "Key Bindings – User", + "command": "open_file", + "args": { + "file": "${packages}/User/Default (Linux).sublime-keymap", + "platform": "Linux" + } + }, + { + "caption": "Key Bindings – User", + "command": "open_file", + "args": { + "file": "${packages}/User/Default (Windows).sublime-keymap", + "platform": "Windows" + } + }, + { "caption": "-" } + ] + } + ] + } + ] + } +] diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/EasyMotion/README.md b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/EasyMotion/README.md new file mode 100644 index 0000000..345e0e7 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/EasyMotion/README.md @@ -0,0 +1,134 @@ +# Sublime EasyMotion + +EasyMotion is a [Sublime Text 2](http://www.sublimetext.com/2) plugin that allows you to move the cursor to any character in your current view. + +It's heavily inspired by [Vim's EasyMotion](http://www.vim.org/scripts/script.php?script_id=3526), and [Emacs' AceJump](http://www.emacswiki.org/emacs/AceJump) plugins. + +After pressing the EasyMotion shortcut (default `cmd-;`/`ctrl-;`), you then press the character that you'd like to jump to. EasyMotion will then replace all currently visible instances of that character with one of `a-zA-Z0-9`. Press the key for the one you want and your cursor will be moved right to it. + +![Animated Gif](https://raw.github.com/tednaleid/sublime-EasyMotion/add_images/images/easymotion.gif) + + +## Installation + +### Install via PackageControl +If you have the [PackageControl](http://wbond.net/sublime_packages/package_control) plugin installed, you can use that to install `EasyMotion`. + +Just type `cmd-shift-p` (`ctrl-shift-p` on win/linux) to bring up the command pallate then type `install` and pick `Package Control: Install Package` from the dropdown. + +Then type `EasyMotion` and choose the EasyMotion plugin from the dropdown. Hit `enter` and it will install. + +### Manual Installation + +Manual installation should be as easy as cloning this git repository into your Sublime `Packages` directory. On OSX: + + cd ~/Application\ Support/Sublime\ Text\ 2/Packages + git clone git://github.com/tednaleid/sublime-EasyMotion.git EasyMotion + +(The directory name underneath packages __must__ be `EasyMotion` and not `sublime-EasyMotion` for some preferences to get picked up) + +If you're interested in trying the next release of the plugin, you can switch your branch to the development branch: + + cd EasyMotion + git checkout development + +This branch will have features that are marked as fixed in the issue, but haven't yet been merged to `master`. + +## Usage + +### Jump to any visible character + + cmd-; // OSX + ctrl-; // Linux/Windows + +it will label all instances of that character with a unique value in `a-zA-Z0-9`, type the label you want and it will jump you to it. + +#### Example + +The cursor is at the end of the file and we want to jump to the beginning of the `realpart` variable on line 3 + +![EasyMotion Begin](https://raw.github.com/tednaleid/sublime-EasyMotion/add_images/images/sublimejump_begin.png) + +Instead of hitting the up arrow twice and scrolling over to the r (or grabbing your mouse), you could press `cmd-;` followed by `r`. That will transform your file into this (notice that each instance of `r` has been turned into one of `a-zA-Z0-9`): + +![EasyMotion Middle](https://raw.github.com/tednaleid/sublime-EasyMotion/add_images/images/sublimejump_middle.png) + +Press `e` and your cursor will jump right there: + +![EasyMotion Middle](https://raw.github.com/tednaleid/sublime-EasyMotion/add_images/images/sublimejump_end.png) + +If your target character occurs more than 62 times in the visible area, it will decorate them in batches. + +So if we search this for the letter `l` using `cmd-;`+`l` + +![Many Matches Start](https://raw.github.com/tednaleid/sublime-EasyMotion/add_images/images/many_matches_start.png) + +The first batch of 62 targets will look like this: + +![Many Matches First](https://raw.github.com/tednaleid/sublime-EasyMotion/add_images/images/many_matches_first.png) + +**Just hit `enter` and it will highlight the next group of matches.** + +![Many Matches Second](https://raw.github.com/tednaleid/sublime-EasyMotion/add_images/images/many_matches_second.png) + +Keep hitting `enter` and it will continue to cycle through them in groups of 62. You can also hit `shift-enter` to cycle backwards through the target groups. Hitting the `spacebar` will exit, and so will `ctrl-c` and `escape` (but for some reason there's currently a bug that makes you hit those twice to exit). + +### Select all text between cursor and any visible character + + cmd-shift-; // OSX + ctrl-shift-; // Linux/Windows + +it will label all instances of that character with a unique value in `a-zA-Z0-9`, type it and it will select all text between your current cursor position and the chosen jump target. + +#### Example + +So in the same situation as above, if we had hit `cmd-shift-;` followed by `r` and picked the `e` target that occurs at the start of the `imagpart` variable on line 3, we would end up with this: + +![EasyMotion Select](https://raw.github.com/tednaleid/sublime-EasyMotion/add_images/images/sublimejump_select.png) + + +## User Modifiable Preferences + +### Remapping the Sublime EasyMotion keyboard shortcut + +You can remap your keys to be something other than the defaults by entering an override value into your "User - KeyBindings" (under Sublime Text 2 -> Preferences -> Package Settings -> Easy Motion on OSX), just make sure to copy the existing key bindings exactly and change only the first item in the `keys` stanza, otherwise it won't work. So if you wanted the jump command to be `ctrl-,`, you'd use: + + + [ + { + "keys": ["ctrl+,", ""], + "command": "easy_motion", + "args": {"select_text": false} + }, + { + "keys": ["ctrl+shift+,", ""], + "command": "easy_motion", + "args": {"select_text": true} + } + ] + + +### Overriding the placeholder characters used for jumping + +Add this to your "User Settings" file (found at "Sublime Text 2 -> Preferences -> Package Settings -> Easy Motion -> Settings - User" on OSX) and change the string to contain whatever characters you'd like to use: + + // define the characters that we can jump to, in the order that they'll appear, they should be unique + "placeholder_chars" : "abcdefghijklmnopqrstuvwxyz01234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ" + +example using only QWERTY home-row replacements: + + "placeholder_chars" : "jkl;asdfHGJKL:ASDFHG" + +### Override the highlight color for jump targets + +If the highlight color used for jump targets isn't bold enough if your color scheme, you can override it by changing this "User Setting": + + // defines syntax highlighting scope that will be used to highlight matched jump targets + // other examples include: keyword, string, number + "jump_target_scope" : "entity.name.class" + + +# Versions + +- 0.8 - released 2/3/13 - updates location of preferences to EasyMotion specific file and includes plugin specific preferences file. You'll need to migrate preferences over into this file for them to stick. +- 0.9 - released 2/14/13 - removes need for input panel and implements an easy_motion_mode to accept keystrokes, also lets `shift-enter` cycle backwards diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/EasyMotion/easy_motion.py b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/EasyMotion/easy_motion.py new file mode 100644 index 0000000..0c7aa8b --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/EasyMotion/easy_motion.py @@ -0,0 +1,293 @@ +import sublime +import sublime_plugin +import re +from itertools import izip_longest +from pprint import pprint + +REGEX_ESCAPE_CHARS = '\\+*()[]{}^$?|:].,' + +# not a fan of using globals like this, but not sure if there's a better way with the plugin +# API that ST2 provides. Tried attaching as fields to active_view, but didn't persiste, I'm guessing +# it's just a representation of something that gets regenerated on demand so dynamic fields are transient +JUMP_GROUP_GENERATOR = None +CURRENT_JUMP_GROUP = None +EASY_MOTION_EDIT = None +SELECT_TEXT = False +COMMAND_MODE_WAS = False +JUMP_TARGET_SCOPE = 'string' + + +class JumpGroupGenerator: + ''' + given a list of region jump targets matching the given character, can emit a series of + JumpGroup dictionaries going forwards with next and backwards with previous + ''' + def __init__(self, view, character, placeholder_chars, case_sensitive): + self.view = view + self.case_sensitive = case_sensitive + self.placeholder_chars = placeholder_chars + self.all_jump_targets = self.find_all_jump_targets_in_visible_region(character) + self.interleaved_jump_targets = self.interleave_jump_targets_from_cursor() + self.jump_target_index = 0 + self.jump_target_groups = self.create_jump_target_groups() + self.jump_target_group_index = -1 + + def determine_re_flags(self, character): + if character == 'enter': + return '(?m)' + elif self.case_sensitive: + return '(?i)' + else: + return '' + + def interleave_jump_targets_from_cursor(self): + sel = self.view.sel()[0] # multi select not supported, doesn't really make sense + sel_begin = sel.begin() + sel_end = sel.end() + before = [] + after = [] + + # split them into two lists radiating out from the cursor position + for target in self.all_jump_targets: + if target.begin() < sel_begin: + # add to beginning of list so closest targets to cursor are first + before.insert(0, target) + elif target.begin() > sel_end: + after.append(target) + + # now interleave the two lists together into one list + return [target for targets in izip_longest(before, after) for target in targets if target is not None] + + def create_jump_target_groups(self): + jump_target_groups = [] + + while self.has_next_jump_target(): + jump_group = dict() + + for placeholder_char in self.placeholder_chars: + if self.has_next_jump_target(): + jump_group[placeholder_char] = self.interleaved_jump_targets[self.jump_target_index] + self.jump_target_index += 1 + else: + break + + jump_target_groups.append(jump_group) + + return jump_target_groups + + def has_next_jump_target(self): + return self.jump_target_index < len(self.interleaved_jump_targets) + + def __len__(self): + return len(self.jump_target_groups) + + def next(self): + self.jump_target_group_index += 1 + + if self.jump_target_group_index >= len(self.jump_target_groups) or self.jump_target_group_index < 0: + self.jump_target_group_index = 0 + + return self.jump_target_groups[self.jump_target_group_index] + + def previous(self): + self.jump_target_group_index -= 1 + + if self.jump_target_group_index < 0 or self.jump_target_group_index >= len(self.jump_target_groups): + self.jump_target_group_index = len(self.jump_target_groups) - 1 + + return self.jump_target_groups[self.jump_target_group_index] + + def find_all_jump_targets_in_visible_region(self, character): + visible_region_begin = self.visible_region_begin() + visible_text = self.visible_text() + folded_regions = self.get_folded_regions(self.view) + matching_regions = [] + target_regexp = self.target_regexp(character) + + for char_at in (match.start() for match in re.finditer(target_regexp, visible_text)): + char_point = char_at + visible_region_begin + char_region = sublime.Region(char_point, char_point + 1) + if not self.region_list_contains_region(folded_regions, char_region): + matching_regions.append(char_region) + + return matching_regions + + def region_list_contains_region(self, region_list, region): + + for element_region in region_list: + if element_region.contains(region): + return True + return False + + def visible_region_begin(self): + return self.view.visible_region().begin() + + def visible_text(self): + visible_region = self.view.visible_region() + return self.view.substr(visible_region) + + def target_regexp(self, character): + re_flags = self.determine_re_flags(character) + if (REGEX_ESCAPE_CHARS.find(character) >= 0): + return re_flags + '\\' + character + elif character == "enter": + return re_flags + "(?=^).|.(?=$)" + else: + return re_flags + character + + def get_folded_regions(self, view): + ''' + No way in the API to get the folded regions without unfolding them first + seems to be quick enough that you can't actually see them fold/unfold + ''' + folded_regions = view.unfold(view.visible_region()) + view.fold(folded_regions) + return folded_regions + + +class EasyMotionCommand(sublime_plugin.WindowCommand): + winning_selection = None + + def run(self, character=None, select_text=False): + global JUMP_GROUP_GENERATOR, SELECT_TEXT, JUMP_TARGET_SCOPE + sublime.status_message("EasyMotion: Jump to " + character) + + SELECT_TEXT = select_text + + active_view = self.window.active_view() + + settings = sublime.load_settings("EasyMotion.sublime-settings") + placeholder_chars = settings.get('placeholder_chars', 'abcdefghijklmnopqrstuvwxyz01234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ') + JUMP_TARGET_SCOPE = settings.get('jump_target_scope', 'string') + case_sensitive = settings.get('case_sensitive', True) + + JUMP_GROUP_GENERATOR = JumpGroupGenerator(active_view, character, placeholder_chars, case_sensitive) + + if len(JUMP_GROUP_GENERATOR) > 0: + self.activate_mode(active_view) + self.window.run_command("show_jump_group") + else: + sublime.status_message("EasyMotion: unable to find any instances of " + character + " in visible region") + + def activate_mode(self, active_view): + global COMMAND_MODE_WAS + active_view.settings().set('easy_motion_mode', True) + # yes, this feels a little dirty to mess with the Vintage plugin, but there + # doesn't appear to be any other way to tell it to not intercept keys, so turn it + # off (if it's on) while we're running EasyMotion + COMMAND_MODE_WAS = active_view.settings().get('command_mode') + if (COMMAND_MODE_WAS): + active_view.settings().set('command_mode', False) + + +class ShowJumpGroup(sublime_plugin.WindowCommand): + active_view = None + + def run(self, next=True): + self.active_view = self.window.active_view() + + self.show_jump_group(next) + + def show_jump_group(self, next=True): + global JUMP_GROUP_GENERATOR, CURRENT_JUMP_GROUP + + if next: + CURRENT_JUMP_GROUP = JUMP_GROUP_GENERATOR.next() + else: + CURRENT_JUMP_GROUP = JUMP_GROUP_GENERATOR.previous() + + self.activate_current_jump_group() + + def activate_current_jump_group(self): + global CURRENT_JUMP_GROUP, EASY_MOTION_EDIT, JUMP_TARGET_SCOPE + ''' + Start up an edit object if we don't have one already, then create all of the jump targets + ''' + if (EASY_MOTION_EDIT is not None): + # normally would call deactivate_current_jump_group here, but apparent ST2 bug prevents it from calling undo correctly + # instead just decorate the new character and keep the same edit object so all changes get undone properly + self.active_view.erase_regions("jump_match_regions") + else: + EASY_MOTION_EDIT = self.active_view.begin_edit() + + for placeholder_char in CURRENT_JUMP_GROUP.keys(): + self.active_view.replace(EASY_MOTION_EDIT, CURRENT_JUMP_GROUP[placeholder_char], placeholder_char) + + self.active_view.add_regions("jump_match_regions", CURRENT_JUMP_GROUP.values(), JUMP_TARGET_SCOPE, "dot") + + +class JumpTo(sublime_plugin.WindowCommand): + def run(self, character=None): + global COMMAND_MODE_WAS + + self.active_view = self.window.active_view() + self.winning_selection = self.winning_selection_from(character) + self.finish_easy_motion() + self.active_view.settings().set('easy_motion_mode', False) + if (COMMAND_MODE_WAS): + self.active_view.settings().set('command_mode', True) + + def winning_selection_from(self, selection): + global CURRENT_JUMP_GROUP, SELECT_TEXT + winning_region = None + if selection in CURRENT_JUMP_GROUP: + winning_region = CURRENT_JUMP_GROUP[selection] + + if winning_region is not None: + if SELECT_TEXT: + for current_selection in self.active_view.sel(): + if winning_region.begin() < current_selection.begin(): + return sublime.Region(current_selection.end(), winning_region.begin()) + else: + return sublime.Region(current_selection.begin(), winning_region.end()) + else: + return sublime.Region(winning_region.begin(), winning_region.begin()) + + def finish_easy_motion(self): + ''' + We need to clean up after ourselves by restoring the view to it's original state, if the user did + press a jump target that we've got saved, jump to it as the last action + ''' + self.deactivate_current_jump_group() + self.jump_to_winning_selection() + + def deactivate_current_jump_group(self): + ''' + Close out the edit that we've been messing with and then undo it right away to return the buffer to + the pristine state that we found it in. Other methods ended up leaving the window in a dirty save state + and this seems to be the cleanest way to get back to the original state + ''' + global EASY_MOTION_EDIT + if (EASY_MOTION_EDIT is not None): + self.active_view.end_edit(EASY_MOTION_EDIT) + self.window.run_command("undo") + EASY_MOTION_EDIT = None + + self.active_view.erase_regions("jump_match_regions") + + def jump_to_winning_selection(self): + if self.winning_selection is not None: + self.active_view.run_command("jump_to_winning_selection", {"begin": self.winning_selection.begin(), "end": self.winning_selection.end()}) + + +class DeactivateJumpTargets(sublime_plugin.WindowCommand): + def run(self): + pprint("DeactivateJumpTargets called") + global EASY_MOTION_EDIT + + active_view = self.window.active_view() + if (EASY_MOTION_EDIT is not None): + active_view.end_edit(EASY_MOTION_EDIT) + self.window.run_command("undo") + EASY_MOTION_EDIT = None + + active_view.erase_regions("jump_match_regions") + + +class JumpToWinningSelection(sublime_plugin.TextCommand): + def run(self, edit, begin, end): + winning_region = sublime.Region(long(begin), long(end)) + sel = self.view.sel() + sel.clear() + sel.add(winning_region) + self.view.show(winning_region) diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/EasyMotion/package-metadata.json b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/EasyMotion/package-metadata.json new file mode 100644 index 0000000..5e98f3f --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/EasyMotion/package-metadata.json @@ -0,0 +1 @@ +{"url": "https://github.com/tednaleid/sublime-EasyMotion", "version": "2013.03.26.20.46.50", "description": "Sublime Text 2 plugin to quickly jump to any character in the visible area of the active view."} \ No newline at end of file diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/.gitignore b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/.gitignore new file mode 100644 index 0000000..2500b0f --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/.gitignore @@ -0,0 +1,2 @@ +*.pyc +*.cache \ No newline at end of file diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/ColorSchemes/Print-Color.tmTheme b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/ColorSchemes/Print-Color.tmTheme new file mode 100644 index 0000000..aadedbc --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/ColorSchemes/Print-Color.tmTheme @@ -0,0 +1,362 @@ + + + + + name + Print Color + settings + + + settings + + background + #FFFFFF + caret + #000000 + foreground + #000000 + invisibles + #3B3A32 + lineHighlight + #2E2E2E22 + selection + #34A7BD + selectionForeground + #FFFFFF + inactiveSelection + #9D550FAA + inactiveSelectionForeground + #6ac4d6 + findHighlight + #FFE792 + findHighlightForeground + #000000 + activeGuide + #34A7BD + gutterForeground + #858585 + gutter + #E5E5E5 + + bracketsForeground + #F8F8F2A5 + bracketsOptions + underline + + bracketContentsForeground + #F8F8F2A5 + bracketContentsOptions + underline + + tagsOptions + stippled_underline + + + + name + Comment + scope + comment + settings + + foreground + #A5A5A5 + + + + name + String + scope + string + settings + + foreground + #8F8634 + + + + name + Number + scope + constant.numeric + settings + + foreground + #7C4FCD + + + + name + Built-in constant + scope + constant.language + settings + + foreground + #7C4FCD + + + + name + User-defined constant + scope + constant.character, constant.other + settings + + foreground + #7C4FCD + + + + name + Variable + scope + variable + settings + + fontStyle + + + + + name + Keyword + scope + keyword + settings + + foreground + #C70040 + + + + name + Storage + scope + storage + settings + + fontStyle + + foreground + #C70040 + + + + name + Storage type + scope + storage.type + settings + + fontStyle + italic + foreground + #34A7BD + + + + name + Class name + scope + entity.name.class + settings + + fontStyle + underline + foreground + #427E00 + + + + name + Inherited class + scope + entity.other.inherited-class + settings + + fontStyle + italic underline + foreground + #427E00 + + + + name + Function name + scope + entity.name.function + settings + + fontStyle + + foreground + #427E00 + + + + name + Function argument + scope + variable.parameter + settings + + fontStyle + italic + foreground + #CB6500 + + + + name + Tag name + scope + entity.name.tag + settings + + fontStyle + + foreground + #C70040 + + + + name + Tag attribute + scope + entity.other.attribute-name + settings + + fontStyle + + foreground + #427E00 + + + + name + Library function + scope + support.function + settings + + fontStyle + + foreground + #34A7BD + + + + name + Library constant + scope + support.constant + settings + + fontStyle + + foreground + #34A7BD + + + + name + Library class/type + scope + support.type, support.class + settings + + fontStyle + italic + foreground + #34A7BD + + + + name + Library variable + scope + support.other.variable + settings + + fontStyle + + + + + name + Invalid + scope + invalid + settings + + background + #C70040 + fontStyle + + foreground + #F8F8F0 + + + + name + Invalid deprecated + scope + invalid.deprecated + settings + + background + #7C4FCD + foreground + #F8F8F0 + + + + name + JSON String + scope + meta.structure.dictionary.json string.quoted.double.json + settings + + foreground + #8F8634 + + + + name + diff.deleted + scope + markup.deleted + settings + + foreground + #C70040 + + + + name + diff.inserted + scope + markup.inserted + settings + + foreground + #427E00 + + + + name + diff.changed + scope + markup.changed + settings + + foreground + #8F8634 + + + + uuid + 22808317-0a5a-4b87-baea-5aeee17bf295 + + diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/ColorSchemes/Print-Grayscale.tmTheme b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/ColorSchemes/Print-Grayscale.tmTheme new file mode 100644 index 0000000..c1b2a58 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/ColorSchemes/Print-Grayscale.tmTheme @@ -0,0 +1,133 @@ + + + + + name + Print Grayscale + settings + + + settings + + background + #FFFFFF + caret + #000000 + foreground + #000000 + invisibles + #323232 + lineHighlight + #2E2E2E22 + selection + #666666 + selectionForeground + #FFFFFF + inactiveSelection + #888888 + findHighlight + #666666 + findHighlightForeground + #000000 + activeGuide + #888888 + gutterForeground + #000000 + gutter + #E5E5E5 + + bracketsForeground + #000000 + bracketsOptions + underline + + bracketContentsForeground + #000000 + bracketContentsOptions + underline --> + + tagsOptions + stippled_underline + + + + name + Comment + scope + comment + settings + + foreground + #A5A5A5 + + + + name + Storage type + scope + storage.type + settings + + fontStyle + italic + foreground + #000000 + + + + name + Class name + scope + entity.name.class + settings + + fontStyle + underline + foreground + #000000 + + + + name + Inherited class + scope + entity.other.inherited-class + settings + + fontStyle + italic underline + foreground + #000000 + + + + name + Function argument + scope + variable.parameter + settings + + fontStyle + italic + foreground + #000000 + + + + name + Library class/type + scope + support.type, support.class + settings + + fontStyle + italic + foreground + #000000 + + + + uuid + 07379361-ce49-4e6c-a03f-26378a7a2131 + + diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/Context.sublime-menu b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/Context.sublime-menu new file mode 100644 index 0000000..d0320be --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/Context.sublime-menu @@ -0,0 +1,26 @@ +[ + { "caption": "-" }, + { + "caption": "Export", + "children": + [ + { "command": "export_html_panel", "caption": "HTML" }, + {"command": "export_bbcode_panel", "caption": "BBCode"} + ] + }, + { + "caption": "Annotations", + "children": + [ + { "command": "enable_annotation_mode", "caption": "Enable Annotation Mode" }, + { "command": "disable_annotation_mode", "caption": "Disable Annotation Mode" }, + { "caption": "-" }, + { "command": "add_annotation", "caption": "Add Annotation" }, + { "command": "edit_annotation", "caption": "Edit Annotation" }, + { "command": "delete_annotations", "caption": "Delete Annotation(s)" }, + { "command": "clear_annotations", "caption": "Delete All Annotations" }, + { "command": "show_annotation_comment", "caption": "Show Annotation Comment" } + ] + }, + { "caption": "-"} +] diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/Default.sublime-commands b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/Default.sublime-commands new file mode 100644 index 0000000..4e3776a --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/Default.sublime-commands @@ -0,0 +1,35 @@ +[ + // Export to HTML + { + "caption": "Export to HTML: Show Export Menu", + "command": "export_html_panel" + }, + { + "caption": "Export to BBCode: Show Export Menu", + "command": "export_bbcode_panel" + }, + { + "caption": "Export to HTML: Toggle Annotation Mode", + "command": "toggle_annotation_html_mode" + }, + { + "caption": "Export to HTML: Add Annotation", + "command": "add_annotation" + }, + { + "caption": "Export to HTML: Edit Annotation", + "command": "edit_annotation" + }, + { + "caption": "Export to HTML: Delete Annotation(s)", + "command": "delete_annotations" + }, + { + "caption": "Export to HTML: Delete All Annotations", + "command": "clear_annotations" + }, + { + "caption": "Export to HTML: Show Annotation Comment", + "command": "show_annotation_comment" + } +] diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/ExportBbcode.py b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/ExportBbcode.py new file mode 100644 index 0000000..2be2d0b --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/ExportBbcode.py @@ -0,0 +1,352 @@ +import sublime +import sublime_plugin +from os import path +import tempfile +import sys +import re + +PACKAGE_SETTINGS = "ExportHtml.sublime-settings" + +if sublime.platform() == "linux": + # Try and load Linux Python2.6 lib. Default path is for Ubuntu. + linux_lib = sublime.load_settings(PACKAGE_SETTINGS).get("linux_python2.6_lib", "/usr/lib/python2.6/lib-dynload") + if not linux_lib in sys.path and path.exists(linux_lib): + sys.path.append(linux_lib) +from plistlib import readPlist +from ExportHtmlLib.rgba.rgba import RGBA + +NUMBERED_BBCODE_LINE = '[color=%(color)s]%(line)s [/color]%(code)s\n' + +BBCODE_LINE = '%(code)s\n' + +BBCODE_CODE = '[color=%(color)s]%(content)s[/color]' + +BBCODE_ESCAPE = '[/color][color=%(color_open)s]%(content)s[/color][color=%(color_close)s]' + +BBCODE_BOLD = '[b]%(content)s[/b]' + +BBCODE_ITALIC = '[i]%(content)s[/i]' + +POST_START = '[pre=%(bg_color)s]' + +POST_END = '[/pre]\n' + +BBCODE_MATCH = re.compile(r"""(\[/?)((?:code|pre|table|tr|td|th|b|i|u|sup|color|url|img|list|trac|center|quote|size|li|ul|ol|youtube|gvideo)(?:=[^\]]+)?)(\])""") + +FILTER_MATCH = re.compile(r'^(?:(brightness|saturation|hue|colorize)\((-?[\d]+|[\d]*\.[\d]+)\)|(sepia|grayscale|invert))$') + + +class ExportBbcodePanelCommand(sublime_plugin.WindowCommand): + def execute(self, value): + if value >= 0: + view = self.window.active_view() + if view != None: + ExportBbcode(view).run(**self.args[value]) + + def run(self): + options = sublime.load_settings(PACKAGE_SETTINGS).get("bbcode_panel", {}) + menu = [] + self.args = [] + for opt in options: + k, v = opt.items()[0] + menu.append(k) + self.args.append(v) + + if len(menu): + self.window.show_quick_panel( + menu, + self.execute + ) + + +class ExportBbcodeCommand(sublime_plugin.WindowCommand): + def run(self, **kwargs): + view = self.window.active_view() + if view != None: + ExportBbcode(view).run(**kwargs) + + +class ExportBbcode(object): + def __init__(self, view): + self.view = view + + def process_inputs(self, **kwargs): + return { + "numbers": bool(kwargs.get("numbers", False)), + "color_scheme": kwargs.get("color_scheme", None), + "multi_select": bool(kwargs.get("multi_select", False)), + "clipboard_copy": bool(kwargs.get("clipboard_copy", True)), + "view_open": bool(kwargs.get("view_open", False)), + "filter": kwargs.get("filter", "") + } + + def setup(self, **kwargs): + path_packages = sublime.packages_path() + + # Get get general document preferences from sublime preferences + settings = sublime.load_settings('Preferences.sublime-settings') + eh_settings = sublime.load_settings(PACKAGE_SETTINGS) + self.tab_size = settings.get('tab_size', 4) + self.char_limit = int(eh_settings.get("valid_selection_size", 4)) + self.bground = '' + self.fground = '' + self.gbground = '' + self.gfground = '' + self.sbground = '' + self.sfground = '' + self.numbers = kwargs["numbers"] + self.hl_continue = None + self.curr_hl = None + self.sels = [] + self.multi_select = self.check_sel() if kwargs["multi_select"] else False + self.size = self.view.size() + self.pt = 0 + self.end = 0 + self.curr_row = 0 + self.empty_space = None + self.filter = [] + for f in kwargs["filter"].split(";"): + m = FILTER_MATCH.match(f) + if m: + if m.group(1): + self.filter.append((m.group(1), float(m.group(2)))) + else: + self.filter.append((m.group(3), 0.0)) + + # Get color scheme + if kwargs["color_scheme"] != None: + alt_scheme = kwargs["color_scheme"] + else: + alt_scheme = eh_settings.get("alternate_scheme", False) + scheme_file = settings.get('color_scheme') if alt_scheme == False else alt_scheme + colour_scheme = path.normpath(scheme_file) + self.plist_file = self.apply_filters(readPlist(path_packages + colour_scheme.replace('Packages', ''))) + colour_settings = self.plist_file["settings"][0]["settings"] + + # Get general theme colors from color scheme file + self.bground = self.strip_transparency(colour_settings.get("background", '#FFFFFF'), simple_strip=True) + self.fground = self.strip_transparency(colour_settings.get("foreground", '#000000')) + self.gbground = self.bground + self.gfground = self.fground + + # Create scope colors mapping from color scheme file + self.colours = {self.view.scope_name(self.end).split(' ')[0]: {"color": self.fground, "style": []}} + for item in self.plist_file["settings"]: + scope = item.get('scope', None) + colour = None + style = [] + if 'scope' in item: + scope = item['scope'] + if 'settings' in item: + colour = item['settings'].get('foreground', None) + if 'fontStyle' in item['settings']: + for s in item['settings']['fontStyle'].split(' '): + if s == "bold" or s == "italic": # or s == "underline": + style.append(s) + + if scope != None and colour != None: + self.colours[scope] = {"color": self.strip_transparency(colour), "style": style} + + def apply_filters(self, tmtheme): + def filter_color(color): + rgba = RGBA(color) + for f in self.filter: + name = f[0] + value = f[1] + if name == "grayscale": + rgba.grayscale() + elif name == "sepia": + rgba.sepia() + elif name == "saturation": + rgba.saturation(value) + elif name == "invert": + rgba.invert() + elif name == "brightness": + rgba.brightness(value) + elif name == "hue": + rgba.hue(value) + elif name == "colorize": + rgba.colorize(value) + return rgba.get_rgba() + + if len(self.filter): + general_settings_read = False + for settings in tmtheme["settings"]: + if not general_settings_read: + for k, v in settings["settings"].items(): + try: + settings["settings"][k] = filter_color(v) + except: + pass + general_settings_read = True + continue + + try: + settings["settings"]["foreground"] = filter_color(settings["settings"]["foreground"]) + except: + pass + try: + settings["settings"]["background"] = filter_color(settings["settings"]["background"]) + except: + pass + return tmtheme + + def strip_transparency(self, color, track_darkness=False, simple_strip=False): + if color is None: + return color + rgba = RGBA(color.replace(" ", "")) + if not simple_strip: + rgba.apply_alpha(self.bground if self.bground != "" else "#FFFFFF") + return rgba.get_rgb() + + def setup_print_block(self, curr_sel, multi=False): + # Determine start and end points and whether to parse whole file or selection + if not multi and (curr_sel.empty() or curr_sel.size() <= self.char_limit): + self.size = self.view.size() + self.pt = 0 + self.end = 1 + self.curr_row = 1 + else: + self.size = curr_sel.end() + self.pt = curr_sel.begin() + self.end = self.pt + 1 + self.curr_row = self.view.rowcol(self.pt)[0] + 1 + self.start_line = self.curr_row + + self.gutter_pad = len(str(self.view.rowcol(self.size)[0])) + 1 + + def check_sel(self): + multi = False + for sel in self.view.sel(): + if not sel.empty() and sel.size() >= self.char_limit: + multi = True + self.sels.append(sel) + return multi + + def guess_colour(self, the_key): + the_colour = None + the_style = None + if the_key in self.colours: + the_colour = self.colours[the_key]["color"] + the_style = self.colours[the_key]["style"] + else: + best_match = 0 + for key in self.colours: + if self.view.score_selector(self.pt, key) > best_match: + best_match = self.view.score_selector(self.pt, key) + the_colour = self.colours[key]["color"] + the_style = self.colours[key]["style"] + self.colours[the_key] = {"color": the_colour, "style": the_style} + return the_colour, the_style + + def print_line(self, line, num): + if self.numbers: + bbcode_line = NUMBERED_BBCODE_LINE % { + "color": self.gfground, + "line": str(num).rjust(self.gutter_pad), + "code": line + } + else: + bbcode_line = BBCODE_LINE % {"code": line} + + return bbcode_line + + def convert_view_to_bbcode(self, the_bbcode): + for line in self.view.split_by_newlines(sublime.Region(self.end, self.size)): + self.empty_space = None + self.size = line.end() + line = self.convert_line_to_bbcode() + the_bbcode.write(self.print_line(line, self.curr_row)) + self.curr_row += 1 + + def repl(self, m, the_colour): + return m.group(1) + ( + BBCODE_ESCAPE % { + "color_open": the_colour, + "color_close": the_colour, + "content": m.group(2) + } + ) + m.group(3) + + def format_text(self, line, text, the_colour, the_style): + text = text.replace('\t', ' ' * self.tab_size).replace('\n', '') + if self.empty_space != None: + text = self.empty_space + text + self.empty_space = None + if text.strip(' ') == '': + self.empty_space = text + else: + code = "" + text = BBCODE_MATCH.sub(lambda m: self.repl(m, the_colour), text) + bold = False + italic = False + for s in the_style: + if s == "bold": + bold = True + if s == "italic": + italic = True + code += (BBCODE_CODE % {"color": the_colour, "content": text}) + if italic: + code = (BBCODE_ITALIC % {"color": the_colour, "content": code}) + if bold: + code = (BBCODE_BOLD % {"color": the_colour, "content": code}) + line.append(code) + + def convert_line_to_bbcode(self): + line = [] + + while self.end <= self.size: + # Get text of like scope up to a highlight + scope_name = self.view.scope_name(self.pt) + while self.view.scope_name(self.end) == scope_name and self.end < self.size: + self.end += 1 + the_colour, the_style = self.guess_colour(scope_name) + + region = sublime.Region(self.pt, self.end) + # Normal text formatting + text = self.view.substr(region) + self.format_text(line, text, the_colour, the_style) + + # Continue walking through line + self.pt = self.end + self.end = self.pt + 1 + + # Join line segments + return ''.join(line) + + def write_body(self, the_bbcode): + the_bbcode.write(POST_START % {"bg_color": self.bground}) + + # Convert view to HTML + if self.multi_select: + count = 0 + total = len(self.sels) + for sel in self.sels: + self.setup_print_block(sel, multi=True) + self.convert_view_to_bbcode(the_bbcode) + count += 1 + + if count < total: + the_bbcode.write("\n" + (BBCODE_CODE % {"color": self.fground, "content": "..."}) + "\n\n") + + else: + self.setup_print_block(self.view.sel()[0]) + self.convert_view_to_bbcode(the_bbcode) + + the_bbcode.write(POST_END) + + def run(self, **kwargs): + inputs = self.process_inputs(**kwargs) + self.setup(**inputs) + + delete = False if inputs["view_open"] else True + + with tempfile.NamedTemporaryFile(delete=delete, suffix='.txt') as the_bbcode: + self.write_body(the_bbcode) + if inputs["clipboard_copy"]: + the_bbcode.seek(0) + sublime.set_clipboard(the_bbcode.read()) + sublime.status_message("Export to BBCode: copied to clipboard") + + if inputs["view_open"]: + self.view.window().open_file(the_bbcode.name) diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/ExportHtml.py b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/ExportHtml.py new file mode 100644 index 0000000..93fa85b --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/ExportHtml.py @@ -0,0 +1,907 @@ +import sublime +import sublime_plugin +from os import path +import tempfile +import sys +import time +import webbrowser +import re +from HtmlAnnotations import get_annotations +import ExportHtmlLib.desktop as desktop +import json + +PACKAGE_SETTINGS = "ExportHtml.sublime-settings" +JS_DIR = path.join(sublime.packages_path(), 'ExportHtml', "js") +CSS_DIR = path.join(sublime.packages_path(), 'ExportHtml', "css") + +if sublime.platform() == "linux": + # Try and load Linux Python2.6 lib. Default path is for Ubuntu. + linux_lib = sublime.load_settings(PACKAGE_SETTINGS).get("linux_python2.6_lib", "/usr/lib/python2.6/lib-dynload") + if not linux_lib in sys.path and path.exists(linux_lib): + sys.path.append(linux_lib) +from plistlib import readPlist +from ExportHtmlLib.rgba.rgba import RGBA + +FILTER_MATCH = re.compile(r'^(?:(brightness|saturation|hue|colorize)\((-?[\d]+|[\d]*\.[\d]+)\)|(sepia|grayscale|invert))$') + +# HTML Code +HTML_HEADER = \ +''' + + +%(title)s + + + + +%(js)s + +''' + +TOOL_GUTTER = '''''' + +TOOL_PLAIN_TEXT = '''''' + +TOOL_PRINT = '''''' + +TOOL_ANNOTATION = '''''' + +TOOL_DUMP_THEME = '''''' + +TOOL_WRAPPING = '''''' + +TOOLBAR = '''
%(options)s
''' + +ANNOTATE_OPEN = '''%(code)s''' + +ANNOTATE_CLOSE = '''''' + +BODY_START = '''
'''
+
+FILE_INFO = '''
%(date_time)s %(file)s\n\n
''' + +TABLE_START = '''''' + +LINE = ( + '' + + '' + + '' + + '' +) + +CODE = '''%(content)s''' +ANNOTATION_CODE = '''%(content)s''' + +TABLE_END = '''
' + + '%(line)s ' + + '' + + '
%(code)s\n
' + + '
''' + +ROW_START = '''''' + +ROW_END = '''''' + +DIVIDER = '''\n...\n\n''' + +ANNOTATION_TBL_START = ( + '''' + +ANNOTATION_ROW = ( + '' + + '' + + '%(link)s' + + '' + + '
%(comment)s
' + + '' +) + +ANNOTATION_FOOTER = ( + '' + + '' + + '' +) + +BODY_END = '''
%(toolbar)s\n%(js)s\n\n\n''' + +INCLUDE_THEME = \ +''' + +''' + +TOGGLE_LINE_OPTIONS = \ +''' + +''' + +AUTO_PRINT = \ +''' + +''' + +WRAP = \ +''' + +''' + +HTML_JS_WRAP = \ +''' + +''' + + +def getjs(file_name): + code = "" + try: + with open(path.join(JS_DIR, file_name), "r") as f: + code = f.read() + except: + pass + return code + + +def getcss(file_name, options): + code = "" + final_code = "" + last_pt = 0 + keys = '|'.join(options.keys()) + replace = re.compile("/\\* *%(" + keys + ")% * \\*/") + + try: + with open(path.join(CSS_DIR, file_name), "r") as f: + code = f.read() + for m in replace.finditer(code): + final_code += code[last_pt:m.start()] + options[m.group(1)] + last_pt = m.end() + final_code += code[last_pt:] + except: + pass + + return final_code + + +class ExportHtmlPanelCommand(sublime_plugin.WindowCommand): + def execute(self, value): + if value >= 0: + view = self.window.active_view() + if view != None: + ExportHtml(view).run(**self.args[value]) + + def run(self): + options = sublime.load_settings(PACKAGE_SETTINGS).get("html_panel", {}) + menu = [] + self.args = [] + for opt in options: + k, v = opt.items()[0] + menu.append(k) + self.args.append(v) + + if len(menu): + self.window.show_quick_panel( + menu, + self.execute + ) + + +class ExportHtmlCommand(sublime_plugin.WindowCommand): + def run(self, **kwargs): + view = self.window.active_view() + if view != None: + ExportHtml(view).run(**kwargs) + + +class ExportHtml(object): + def __init__(self, view): + self.view = view + + def process_inputs(self, **kwargs): + return { + "numbers": bool(kwargs.get("numbers", False)), + "highlight_selections": bool(kwargs.get("highlight_selections", False)), + "browser_print": bool(kwargs.get("browser_print", False)), + "color_scheme": kwargs.get("color_scheme", None), + "wrap": kwargs.get("wrap", None), + "multi_select": bool(kwargs.get("multi_select", False)), + "style_gutter": bool(kwargs.get("style_gutter", True)), + "no_header": bool(kwargs.get("no_header", False)), + "date_time_format": kwargs.get("date_time_format", "%m/%d/%y %I:%M:%S"), + "show_full_path": bool(kwargs.get("show_full_path", True)), + "toolbar": kwargs.get("toolbar", ["plain_text", "gutter", "wrapping", "print", "annotation", "theme"]), + "save_location": kwargs.get("save_location", None), + "time_stamp": kwargs.get("time_stamp", "_%m%d%y%H%M%S"), + "clipboard_copy": bool(kwargs.get("clipboard_copy", False)), + "view_open": bool(kwargs.get("view_open", False)), + "shift_brightness": bool(kwargs.get("shift_brightness", False)), + "filter": kwargs.get("filter", "") + } + + def setup(self, **kwargs): + path_packages = sublime.packages_path() + + # Get get general document preferences from sublime preferences + eh_settings = sublime.load_settings(PACKAGE_SETTINGS) + settings = sublime.load_settings('Preferences.sublime-settings') + alternate_font_size = eh_settings.get("alternate_font_size", False) + alternate_font_face = eh_settings.get("alternate_font_face", False) + self.font_size = settings.get('font_size', 10) if alternate_font_size == False else alternate_font_size + self.font_face = settings.get('font_face', 'Consolas') if alternate_font_face == False else alternate_font_face + self.tab_size = settings.get('tab_size', 4) + self.padd_top = settings.get('line_padding_top', 0) + self.padd_bottom = settings.get('line_padding_bottom', 0) + self.char_limit = int(eh_settings.get("valid_selection_size", 4)) + self.bground = '' + self.fground = '' + self.gbground = '' + self.gfground = '' + self.sbground = '' + self.sfground = '' + self.numbers = kwargs["numbers"] + self.date_time_format = kwargs["date_time_format"] + self.time = time.localtime() + self.show_full_path = kwargs["show_full_path"] + self.highlight_selections = kwargs["highlight_selections"] + self.browser_print = kwargs["browser_print"] + self.auto_wrap = kwargs["wrap"] != None and int(kwargs["wrap"]) > 0 + self.wrap = 900 if not self.auto_wrap else int(kwargs["wrap"]) + self.hl_continue = None + self.curr_hl = None + self.sels = [] + self.multi_select = self.check_sel() if kwargs["multi_select"] and not kwargs["highlight_selections"] else False + self.size = self.view.size() + self.pt = 0 + self.end = 0 + self.curr_row = 0 + self.tables = 0 + self.curr_annot = None + self.curr_comment = None + self.annotations = self.get_annotations() + self.annot_num = -1 + self.new_annot = False + self.open_annot = False + self.no_header = kwargs["no_header"] + self.annot_tbl = [] + self.toolbar = kwargs["toolbar"] + self.toolbar_orientation = "block" if eh_settings.get("toolbar_orientation", "horizontal") == "vertical" else "inline-block" + self.matched = {} + self.ebground = self.bground + self.dark_lumens = None + self.lumens_limit = float(eh_settings.get("bg_min_lumen_threshold", 62)) + self.filter = [] + for f in kwargs["filter"].split(";"): + m = FILTER_MATCH.match(f) + if m: + if m.group(1): + self.filter.append((m.group(1), float(m.group(2)))) + else: + self.filter.append((m.group(3), 0.0)) + + fname = self.view.file_name() + if fname == None or not path.exists(fname): + fname = "Untitled" + self.file_name = fname + + # Get color scheme + if kwargs["color_scheme"] != None: + alt_scheme = kwargs["color_scheme"] + else: + alt_scheme = eh_settings.get("alternate_scheme", False) + scheme_file = settings.get('color_scheme') if alt_scheme == False else alt_scheme + colour_scheme = path.normpath(scheme_file) + self.scheme_file = path.basename(colour_scheme) + self.plist_file = self.apply_filters(readPlist(path_packages + colour_scheme.replace('Packages', ''))) + colour_settings = self.plist_file["settings"][0]["settings"] + + # Get general theme colors from color scheme file + self.bground = self.strip_transparency(colour_settings.get("background", '#FFFFFF'), True, True) + self.fground = self.strip_transparency(colour_settings.get("foreground", '#000000')) + self.sbground = self.strip_transparency(colour_settings.get("selection", self.fground), True) + self.sfground = self.strip_transparency(colour_settings.get("selectionForeground", None)) + self.gbground = self.strip_transparency(colour_settings.get("gutter", self.bground)) if kwargs["style_gutter"] else self.bground + self.gfground = self.strip_transparency(colour_settings.get("gutterForeground", self.fground), True) if kwargs["style_gutter"] else self.fground + + self.highlights = [] + if self.highlight_selections: + for sel in self.view.sel(): + if not sel.empty(): + self.highlights.append(sel) + + # Create scope colors mapping from color scheme file + self.colours = {self.view.scope_name(self.end).split(' ')[0]: {"color": self.fground, "bgcolor": None, "style": None}} + for item in self.plist_file["settings"]: + scope = item.get('scope', None) + colour = None + style = [] + if 'scope' in item: + scope = item['scope'] + if 'settings' in item: + colour = item['settings'].get('foreground', None) + bgcolour = item['settings'].get('background', None) + if 'fontStyle' in item['settings']: + for s in item['settings']['fontStyle'].split(' '): + if s == "bold" or s == "italic": # or s == "underline": + style.append(s) + + if scope != None and (colour != None or bgcolour != None): + self.colours[scope] = { + "color": self.strip_transparency(colour), + "bgcolor": self.strip_transparency(bgcolour, True), + "style": style + } + + self.shift_brightness = kwargs["shift_brightness"] and self.dark_lumens is not None and self.dark_lumens < self.lumens_limit + if self.shift_brightness: + self.color_adjust() + + def apply_filters(self, tmtheme): + def filter_color(color): + rgba = RGBA(color) + for f in self.filter: + name = f[0] + value = f[1] + if name == "grayscale": + rgba.grayscale() + elif name == "sepia": + rgba.sepia() + elif name == "saturation": + rgba.saturation(value) + elif name == "invert": + rgba.invert() + elif name == "brightness": + rgba.brightness(value) + elif name == "hue": + rgba.hue(value) + elif name == "colorize": + rgba.colorize(value) + return rgba.get_rgba() + + if len(self.filter): + general_settings_read = False + for settings in tmtheme["settings"]: + if not general_settings_read: + for k, v in settings["settings"].items(): + try: + settings["settings"][k] = filter_color(v) + except: + pass + general_settings_read = True + continue + + try: + settings["settings"]["foreground"] = filter_color(settings["settings"]["foreground"]) + except: + pass + try: + settings["settings"]["background"] = filter_color(settings["settings"]["background"]) + except: + pass + return tmtheme + + def color_adjust(self): + factor = 1 + ((self.lumens_limit - self.dark_lumens) / 255.0) if self.shift_brightness else None + for k, v in self.colours.items(): + fg, bg = v["color"], v["bgcolor"] + if v["color"] is not None: + self.colours[k]["color"] = self.apply_color_change(v["color"], factor) + if v["bgcolor"] is not None: + self.colours[k]["bgcolor"] = self.apply_color_change(v["bgcolor"], factor) + self.bground = self.apply_color_change(self.bground, factor) + self.fground = self.apply_color_change(self.fground, factor) + self.sbground = self.apply_color_change(self.sbground, factor) + if self.sfground is not None: + self.sfground = self.apply_color_change(self.sfground, factor) + self.gbground = self.apply_color_change(self.gbground, factor) + self.gfground = self.apply_color_change(self.gfground, factor) + + def apply_color_change(self, color, shift_factor): + rgba = RGBA(color) + if shift_factor is not None: + rgba.brightness(shift_factor) + return rgba.get_rgb() + + def get_tools(self, tools, use_annotation, use_wrapping): + toolbar_options = { + "gutter": TOOL_GUTTER, + "print": TOOL_PRINT, + "plain_text": TOOL_PLAIN_TEXT, + "annotation": TOOL_ANNOTATION if use_annotation else "", + "theme": TOOL_DUMP_THEME, + "wrapping": TOOL_WRAPPING if use_wrapping else "" + } + t_opt = "" + toolbar_element = "" + + if len(tools): + for t in tools: + if t in toolbar_options: + t_opt += toolbar_options[t] + toolbar_element = TOOLBAR % {"options": t_opt} + return toolbar_element + + def strip_transparency(self, color, track_darkness=False, simple_strip=False): + if color is None: + return color + rgba = RGBA(color.replace(" ", "")) + if not simple_strip: + rgba.apply_alpha(self.bground if self.bground != "" else "#FFFFFF") + if track_darkness: + lumens = rgba.luminance() + if self.dark_lumens is None or lumens < self.dark_lumens: + self.dark_lumens = lumens + return rgba.get_rgb() + + def setup_print_block(self, curr_sel, multi=False): + # Determine start and end points and whether to parse whole file or selection + if not multi and (curr_sel.empty() or self.highlight_selections or curr_sel.size() <= self.char_limit): + self.size = self.view.size() + self.pt = 0 + self.end = 1 + self.curr_row = 1 + else: + self.size = curr_sel.end() + self.pt = curr_sel.begin() + self.end = self.pt + 1 + self.curr_row = self.view.rowcol(self.pt)[0] + 1 + self.start_line = self.curr_row + + self.gutter_pad = len(str(self.view.rowcol(self.size)[0])) + 1 + + def check_sel(self): + multi = False + for sel in self.view.sel(): + if not sel.empty() and sel.size() >= self.char_limit: + multi = True + self.sels.append(sel) + return multi + + def print_line(self, line, num): + html_line = LINE % { + "line_id": num, + "color": self.gfground, + "line": str(num).rjust(self.gutter_pad).replace(" ", ' '), + "code_id": num, + "code": line, + "table": self.tables, + "pad_color": self.ebground or self.bground + } + + return html_line + + def guess_colour(self, pt, the_key): + the_colour = self.fground + the_bgcolour = None + the_style = set([]) + if the_key in self.matched: + the_colour = self.matched[the_key]["color"] + the_style = self.matched[the_key]["style"] + the_bgcolour = self.matched[the_key]["bgcolor"] + else: + best_match_bg = 0 + best_match_fg = 0 + best_match_style = 0 + for key in self.colours: + match = self.view.score_selector(pt, key) + if self.colours[key]["color"] is not None and match > best_match_fg: + best_match_fg = match + the_colour = self.colours[key]["color"] + if self.colours[key]["style"] is not None and match > best_match_style: + best_match_style = match + for s in self.colours[key]["style"]: + the_style.add(s) + if self.colours[key]["bgcolor"] is not None and match > best_match_bg: + best_match_bg = match + the_bgcolour = self.colours[key]["bgcolor"] + self.matched[the_key] = {"color": the_colour, "bgcolor": the_bgcolour, "style": the_style} + if len(the_style) == 0: + the_style = "normal" + else: + the_style = ' '.join(the_style) + return the_colour, the_style, the_bgcolour + + def write_header(self, the_html): + header = HTML_HEADER % { + "title": path.basename(self.file_name), + "css": getcss( + 'export.css', + { + "font_size": str(self.font_size), + "font_face": '"' + self.font_face + '"', + "page_bg": self.bground, + "gutter_bg": self.gbground, + "body_fg": self.fground, + "display_mode": 'table-cell' if self.numbers else 'none', + "dot_color": self.fground, + "toolbar_orientation": self.toolbar_orientation + } + ), + "js": INCLUDE_THEME % { + "jscode": getjs('plist.js'), + "theme": json.dumps(self.plist_file, sort_keys=True, indent=4, separators=(',', ': ')).encode('raw_unicode_escape'), + "name": self.scheme_file, + } + } + the_html.write(header) + + def convert_view_to_html(self, the_html): + for line in self.view.split_by_newlines(sublime.Region(self.pt, self.size)): + self.size = line.end() + empty = not bool(line.size()) + line = self.convert_line_to_html(the_html, empty) + the_html.write(self.print_line(line, self.curr_row)) + self.curr_row += 1 + + def html_encode(self, text): + # Format text to HTML + encode_table = { + '&': '&', + '>': '>', + '<': '<', + '\t': ' ' * self.tab_size, + ' ': ' ', + '\n': '' + } + + return ''.join(encode_table.get(c, c) for c in text).encode('ascii', 'xmlcharrefreplace') + + def get_annotations(self): + annotations = get_annotations(self.view) + comments = [] + for x in range(0, int(annotations["count"])): + region = annotations["annotations"]["html_annotation_%d" % x]["region"] + comments.append((region, annotations["annotations"]["html_annotation_%d" % x]["comment"])) + comments.sort() + return comments + + def annotate_text(self, line, the_colour, the_bgcolour, the_style, empty): + pre_text = None + annot_text = None + post_text = None + start = None + + # Pretext Check + if self.pt >= self.curr_annot.begin(): + # Region starts with an annotation + start = self.pt + else: + # Region has text before annoation + pre_text = self.html_encode(self.view.substr(sublime.Region(self.pt, self.curr_annot.begin()))) + start = self.curr_annot.begin() + + if self.end == self.curr_annot.end(): + # Region ends annotation + annot_text = self.html_encode(self.view.substr(sublime.Region(start, self.end))) + self.curr_annot = None + elif self.end > self.curr_annot.end(): + # Region has text following annotation + annot_text = self.html_encode(self.view.substr(sublime.Region(start, self.curr_annot.end()))) + post_text = self.html_encode(self.view.substr(sublime.Region(self.curr_annot.end(), self.end))) + self.curr_annot = None + else: + # Region ends but annotation is not finished + annot_text = self.html_encode(self.view.substr(sublime.Region(start, self.end))) + self.curr_annot = sublime.Region(self.end, self.curr_annot.end()) + + # Print the separate parts pre text, annotation, post text + if pre_text != None: + self.format_text(line, pre_text, the_colour, the_bgcolour, the_style, empty) + if annot_text != None: + self.format_text(line, annot_text, the_colour, the_bgcolour, the_style, empty, annotate=True) + if self.curr_annot == None: + self.curr_comment = None + if post_text != None: + self.format_text(line, post_text, the_colour, the_bgcolour, the_style, empty) + + def add_annotation_table_entry(self): + row, col = self.view.rowcol(self.annot_pt) + self.annot_tbl.append( + ( + self.tables, self.curr_row, "Line %d Col %d" % (row + 1, col + 1), + self.curr_comment.encode('ascii', 'xmlcharrefreplace') + ) + ) + self.annot_pt = None + + def format_text(self, line, text, the_colour, the_bgcolour, the_style, empty, annotate=False): + if empty: + text = ' ' + else: + the_style += " real_text" + + if the_bgcolour is None: + the_bgcolour = self.bground + + if annotate: + code = ANNOTATION_CODE % {"highlight": the_bgcolour, "color": the_colour, "content": text, "class": the_style} + else: + code = CODE % {"highlight": the_bgcolour, "color": the_colour, "content": text, "class": the_style} + + if annotate: + if self.curr_annot != None and not self.open_annot: + # Open an annotation + if self.annot_pt != None: + self.add_annotation_table_entry() + if self.new_annot: + self.annot_num += 1 + self.new_annot = False + code = ANNOTATE_OPEN % {"code": code, "comment": str(self.annot_num)} + self.open_annot = True + elif self.curr_annot == None: + if self.open_annot: + # Close an annotation + code += ANNOTATE_CLOSE + self.open_annot = False + else: + # Do a complete annotation + if self.annot_pt != None: + self.add_annotation_table_entry() + if self.new_annot: + self.annot_num += 1 + self.new_annot = False + code = ( + ANNOTATE_OPEN % {"code": code, "comment": str(self.annot_num)} + + ANNOTATE_CLOSE + ) + line.append(code) + + def convert_line_to_html(self, the_html, empty): + line = [] + hl_done = False + + # Continue highlight form last line + if self.hl_continue != None: + self.curr_hl = self.hl_continue + self.hl_continue = None + + while self.end <= self.size: + # Get next highlight region + if self.highlight_selections and self.curr_hl == None and len(self.highlights) > 0: + self.curr_hl = self.highlights.pop(0) + + # See if we are starting a highlight region + if self.curr_hl != None and self.pt == self.curr_hl.begin(): + # Get text of like scope up to a highlight + scope_name = self.view.scope_name(self.pt) + while self.view.scope_name(self.end) == scope_name and self.end < self.size: + # Kick out if we hit a highlight region + if self.end == self.curr_hl.end(): + break + self.end += 1 + if self.end < self.curr_hl.end(): + if self.end >= self.size: + self.hl_continue = sublime.Region(self.end, self.curr_hl.end()) + else: + self.curr_hl = sublime.Region(self.end, self.curr_hl.end()) + else: + hl_done = True + if hl_done and empty: + the_colour, the_style, the_bgcolour = self.guess_colour(self.pt, scope_name) + elif self.sfground is None: + the_colour, the_style, _ = self.guess_colour(self.pt, scope_name) + the_bgcolour = self.sbground + else: + the_colour, the_style = self.sfground, "normal" + the_bgcolour = self.sbground + else: + # Get text of like scope up to a highlight + scope_name = self.view.scope_name(self.pt) + while self.view.scope_name(self.end) == scope_name and self.end < self.size: + # Kick out if we hit a highlight region + if self.curr_hl != None and self.end == self.curr_hl.begin(): + break + self.end += 1 + the_colour, the_style, the_bgcolour = self.guess_colour(self.pt, scope_name) + + # Get new annotation + if (self.curr_annot == None or self.curr_annot.end() < self.pt) and len(self.annotations): + self.curr_annot, self.curr_comment = self.annotations.pop(0) + self.annot_pt = self.curr_annot[0] + while self.pt > self.curr_annot[1]: + if len(self.annotations): + self.curr_annot, self.curr_comment = self.annotations.pop(0) + self.annot_pt = self.curr_annot[0] + else: + self.curr_annot = None + self.curr_comment = None + break + self.new_annot = True + self.curr_annot = sublime.Region(self.curr_annot[0], self.curr_annot[1]) + + region = sublime.Region(self.pt, self.end) + if self.curr_annot != None and region.intersects(self.curr_annot): + # Apply annotation within the text and format the text + self.annotate_text(line, the_colour, the_bgcolour, the_style, empty) + else: + # Normal text formatting + tidied_text = self.html_encode(self.view.substr(region)) + self.format_text(line, tidied_text, the_colour, the_bgcolour, the_style, empty) + + if hl_done: + # Clear highlight flags and variables + hl_done = False + self.curr_hl = None + + # Continue walking through line + self.pt = self.end + self.end = self.pt + 1 + + # Close annotation if open at end of line + if self.open_annot: + line.append(ANNOTATE_CLOSE % {"comment": self.curr_comment}) + self.open_annot = False + + # Get the color for the space at the end of a line + if self.end < self.view.size(): + end_key = self.view.scope_name(self.pt) + _, _, self.ebground = self.guess_colour(self.pt, end_key) + + # Join line segments + return ''.join(line) + + def write_body(self, the_html): + processed_rows = "" + the_html.write(BODY_START) + + the_html.write(TABLE_START) + if not self.no_header: + # Write file name + date_time = time.strftime(self.date_time_format, self.time) + the_html.write( + FILE_INFO % { + "color": self.fground, + "date_time": date_time, + "file": self.file_name if self.show_full_path else path.basename(self.file_name) + } + ) + + the_html.write(ROW_START) + the_html.write(TABLE_START) + # Convert view to HTML + if self.multi_select: + count = 0 + total = len(self.sels) + for sel in self.sels: + self.setup_print_block(sel, multi=True) + processed_rows += "[" + str(self.curr_row) + "," + self.convert_view_to_html(the_html) + count += 1 + self.tables = count + processed_rows += str(self.curr_row) + "]," + + if count < total: + the_html.write(TABLE_END) + the_html.write(ROW_END) + the_html.write(ROW_START) + the_html.write(DIVIDER % {"color": self.fground}) + the_html.write(ROW_END) + the_html.write(ROW_START) + the_html.write(TABLE_START) + else: + self.setup_print_block(self.view.sel()[0]) + processed_rows += "[" + str(self.curr_row) + "," + self.convert_view_to_html(the_html) + processed_rows += str(self.curr_row) + "]," + self.tables += 1 + + the_html.write(TABLE_END) + the_html.write(ROW_END) + the_html.write(TABLE_END) + + js_options = [] + if len(self.annot_tbl): + self.add_comments_table(the_html) + js_options.append(HTML_JS_WRAP % {"jscode": getjs('annotation.js')}) + + # Write javascript snippets + js_options.append(HTML_JS_WRAP % {"jscode": getjs('print.js')}) + js_options.append(HTML_JS_WRAP % {"jscode": getjs('plaintext.js')}) + js_options.append(TOGGLE_LINE_OPTIONS % { + "jscode": getjs('lines.js'), + "wrap_size": self.wrap, + "ranges": processed_rows.rstrip(','), + "tables": self.tables, + "header": ("false" if self.no_header else "true"), + "gutter": ('true' if self.numbers else 'false') + } + ) + if self.auto_wrap: + js_options.append(WRAP) + + if self.browser_print: + js_options.append(AUTO_PRINT) + + # Write empty line to allow copying of last line and line number without issue + the_html.write(BODY_END % {"js": ''.join(js_options), "toolbar": self.get_tools(self.toolbar, len(self.annot_tbl), self.auto_wrap)}) + + def add_comments_table(self, the_html): + the_html.write(ANNOTATION_TBL_START) + the_html.write(''.join([ANNOTATION_ROW % {"table": t, "row": r, "link": l, "comment": c} for t, r, l, c in self.annot_tbl])) + the_html.write(ANNOTATION_FOOTER) + the_html.write(ANNOTATION_TBL_END) + + def run(self, **kwargs): + inputs = self.process_inputs(**kwargs) + self.setup(**inputs) + + save_location = inputs["save_location"] + time_stamp = inputs["time_stamp"] + + if save_location is not None: + fname = self.view.file_name() + if ( + ((fname == None or not path.exists(fname)) and save_location == ".") or + not path.exists(save_location) + or not path.isdir(save_location) + ): + html_file = ".html" + save_location = None + elif save_location == ".": + html_file = "%s%s.html" % (fname, time.strftime(time_stamp, self.time)) + elif fname is None or not path.exists(fname): + html_file = path.join(save_location, "Untitled%s.html" % time.strftime(time_stamp, self.time)) + else: + html_file = path.join(save_location, "%s%s.html" % (path.basename(fname), time.strftime(time_stamp, self.time))) + else: + html_file = ".html" + + if save_location is not None: + open_html = lambda x: open(x, "w") + else: + open_html = lambda x: tempfile.NamedTemporaryFile(delete=False, suffix=x) + + with open_html(html_file) as the_html: + self.write_header(the_html) + self.write_body(the_html) + if inputs["clipboard_copy"]: + the_html.seek(0) + sublime.set_clipboard(the_html.read()) + sublime.status_message("Export to HTML: copied to clipboard") + + if inputs["view_open"]: + self.view.window().open_file(the_html.name) + else: + # Open in web browser; check return code, if failed try webbrowser + status = desktop.open(the_html.name, status=True) + if not status: + webbrowser.open(the_html.name, new=2) diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/ExportHtml.sublime-settings b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/ExportHtml.sublime-settings new file mode 100644 index 0000000..81ce6ae --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/ExportHtml.sublime-settings @@ -0,0 +1,180 @@ +{ + // By default, the current color scheme is used + // You can define a string path to an alternate default + // Color scheme here, it must be relative to the + // Example: + // "alternate_scheme": "Packages/ExportHtml/themes/Print-Color.tmTheme" + "alternate_scheme": false, + + // By default, ExportHtml uses your current font_face and font_size. + // You can change this setting to always use this value. By default, + // the setting is a literal false, but you can change it to an actual + // font_face to enable this setting. + "alternate_font_face": false, + + // By default, ExportHtml uses your current font_face and font_size. + // You can change this setting to always use this value. By default, + // the setting is a literal false, but you can change it to an actual + // font_size to enable this setting. + "alternate_font_size": false, + + //Path to linux Python 2.6 lib + "linux_python2.6_lib": "/usr/lib/python2.6/lib-dynload", + + // Minimum allowable size for a selection to be accepted for only the selection to be exproted + // Multi-select will also ignore selections whose size is less than this. + "valid_selection_size": 4, + + // Scope to use for color for annotations in a Sublime Text view + "annotation_highlight_scope": "comment", + + // Style to use for for annotations in a Sublime Text view + // (outline|solid) + "annotation_highlight_style": "outline", + + // Orientation that the toolbar will be rendered with. + // (horizontal|vertical) + "toolbar_orientation": "horizontal", + + // Define configurations for the drop down export menu + "html_panel": [ + // Browser print color (selections and multi-selections allowed) + { + "Browser Print - Color": { + "numbers": true, + "wrap": 900, + "browser_print": true, + "multi_select": true, + "color_scheme": "Packages/ExportHtml/ColorSchemes/Print-Color.tmTheme", + "style_gutter": false + } + }, + + // Browser print black and white (selections and multi-selections allowed) + { + "Browser Print - Grayscale": { + "numbers": true, + "wrap": 900, + "browser_print": true, + "multi_select": true, + "color_scheme": "Packages/ExportHtml/ColorSchemes/Print-Grayscale.tmTheme", + "style_gutter": false + } + }, + + // Browser print color; highlight selections(selections and multi-selections allowed) + // Background colors are disabled in browser printing by default, so they will not + // print until background color printing is enabled + { + "Browser Print - Color (Selection Highlights)": { + "numbers": true, + "wrap": 900, + "browser_print": true, + "highlight_selections": true, + "color_scheme": "Packages/ExportHtml/ColorSchemes/Print-Color.tmTheme", + "style_gutter": false + } + }, + + // Browser print black and white; highlight selections(selections and multi-selections allowed) + // Background colors are disabled in browser printing by default, so they will not + // print until background color printing is enabled + { + "Browser Print - Grayscale (Selection Highlights)": { + "numbers": true, + "wrap": 900, + "browser_print": true, + "highlight_selections": true, + "color_scheme": "Packages/ExportHtml/ColorSchemes/Print-Grayscale.tmTheme", + "style_gutter": false + } + }, + // Browser view color (selections and multi-selections allowed) + { + "Browser View - Color": { + "numbers": true, + "multi_select": true, + "color_scheme": "Packages/ExportHtml/ColorSchemes/Print-Color.tmTheme" + } + }, + + // Browser view black and white (selections and multi-selections allowed) + { + "Browser View - Grayscale": { + "numbers": true, + "multi_select": true, + "color_scheme": "Packages/ExportHtml/ColorSchemes/Print-Grayscale.tmTheme" + } + }, + + // Browser view color; highlight selections(selections and multi-selections allowed) + { + "Browser View - Color (Selection Highlights)": { + "numbers": true, + "highlight_selections": true, + "color_scheme": "Packages/ExportHtml/ColorSchemes/Print-Color.tmTheme" + } + }, + + // Browser view black and white; highlight selections(selections and multi-selections allowed) + { + "Browser View - Grayscale (Selection Highlights)": { + "numbers": true, + "highlight_selections": true, + "color_scheme": "Packages/ExportHtml/ColorSchemes/Print-Grayscale.tmTheme" + } + }, + + // Sublime view grayscale HTML source; (selections and multi-selections allowed) + { + "Sublime View - Color": { + "view_open": true, + "numbers": true, + "wrap": 900, + "multi_select": true, + "color_scheme": "Packages/ExportHtml/ColorSchemes/Print-Color.tmTheme" + } + }, + + // Sublime view grayscale HTML source; (selections and multi-selections allowed) + { + "Sublime View - Grayscale": { + "view_open": true, + "numbers": true, + "wrap": 900, + "multi_select": true, + "color_scheme": "Packages/ExportHtml/ColorSchemes/Print-Grayscale.tmTheme" + } + } + ], + + "bbcode_panel": [ + { + "To Clipboard - Format as BBCode": { + "numbers": false, + "multi_select": true + } + }, + + { + "To Clipboard - Format as BBCode (show gutter)": { + "numbers": true, + "multi_select": true + } + }, + { + "Sublime View - Show BBCode in View": { + "numbers": false, + "multi_select": true, + "view_open": true + } + }, + { + "Sublime View - Show BBCode in View (show gutter)": { + "numbers": false, + "multi_select": true, + "view_open": true + } + } + ] +} diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/ExportHtmlLib/__init__.py b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/ExportHtmlLib/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/ExportHtmlLib/desktop/__init__.py b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/ExportHtmlLib/desktop/__init__.py new file mode 100644 index 0000000..9be2bbc --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/ExportHtmlLib/desktop/__init__.py @@ -0,0 +1,285 @@ +#!/usr/bin/env python + +""" +Simple desktop integration for Python. This module provides desktop environment +detection and resource opening support for a selection of common and +standardised desktop environments. + +Copyright (C) 2005, 2006, 2007, 2008, 2009 Paul Boddie + +This program is free software; you can redistribute it and/or modify it under +the terms of the GNU Lesser General Public License as published by the Free +Software Foundation; either version 3 of the License, or (at your option) any +later version. + +This program is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more +details. + +You should have received a copy of the GNU Lesser General Public License along +with this program. If not, see . + +-------- + +Desktop Detection +----------------- + +To detect a specific desktop environment, use the get_desktop function. +To detect whether the desktop environment is standardised (according to the +proposed DESKTOP_LAUNCH standard), use the is_standard function. + +Opening URLs +------------ + +To open a URL in the current desktop environment, relying on the automatic +detection of that environment, use the desktop.open function as follows: + +desktop.open("http://www.python.org") + +To override the detected desktop, specify the desktop parameter to the open +function as follows: + +desktop.open("http://www.python.org", "KDE") # Insists on KDE +desktop.open("http://www.python.org", "GNOME") # Insists on GNOME + +Without overriding using the desktop parameter, the open function will attempt +to use the "standard" desktop opening mechanism which is controlled by the +DESKTOP_LAUNCH environment variable as described below. + +The DESKTOP_LAUNCH Environment Variable +--------------------------------------- + +The DESKTOP_LAUNCH environment variable must be shell-quoted where appropriate, +as shown in some of the following examples: + +DESKTOP_LAUNCH="kdialog --msgbox" Should present any opened URLs in + their entirety in a KDE message box. + (Command "kdialog" plus parameter.) +DESKTOP_LAUNCH="my\ opener" Should run the "my opener" program to + open URLs. + (Command "my opener", no parameters.) +DESKTOP_LAUNCH="my\ opener --url" Should run the "my opener" program to + open URLs. + (Command "my opener" plus parameter.) + +Details of the DESKTOP_LAUNCH environment variable convention can be found here: +http://lists.freedesktop.org/archives/xdg/2004-August/004489.html + +Other Modules +------------- + +The desktop.dialog module provides support for opening dialogue boxes. +The desktop.windows module permits the inspection of desktop windows. +""" + +__version__ = "0.4" + +import os +import sys + +# Provide suitable process creation functions. + +try: + import subprocess + def _run(cmd, shell, wait): + opener = subprocess.Popen(cmd, shell=shell) + if wait: opener.wait() + return opener.pid + + def _readfrom(cmd, shell): + opener = subprocess.Popen(cmd, shell=shell, stdin=subprocess.PIPE, stdout=subprocess.PIPE) + opener.stdin.close() + return opener.stdout.read() + + def _status(cmd, shell): + opener = subprocess.Popen(cmd, shell=shell) + opener.wait() + return opener.returncode == 0 + +except ImportError: + import popen2 + def _run(cmd, shell, wait): + opener = popen2.Popen3(cmd) + if wait: opener.wait() + return opener.pid + + def _readfrom(cmd, shell): + opener = popen2.Popen3(cmd) + opener.tochild.close() + opener.childerr.close() + return opener.fromchild.read() + + def _status(cmd, shell): + opener = popen2.Popen3(cmd) + opener.wait() + return opener.poll() == 0 + +import commands + +# Private functions. + +def _get_x11_vars(): + + "Return suitable environment definitions for X11." + + if not os.environ.get("DISPLAY", "").strip(): + return "DISPLAY=:0.0 " + else: + return "" + +def _is_xfce(): + + "Return whether XFCE is in use." + + # XFCE detection involves testing the output of a program. + + try: + return _readfrom(_get_x11_vars() + "xprop -root _DT_SAVE_MODE", shell=1).strip().endswith(' = "xfce4"') + except OSError: + return 0 + +def _is_x11(): + + "Return whether the X Window System is in use." + + return os.environ.has_key("DISPLAY") + +# Introspection functions. + +def get_desktop(): + + """ + Detect the current desktop environment, returning the name of the + environment. If no environment could be detected, None is returned. + """ + + if os.environ.has_key("KDE_FULL_SESSION") or \ + os.environ.has_key("KDE_MULTIHEAD"): + return "KDE" + elif os.environ.has_key("GNOME_DESKTOP_SESSION_ID") or \ + os.environ.has_key("GNOME_KEYRING_SOCKET"): + return "GNOME" + elif sys.platform == "darwin": + return "Mac OS X" + elif hasattr(os, "startfile"): + return "Windows" + elif _is_xfce(): + return "XFCE" + + # KDE, GNOME and XFCE run on X11, so we have to test for X11 last. + + if _is_x11(): + return "X11" + else: + return None + +def use_desktop(desktop): + + """ + Decide which desktop should be used, based on the detected desktop and a + supplied 'desktop' argument (which may be None). Return an identifier + indicating the desktop type as being either "standard" or one of the results + from the 'get_desktop' function. + """ + + # Attempt to detect a desktop environment. + + detected = get_desktop() + + # Start with desktops whose existence can be easily tested. + + if (desktop is None or desktop == "standard") and is_standard(): + return "standard" + elif (desktop is None or desktop == "Windows") and detected == "Windows": + return "Windows" + + # Test for desktops where the overriding is not verified. + + elif (desktop or detected) == "KDE": + return "KDE" + elif (desktop or detected) == "GNOME": + return "GNOME" + elif (desktop or detected) == "XFCE": + return "XFCE" + elif (desktop or detected) == "Mac OS X": + return "Mac OS X" + elif (desktop or detected) == "X11": + return "X11" + else: + return None + +def is_standard(): + + """ + Return whether the current desktop supports standardised application + launching. + """ + + return os.environ.has_key("DESKTOP_LAUNCH") + +# Activity functions. + +def open(url, desktop=None, wait=0, status=False): + + """ + Open the 'url' in the current desktop's preferred file browser. If the + optional 'desktop' parameter is specified then attempt to use that + particular desktop environment's mechanisms to open the 'url' instead of + guessing or detecting which environment is being used. + + Suggested values for 'desktop' are "standard", "KDE", "GNOME", "XFCE", + "Mac OS X", "Windows" where "standard" employs a DESKTOP_LAUNCH environment + variable to open the specified 'url'. DESKTOP_LAUNCH should be a command, + possibly followed by arguments, and must have any special characters + shell-escaped. + + The process identifier of the "opener" (ie. viewer, editor, browser or + program) associated with the 'url' is returned by this function. If the + process identifier cannot be determined, None is returned. + + An optional 'wait' parameter is also available for advanced usage and, if + 'wait' is set to a true value, this function will wait for the launching + mechanism to complete before returning (as opposed to immediately returning + as is the default behaviour). + """ + + # Decide on the desktop environment in use. + + desktop_in_use = use_desktop(desktop) + + if desktop_in_use == "standard": + arg = "".join([os.environ["DESKTOP_LAUNCH"], commands.mkarg(url)]) + return _run(arg, 1, wait) + + elif desktop_in_use == "Windows": + # NOTE: This returns None in current implementations. + os.startfile(url) + return True if status else None + + elif desktop_in_use == "KDE": + cmd = ["kfmclient", "exec", url] + + elif desktop_in_use == "GNOME": + cmd = ["gnome-open", url] + + elif desktop_in_use == "XFCE": + cmd = ["exo-open", url] + + elif desktop_in_use == "Mac OS X": + cmd = ["open", url] + + elif desktop_in_use == "X11" and os.environ.has_key("BROWSER"): + cmd = [os.environ["BROWSER"], url] + + # Finish with an error where no suitable desktop was identified. + + else: + raise OSError, "Desktop '%s' not supported (neither DESKTOP_LAUNCH nor os.startfile could be used)" % desktop_in_use + + if status: + return _status(cmd, 0) + else: + return _run(cmd, 0, wait) + +# vim: tabstop=4 expandtab shiftwidth=4 diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/ExportHtmlLib/desktop/dialog.py b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/ExportHtmlLib/desktop/dialog.py new file mode 100644 index 0000000..9525004 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/ExportHtmlLib/desktop/dialog.py @@ -0,0 +1,549 @@ +#!/usr/bin/env python + +""" +Simple desktop dialogue box support for Python. + +Copyright (C) 2007, 2009 Paul Boddie + +This program is free software; you can redistribute it and/or modify it under +the terms of the GNU Lesser General Public License as published by the Free +Software Foundation; either version 3 of the License, or (at your option) any +later version. + +This program is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more +details. + +You should have received a copy of the GNU Lesser General Public License along +with this program. If not, see . + +-------- + +Opening Dialogue Boxes (Dialogs) +-------------------------------- + +To open a dialogue box (dialog) in the current desktop environment, relying on +the automatic detection of that environment, use the appropriate dialogue box +class: + +question = desktop.dialog.Question("Are you sure?") +result = question.open() + +To override the detected desktop, specify the desktop parameter to the open +function as follows: + +question.open("KDE") # Insists on KDE +question.open("GNOME") # Insists on GNOME + +The dialogue box options are documented in each class's docstring. + +Available dialogue box classes are listed in the desktop.dialog.available +attribute. + +Supported desktop environments are listed in the desktop.dialog.supported +attribute. +""" + +from desktop import use_desktop, _run, _readfrom, _status + +class _wrapper: + def __init__(self, handler): + self.handler = handler + +class _readvalue(_wrapper): + def __call__(self, cmd, shell): + return self.handler(cmd, shell).strip() + +class _readinput(_wrapper): + def __call__(self, cmd, shell): + return self.handler(cmd, shell)[:-1] + +class _readvalues_kdialog(_wrapper): + def __call__(self, cmd, shell): + result = self.handler(cmd, shell).strip().strip('"') + if result: + return result.split('" "') + else: + return [] + +class _readvalues_zenity(_wrapper): + def __call__(self, cmd, shell): + result = self.handler(cmd, shell).strip() + if result: + return result.split("|") + else: + return [] + +class _readvalues_Xdialog(_wrapper): + def __call__(self, cmd, shell): + result = self.handler(cmd, shell).strip() + if result: + return result.split("/") + else: + return [] + +# Dialogue parameter classes. + +class String: + + "A generic parameter." + + def __init__(self, name): + self.name = name + + def convert(self, value, program): + return [value or ""] + +class Strings(String): + + "Multiple string parameters." + + def convert(self, value, program): + return value or [] + +class StringPairs(String): + + "Multiple string parameters duplicated to make identifiers." + + def convert(self, value, program): + l = [] + for v in value: + l.append(v) + l.append(v) + return l + +class StringKeyword: + + "A keyword parameter." + + def __init__(self, keyword, name): + self.keyword = keyword + self.name = name + + def convert(self, value, program): + return [self.keyword + "=" + (value or "")] + +class StringKeywords: + + "Multiple keyword parameters." + + def __init__(self, keyword, name): + self.keyword = keyword + self.name = name + + def convert(self, value, program): + l = [] + for v in value or []: + l.append(self.keyword + "=" + v) + return l + +class Integer(String): + + "An integer parameter." + + defaults = { + "width" : 40, + "height" : 15, + "list_height" : 10 + } + scale = 8 + + def __init__(self, name, pixels=0): + String.__init__(self, name) + if pixels: + self.factor = self.scale + else: + self.factor = 1 + + def convert(self, value, program): + if value is None: + value = self.defaults[self.name] + return [str(int(value) * self.factor)] + +class IntegerKeyword(Integer): + + "An integer keyword parameter." + + def __init__(self, keyword, name, pixels=0): + Integer.__init__(self, name, pixels) + self.keyword = keyword + + def convert(self, value, program): + if value is None: + value = self.defaults[self.name] + return [self.keyword + "=" + str(int(value) * self.factor)] + +class Boolean(String): + + "A boolean parameter." + + values = { + "kdialog" : ["off", "on"], + "zenity" : ["FALSE", "TRUE"], + "Xdialog" : ["off", "on"] + } + + def convert(self, value, program): + values = self.values[program] + if value: + return [values[1]] + else: + return [values[0]] + +class MenuItemList(String): + + "A menu item list parameter." + + def convert(self, value, program): + l = [] + for v in value: + l.append(v.value) + l.append(v.text) + return l + +class ListItemList(String): + + "A radiolist/checklist item list parameter." + + def __init__(self, name, status_first=0): + String.__init__(self, name) + self.status_first = status_first + + def convert(self, value, program): + l = [] + for v in value: + boolean = Boolean(None) + status = boolean.convert(v.status, program) + if self.status_first: + l += status + l.append(v.value) + l.append(v.text) + if not self.status_first: + l += status + return l + +# Dialogue argument values. + +class MenuItem: + + "A menu item which can also be used with radiolists and checklists." + + def __init__(self, value, text, status=0): + self.value = value + self.text = text + self.status = status + +# Dialogue classes. + +class Dialogue: + + commands = { + "KDE" : "kdialog", + "GNOME" : "zenity", + "XFCE" : "zenity", # NOTE: Based on observations with Xubuntu. + "X11" : "Xdialog" + } + + def open(self, desktop=None): + + """ + Open a dialogue box (dialog) using a program appropriate to the desktop + environment in use. + + If the optional 'desktop' parameter is specified then attempt to use + that particular desktop environment's mechanisms to open the dialog + instead of guessing or detecting which environment is being used. + + Suggested values for 'desktop' are "standard", "KDE", "GNOME", + "Mac OS X", "Windows". + + The result of the dialogue interaction may be a string indicating user + input (for Input, Password, Menu, Pulldown), a list of strings + indicating selections of one or more items (for RadioList, CheckList), + or a value indicating true or false (for Question, Warning, Message, + Error). + + Where a string value may be expected but no choice is made, an empty + string may be returned. Similarly, where a list of values is expected + but no choice is made, an empty list may be returned. + """ + + # Decide on the desktop environment in use. + + desktop_in_use = use_desktop(desktop) + + # Get the program. + + try: + program = self.commands[desktop_in_use] + except KeyError: + raise OSError, "Desktop '%s' not supported (no known dialogue box command could be suggested)" % desktop_in_use + + # The handler is one of the functions communicating with the subprocess. + # Some handlers return boolean values, others strings. + + handler, options = self.info[program] + + cmd = [program] + for option in options: + if isinstance(option, str): + cmd.append(option) + else: + value = getattr(self, option.name, None) + cmd += option.convert(value, program) + + return handler(cmd, 0) + +class Simple(Dialogue): + def __init__(self, text, width=None, height=None): + self.text = text + self.width = width + self.height = height + +class Question(Simple): + + """ + A dialogue asking a question and showing response buttons. + Options: text, width (in characters), height (in characters) + Response: a boolean value indicating an affirmative response (true) or a + negative response + """ + + name = "question" + info = { + "kdialog" : (_status, ["--yesno", String("text")]), + "zenity" : (_status, ["--question", StringKeyword("--text", "text")]), + "Xdialog" : (_status, ["--stdout", "--yesno", String("text"), Integer("height"), Integer("width")]), + } + +class Warning(Simple): + + """ + A dialogue asking a question and showing response buttons. + Options: text, width (in characters), height (in characters) + Response: a boolean value indicating an affirmative response (true) or a + negative response + """ + + name = "warning" + info = { + "kdialog" : (_status, ["--warningyesno", String("text")]), + "zenity" : (_status, ["--warning", StringKeyword("--text", "text")]), + "Xdialog" : (_status, ["--stdout", "--yesno", String("text"), Integer("height"), Integer("width")]), + } + +class Message(Simple): + + """ + A message dialogue. + Options: text, width (in characters), height (in characters) + Response: a boolean value indicating an affirmative response (true) or a + negative response + """ + + name = "message" + info = { + "kdialog" : (_status, ["--msgbox", String("text")]), + "zenity" : (_status, ["--info", StringKeyword("--text", "text")]), + "Xdialog" : (_status, ["--stdout", "--msgbox", String("text"), Integer("height"), Integer("width")]), + } + +class Error(Simple): + + """ + An error dialogue. + Options: text, width (in characters), height (in characters) + Response: a boolean value indicating an affirmative response (true) or a + negative response + """ + + name = "error" + info = { + "kdialog" : (_status, ["--error", String("text")]), + "zenity" : (_status, ["--error", StringKeyword("--text", "text")]), + "Xdialog" : (_status, ["--stdout", "--msgbox", String("text"), Integer("height"), Integer("width")]), + } + +class Menu(Simple): + + """ + A menu of options, one of which being selectable. + Options: text, width (in characters), height (in characters), + list_height (in items), items (MenuItem objects) + Response: a value corresponding to the chosen item + """ + + name = "menu" + info = { + "kdialog" : (_readvalue(_readfrom), ["--menu", String("text"), MenuItemList("items")]), + "zenity" : (_readvalue(_readfrom), ["--list", StringKeyword("--text", "text"), StringKeywords("--column", "titles"), + MenuItemList("items")] + ), + "Xdialog" : (_readvalue(_readfrom), ["--stdout", "--menubox", + String("text"), Integer("height"), Integer("width"), Integer("list_height"), MenuItemList("items")] + ), + } + item = MenuItem + number_of_titles = 2 + + def __init__(self, text, titles, items=None, width=None, height=None, list_height=None): + + """ + Initialise a menu with the given heading 'text', column 'titles', and + optional 'items' (which may be added later), 'width' (in characters), + 'height' (in characters) and 'list_height' (in items). + """ + + Simple.__init__(self, text, width, height) + self.titles = ([""] * self.number_of_titles + titles)[-self.number_of_titles:] + self.items = items or [] + self.list_height = list_height + + def add(self, *args, **kw): + + """ + Add an item, passing the given arguments to the appropriate item class. + """ + + self.items.append(self.item(*args, **kw)) + +class RadioList(Menu): + + """ + A list of radio buttons, one of which being selectable. + Options: text, width (in characters), height (in characters), + list_height (in items), items (MenuItem objects), titles + Response: a list of values corresponding to chosen items (since some + programs, eg. zenity, appear to support multiple default + selections) + """ + + name = "radiolist" + info = { + "kdialog" : (_readvalues_kdialog(_readfrom), ["--radiolist", String("text"), ListItemList("items")]), + "zenity" : (_readvalues_zenity(_readfrom), + ["--list", "--radiolist", StringKeyword("--text", "text"), StringKeywords("--column", "titles"), + ListItemList("items", 1)] + ), + "Xdialog" : (_readvalues_Xdialog(_readfrom), ["--stdout", "--radiolist", + String("text"), Integer("height"), Integer("width"), Integer("list_height"), ListItemList("items")] + ), + } + number_of_titles = 3 + +class CheckList(Menu): + + """ + A list of checkboxes, many being selectable. + Options: text, width (in characters), height (in characters), + list_height (in items), items (MenuItem objects), titles + Response: a list of values corresponding to chosen items + """ + + name = "checklist" + info = { + "kdialog" : (_readvalues_kdialog(_readfrom), ["--checklist", String("text"), ListItemList("items")]), + "zenity" : (_readvalues_zenity(_readfrom), + ["--list", "--checklist", StringKeyword("--text", "text"), StringKeywords("--column", "titles"), + ListItemList("items", 1)] + ), + "Xdialog" : (_readvalues_Xdialog(_readfrom), ["--stdout", "--checklist", + String("text"), Integer("height"), Integer("width"), Integer("list_height"), ListItemList("items")] + ), + } + number_of_titles = 3 + +class Pulldown(Menu): + + """ + A pull-down menu of options, one of which being selectable. + Options: text, width (in characters), height (in characters), + items (list of values) + Response: a value corresponding to the chosen item + """ + + name = "pulldown" + info = { + "kdialog" : (_readvalue(_readfrom), ["--combobox", String("text"), Strings("items")]), + "zenity" : (_readvalue(_readfrom), + ["--list", "--radiolist", StringKeyword("--text", "text"), StringKeywords("--column", "titles"), + StringPairs("items")] + ), + "Xdialog" : (_readvalue(_readfrom), + ["--stdout", "--combobox", String("text"), Integer("height"), Integer("width"), Strings("items")]), + } + item = unicode + number_of_titles = 2 + +class Input(Simple): + + """ + An input dialogue, consisting of an input field. + Options: text, input, width (in characters), height (in characters) + Response: the text entered into the dialogue by the user + """ + + name = "input" + info = { + "kdialog" : (_readinput(_readfrom), + ["--inputbox", String("text"), String("data")]), + "zenity" : (_readinput(_readfrom), + ["--entry", StringKeyword("--text", "text"), StringKeyword("--entry-text", "data")]), + "Xdialog" : (_readinput(_readfrom), + ["--stdout", "--inputbox", String("text"), Integer("height"), Integer("width"), String("data")]), + } + + def __init__(self, text, data="", width=None, height=None): + Simple.__init__(self, text, width, height) + self.data = data + +class Password(Input): + + """ + A password dialogue, consisting of a password entry field. + Options: text, width (in characters), height (in characters) + Response: the text entered into the dialogue by the user + """ + + name = "password" + info = { + "kdialog" : (_readinput(_readfrom), + ["--password", String("text")]), + "zenity" : (_readinput(_readfrom), + ["--entry", StringKeyword("--text", "text"), "--hide-text"]), + "Xdialog" : (_readinput(_readfrom), + ["--stdout", "--password", "--inputbox", String("text"), Integer("height"), Integer("width")]), + } + +class TextFile(Simple): + + """ + A text file input box. + Options: filename, text, width (in characters), height (in characters) + Response: any text returned by the dialogue program (typically an empty + string) + """ + + name = "textfile" + info = { + "kdialog" : (_readfrom, ["--textbox", String("filename"), Integer("width", pixels=1), Integer("height", pixels=1)]), + "zenity" : (_readfrom, ["--text-info", StringKeyword("--filename", "filename"), IntegerKeyword("--width", "width", pixels=1), + IntegerKeyword("--height", "height", pixels=1)] + ), + "Xdialog" : (_readfrom, ["--stdout", "--textbox", String("filename"), Integer("height"), Integer("width")]), + } + + def __init__(self, filename, text="", width=None, height=None): + Simple.__init__(self, text, width, height) + self.filename = filename + +# Available dialogues. + +available = [Question, Warning, Message, Error, Menu, CheckList, RadioList, Input, Password, Pulldown, TextFile] + +# Supported desktop environments. + +supported = Dialogue.commands.keys() + +# vim: tabstop=4 expandtab shiftwidth=4 diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/ExportHtmlLib/desktop/windows.py b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/ExportHtmlLib/desktop/windows.py new file mode 100644 index 0000000..2b19e85 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/ExportHtmlLib/desktop/windows.py @@ -0,0 +1,273 @@ +#!/usr/bin/env python + +""" +Simple desktop window enumeration for Python. + +Copyright (C) 2007, 2008, 2009 Paul Boddie + +This program is free software; you can redistribute it and/or modify it under +the terms of the GNU Lesser General Public License as published by the Free +Software Foundation; either version 3 of the License, or (at your option) any +later version. + +This program is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more +details. + +You should have received a copy of the GNU Lesser General Public License along +with this program. If not, see . + +-------- + +Finding Open Windows on the Desktop +----------------------------------- + +To obtain a list of windows, use the desktop.windows.list function as follows: + +windows = desktop.windows.list() + +To obtain the root window, typically the desktop background, use the +desktop.windows.root function as follows: + +root = desktop.windows.root() + +Each window object can be inspected through a number of methods. For example: + +name = window.name() +width, height = window.size() +x, y = window.position() +child_windows = window.children() + +See the desktop.windows.Window class for more information. +""" + +from desktop import _is_x11, _get_x11_vars, _readfrom, use_desktop +import re + +# System functions. + +def _xwininfo(identifier, action): + if identifier is None: + args = "-root" + else: + args = "-id " + identifier + + s = _readfrom(_get_x11_vars() + "xwininfo %s -%s" % (args, action), shell=1) + + # Return a mapping of keys to values for the "stats" action. + + if action == "stats": + d = {} + for line in s.split("\n"): + fields = line.split(":") + if len(fields) < 2: + continue + key, value = fields[0].strip(), ":".join(fields[1:]).strip() + d[key] = value + + return d + + # Otherwise, return the raw output. + + else: + return s + +def _get_int_properties(d, properties): + results = [] + for property in properties: + results.append(int(d[property])) + return results + +# Finder functions. + +def find_all(name): + return 1 + +def find_named(name): + return name is not None + +def find_by_name(name): + return lambda n, t=name: n == t + +# Window classes. +# NOTE: X11 is the only supported desktop so far. + +class Window: + + "A window on the desktop." + + _name_pattern = re.compile(r':\s+\(.*?\)\s+[-0-9x+]+\s+[-0-9+]+$') + _absent_names = "(has no name)", "(the root window) (has no name)" + + def __init__(self, identifier): + + "Initialise the window with the given 'identifier'." + + self.identifier = identifier + + # Finder methods (from above). + + self.find_all = find_all + self.find_named = find_named + self.find_by_name = find_by_name + + def __repr__(self): + return "Window(%r)" % self.identifier + + # Methods which deal with the underlying commands. + + def _get_handle_and_name(self, text): + fields = text.strip().split(" ") + handle = fields[0] + + # Get the "" part, stripping off the quotes. + + name = " ".join(fields[1:]) + if len(name) > 1 and name[0] == '"' and name[-1] == '"': + name = name[1:-1] + + if name in self._absent_names: + return handle, None + else: + return handle, name + + def _get_this_handle_and_name(self, line): + fields = line.split(":") + return self._get_handle_and_name(":".join(fields[1:])) + + def _get_descendant_handle_and_name(self, line): + match = self._name_pattern.search(line) + if match: + return self._get_handle_and_name(line[:match.start()].strip()) + else: + raise OSError, "Window information from %r did not contain window details." % line + + def _descendants(self, s, fn): + handles = [] + adding = 0 + for line in s.split("\n"): + if line.endswith("child:") or line.endswith("children:"): + if not adding: + adding = 1 + elif adding and line: + handle, name = self._get_descendant_handle_and_name(line) + if fn(name): + handles.append(handle) + return [Window(handle) for handle in handles] + + # Public methods. + + def children(self, all=0): + + """ + Return a list of windows which are children of this window. If the + optional 'all' parameter is set to a true value, all such windows will + be returned regardless of whether they have any name information. + """ + + s = _xwininfo(self.identifier, "children") + return self._descendants(s, all and self.find_all or self.find_named) + + def descendants(self, all=0): + + """ + Return a list of windows which are descendants of this window. If the + optional 'all' parameter is set to a true value, all such windows will + be returned regardless of whether they have any name information. + """ + + s = _xwininfo(self.identifier, "tree") + return self._descendants(s, all and self.find_all or self.find_named) + + def find(self, callable): + + """ + Return windows using the given 'callable' (returning a true or a false + value when invoked with a window name) for descendants of this window. + """ + + s = _xwininfo(self.identifier, "tree") + return self._descendants(s, callable) + + def name(self): + + "Return the name of the window." + + d = _xwininfo(self.identifier, "stats") + + # Format is 'xwininfo: Window id: "" + + return self._get_this_handle_and_name(d["xwininfo"])[1] + + def size(self): + + "Return a tuple containing the width and height of this window." + + d = _xwininfo(self.identifier, "stats") + return _get_int_properties(d, ["Width", "Height"]) + + def position(self): + + "Return a tuple containing the upper left co-ordinates of this window." + + d = _xwininfo(self.identifier, "stats") + return _get_int_properties(d, ["Absolute upper-left X", "Absolute upper-left Y"]) + + def displayed(self): + + """ + Return whether the window is displayed in some way (but not necessarily + visible on the current screen). + """ + + d = _xwininfo(self.identifier, "stats") + return d["Map State"] != "IsUnviewable" + + def visible(self): + + "Return whether the window is displayed and visible." + + d = _xwininfo(self.identifier, "stats") + return d["Map State"] == "IsViewable" + +def list(desktop=None): + + """ + Return a list of windows for the current desktop. If the optional 'desktop' + parameter is specified then attempt to use that particular desktop + environment's mechanisms to look for windows. + """ + + root_window = root(desktop) + window_list = [window for window in root_window.descendants() if window.displayed()] + window_list.insert(0, root_window) + return window_list + +def root(desktop=None): + + """ + Return the root window for the current desktop. If the optional 'desktop' + parameter is specified then attempt to use that particular desktop + environment's mechanisms to look for windows. + """ + + # NOTE: The desktop parameter is currently ignored and X11 is tested for + # NOTE: directly. + + if _is_x11(): + return Window(None) + else: + raise OSError, "Desktop '%s' not supported" % use_desktop(desktop) + +def find(callable, desktop=None): + + """ + Find and return windows using the given 'callable' for the current desktop. + If the optional 'desktop' parameter is specified then attempt to use that + particular desktop environment's mechanisms to look for windows. + """ + + return root(desktop).find(callable) + +# vim: tabstop=4 expandtab shiftwidth=4 diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/ExportHtmlLib/rgba/__init__.py b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/ExportHtmlLib/rgba/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/ExportHtmlLib/rgba/rgba.py b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/ExportHtmlLib/rgba/rgba.py new file mode 100644 index 0000000..b21f885 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/ExportHtmlLib/rgba/rgba.py @@ -0,0 +1,173 @@ +''' +RGBA +Licensed under MIT +Copyright (c) 2012 Isaac Muse +''' + +import re +from colorsys import rgb_to_hls, hls_to_rgb, rgb_to_hsv, hsv_to_rgb + +RGB_CHANNEL_SCALE = 1.0 / 255.0 +HUE_SCALE = 1.0 / 360.0 + + +def clamp(value, mn, mx): + return max(min(value, mx), mn) + + +class RGBA(object): + r = None + g = None + b = None + a = None + color_pattern = re.compile(r"^#(?:([A-Fa-f\d]{6})([A-Fa-f\d]{2})?|([A-Fa-f\d]{3}))") + + def __init__(self, s=None): + if s is None: + s = "#000000FF" + self.r, self.g, self.b, self.a = self._split_channels(s) + + def _split_channels(self, s): + def alpha_channel(alpha): + return int(alpha, 16) if alpha else 0xFF + + m = self.color_pattern.match(s) + assert(m is not None) + if m.group(1): + return int(s[1:3], 16), int(s[3:5], 16), int(s[5:7], 16), alpha_channel(m.group(2)) + else: + return int(s[1] * 2, 16), int(s[2] * 2, 16), int(s[3] * 2, 16), 0xFF + + def get_rgba(self): + return "#%02X%02X%02X%02X" % (self.r, self.g, self.b, self.a) + + def get_rgb(self): + return "#%02X%02X%02X" % (self.r, self.g, self.b) + + def apply_alpha(self, background="#000000AA"): + def tx_alpha(cf, af, cb, ab): + return int(abs(cf * (af / 255.0) + cb * (ab / 255.0) * (1 - (af / 255.0)))) & 0xFF + + if self.a < 0xFF: + r, g, b, a = self._split_channels(background) + + self.r, self.g, self.b = (tx_alpha(self.r, self.a, r, a), tx_alpha(self.g, self.a, g, a), tx_alpha(self.b, self.a, b, a)) + + return self.get_rgb() + + def luminance(self): + return clamp(int(round(0.299 * self.r + 0.587 * self.g + 0.114 * self.b)), 0, 255) + + def tohsv(self): + return rgb_to_hsv(self.r * RGB_CHANNEL_SCALE, self.g * RGB_CHANNEL_SCALE, self.b * RGB_CHANNEL_SCALE) + + def fromhsv(self, h, s, v): + r, g, b = hsv_to_rgb(h, s, v) + self.r = int(round(r * 255)) & 0xFF + self.g = int(round(g * 255)) & 0xFF + self.b = int(round(b * 255)) & 0xFF + + def tohls(self): + return rgb_to_hls(self.r * RGB_CHANNEL_SCALE, self.g * RGB_CHANNEL_SCALE, self.b * RGB_CHANNEL_SCALE) + + def fromhls(self, h, l, s): + r, g, b = hls_to_rgb(h, l, s) + self.r = int(round(r * 255)) & 0xFF + self.g = int(round(g * 255)) & 0xFF + self.b = int(round(b * 255)) & 0xFF + + def colorize(self, deg): + h, l, s = self.tohls() + h = clamp(deg * HUE_SCALE, 0.0, 1.0) + self.fromhls(h, l, s) + + def hue(self, deg): + d = deg * HUE_SCALE + h, l, s = self.tohls() + h = h + d + while h > 1.0: + h -= 1.0 + while h < 0.0: + h += 1.0 + self.fromhls(h, l, s) + + def invert(self): + self.r ^= 0xFF + self.g ^= 0xFF + self.b ^= 0xFF + + def saturation(self, factor): + h, l, s = self.tohls() + s = clamp(s * factor, 0.0, 1.0) + self.fromhls(h, l, s) + + def grayscale(self): + luminance = self.luminance() & 0xFF + self.r = luminance + self.g = luminance + self.b = luminance + + def sepia(self): + r = clamp(int((self.r * .393) + (self.g * .769) + (self.b * .189)), 0, 255) & 0xFF + g = clamp(int((self.r * .349) + (self.g * .686) + (self.b * .168)), 0, 255) & 0xFF + b = clamp(int((self.r * .272) + (self.g * .534) + (self.b * .131)), 0, 255) & 0xFF + self.r, self.g, self.b = r, g, b + + def brightness(self, factor): + # Caculate brightness based on RGB luminance. + # Maybe HLS or HSV brightness adjustment is better? + def get_overage(c): + if c < 0.0: + o = 0.0 + c + c = 0.0 + elif c > 255.0: + o = c - 255.0 + c = 255.0 + else: + o = 0.0 + return o, c + + def distribute_overage(c, o, s): + channels = len(s) + if channels == 0: + return c + parts = o / len(s) + if "r" in s and "g" in s: + c = c[0] + parts, c[1] + parts, c[2] + elif "r" in s and "b" in s: + c = c[0] + parts, c[1], c[2] + parts + elif "g" in s and "b" in s: + c = c[0], c[1] + parts, c[2] + parts + elif "r" in s: + c = c[0] + parts, c[1], c[2] + elif "g" in s: + c = c[0], c[1] + parts, c[2] + else: # "b" in s: + c = c[0], c[1], c[2] + parts + return c + + channels = ["r", "g", "b"] + total_lumes = clamp(self.luminance() + (255.0 * factor) - 255.0, 0.0, 255.0) + + if total_lumes == 255: + # white + self.r, self.g, self.b = 0xFF, 0xFF, 0xFF + elif total_lumes == 0: + # black + self.r, self.g, self.b = 0x00, 0x00, 0x00 + else: + # Adjust Brightness + pts = (total_lumes - 0.299 * self.r - 0.587 * self.g - 0.114 * self.b) + slots = set(channels) + components = [float(self.r) + pts, float(self.g) + pts, float(self.b) + pts] + count = 0 + for c in channels: + overage, components[count] = get_overage(components[count]) + if overage: + slots.remove(c) + components = list(distribute_overage(components, overage, slots)) + count += 1 + + self.r = int(round(components[0])) & 0xFF + self.g = int(round(components[1])) & 0xFF + self.b = int(round(components[2])) & 0xFF diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/HtmlAnnotations.py b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/HtmlAnnotations.py new file mode 100644 index 0000000..133dc88 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/HtmlAnnotations.py @@ -0,0 +1,262 @@ +import sublime +import sublime_plugin + +PACKAGE_SETTINGS = "ExportHtml.sublime-settings" + + +def get_highlight_style(): + style_flag = 0 + settings = sublime.load_settings(PACKAGE_SETTINGS) + scope = settings.get("annotation_highlight_scope", "comment") + style = settings.get("annotation_highlight_style", "outline") + if style == "outline": + style_flag |= sublime.DRAW_OUTLINED + return scope, style_flag + + +def clean_invalid_regions(view, annotations): + deletions = 0 + for x in range(0, int(annotations["count"])): + key_name = "html_annotation_%d" % x + regions = view.get_regions(key_name) + if len(regions) and not regions[0].empty(): + annotations["annotations"]["html_annotation_%d" % x]["region"] = [regions[0].begin(), regions[0].end()] + if deletions: + new_key = "html_annotation_%d" % (x - deletions) + annotations["annotations"][new_key] = annotations["annotations"][key_name] + del annotations["annotations"][key_name] + new_region = annotations["annotations"][new_key]["region"] + view.erase_regions(key_name) + scope, style = get_highlight_style() + view.add_regions( + new_key, + [sublime.Region(new_region[0], new_region[1])], + scope, + "", + style + ) + else: + del annotations["annotations"]["html_annotation_%d" % x] + annotations["count"] -= 1 + deletions += 1 + if len(regions): + view.erase_regions(key_name) + + view.settings().set("annotation_comments", annotations) + + +def get_annotations(view): + annotations = view.settings().get("annotation_comments", {"count": 0, "annotations": {}}) + clean_invalid_regions(view, annotations) + return annotations + + +def clear_annotations(view): + annotations = view.settings().get("annotation_comments", {"count": 0, "annotations": {}}) + for x in range(0, int(annotations["count"])): + view.erase_regions("html_annotation_%d" % x) + view.settings().set("annotation_comments", {"count": 0, "annotations": {}}) + + +def delete_annotations(view): + annotations = view.settings().get("annotation_comments", {"count": 0, "annotations": {}}) + for sel in view.sel(): + for x in range(0, int(annotations["count"])): + region = annotations["annotations"]["html_annotation_%d" % x]["region"] + annotation = sublime.Region(int(region[0]), int(region[1])) + if annotation.contains(sel): + view.erase_regions("html_annotation_%d" % x) + break + clean_invalid_regions(view, annotations) + + +def get_annotation_comment(view): + comment = None + annotations = view.settings().get("annotation_comments", {"count": 0, "annotations": {}}) + if len(view.sel()): + sel = view.sel()[0] + for x in range(0, int(annotations["count"])): + region = annotations["annotations"]["html_annotation_%d" % x]["region"] + annotation = sublime.Region(int(region[0]), int(region[1])) + if annotation.contains(sel): + comment = annotations["annotations"]["html_annotation_%d" % x]["comment"] + return comment + + +def is_selection_in_annotation(view, first_only=False): + mode = view.settings().get("annotation_mode", False) + selection = False + if mode: + annotations = view.settings().get("annotation_comments", {"count": 0, "annotations": {}}) + for sel in view.sel(): + for x in range(0, int(annotations["count"])): + region = annotations["annotations"]["html_annotation_%d" % x]["region"] + annotation = sublime.Region(int(region[0]), int(region[1])) + if annotation.contains(sel): + selection = True + break + if first_only: + break + return mode and selection + + +def annotations_exist(view): + mode = view.settings().get("annotation_mode", False) + found = False + if mode: + annotations = view.settings().get("annotation_comments", {"count": 0, "annotations": {}}) + if int(annotations["count"]): + found = True + return mode and found + + +def is_selected(view): + mode = view.settings().get("annotation_mode", False) + selected = not view.sel()[0].empty() + return mode and selected + + +class ShowAnnotationCommentCommand(sublime_plugin.TextCommand): + def is_visible(self): + return is_selection_in_annotation(self.view) + + def run(self, edit): + comment = get_annotation_comment(self.view) + if comment != None: + sublime.message_dialog("Annotation Comment:\n\n%s" % comment) + sublime.set_clipboard(comment) + + +class ClearAnnotationsCommand(sublime_plugin.TextCommand): + def is_visible(self): + return annotations_exist(self.view) + + def run(self, edit): + clear_annotations(self.view) + + +class DeleteAnnotationsCommand(sublime_plugin.TextCommand): + def is_visible(self): + return is_selection_in_annotation(self.view) + + def run(self, edit): + delete_annotations(self.view) + + +class EnableAnnotationModeCommand(sublime_plugin.TextCommand): + def is_visible(self): + return not self.view.settings().get("annotation_mode", False) + + def run(self, edit): + self.view.run_command("toggle_annotation_html_mode") + + +class DisableAnnotationModeCommand(sublime_plugin.TextCommand): + def is_visible(self): + return self.view.settings().get("annotation_mode", False) + + def run(self, edit): + self.view.run_command("toggle_annotation_html_mode") + + +class ToggleAnnotationHtmlModeCommand(sublime_plugin.TextCommand): + def is_enabled(self): + return not self.view.settings().get('is_widget') + + def run(self, edit): + mode = False if self.view.settings().get("annotation_mode", False) else True + self.view.settings().set("annotation_mode", mode) + if mode: + self.view.settings().set("annotation_read_mode", self.view.is_read_only()) + self.view.set_read_only(True) + self.view.set_status("html_annotation_mode", "Annotation Mode: ON") + else: + clear_annotations(self.view) + self.view.set_read_only(self.view.settings().get("annotation_read_mode", False)) + self.view.erase_status("html_annotation_mode") + + +class AddAnnotationCommand(sublime_plugin.TextCommand): + def is_visible(self): + return is_selected(self.view) + + def run(self, edit): + AnnotateHtml(self.view).run() + + +class EditAnnotationCommand(sublime_plugin.TextCommand): + def is_visible(self): + return is_selection_in_annotation(self.view, first_only=True) + + def run(self, edit): + AnnotateHtml(self.view).run() + + +class AnnotateHtml(object): + def __init__(self, view): + self.view = view + + def subset_annotation_adjust(self): + subset = None + comment = "" + parent = None + intersect = False + for k, v in self.annotations["annotations"].items(): + region = sublime.Region(int(v["region"][0]), int(v["region"][1])) + if region.contains(self.sel): + subset = region + comment = v["comment"] + parent = k + break + elif region.intersects(self.sel): + intersect = True + break + if subset != None: + self.sel = subset + return comment, parent, intersect + + def add_annotation(self, s, view_id, subset): + window = sublime.active_window() + view = window.active_view() if window != None else None + if s != "" and view != None and view_id == view.id(): + if subset == None: + idx = self.annotations["count"] + key_name = ("html_annotation_%d" % idx) + else: + key_name = subset + + self.annotations["annotations"][key_name] = { + "region": [self.sel.begin(), self.sel.end()], + "comment": s + } + if subset == None: + self.annotations["count"] += 1 + self.view.settings().set("annotation_comments", self.annotations) + + scope, style = get_highlight_style() + self.view.add_regions( + key_name, + [self.sel], + scope, + "", + style + ) + + def annotation_panel(self, default_comment, subset): + view_id = self.view.id() + self.view.window().show_input_panel( + ("Annotate region (%d, %d)" % (self.sel.begin(), self.sel.end())), + default_comment, + lambda x: self.add_annotation(x, view_id=view_id, subset=subset), + None, + None + ) + + def run(self): + self.sel = self.view.sel()[0] + self.annotations = get_annotations(self.view) + comment, subset, intersects = self.subset_annotation_adjust() + if not intersects: + self.annotation_panel(comment, subset) + else: + sublime.error_message("Cannot have intersecting annotation regions!") diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/Main.sublime-menu b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/Main.sublime-menu new file mode 100644 index 0000000..548aa4a --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/Main.sublime-menu @@ -0,0 +1,40 @@ +[ + { + "caption": "Preferences", + "mnemonic": "n", + "id": "preferences", + "children": + [ + { + "caption": "Package Settings", + "mnemonic": "P", + "id": "package-settings", + "children": + [ + { + "caption": "ExportHTML", + "children": + [ + { + "command": "open_file", + "args": {"file": "${packages}/ExportHtml/readme.md"}, + "caption": "README" + }, + { "caption": "-" }, + { + "command": "open_file", + "args": {"file": "${packages}/ExportHtml/ExportHtml.sublime-settings"}, + "caption": "Settings – Default" + }, + { + "command": "open_file", + "args": {"file": "${packages}/User/ExportHtml.sublime-settings"}, + "caption": "Settings – User" + } + ] + } + ] + } + ] + } +] \ No newline at end of file diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/css/export.css b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/css/export.css new file mode 100644 index 0000000..fcefd28 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/css/export.css @@ -0,0 +1,153 @@ +/* General */ +* html a:hover { background: transparent; } +body { color: /* %body_fg% */; } +pre { border: 0; margin: 0; padding: 0; } +td { padding: 0; } +table { border: 0; margin: 0; padding: 0; border-collapse: collapse; empty-cells: show; } +.code_text { font: /* %font_size% */pt /* %font_face% */, "Courier", Monospace; } +.code_page { background-color: /* %page_bg% */; } +.simple_code_page { background-color: white; color: black } +.code_gutter { display: /* %display_mode% */; background-color: /* %gutter_bg% */; padding-right: 10px; } +td.code_line div { width: 100%; } +span { display: inline-block; border: 0; margin: 0; } +span.bold { font-weight: bold; } +span.italic { font-style: italic; } +span.normal { font-style: normal; } +span.underline { text-decoration:underline; } + +/* Wrapping */ +div.wrap { + white-space: -moz-pre-wrap; /* Mozilla */ + white-space: -hp-pre-wrap; /* HP printers */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: pre-wrap; /* CSS 2.1 */ + white-space: pre-line; /* CSS 3 (and 2.1 as well, actually) */ + word-wrap: break-word; /* IE */ +} +div.wrap span { display: inline; } + +/* Toolbar */ +div#toolbarhide { + position: fixed; + top: 0px; + right: 0px; + padding-top: 5px; + padding-right: 10px; +} +div#toolbar { + visibility: hidden; + text-align: center; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; + opacity: 0; + -webkit-transform: translateZ(0); /* webkit flicker fix */ + -webkit-font-smoothing: antialiased; /* webkit text rendering fix */ + -webkit-transition: all .25s ease-in; + -moz-transition: all .25s ease-in; + -ms-transition: all .25s ease-in; + -o-transition: all .25s ease-in; + transition: all .25s ease-in; + background-color:black; + color: white; +} +div#toolbarhide:hover div#toolbar { + visibility: visible; + opacity: .8; + -webkit-transition: all .25s ease-out; + -moz-transition: all .25s ease-out; + -ms-transition: all .25s ease-out; + -o-transition: all .25s ease-out; + transition: all .25s ease-out; +} + +div#toolbar img { + display: /* %toolbar_orientation% */ ; + vertical-align: middle; + border: 0; + cursor: pointer; + height: 16px; + width: 16px; + padding: 5px; +} + +/* tooltips */ +#tooltip { + border-radius: 5px 5px; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.1); + -webkit-box-shadow: 5px 5px rgba(0, 0, 0, 0.1); + -moz-box-shadow: 5px 5px rgba(0, 0, 0, 0.1); + white-space: -moz-pre-wrap; /* Mozilla */ + white-space: -hp-pre-wrap; /* HP printers */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: pre-wrap; /* CSS 2.1 */ + white-space: pre-line; /* CSS 3 (and 2.1 as well, actually) */ + word-wrap: break-word; /* IE */ + position:absolute; display:block; + color: black; + padding: 0.8em 1em; + background: #FFFFE0; border: solid black; + font-family: Calibri, Tahoma, Geneva, sans-serif; + font-size: 10pt; + font-weight: bold; +} + +a.annotation { + color: /* %body_fg% */; + outline: none; + text-decoration: underline; +} + +span.annotation{ display: inline; } + +.tooltip_hotspot { cursor:pointer; } + +/* Annotation Table */ +div#comment_list { + visibility: hidden; + display: none; + margin: auto auto; + text-align: center; + position: fixed; + z-index: 99; + left:0px; + top: 0px; +} +div#comment_wrapper { + max-height: 200px; + overflow: auto; + border: solid black; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.1); + -webkit-box-shadow: 5px 5px rgba(0, 0, 0, 0.1); + -moz-box-shadow: 5px 5px rgba(0, 0, 0, 0.1); +} +table#comment_table { + border: thin solid; border-collapse: collapse; + color: #000000; background-color: #FFFFE0; margin: auto auto; +} +div.table_footer { text-align:right; font-size: 8pt; font-weight: bold;} +a.table_close { color: black; float: right; } +a.table_close:link { text-decoration: none; } +a.table_close:active { text-decoration: none; } +a.table_close:visited { text-decoration: none; } +a.table_close:hover { text-decoration: none; } +table#comment_table th, table#comment_table td { border: thin solid; padding: 5px; } +td.annotation_link { width: 60px; text-align: right; padding-right: 20px; } +.annotation_comment { width: 500px; } +div.annotation_comment { + float: left; + text-align: left; + white-space: -moz-pre-wrap; /* Mozilla */ + white-space: -hp-pre-wrap; /* HP printers */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: pre-wrap; /* CSS 2.1 */ + white-space: pre-line; /* CSS 3 (and 2.1 as well, actually) */ + word-wrap: break-word; /* IE */ +} diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/icons/bubble.png b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/icons/bubble.png new file mode 100644 index 0000000..ffbe903 Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/icons/bubble.png differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/icons/down.png b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/icons/down.png new file mode 100644 index 0000000..7e866f8 Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/icons/down.png differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/icons/gutter.png b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/icons/gutter.png new file mode 100644 index 0000000..d28b142 Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/icons/gutter.png differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/icons/print.png b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/icons/print.png new file mode 100644 index 0000000..c9c279b Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/icons/print.png differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/icons/text.png b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/icons/text.png new file mode 100644 index 0000000..0859e6a Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/icons/text.png differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/icons/toolbar.xcf b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/icons/toolbar.xcf new file mode 100644 index 0000000..7448447 Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/icons/toolbar.xcf differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/icons/wrap.png b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/icons/wrap.png new file mode 100644 index 0000000..c8e0a32 Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/icons/wrap.png differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/js/annotation.js b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/js/annotation.js new file mode 100644 index 0000000..87692e8 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/js/annotation.js @@ -0,0 +1,206 @@ +/*jshint globalstrict: true*/ +"use strict"; + +var win_attr = { + get_center : function (dim) { + var c = { + 'x' : (win_attr.get_size('x')/2), + 'y' : (win_attr.get_size('y')/2) + }; + return ((dim) ? c[dim] : c); + }, + + get_size : function(dir) { + dir = (dir === 'x') ? 'Width' : 'Height'; + return ((window['inner'+dir]) ? + window['inner'+dir] : + ((window.document.documentElement && window.document.documentElement['client'+dir]) ? + window.document.documentElement['client'+dir] : + window.document.body['client'+dir] + ) + ); + } +}, + +position_el = { + center : function (el, dim) { + var c = win_attr.get_center(), + top = (c.y - (el.offsetHeight/2)), + left = (c.x - (el.offsetWidth/2)); + if (dim == null || dim === 'y') el.style.top = (top < 0) ? 0 + 'px' : top + 'px'; + if (dim == null || dim === 'x') el.style.left = (left < 0) ? 0 + 'px' : left + 'px'; + }, + + set : function (el, x, y) { + var left, top; + + if (typeof x === "undefined") x = null; + if (typeof y === "undefined") y = null; + + if (y === 'center') { + position_el.center(el, 'y'); + } else if (y === 'top') { + el.style.top = 0 + 'px'; + } else if (y === 'bottom') { + top = (win_attr.get_size('y') - (el.offsetHeight)); + el.style.top = (top < 0) ? 0 + 'px' : top + 'px'; + } else if (y.match(/^[\d]+(%|px|em|mm|cm|in|pt|pc)$/) != null) { + el.style.top = y; + } + + if (x === "center") { + position_el.center(el, 'x'); + } else if (x === 'left') { + el.style.left = 0 + 'px'; + } else if (x === 'right') { + left = (win_attr.get_size('x') - (el.offsetWidth)); + el.style.left = (left < 0) ? 0 + 'px' : left + 'px'; + } else if (x.match(/^[\d]+(%|px|em|mm|cm|in|pt|pc)$/) != null) { + el.style.left = x; + } + } +}; + +function position_table(el) { + var x, y, + sel = document.getElementById('dock'), + option = sel.options[sel.selectedIndex].value; + switch(option) { + case "0": x = 'center'; y = 'center'; break; + case "1": x = 'center'; y = 'top'; break; + case "2": x = 'center'; y = 'bottom'; break; + case "3": x = 'left'; y = 'center'; break; + case "4": x = 'right'; y = 'center'; break; + case "5": x = 'left'; y = 'top'; break; + case "6": x = 'right'; y = 'top'; break; + case "7": x = 'left'; y = 'bottom'; break; + case "8": x = 'right'; y = 'bottom'; break; + default: break; + } + setTimeout(function () {position_el.set(el, x, y); el.style.visibility = 'visible';}, 300); +} + +function toggle_annotations() { + var comments_div = document.getElementById('comment_list'), + mode = comments_div.style.display; + if (mode == 'none') { + comments_div.style.display = 'block'; + position_table(comments_div); + } else { + comments_div.style.visibility = 'hidden'; + comments_div.style.display = 'none'; + } +} + +function dock_table() { + var comments_div = document.getElementById('comment_list'); + position_table(comments_div); +} + +function scroll_to_line(value) { + var pos = 0, + el = document.getElementById(value); + window.scrollTo(0, 0); + while(el) { + pos += el.offsetTop; + el = el.offsetParent; + } + pos -= win_attr.get_center('y'); + if (pos < 0) { + pos = 0; + } + window.scrollTo(0, pos); +} + +// Tooltips from http://www.scriptiny.com/2008/06/javascript-tooltip/ +var tooltip = function() { + var id = 'tooltip', + top = 3, + left = 3, + maxw = 300, + speed = 10, + timer = 20, + endalpha = 95, + alpha = 0, + ie = document.all ? true : false, + tt, t, c, b, h; + return{ + annotation_list: {}, + init: function() { + var i, comment, comments, len; + comments = document.querySelectorAll("div.annotation_comment"); + len = comments.length; + for (i = 0; i < len; i++) { + comment = comments[i]; + if ("textContent" in comment) { + tooltip.annotation_list[i] = comment.textContent; + } else { + tooltip.annotation_list[i] = comment.innerText; + } + } + }, + show:function(v, w) { + if(tt == null) { + tt = document.createElement('div'); + tt.setAttribute('id', id); + document.body.appendChild(tt); + tt.style.opacity = 0; + tt.style.filter = 'alpha(opacity=0)'; + document.onmousemove = this.pos; + } + tt.style.display = 'block'; + tt.innerHTML = v in tooltip.annotation_list ? tooltip.annotation_list[v] : '?'; + tt.style.width = w ? w + 'px' : 'auto'; + if(!w && ie){ + tt.style.width = tt.offsetWidth; + } + if(tt.offsetWidth > maxw){ + tt.style.width = maxw + 'px'; + } + h = parseInt(tt.offsetHeight, 10) + top; + clearInterval(tt.timer); + tooltip.instantshow(true); + // tt.timer = setInterval(function(){tooltip.fade(1);}, timer); + }, + pos:function(e) { + var u = ie ? event.clientY + document.documentElement.scrollTop : e.pageY, + l = ie ? event.clientX + document.documentElement.scrollLeft : e.pageX; + tt.style.top = (u - h) + 'px'; + tt.style.left = (l + left) + 'px'; + }, + instantshow: function(show) { + if (show === true) { + tt.style.opacity = endalpha * 0.01; + tt.style.filter = 'alpha(opacity=' + endalpha + ')'; + } else { + tt.style.display = 'none'; + } + }, + fade:function(d) { + var a = alpha, i; + if((a != endalpha && d == 1) || (a !== 0 && d == -1)){ + i = speed; + if(endalpha - a < speed && d == 1){ + i = endalpha - a; + }else if(alpha < speed && d == -1){ + i = a; + } + alpha = a + (i * d); + tt.style.opacity = alpha * 0.01; + tt.style.filter = 'alpha(opacity=' + alpha + ')'; + }else{ + clearInterval(tt.timer); + if(d == -1){ + tt.style.display = 'none'; + } + } + }, + hide:function() { + clearInterval(tt.timer); + tooltip.instantshow(false); + // tt.timer = setInterval(function(){tooltip.fade(-1);},timer); + } + }; +}(); + +tooltip.init(); diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/js/lines.js b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/js/lines.js new file mode 100644 index 0000000..20e9d49 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/js/lines.js @@ -0,0 +1,87 @@ +/*jshint globalstrict: true*/ +"use strict"; + +var page_line_info = { + wrap: false, + ranges: null, + wrap_size: null, + tables: null, + header: null, + gutter: false + }; + +function wrap_code() { + var start, end, i, j, mode, idx, + width = 0, el; + if (page_line_info.header) { + document.getElementById("file_info").style.width = page_line_info.wrap_size + "px"; + } + for (i = 1; i <= page_line_info.tables; i++) { + idx = i - 1; + start = page_line_info.ranges[idx][0]; + end = page_line_info.ranges[idx][1]; + for(j = start; j < end; j++) { + if (mode == null) { + mode = true; + if (page_line_info.gutter) { + width = document.getElementById("L_" + idx + "_" + j).offsetWidth; + } + } + el = document.getElementById("C_" + idx + "_" + j); + el.style.width = (page_line_info.wrap_size - width) + "px"; + el.className = "wrap"; + } + } +} + +function toggle_gutter() { + var i, j, mode, rows, r, tbls, cells; + tbls = document.getElementsByTagName('table'); + for (i = 1; i <= page_line_info.tables; i++) { + rows = tbls[i].getElementsByTagName('tr'); + r = rows.length; + for (j = 0; j < r; j++) { + cells = rows[j].getElementsByTagName('td'); + if (mode == null) { + if (page_line_info.gutter) { + mode = 'none'; + page_line_info.gutter = false; + } else { + mode = 'table-cell'; + page_line_info.gutter = true; + } + } + cells[0].style.display = mode; + } + } + if (page_line_info.wrap && mode != null) { + setTimeout(function() {wrap_code();}, 500); + } +} + +function unwrap_code() { + var i, j, idx, start, end, el; + if (page_line_info.header) { + document.getElementById("file_info").style.width = "100%"; + } + for (i = 1; i <= page_line_info.tables; i++) { + idx = i - 1; + start = page_line_info.ranges[idx][0]; + end = page_line_info.ranges[idx][1]; + for(j = start; j < end; j++) { + el = document.getElementById("C_" + idx + "_" + j); + el.style.width = "100%"; + el.className = ""; + } + } +} + +function toggle_wrapping() { + if (page_line_info.wrap) { + page_line_info.wrap = false; + unwrap_code(); + } else { + page_line_info.wrap = true; + wrap_code(); + } +} diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/js/plaintext.js b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/js/plaintext.js new file mode 100644 index 0000000..183117d --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/js/plaintext.js @@ -0,0 +1,39 @@ +/*jshint globalstrict: true*/ +"use strict"; + +var plain_text_clone = null; + +function toggle_plain_text() { + var lines = document.querySelectorAll("td.code_line"), + line_len = lines.length, + text = "", + plain_pre = document.querySelectorAll("pre.simple_code_page"), + orig_pre, pre, i, j, spans, span_len, span; + if (plain_pre.length > 0) { + document.body.removeChild(plain_pre[0]); + document.body.appendChild(plain_text_clone); + document.body.className = "code_page"; + } else { + for (i = 0; i < line_len; i++) { + spans = lines[i].querySelectorAll("span.real_text"); + span_len = spans.length; + for (j = 0; j < span_len; j++) { + span = spans[j]; + if ("textContent" in span) { + text += span.textContent; + } else { + text += span.innerText; + } + } + text += "\n"; + } + orig_pre = document.querySelectorAll("pre.code_page")[0]; + plain_text_clone = orig_pre.cloneNode(true); + pre = document.createElement('pre'); + pre.className = "simple_code_page"; + pre.appendChild(document.createTextNode(text)); + document.body.removeChild(orig_pre); + document.body.appendChild(pre); + document.body.className = "simple_code_page"; + } +} diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/js/plist.js b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/js/plist.js new file mode 100644 index 0000000..c61be48 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/js/plist.js @@ -0,0 +1,129 @@ +/*jshint globalstrict: true*/ +"use strict"; + +var plist = { + color_scheme: {}, + content: "", + indentlevel: 0, + + get: function(file_name) { + this.content = '\n' + + '\n' + + '\n' + + '\n'; + this.parsedict(this.color_scheme); + this.content += '\n'; + return this.content; + }, + + isinstance: function(obj, s) { + return ({}).toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase() === s; + }, + + sortkeys: function(obj) { + var sorted = {}, + keys = [], + key; + + for (key in obj) { + if (obj.hasOwnProperty(key)) { + keys.push(key); + } + } + keys.sort(); + return keys; + }, + + indent: function() { + var i; + for (i = 0; i < this.indentlevel; i++) { + this.content += " "; + } + }, + + parsekey: function(k) { + this.indent(); + this.content += '' + k + '\n'; + }, + + parseitem: function(obj) { + if (this.isinstance(obj, "string")) { + this.parsestring(obj); + } else if (this.isinstance(obj, "array")) { + this.parsearray(obj); + } else if (this.isinstance(obj, "object")) { + this.parsedict(obj); + } + }, + + parsearray: function(obj) { + var i, len = obj.length; + this.indent(); + this.content += '\n'; + this.indentlevel++; + for (i = 0; i < len; i++) { + this.parseitem(obj[i]); + } + this.indentlevel--; + this.indent(); + this.content += '\n'; + }, + + parsestring: function(s) { + this.indent(); + this.content += '' + s + '\n'; + }, + + parsedict: function(obj) { + var keys = this.sortkeys(obj), + len = keys.length, + k, i; + + this.indent(); + this.content += '\n'; + this.indentlevel++; + for (i = 0; i < len; i++) + { + k = keys[i]; + this.parsekey(k); + this.parseitem(obj[k]); + } + this.indentlevel--; + this.indent(); + this.content += '\n'; + } +}, + +escape_html = { + safe_chars: { + "&": "&", + "<": "<", + ">": ">", + '"': '"', + "'": ''', + "/": '/' + }, + escape: function (s) { + return String(s).replace(/[&<>"'\/]/g, function (c) {return escape_html.safe_chars[c];}); + } +}; + +function extract_theme(name) { + var text, wnd, doc, + a = document.createElement('a'); + window.URL = window.URL || window.webkitURL; + + if (window.Blob != null && a.download != null) { + text = new Blob([plist.get(name)], {'type':'application/octet-stream'}); + a.href = window.URL.createObjectURL(text); + a.download = name; + a.click(); + } else { + text = '
' + escape_html.escape(plist.get(name)) + '
', + wnd = window.open('', '_blank', "status=1,toolbar=0,scrollbars=1"), + doc = wnd.document; + doc.write(text); + doc.close(); + wnd.focus(); + } +} diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/js/print.js b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/js/print.js new file mode 100644 index 0000000..cf5594d --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/js/print.js @@ -0,0 +1,15 @@ +/*jshint globalstrict: true*/ +"use strict"; + +function page_print() { + var element = document.getElementById("toolbarhide"); + if (element != null) { + element.style.display = "none"; + } + if (window.print) { + window.print(); + } + if (element != null) { + element.style.display = "block"; + } +} diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/package-metadata.json b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/package-metadata.json new file mode 100644 index 0000000..9887e8e --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/package-metadata.json @@ -0,0 +1 @@ +{"url": "https://github.com/facelessuser/ExportHtml", "version": "2013.03.29.23.39.49", "description": "Sublime Text - Export code to HTML for copying/printing/saving. Also, export code to BBCode for forum posts."} \ No newline at end of file diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/readme.md b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/readme.md new file mode 100644 index 0000000..c9957c1 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ExportHtml/readme.md @@ -0,0 +1,220 @@ +# About +This is a fork of agibsonsw's [PrintHtml](https://github.com/agibsonsw/PrintHtml) plugin. This plugin allows the exporting of a document in ST2 to an HTML file or to BBCode. It duplicates ST2's theme colors and font styles. You can play with the demo page that has actual html pages generated with this plugin [here](http://facelessuser.github.com/ExportHtml). + + + +# Features +- Export to HTML using any tmTheme for syntax highlighting +- Can handle any language supported by ST2 +- Supports bold and italic theme font styles as well +- Configurable output +- Format suitable for copying and pasting in emails +- 2 included tmTheme files for color and grayscale printing (but any can be used) +- Export only selections (multi-select supported) +- Export and show highlights (multi-select supported) +- Toggle gutter on/off in browser view +- Automatically open browser print dialog (optional) +- Enable/disable configurable word wrapping +- Configurable toolbar to appear in the generated webpage + +# Usage: Exporting HTML +ExportHtml comes with a number of default commands available, but these can be overridden in the settings file. Or you can create commands directly outside of the settings file bound to the command palette, key bindings, or even the menu. + +If adding a command to the settings file, it goes under the ```html_panel``` setting. These configurations will appear under the ```Export to HTML: Show Export Menu``` command palette command. + +```javascript +// Define configurations for the drop down export menu +"html_panel": [ + // Browser print color (selections and multi-selections allowed) + { + "Browser Print - Color": { + "numbers": true, + "wrap": 900, + "browser_print": true, + "multi_select": true, + "color_scheme": "Packages/ExportHtml/ColorSchemes/Print-Color.tmTheme", + "style_gutter": false + } + } + ] +``` + +The name of the command is the key value, and then you add the parameters you wish to specify. You can use any combination of settings below. + +- numbers (boolean): Display line numbers in the gutter. +- style_gutter (boolean): Style gutter with theme backgrounds and foregrounds, or just use the default background/foreground. Default is ```true```. +- multi_select (boolean): If multiple regions are selected in a document, only export what is under those selections. By default only the first selection is recognized. Default is ```false``` +- highlight_selections (boolean): Highlights all selections in HTML output using the themes selection colors. Multi-select option will be ignored if this is set ```true```. Default is ```false``` +- wrap (integer): Define the allowable size in px to wrap lines at. By default wrapping is not used. +- color_scheme (string): The color scheme (tmTheme) file you would like to use. By default the current color scheme file is used, or the the alternate default color scheme if defined in the setting ```alternate_scheme```. +- clipboard_copy (boolean): Copy html to the clipboard after generation. Default is ```false```. +- browser_print (boolean): When opening in the web browser, also open the brower's print dialog. This will be ignored if ```view_open``` is ```true```. Default is ```false```. +- view_open (boolean): Open HTML in a Sublime Text tab instead of the web browser. Default is ```false```. +- no_header (boolean): Do not display file name, date, and time at the top of the HTML document. Default is ```false```. +- date_time_format (string): String denoting the format for date and time when displaying header. Please see Python's documentation on ```time.strftime``` for detailed info on formatting syntax. Default is ```"%m/%d/%y %I:%M:%S"``` +- show_full_path (boolean): Show full path for filename when displaying header. Default is ```true``` +- save_location (string): Path to save html file. If the file is wanted in the same file as the original, use ".". Otherwise, use the absolute path to where the file is desired. If there is an issue determining where to save the file, or the path does not exist, the OS temp folder will be used. Default is ```None``` (use temp folder). +- time_stamp (string): Configure the time stamp of saved html when using ```save_location```. To remove time stamps, just set to an empty string ```""```. Please see Python's documentation on ```time.strftime``` for detailed info on formatting syntax. Default is ```"_%m%d%y%H%M%S"``` +- toolbar (array of strings): Option to display a toolbar with to access features in a generated HTML. This setting is an array of keywords that represent the icons in the toolbar to show. Valid keywords include ```gutter```, ```print```, ```plain_text```, ```annotation```, ```theme```, and ```wrapping```. Toolbar will appear when you mouse over the uppert right corner of the window of the generated html. Default enables all. +- filter (string): Filters to use on the theme's colors. The string is a sequence of filters separated by ```;```. The accepted filters are ```grayscale```, ```invert```, ```sepia```, ```brightness```,, ```saturation```, ```hue```, and ```colorize```. ```brightness``` and ```saturation``` requires a float parameter to specify to what magnitude the filter should be applied at. ```hue``` and ```colorize``` take a float that represents a degree. ```hue``` shifts the hue via the degree given (can accept negative degrees); hues will wrap if they extend past 0 degrees or 360 degrees. Example: ```"filter": "sepia;invert;brightness(1.1);saturation(1.3);"```. Default is ```""```. +- shift_brightness (bool): This setting shifts the entire theme's brightness if a background color's luminace is below the global setting ```bg_min_lumen_threshold```. This was added to solve an issue that I had when copying dark themes into an outlook email; if a html span had a background that was too dark, the foreground would just be white. This allows me to not have to worry about how dark the theme is, and probably serves very little use besides that. + +If you wish to bind a command to a key combination etc., the same settings as above can be used. + +Example: + +```javascript +{ + "keys": ["ctrl+alt+n"], + "command": "export_html", + "args": { + "numbers": true, + "wrap": 900, + "browser_print": true, + "multi_select": true, + "color_scheme": "Packages/ExportHtml/ColorSchemes/Print-Color.tmTheme", + "style_gutter": false + } +} +``` + +When viewing the HTML in your web browser, regardless of the gutter settings, the gutter can be toggled to show or be hidden using the toolbar. + +# Usage: Exporting BBCode +ExportHtml can also export selected code as BBCode for posting in forums. Exporting BBCode is very similar to exporting HTML code. + +If adding a command to the settings file, it goes under the ```bbcode_panel``` setting. These configurations will appear under the ```Export to BBCode: Show Export Menu``` command palette command. + +```javascript +// Define configurations for the drop down export menu +"bbcode_panel": [ + { + "To Clipboard - Format as BBCode": { + "numbers": false, + "multi_select": true + } + } +] +``` + +The name of the command is the key value, and then you add the parameters you wish to specify. You can use any combination of settings below. + +- numbers (boolean): Display line numbers in the gutter. +- multi_select (boolean): If multiple regions are selected in a document, only export what is under those selections. By default only the first selection is recognized. Default is ```false``` +- color_scheme (string): The color scheme (tmTheme) file you would like to use. By default the current color scheme file is used, or the the alternate default color scheme if defined in the setting ```alternate_scheme```. +- clipboard_copy (boolean): Copy BBCode to the clipboard after generation. Default is ```true```. +- view_open (boolean): Open txt file of BBCode in a Sublime Text tab. Default is ```false```. +- no_header (boolean): Do not display file name, date, and time at the top of the HTML document. Default is ```false```. + +If you wish to bind a command to a key combination etc., the same settings as above can be used. + +Example: + +```javascript +{ + "keys": ["ctrl+alt+n"], + "command": "export_bbcode", + "args": { + "numbers": false, + "multi_select": true + } +} +``` + +# Usage: Annotations (HTML only) +Annotations are comments you can make on selected text. When the HTML is generated, the selected text will be underlined, and when the mouse hovers over them, a tooltip will appear with your comment. + + + +In order to use annotations, you must enter into an "Annotation Mode". This puts your file in a read only state. At this point, you can select text and create annotations using the annotation commands provided. When you leave the "Annotation Mode", all annotations will be lost. So you must print before leaving annotation mode. + +You can access the annotation commands from the command palette or from the context menu. + +The commands are as follows: + +- Enable Annotation Mode: Turn annotation mode on. +- Disable Annotation Mode: Turn annotation mode off. +- Annotate Selection: Annote the given selection (no multi-select support currently). +- Delete Annotation(s): Delete the annotation region the the cursor resides in (multi-select support). +- Delete All Annotations: Delete all annotation regions. +- Show Annotation Comment: Show the annotation comment of the region under the cursor. + +You can navigate the annotations in the generate HTML by using a jump table. You can show the jump table at any time by selecting the annotation button in the toolbar. You can also click any annotation to show the jump table as well. If it gets in the way, you can dock it in a different location. + + + + +# Settings File options +- alternate_scheme (string or false): Defines a default theme to be used if a theme is not specified in a command. When this is false, the current Sublime Text theme in use is used. +- alternate_font_size (int or false): Define an alternate font_size to use by default instead of the current one in use. Use the current one in use if set to a literal ```false```. Default is ```false```. +- alternate_font_face (string or false): Define an alternate font_face to use by default instead of the current one in use. Use the current one in use if set to a literal ```false```. Default is ```false```. +- valid_selection_size (integer): Minimum allowable size for a selection to be accepted for only the selection to be printed. +- linux_python2.6_lib (string): If you are on linux and Sublime Text is not including your Python 2.6 library folder, you can try and configure it here. +- html_panel (array of commands): Define export configurations to appear under the ```Export to HTML: Show Export Menu``` command palette command. +- bbcode_panel (array of commands): Define export configurations to appear under the ```Export to BBCode: Show Export Menu``` command palette command. + +#Credits +- agibsonsw: Original idea and algorithm for the plugin +- Paul Boddie: Desktop module for open files in web browser cross platform +- Print-Color and Print-Grayscale tmThemes were derived from Monokai Bright + +#Version 0.5.7 +- Better tooltips for annotations (they now follow the mouse) +- Remove workaround to fix gaps in background color (it is recommended to just use a reliable font like Courier) +- Change method of underlining annotations to work in wrap mode and non-wrap mode and with background colors +- Fix for CSS in annotation table not handling comment overflow + +#Version 0.5.6 +- Expose filters to ExportBbcode +- Port transparency simulation to ExportBbcode +- Add hue and colorize filters + +#Version 0.5.5 +- Various bug fixes +- Add color filters that can be applied to a theme +- Add shift_brightness to solve an issue I had with copying the html of very dark themes into Outlook at work + +#Version 0.5.0 +- Added ability to define path to save generated html to a specific folder with optional timestamp +- If selection foreground is not defined, use normal colors for text. +- Click annotations to show annotation jump table +- Removed shortcut actions +- Themes are now embedded in the html and can be extracted +- Added toggle plain text option and toggle wrapping (if enababled) +- Added toolbar to print, download theme, disable toggle wrapping (if enabled), toggle annotation jump table (if annotations available), toggle plain text, and toggle gutter +- Exposed toolbar options in configuration (can define any toolbar item to appear) +- Split out javascript into separate files +- Improved and fixed javascript issues + +# Version 0.4.1 +- Add date_time_format and show_full_path options +- Some internal adjustments + +# Version 0.4.0 +- Fix regression with option numbers = false +- Fix issue where if transparency was included in hex color, color would not render +- Fix regression where annotation table would not show + +# Version 0.3.2 +- Allow alternate font size and face via the settings file +- Tweak annotation jump table style and code + +# Version 0.3.1 +- Position annotation jump table in different locations via drop down list + +# Version 0.3.0 +- Add annotation jump table for the HTML. Show table with "alt+double_click" + +# Version 0.2.0 +- Fix issue where html is opened twice +- New annotation feature +- New export to BBCode +- Rename PrintHTML to ExportHTML +- Fix HTML Title (display actual file name of content) +- Update documentation + +# Version 0.1.1 +- Fix status returnd as None for Windows + +# Version 0.1.0 +- Initial release diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/FileDiffs/Context.sublime-menu b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/FileDiffs/Context.sublime-menu new file mode 100644 index 0000000..2cf4afd --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/FileDiffs/Context.sublime-menu @@ -0,0 +1,8 @@ +[ + { "caption": "-" }, + { "caption": "FileDiffs Menu", "command": "file_diff_menu" }, + { "caption": "Diff Selections", "command": "file_diff_selections" }, + { "caption": "Diff with Clipboard", "command": "file_diff_clipboard" }, + { "caption": "Diff with Saved", "command": "file_diff_saved" }, + { "caption": "-" } +] diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/FileDiffs/Default.sublime-commands b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/FileDiffs/Default.sublime-commands new file mode 100644 index 0000000..596557d --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/FileDiffs/Default.sublime-commands @@ -0,0 +1,6 @@ +[ + { + "caption": "FileDiffs: Menu", + "command": "file_diff_menu" + } +] diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/FileDiffs/Example.sublime-keymap b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/FileDiffs/Example.sublime-keymap new file mode 100644 index 0000000..33e5eb1 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/FileDiffs/Example.sublime-keymap @@ -0,0 +1,3 @@ +[ + { "keys": ["ctrl+shift+d"], "command": "file_diff_menu" } +] diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/FileDiffs/FileDiffs.sublime-settings b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/FileDiffs/FileDiffs.sublime-settings new file mode 100644 index 0000000..c6f0b9d --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/FileDiffs/FileDiffs.sublime-settings @@ -0,0 +1,31 @@ +// You can set a command like this +// "cmd": ["command", "$file1", "$file2"] + +// You can also include other command line parameters like this +// "cmd": ["command", "-parameter1", "-parameter2", "$file1", "$file2"] + +{ + // just uncomment one of the examples + // or write your own command + // NOTE: Copy/paste example below or write your own command in: Package Settings --> FileDiffs --> Settings - User + // This file will be overwritten if the package is updated. + + // opendiff (FileMerge) + // "cmd": ["opendiff", "$file1", "$file2"] + + // ksdiff (Kaleidoscope) + // "cmd": ["ksdiff", "$file1", "$file2"] + + // "open_in_sublime": false + // twdiff (Textwrangler) + // "cmd": ["twdiff", "$file1", "$file2"] + + // bbdiff (BBEdit) NOTE: Use example below if you receive error. + // "cmd": ["bbdiff", "$file1", "$file2"] + + // bbdiff (BBEdit) + // "cmd" ["/usr/local/bin/bbdiff", "$file1", "$file2"] + + // deltawalker (DeltaWalker) + // "cmd": ["deltawalker", "-nosplash", "$file1", "$file2"] +} diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/FileDiffs/Main.sublime-menu b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/FileDiffs/Main.sublime-menu new file mode 100644 index 0000000..edb3be8 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/FileDiffs/Main.sublime-menu @@ -0,0 +1,27 @@ +[ + { + "caption": "Preferences", + "mnemonic": "n", + "id": "preferences", + "children": + [ + { + "caption": "Package Settings", + "mnemonic": "P", + "id": "package-settings", + "children": + [ + { + "caption": "FileDiffs", + "children": + [ + { "command": "open_file", "args": {"file": "${packages}/FileDiffs/FileDiffs.sublime-settings"}, "caption": "Settings – Default" }, + { "command": "open_file", "args": {"file": "${packages}/User/FileDiffs.sublime-settings"}, "caption": "Settings – User" }, + { "caption": "-" } + ] + } + ] + } + ] + } +] diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/FileDiffs/README.md b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/FileDiffs/README.md new file mode 100644 index 0000000..ad0183a --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/FileDiffs/README.md @@ -0,0 +1,55 @@ +FileDiffs Plugin for Sublime Text 2 +=================================== + +Shows diffs - also in an external diff tool - between the current file, or selection(s) in the current file, and clipboard, another file, or unsaved changes. + + +Installation +------------ + +1. Using Package Control, install "FileDiffs" + +Or: + +1. Open the Sublime Text 2 Packages folder + + - OS X: ~/Library/Application Support/Sublime Text 2/Packages/ + - Windows: %APPDATA%/Sublime Text 2/Packages/ + - Linux: ~/.Sublime Text 2/Packages/ or ~/.config/sublime-text-2/Packages + +2. clone this repo +3. Install keymaps for the commands (see Example.sublime-keymap for my preferred keys) + +Add External Diff Tool +-------- + +(IMPORTANT: Dont forget to make a correct symlink (e.g. in /usr/bin) pointing to the command line tool of your external diff tool) + +1. Preferences > Package Settings > FileDiffs > Settings - Default + +2. Uncomment one of the examples or write you own command to open external diff tool. + + +Commands +-------- + +`file_diff_menu`: Shows a menu to select one of the file_diff commands. Bound to `ctrl+shift+d`. + +The rest of the commands are not bound by default: + +`file_diff_clipboard`: Shows the diff of the current file or selection(s) and the clipboard (the clipboard is considered the "new" file unless `reverse` is True) + +`file_diff_selections`: Shows the diff of the first and second selected regions. The file_diff_menu command checks for exactly two regions selected, otherwise it doesn't display this command. + +`file_diff_saved`: Shows the diff of the current file or selection(s) and the saved file. + +`file_diff_file`: Shows the diff of the current file or selection(s) and a file that is in the current project. + +`file_diff_tab`: Shows the diff of the current file or selection(s) and an open file (aka a file that has a tab). + +Help! +----- + +Check the [wiki][] for more tips + +[wiki]: https://github.com/colinta/SublimeFileDiffs/wiki diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/FileDiffs/Side Bar.sublime-menu b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/FileDiffs/Side Bar.sublime-menu new file mode 100644 index 0000000..3200757 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/FileDiffs/Side Bar.sublime-menu @@ -0,0 +1,6 @@ +[ + { "caption": "-" }, + { "caption": "FileDiffs Menu", "command": "file_diff_menu" }, + { "caption": "Diff with File in Project…", "command": "file_diff_file" }, + { "caption": "-" } +] diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/FileDiffs/Tab Context.sublime-menu b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/FileDiffs/Tab Context.sublime-menu new file mode 100644 index 0000000..2a7fc9e --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/FileDiffs/Tab Context.sublime-menu @@ -0,0 +1,6 @@ +[ + { "caption": "-" }, + { "caption": "FileDiffs Menu", "command": "file_diff_menu" }, + { "caption": "Diff with Tab…", "command": "file_diff_tab" }, + { "caption": "-" } +] diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/FileDiffs/file_diffs.py b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/FileDiffs/file_diffs.py new file mode 100644 index 0000000..16f79a8 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/FileDiffs/file_diffs.py @@ -0,0 +1,292 @@ +# coding: utf8 +import os +import re + +import sublime +import sublime_plugin +import difflib +import tempfile + +from fnmatch import fnmatch +import codecs + +SETTINGS = sublime.load_settings('FileDiffs.sublime-settings') + +CLIPBOARD = u'Diff file with Clipboard' +SELECTIONS = u'Diff Selections' +SAVED = u'Diff file with Saved' +FILE = u'Diff file with File in Project…' +TAB = u'Diff file with Open Tab…' + +FILE_DIFFS = [CLIPBOARD, SAVED, FILE, TAB] + + +class FileDiffMenuCommand(sublime_plugin.TextCommand): + def run(self, edit): + menu_items = FILE_DIFFS[:] + saved = SAVED + non_empty_regions = [region for region in self.view.sel() if not region.empty()] + if len(non_empty_regions) == 2: + menu_items.insert(1, SELECTIONS) + elif len(non_empty_regions): + menu_items = [f.replace(u'Diff file', u'Diff selection') for f in menu_items] + saved = saved.replace(u'Diff file', u'Diff selection') + + if not (self.view.file_name() and self.view.is_dirty()): + menu_items.remove(saved) + + def on_done(index): + restored_menu_items = [f.replace(u'Diff selection', u'Diff file') for f in menu_items] + if index == -1: + return + elif restored_menu_items[index] == CLIPBOARD: + self.view.run_command('file_diff_clipboard') + elif restored_menu_items[index] == SELECTIONS: + self.view.run_command('file_diff_selections') + elif restored_menu_items[index] == SAVED: + self.view.run_command('file_diff_saved') + elif restored_menu_items[index] == FILE: + self.view.run_command('file_diff_file') + elif restored_menu_items[index] == TAB: + self.view.run_command('file_diff_tab') + self.view.window().show_quick_panel(menu_items, on_done) + + +class FileDiffCommand(sublime_plugin.TextCommand): + def diff_content(self): + content = '' + + regions = [region for region in self.view.sel()] + for region in regions: + if region.empty(): + continue + content += self.view.substr(region) + + if not content: + content = self.view.substr(sublime.Region(0, self.view.size())) + return content + + def run_diff(self, a, b, from_file=None, to_file=None): + from_content = a + to_content = b + + if os.path.exists(a): + if from_file is None: + from_file = a + with codecs.open(from_file, mode='U', encoding='utf-8') as f: + from_content = f.readlines() + else: + from_content = a.splitlines(True) + if from_file is None: + from_file = 'from_file' + + if os.path.exists(b): + if to_file is None: + to_file = b + with codecs.open(to_file, mode='U', encoding='utf-8') as f: + to_content = f.readlines() + else: + to_content = b.splitlines(True) + if to_file is None: + to_file = 'to_file' + + diffs = list(difflib.unified_diff(from_content, to_content, from_file, to_file)) + + open_in_sublime = SETTINGS.get('open_in_sublime', True) + external_command = SETTINGS.get('cmd') + if not diffs: + sublime.status_message('No Difference') + else: + if external_command: + self.diff_with_external(a, b, from_file, to_file) + + if open_in_sublime: + self.diff_in_sublime(diffs) + + def diff_with_external(self, a, b, from_file=None, to_file=None): + try: + if not os.path.exists(from_file): + tmp_file = tempfile.NamedTemporaryFile(delete=False) + from_file = tmp_file.name + tmp_file.close() + + with codecs.open(from_file, encoding='utf-8', mode='w+') as tmp_file: + tmp_file.write(a) + + if not os.path.exists(to_file): + tmp_file = tempfile.NamedTemporaryFile(delete=False) + to_file = tmp_file.name + tmp_file.close() + + with codecs.open(to_file, encoding='utf-8', mode='w+') as tmp_file: + tmp_file.write(b) + + if os.path.exists(from_file): + command = SETTINGS.get('cmd') + if command is not None: + command = [c.replace(u'$file1', from_file) for c in command] + command = [c.replace(u'$file2', to_file) for c in command] + self.view.window().run_command("exec", {"cmd": command}) + except Exception as e: + # some basic logging here, since we are cluttering the /tmp folder + print repr(e) + sublime.status_message(str(e)) + + def diff_in_sublime(self, diffs): + scratch = self.view.window().new_file() + scratch.set_scratch(True) + scratch.set_syntax_file('Packages/Diff/Diff.tmLanguage') + scratch_edit = scratch.begin_edit('file_diffs') + scratch.insert(scratch_edit, 0, ''.join(diffs)) + scratch.end_edit(scratch_edit) + + +class FileDiffClipboardCommand(FileDiffCommand): + def run(self, edit, **kwargs): + current = sublime.get_clipboard() + self.run_diff(self.diff_content(), current, + from_file=self.view.file_name(), + to_file='(clipboard)') + + +class FileDiffSelectionsCommand(FileDiffCommand): + def run(self, edit, **kwargs): + regions = self.view.sel() + current = self.view.substr(regions[0]) + diff = self.view.substr(regions[1]) + + # trim off indent + indent = None + for line in current.splitlines(): + new_indent = re.match('[ \t]*', line).group(0) + if new_indent == '': + continue + + if indent is None: + indent = new_indent + elif len(new_indent) < len(indent): + indent = new_indent + + if not indent: + break + + if indent: + current = u"\n".join(line[len(indent):] for line in current.splitlines()) + + # trim off indent + indent = None + for line in diff.splitlines(): + new_indent = re.match('[ \t]*', line).group(0) + if new_indent == '': + continue + + if indent is None: + indent = new_indent + elif len(new_indent) < len(indent): + indent = new_indent + + if indent: + diff = u"\n".join(line[len(indent):] for line in diff.splitlines()) + + self.run_diff(current, diff, + from_file='first selection', + to_file='second selection') + + +class FileDiffSavedCommand(FileDiffCommand): + def run(self, edit, **kwargs): + content = '' + regions = [region for region in self.view.sel()] + for region in regions: + if region.empty(): + continue + content += self.view.substr(region) + if not content: + content = self.view.substr(sublime.Region(0, self.view.size())) + + self.run_diff(self.view.file_name(), content, + from_file=self.view.file_name(), + to_file=self.view.file_name() + u' (Unsaved)') + + +class FileDiffFileCommand(FileDiffCommand): + def run(self, edit, **kwargs): + common = None + folders = self.view.window().folders() + files = self.find_files(folders) + for folder in folders: + if common == None: + common = folder + else: + common_len = len(common) + while folder[0:common_len] != common[0:common_len]: + common_len -= 1 + common = common[0:common_len] + + my_file = self.view.file_name() + # filter out my_file + files = [file for file in files if file != my_file] + # shorten names using common length + file_picker = [file[len(common):] for file in files] + + def on_done(index): + if index > -1: + self.run_diff(self.diff_content(), files[index], + from_file=self.view.file_name()) + self.view.window().show_quick_panel(file_picker, on_done) + + def find_files(self, folders): + # Cannot access these settings!! WHY!? + # folder_exclude_patterns = self.view.settings().get('folder_exclude_patterns') + # file_exclude_patterns = self.view.settings().get('file_exclude_patterns') + folder_exclude_patterns = [".svn", ".git", ".hg", "CVS"] + file_exclude_patterns = ["*.pyc", "*.pyo", "*.exe", "*.dll", "*.obj", "*.o", "*.a", "*.lib", "*.so", "*.dylib", "*.ncb", "*.sdf", "*.suo", "*.pdb", "*.idb", ".DS_Store", "*.class", "*.psd", "*.db"] + + ret = [] + for folder in folders: + if not os.path.isdir(folder): + continue + + for file in os.listdir(folder): + fullpath = os.path.join(folder, file) + if os.path.isdir(fullpath): + # excluded folder? + if not len([True for pattern in folder_exclude_patterns if fnmatch(file, pattern)]): + ret += self.find_files([fullpath]) + else: + # excluded file? + if not len([True for pattern in file_exclude_patterns if fnmatch(file, pattern)]): + ret.append(fullpath) + return ret + + +class FileDiffTabCommand(FileDiffCommand): + def run(self, edit, **kwargs): + my_id = self.view.id() + files = [] + contents = [] + untitled_count = 1 + for v in self.view.window().views(): + if v.id() != my_id: + this_content = v.substr(sublime.Region(0, v.size())) + if v.file_name(): + files.append(v.file_name()) + elif v.name(): + files.append(v.name()) + else: + files.append('untitled %d' % untitled_count) + untitled_count += 1 + + contents.append(this_content) + + def on_done(index): + if index > -1: + self.run_diff(self.diff_content(), contents[index], + from_file=self.view.file_name(), + to_file=files[index]) + + if len(files) == 1: + on_done(0) + else: + menu_items = [os.path.basename(f) for f in files] + self.view.window().show_quick_panel(menu_items, on_done) diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/FileDiffs/package-metadata.json b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/FileDiffs/package-metadata.json new file mode 100644 index 0000000..7710cac --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/FileDiffs/package-metadata.json @@ -0,0 +1 @@ +{"url": "https://github.com/spape/SublimeFileDiffs", "version": "1.5.0", "description": "Shows diffs - also in an external diff tool - between the current file, or selection(s) in the current file, and clipboard, another file, or unsaved changes."} \ No newline at end of file diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/FileDiffs/package.json b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/FileDiffs/package.json new file mode 100644 index 0000000..d78b90a --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/FileDiffs/package.json @@ -0,0 +1,7 @@ +{ + "repo": "SublimeFileDiffs", + "name": "FileDiffs", + "description": "Shows diffs - also in an external diff tool - between the current file, or selection(s) in the current file, and clipboard, another file, or unsaved changes.", + "author": "Colin Thomas-Arnold (colinta), Sebastian Pape (spape), Jiri Urban (jiriurban)", + "homepage": "https://github.com/spape/SublimeFileDiffs" +} \ No newline at end of file diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/LiveReload/LiveReload.sublime-settings b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/LiveReload/LiveReload.sublime-settings new file mode 100644 index 0000000..8dc3ca9 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/LiveReload/LiveReload.sublime-settings @@ -0,0 +1,8 @@ +{ + "version" : "1.6" + , "port" : 35729 + , "delay_ms" : 100 + , "apply_js_live" : false + , "apply_css_live" : true + , "apply_images_live" : true +} diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/LiveReload/Main.sublime-menu b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/LiveReload/Main.sublime-menu new file mode 100644 index 0000000..8622061 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/LiveReload/Main.sublime-menu @@ -0,0 +1,39 @@ +[ + { + "caption": "Preferences", + "mnemonic": "n", + "id": "preferences", + "children": + [ + { + "caption": "Package Settings", + "mnemonic": "P", + "id": "package-settings", + "children": + [ + { + "caption": "LiveReload", + "children": + [ + { + "command": "open_file", "args": + { + "file": "${packages}/LiveReload/LiveReload.sublime-settings" + }, + "caption": "Settings – Default" + }, + { + "command": "open_file", "args": + { + "file": "${packages}/User/LiveReload.sublime-settings" + }, + "caption": "Settings – User" + }, + { "caption": "-" } + ] + } + ] + } + ] + } +] \ No newline at end of file diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/LiveReload/README.md b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/LiveReload/README.md new file mode 100644 index 0000000..bf14a91 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/LiveReload/README.md @@ -0,0 +1,62 @@ +LiveReload for Sublime Text 2 +========= + +A web browser page reloading plugin for the [Sublime Text 2](http://sublimetext.com "Sublime Text 2") editor. + +Installing +----- + +Install with [Sublime Package Control](http://wbond.net/sublime_packages/package_control "Sublime Package Control"), search for LiveReload and install. + +Devel branch +----- +Have a look at [devel version](https://github.com/dz0ny/LiveReload-sublimetext2/tree/devel). Which is total rewrite of plugin, supporting SublimeText 3, plugins and much more. + +Browser extensions +----- +You can use both major LiveReload versions. For old one you can find instructions bellow, for new ones please visit [New browser extensions](http://help.livereload.com/kb/general-use/browser-extensions "New browser extensions") or try [self loading version](http://help.livereload.com/kb/general-use/using-livereload-without-browser-extensions "self loading version"). + + +### [Google Chrome extension](https://chrome.google.com/extensions/detail/jnihajbhpnppcggbcgedagnkighmdlei) + +![](https://github.com/mockko/livereload/raw/master/docs/images/chrome-install-prompt.png) + +Click “Install”. Actually, LiveReload does not access your browser history. The warning is misleading. + +![](https://github.com/mockko/livereload/raw/master/docs/images/chrome-button.png) + +If you want to use it with local files, be sure to enable “Allow access to file URLs” checkbox in Tools > Extensions > LiveReload after installation. + +### Safari extension + +For now it only works with self loading version: + + + + +### [Firefox 4 extension](http://feedback.livereload.com/knowledgebase/articles/86242-how-do-i-install-and-use-the-browser-extensions-) + +![](http://static-cdn.addons.mozilla.net/img/uploads/previews/full/63/63478.png?modified=1317506904) + + +## Usage + +Now, if you are using Safari, right-click the page you want to be livereload'ed and choose “Enable LiveReload”: + +![](https://github.com/mockko/livereload/raw/master/docs/images/safari-context-menu.png) + +If you are using Chrome, just click the toolbar button (it will turn green to indicate that LiveReload is active). + +---- + +You can also use the Preferences menu to change port, version and type of reloading(full, js,css). + +## Compass + +![](http://cdn.nmecdesign.com/wp/wp-content/uploads/2011/12/Compass-Logo.png) + +Want to use Livereload with compass ? Now you can ! + +.scss and .css have to be in the same directory , if no config.rb file is found one will automatically generated ! + +So if you want to start using compass, install compass gem, edit a xxx.scss file and voila ! A .css file would be automatically generated. diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/LiveReload/assets/config.rb b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/LiveReload/assets/config.rb new file mode 100644 index 0000000..10577cd --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/LiveReload/assets/config.rb @@ -0,0 +1,8 @@ +http_path = "/" +css_dir = "." +sass_dir = "." +images_dir = "img" +javascripts_dir = "js" +output_style = :compressed +relative_assets=true +line_comments = false \ No newline at end of file diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/LiveReload/livereload.js b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/LiveReload/livereload.js new file mode 100644 index 0000000..3a14a06 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/LiveReload/livereload.js @@ -0,0 +1,942 @@ +(function() { +var __customevents = {}, __protocol = {}, __connector = {}, __timer = {}, __options = {}, __reloader = {}, __livereload = {}, __less = {}, __startup = {}; + +// customevents +var CustomEvents; +CustomEvents = { + bind: function(element, eventName, handler) { + if (element.addEventListener) { + return element.addEventListener(eventName, handler, false); + } else if (element.attachEvent) { + element[eventName] = 1; + return element.attachEvent('onpropertychange', function(event) { + if (event.propertyName === eventName) { + return handler(); + } + }); + } else { + throw new Error("Attempt to attach custom event " + eventName + " to something which isn't a DOMElement"); + } + }, + fire: function(element, eventName) { + var event; + if (element.addEventListener) { + event = document.createEvent('HTMLEvents'); + event.initEvent(eventName, true, true); + return document.dispatchEvent(event); + } else if (element.attachEvent) { + if (element[eventName]) { + return element[eventName]++; + } + } else { + throw new Error("Attempt to fire custom event " + eventName + " on something which isn't a DOMElement"); + } + } +}; +__customevents.bind = CustomEvents.bind; +__customevents.fire = CustomEvents.fire; + +// protocol +var PROTOCOL_6, PROTOCOL_7, Parser, ProtocolError; +var __indexOf = Array.prototype.indexOf || function(item) { + for (var i = 0, l = this.length; i < l; i++) { + if (this[i] === item) return i; + } + return -1; +}; +__protocol.PROTOCOL_6 = PROTOCOL_6 = 'http://livereload.com/protocols/official-6'; +__protocol.PROTOCOL_7 = PROTOCOL_7 = 'http://livereload.com/protocols/official-7'; +__protocol.ProtocolError = ProtocolError = (function() { + function ProtocolError(reason, data) { + this.message = "LiveReload protocol error (" + reason + ") after receiving data: \"" + data + "\"."; + } + return ProtocolError; +})(); +__protocol.Parser = Parser = (function() { + function Parser(handlers) { + this.handlers = handlers; + this.reset(); + } + Parser.prototype.reset = function() { + return this.protocol = null; + }; + Parser.prototype.process = function(data) { + var command, message, options, _ref; + try { + if (!(this.protocol != null)) { + if (data.match(/^!!ver:([\d.]+)$/)) { + this.protocol = 6; + } else if (message = this._parseMessage(data, ['hello'])) { + if (!message.protocols.length) { + throw new ProtocolError("no protocols specified in handshake message"); + } else if (__indexOf.call(message.protocols, PROTOCOL_7) >= 0) { + this.protocol = 7; + } else if (__indexOf.call(message.protocols, PROTOCOL_6) >= 0) { + this.protocol = 6; + } else { + throw new ProtocolError("no supported protocols found"); + } + } + return this.handlers.connected(this.protocol); + } else if (this.protocol === 6) { + message = JSON.parse(data); + if (!message.length) { + throw new ProtocolError("protocol 6 messages must be arrays"); + } + command = message[0], options = message[1]; + if (command !== 'refresh') { + throw new ProtocolError("unknown protocol 6 command"); + } + return this.handlers.message({ + command: 'reload', + path: options.path, + liveCSS: (_ref = options.apply_css_live) != null ? _ref : true + }); + } else { + message = this._parseMessage(data, ['reload', 'alert']); + return this.handlers.message(message); + } + } catch (e) { + if (e instanceof ProtocolError) { + return this.handlers.error(e); + } else { + throw e; + } + } + }; + Parser.prototype._parseMessage = function(data, validCommands) { + var message, _ref; + try { + message = JSON.parse(data); + } catch (e) { + throw new ProtocolError('unparsable JSON', data); + } + if (!message.command) { + throw new ProtocolError('missing "command" key', data); + } + if (_ref = message.command, __indexOf.call(validCommands, _ref) < 0) { + throw new ProtocolError("invalid command '" + message.command + "', only valid commands are: " + (validCommands.join(', ')) + ")", data); + } + return message; + }; + return Parser; +})(); + +// connector +var Connector, PROTOCOL_6, PROTOCOL_7, Parser, Version, _ref; + +_ref = __protocol, Parser = _ref.Parser, PROTOCOL_6 = _ref.PROTOCOL_6, PROTOCOL_7 = _ref.PROTOCOL_7; + +Version = '2.0.7'; + +__connector.Connector = Connector = (function() { + + function Connector(options, WebSocket, Timer, handlers) { + var _this = this; + this.options = options; + this.WebSocket = WebSocket; + this.Timer = Timer; + this.handlers = handlers; + this._uri = "ws://" + this.options.host + ":" + this.options.port + "/livereload"; + this._nextDelay = this.options.mindelay; + this._connectionDesired = false; + this.protocol = 0; + this.protocolParser = new Parser({ + connected: function(protocol) { + _this.protocol = protocol; + _this._handshakeTimeout.stop(); + _this._nextDelay = _this.options.mindelay; + _this._disconnectionReason = 'broken'; + return _this.handlers.connected(protocol); + }, + error: function(e) { + _this.handlers.error(e); + return _this._closeOnError(); + }, + message: function(message) { + return _this.handlers.message(message); + } + }); + this._handshakeTimeout = new Timer(function() { + if (!_this._isSocketConnected()) return; + _this._disconnectionReason = 'handshake-timeout'; + return _this.socket.close(); + }); + this._reconnectTimer = new Timer(function() { + if (!_this._connectionDesired) return; + return _this.connect(); + }); + this.connect(); + } + + Connector.prototype._isSocketConnected = function() { + return this.socket && this.socket.readyState === this.WebSocket.OPEN; + }; + + Connector.prototype.connect = function() { + var _this = this; + this._connectionDesired = true; + if (this._isSocketConnected()) return; + this._reconnectTimer.stop(); + this._disconnectionReason = 'cannot-connect'; + this.protocolParser.reset(); + this.handlers.connecting(); + this.socket = new this.WebSocket(this._uri); + this.socket.onopen = function(e) { + return _this._onopen(e); + }; + this.socket.onclose = function(e) { + return _this._onclose(e); + }; + this.socket.onmessage = function(e) { + return _this._onmessage(e); + }; + return this.socket.onerror = function(e) { + return _this._onerror(e); + }; + }; + + Connector.prototype.disconnect = function() { + this._connectionDesired = false; + this._reconnectTimer.stop(); + if (!this._isSocketConnected()) return; + this._disconnectionReason = 'manual'; + return this.socket.close(); + }; + + Connector.prototype._scheduleReconnection = function() { + if (!this._connectionDesired) return; + if (!this._reconnectTimer.running) { + this._reconnectTimer.start(this._nextDelay); + return this._nextDelay = Math.min(this.options.maxdelay, this._nextDelay * 2); + } + }; + + Connector.prototype.sendCommand = function(command) { + if (this.protocol == null) return; + return this._sendCommand(command); + }; + + Connector.prototype._sendCommand = function(command) { + return this.socket.send(JSON.stringify(command)); + }; + + Connector.prototype._closeOnError = function() { + this._handshakeTimeout.stop(); + this._disconnectionReason = 'error'; + return this.socket.close(); + }; + + Connector.prototype._onopen = function(e) { + var hello; + this.handlers.socketConnected(); + this._disconnectionReason = 'handshake-failed'; + hello = { + command: 'hello', + protocols: [PROTOCOL_6, PROTOCOL_7] + }; + hello.ver = Version; + if (this.options.ext) hello.ext = this.options.ext; + if (this.options.extver) hello.extver = this.options.extver; + if (this.options.snipver) hello.snipver = this.options.snipver; + this._sendCommand(hello); + return this._handshakeTimeout.start(this.options.handshake_timeout); + }; + + Connector.prototype._onclose = function(e) { + this.protocol = 0; + this.handlers.disconnected(this._disconnectionReason, this._nextDelay); + return this._scheduleReconnection(); + }; + + Connector.prototype._onerror = function(e) {}; + + Connector.prototype._onmessage = function(e) { + return this.protocolParser.process(e.data); + }; + + return Connector; + +})(); + +// timer +var Timer; +var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; +__timer.Timer = Timer = (function() { + function Timer(func) { + this.func = func; + this.running = false; + this.id = null; + this._handler = __bind(function() { + this.running = false; + this.id = null; + return this.func(); + }, this); + } + Timer.prototype.start = function(timeout) { + if (this.running) { + clearTimeout(this.id); + } + this.id = setTimeout(this._handler, timeout); + return this.running = true; + }; + Timer.prototype.stop = function() { + if (this.running) { + clearTimeout(this.id); + this.running = false; + return this.id = null; + } + }; + return Timer; +})(); +Timer.start = function(timeout, func) { + return setTimeout(func, timeout); +}; + +// options +var Options; +__options.Options = Options = (function() { + function Options() { + this.host = null; + this.port = 35729; + this.snipver = null; + this.ext = null; + this.extver = null; + this.mindelay = 1000; + this.maxdelay = 60000; + this.handshake_timeout = 5000; + } + Options.prototype.set = function(name, value) { + switch (typeof this[name]) { + case 'undefined': + break; + case 'number': + return this[name] = +value; + default: + return this[name] = value; + } + }; + return Options; +})(); +Options.extract = function(document) { + var element, keyAndValue, m, mm, options, pair, src, _i, _j, _len, _len2, _ref, _ref2; + _ref = document.getElementsByTagName('script'); + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + element = _ref[_i]; + if ((src = element.src) && (m = src.match(/^[^:]+:\/\/(.*)\/z?livereload\.js(?:\?(.*))?$/))) { + options = new Options(); + if (mm = m[1].match(/^([^\/:]+)(?::(\d+))?$/)) { + options.host = mm[1]; + if (mm[2]) { + options.port = parseInt(mm[2], 10); + } + } + if (m[2]) { + _ref2 = m[2].split('&'); + for (_j = 0, _len2 = _ref2.length; _j < _len2; _j++) { + pair = _ref2[_j]; + if ((keyAndValue = pair.split('=')).length > 1) { + options.set(keyAndValue[0].replace(/-/g, '_'), keyAndValue.slice(1).join('=')); + } + } + } + return options; + } + } + return null; +}; + +// reloader +var IMAGE_STYLES, Reloader, numberOfMatchingSegments, pathFromUrl, pathsMatch, pickBestMatch, splitUrl; + +splitUrl = function(url) { + var hash, index, params; + if ((index = url.indexOf('#')) >= 0) { + hash = url.slice(index); + url = url.slice(0, index); + } else { + hash = ''; + } + if ((index = url.indexOf('?')) >= 0) { + params = url.slice(index); + url = url.slice(0, index); + } else { + params = ''; + } + return { + url: url, + params: params, + hash: hash + }; +}; + +pathFromUrl = function(url) { + var path; + url = splitUrl(url).url; + if (url.indexOf('file://') === 0) { + path = url.replace(/^file:\/\/(localhost)?/, ''); + } else { + path = url.replace(/^([^:]+:)?\/\/([^:\/]+)(:\d*)?\//, '/'); + } + return decodeURIComponent(path); +}; + +pickBestMatch = function(path, objects, pathFunc) { + var bestMatch, object, score, _i, _len; + bestMatch = { + score: 0 + }; + for (_i = 0, _len = objects.length; _i < _len; _i++) { + object = objects[_i]; + score = numberOfMatchingSegments(path, pathFunc(object)); + if (score > bestMatch.score) { + bestMatch = { + object: object, + score: score + }; + } + } + if (bestMatch.score > 0) { + return bestMatch; + } else { + return null; + } +}; + +numberOfMatchingSegments = function(path1, path2) { + var comps1, comps2, eqCount, len; + path1 = path1.replace(/^\/+/, '').toLowerCase(); + path2 = path2.replace(/^\/+/, '').toLowerCase(); + if (path1 === path2) return 10000; + comps1 = path1.split('/').reverse(); + comps2 = path2.split('/').reverse(); + len = Math.min(comps1.length, comps2.length); + eqCount = 0; + while (eqCount < len && comps1[eqCount] === comps2[eqCount]) { + ++eqCount; + } + return eqCount; +}; + +pathsMatch = function(path1, path2) { + return numberOfMatchingSegments(path1, path2) > 0; +}; + +IMAGE_STYLES = [ + { + selector: 'background', + styleNames: ['backgroundImage'] + }, { + selector: 'border', + styleNames: ['borderImage', 'webkitBorderImage', 'MozBorderImage'] + } +]; + +__reloader.Reloader = Reloader = (function() { + + function Reloader(window, console, Timer) { + this.window = window; + this.console = console; + this.Timer = Timer; + this.document = this.window.document; + this.stylesheetGracePeriod = 200; + this.importCacheWaitPeriod = 200; + this.plugins = []; + } + + Reloader.prototype.addPlugin = function(plugin) { + return this.plugins.push(plugin); + }; + + Reloader.prototype.analyze = function(callback) { + return results; + }; + + Reloader.prototype.reload = function(path, options) { + var plugin, _i, _len, _ref; + this.options = options; + _ref = this.plugins; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + plugin = _ref[_i]; + if (plugin.reload && plugin.reload(path, options)) return; + } + if (options.liveCSS) { + if (path.match(/\.css$/i)) if (this.reloadStylesheet(path)) return; + } + if (options.liveImg) { + if (path.match(/\.(jpe?g|png|gif)$/i)) { + this.reloadImages(path); + return; + } + } + return this.reloadPage(); + }; + + Reloader.prototype.reloadPage = function() { + return this.window.document.location.reload(); + }; + + Reloader.prototype.reloadImages = function(path) { + var expando, img, selector, styleNames, styleSheet, _i, _j, _k, _l, _len, _len2, _len3, _len4, _ref, _ref2, _ref3, _ref4, _results; + expando = this.generateUniqueString(); + _ref = this.document.images; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + img = _ref[_i]; + if (pathsMatch(path, pathFromUrl(img.src))) { + img.src = this.generateCacheBustUrl(img.src, expando); + } + } + if (this.document.querySelectorAll) { + for (_j = 0, _len2 = IMAGE_STYLES.length; _j < _len2; _j++) { + _ref2 = IMAGE_STYLES[_j], selector = _ref2.selector, styleNames = _ref2.styleNames; + _ref3 = this.document.querySelectorAll("[style*=" + selector + "]"); + for (_k = 0, _len3 = _ref3.length; _k < _len3; _k++) { + img = _ref3[_k]; + this.reloadStyleImages(img.style, styleNames, path, expando); + } + } + } + if (this.document.styleSheets) { + _ref4 = this.document.styleSheets; + _results = []; + for (_l = 0, _len4 = _ref4.length; _l < _len4; _l++) { + styleSheet = _ref4[_l]; + _results.push(this.reloadStylesheetImages(styleSheet, path, expando)); + } + return _results; + } + }; + + Reloader.prototype.reloadStylesheetImages = function(styleSheet, path, expando) { + var rule, rules, styleNames, _i, _j, _len, _len2; + try { + rules = styleSheet != null ? styleSheet.cssRules : void 0; + } catch (e) { + + } + if (!rules) return; + for (_i = 0, _len = rules.length; _i < _len; _i++) { + rule = rules[_i]; + switch (rule.type) { + case CSSRule.IMPORT_RULE: + this.reloadStylesheetImages(rule.styleSheet, path, expando); + break; + case CSSRule.STYLE_RULE: + for (_j = 0, _len2 = IMAGE_STYLES.length; _j < _len2; _j++) { + styleNames = IMAGE_STYLES[_j].styleNames; + this.reloadStyleImages(rule.style, styleNames, path, expando); + } + break; + case CSSRule.MEDIA_RULE: + this.reloadStylesheetImages(rule, path, expando); + } + } + }; + + Reloader.prototype.reloadStyleImages = function(style, styleNames, path, expando) { + var newValue, styleName, value, _i, _len; + var _this = this; + for (_i = 0, _len = styleNames.length; _i < _len; _i++) { + styleName = styleNames[_i]; + value = style[styleName]; + if (typeof value === 'string') { + newValue = value.replace(/\burl\s*\(([^)]*)\)/, function(match, src) { + if (pathsMatch(path, pathFromUrl(src))) { + return "url(" + (_this.generateCacheBustUrl(src, expando)) + ")"; + } else { + return match; + } + }); + if (newValue !== value) style[styleName] = newValue; + } + } + }; + + Reloader.prototype.reloadStylesheet = function(path) { + var imported, link, links, match, style, _i, _j, _k, _len, _len2, _len3, _ref; + links = (function() { + var _i, _len, _ref, _results; + _ref = this.document.getElementsByTagName('link'); + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + link = _ref[_i]; + if (link.rel === 'stylesheet' && !link.__LiveReload_pendingRemoval) { + _results.push(link); + } + } + return _results; + }).call(this); + imported = []; + _ref = this.document.getElementsByTagName('style'); + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + style = _ref[_i]; + if (style.sheet) { + this.collectImportedStylesheets(style, style.sheet, imported); + } + } + for (_j = 0, _len2 = links.length; _j < _len2; _j++) { + link = links[_j]; + this.collectImportedStylesheets(link, link.sheet, imported); + } + this.console.log("LiveReload found " + links.length + " LINKed stylesheets, " + imported.length + " @imported stylesheets"); + match = pickBestMatch(path, links.concat(imported), function(l) { + return pathFromUrl(l.href); + }); + if (match) { + if (match.object.rule) { + this.console.log("LiveReload is reloading imported stylesheet: " + match.object.href); + this.reattachImportedRule(match.object); + } else { + this.console.log("LiveReload is reloading stylesheet: " + match.object.href); + this.reattachStylesheetLink(match.object); + } + } else { + this.console.log("LiveReload will reload all stylesheets because path '" + path + "' did not match any specific one"); + for (_k = 0, _len3 = links.length; _k < _len3; _k++) { + link = links[_k]; + this.reattachStylesheetLink(link); + } + } + return true; + }; + + Reloader.prototype.collectImportedStylesheets = function(link, styleSheet, result) { + var index, rule, rules, _len; + try { + rules = styleSheet != null ? styleSheet.cssRules : void 0; + } catch (e) { + + } + if (rules && rules.length) { + for (index = 0, _len = rules.length; index < _len; index++) { + rule = rules[index]; + switch (rule.type) { + case CSSRule.CHARSET_RULE: + continue; + case CSSRule.IMPORT_RULE: + result.push({ + link: link, + rule: rule, + index: index, + href: rule.href + }); + this.collectImportedStylesheets(link, rule.styleSheet, result); + break; + default: + break; + } + } + } + }; + + Reloader.prototype.reattachStylesheetLink = function(link) { + var clone, parent, timer; + if (link.__LiveReload_pendingRemoval) return; + link.__LiveReload_pendingRemoval = true; + clone = link.cloneNode(false); + clone.href = this.generateCacheBustUrl(link.href); + parent = link.parentNode; + if (parent.lastChild === link) { + parent.appendChild(clone); + } else { + parent.insertBefore(clone, link.nextSibling); + } + timer = new this.Timer(function() { + if (link.parentNode) return link.parentNode.removeChild(link); + }); + return timer.start(this.stylesheetGracePeriod); + }; + + Reloader.prototype.reattachImportedRule = function(_arg) { + var href, index, link, media, newRule, parent, rule, tempLink; + var _this = this; + rule = _arg.rule, index = _arg.index, link = _arg.link; + parent = rule.parentStyleSheet; + href = this.generateCacheBustUrl(rule.href); + media = rule.media.length ? [].join.call(rule.media, ', ') : ''; + newRule = "@import url(\"" + href + "\") " + media + ";"; + rule.__LiveReload_newHref = href; + tempLink = this.document.createElement("link"); + tempLink.rel = 'stylesheet'; + tempLink.href = href; + tempLink.__LiveReload_pendingRemoval = true; + if (link.parentNode) link.parentNode.insertBefore(tempLink, link); + return this.Timer.start(this.importCacheWaitPeriod, function() { + if (tempLink.parentNode) tempLink.parentNode.removeChild(tempLink); + if (rule.__LiveReload_newHref !== href) return; + parent.insertRule(newRule, index); + parent.deleteRule(index + 1); + rule = parent.cssRules[index]; + rule.__LiveReload_newHref = href; + return _this.Timer.start(_this.importCacheWaitPeriod, function() { + if (rule.__LiveReload_newHref !== href) return; + parent.insertRule(newRule, index); + return parent.deleteRule(index + 1); + }); + }); + }; + + Reloader.prototype.generateUniqueString = function() { + return 'livereload=' + Date.now(); + }; + + Reloader.prototype.generateCacheBustUrl = function(url, expando) { + var hash, oldParams, params, _ref; + if (expando == null) expando = this.generateUniqueString(); + _ref = splitUrl(url), url = _ref.url, hash = _ref.hash, oldParams = _ref.params; + if (this.options.overrideURL) { + if (url.indexOf(this.options.serverURL) < 0) { + url = this.options.serverURL + this.options.overrideURL + "?url=" + encodeURIComponent(url); + } + } + params = oldParams.replace(/(\?|&)livereload=(\d+)/, function(match, sep) { + return "" + sep + expando; + }); + if (params === oldParams) { + if (oldParams.length === 0) { + params = "?" + expando; + } else { + params = "" + oldParams + "&" + expando; + } + } + return url + params + hash; + }; + + return Reloader; + +})(); + +// livereload +var Connector, LiveReload, Options, Reloader, Timer; + +Connector = __connector.Connector; + +Timer = __timer.Timer; + +Options = __options.Options; + +Reloader = __reloader.Reloader; + +__livereload.LiveReload = LiveReload = (function() { + + function LiveReload(window) { + var _this = this; + this.window = window; + this.listeners = {}; + this.plugins = []; + this.pluginIdentifiers = {}; + this.console = this.window.location.href.match(/LR-verbose/) && this.window.console && this.window.console.log && this.window.console.error ? this.window.console : { + log: function() {}, + error: function() {} + }; + if (!(this.WebSocket = this.window.WebSocket || this.window.MozWebSocket)) { + console.error("LiveReload disabled because the browser does not seem to support web sockets"); + return; + } + if (!(this.options = Options.extract(this.window.document))) { + console.error("LiveReload disabled because it could not find its own ' + # update output html file + tmp_fullpath = getTempMarkdownPreviewPath(self.view) + tmp_html = open(tmp_fullpath, 'w') + tmp_html.write(full_html.encode(encoding)) + tmp_html.close() + # now opens in browser if needed + if target == 'browser': + config_browser = settings.get('browser') + if config_browser and config_browser != 'default': + cmd = '"%s" %s' % (config_browser, tmp_fullpath) + if sys.platform == 'darwin': + cmd = "open -a %s" % cmd + elif sys.platform == 'linux2': + cmd += ' &' + result = os.system(cmd) + if result != 0: + sublime.error_message('cannot execute "%s" Please check your Markdown Preview settings' % config_browser) + else: + sublime.status_message('Markdown preview launched in %s' % config_browser) + else: + desktop.open(tmp_fullpath) + sublime.status_message('Markdown preview launched in default html viewer') + elif target == 'sublime': + # create a new buffer and paste the output HTML + new_view = self.view.window().new_file() + new_view.set_scratch(True) + new_edit = new_view.begin_edit() + new_view.insert(new_edit, 0, markdown_html) + new_view.end_edit(new_edit) + sublime.status_message('Markdown preview launched in sublime') + elif target == 'clipboard': + # clipboard copy the full HTML + sublime.set_clipboard(full_html) + sublime.status_message('Markdown export copied to clipboard') diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Markdown Preview/MarkdownPreview.sublime-settings b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Markdown Preview/MarkdownPreview.sublime-settings new file mode 100644 index 0000000..f815f52 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Markdown Preview/MarkdownPreview.sublime-settings @@ -0,0 +1,60 @@ +/* + Markdown Preview default settings +*/ +{ + /* + Sets the default opener for html files + + default - Use the system default HTML viewer + other - Set a full path to any executable. ex: /Applications/Google Chrome Canary.app or /Applications/Firefox.app + */ + "browser": "default", + + /* + Sets the default parser for converting markdown to html. + Warning for github API : if you have a ST2 linux build, Python is not built with SSL o it may not work + + default - Use the builtin python-markdown2 parser + github - User github API to convert markdown, so you can use GitHub flavored Markdown, see http://github.github.com/github-flavored-markdown/ + */ + "parser": "default", + + /* + Default mode for the github Markdon parser : markdown (documents) or gfm (comments) + see http://developer.github.com/v3/markdown/#render-an-arbitrary-markdown-document + */ + "github_mode": "markdown", + + /* + Uses an OAuth token to when parsing markdown with GitHub API. To create one for Markdown Preview, see https://help.github.com/articles/creating-an-oauth-token-for-command-line-use. + */ + // "github_oauth_token": "secret" + + /* + Sets the default css file to embed in the HTML + + default - Use the builtin CSS or github CSS, depending on parser config (markdown.css or github.css) + other - Set an absolute path or url to any css file + */ + "css": "default", + + /* + Allow CSS overrides + + true - Any file with matching a .markdown_filetype extension with .css will be loaded as an override + false - Matching files ignored + */ + "allow_css_overrides": true, + + /* + Sets the supported filetypes for auto-reload on save + */ + "markdown_filetypes": [".md", ".markdown", ".mdown"], + + /* + Strips the YAML front matter header and converts title to a heading + */ + "strip_yaml_front_matter": false +} + + diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Markdown Preview/README.md b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Markdown Preview/README.md new file mode 100644 index 0000000..94c3e54 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Markdown Preview/README.md @@ -0,0 +1,52 @@ +Sublime Text 2 MarkDown preview +=============================== + +A simple ST2 plugin to help you preview your markdown files quickly in you web browser. + +You can use builtin [python-markdown2][0] parser (default) or use the [github markdown API][5] for the conversion (edit your settings to select it). + +**NOTE:** If you choose the GitHub API for conversion (set parser: github in your settings), your code will be sent through https to github for live conversion. You'll have [Github flavored markdown][6], syntax highlighting and EMOJI support for free :heart: :octocat: :gift:. If you make more than 60 calls a day, be sure to set your GitHub API key in the settings :) + +**LINUX users:** If you want to use GitHub API for conversion, you'll need to have a custom Python install that includes python-ssl as its not built in the Sublime Text 2 Linux package. see [@dusteye comment][8]. If you use a custom window manager, also be sure to set a `BROWSER` environnement variable. see [@PPvG comments][9] + +## Features : + + - Markdown conversion via builtin Markdown Parser ([python-markdown2][0]) or via Github API : just choose in your settings. + - Browser preview auto reload on save if you have the [ST2 LiveReload plugin][7] installed. + - Builtin parser : Support TOC, footnotes markdown extensions + - CSS overriding if you need + - YAML support thanks to @tommi + - Clipboard selection and copy to clipboard thanks to @hexatrope + +## Installation : + + - you should use [sublime package manager][3] + - use `cmd+shift+P` then `Package Control: Install Package` + - look for `Markdown Preview` and install it. + +## Usage : + + - optionnaly select some of your markdown for conversion + - use `cmd+shift+P` then `Markdown Preview` to launch a preview + - or bind some key in your user key binding, using a line like this one: + `{ "keys": ["alt+m"], "command": "markdown_preview", "args": {"target": "browser"} },` + - once converted a first time, the output HTML will be updated on each file save (with LiveReload plugin) + +## Uses : + + - [python-markdown2][0] for markdown parsing **OR** the GitHub markdown API. + + +## Licence : + +The code is available at github [https://github.com/revolunet/sublimetext-markdown-preview][2] under MIT licence : [http://revolunet.mit-license.org][4] + + [0]: https://github.com/trentm/python-markdown2 + [2]: https://github.com/revolunet/sublimetext-markdown-preview + [3]: http://wbond.net/sublime_packages/package_control + [4]: http://revolunet.mit-license.org + [5]: http://developer.github.com/v3/markdown + [6]: http://github.github.com/github-flavored-markdown/ + [7]: https://github.com/dz0ny/LiveReload-sublimetext2 + [8]: https://github.com/revolunet/sublimetext-markdown-preview/issues/27#issuecomment-11772098 + [9]: https://github.com/revolunet/sublimetext-markdown-preview/issues/78#issuecomment-15644727 diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Markdown Preview/desktop/__init__.py b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Markdown Preview/desktop/__init__.py new file mode 100644 index 0000000..d87486f --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Markdown Preview/desktop/__init__.py @@ -0,0 +1,290 @@ +#!/usr/bin/env python + +""" +Simple desktop integration for Python. This module provides desktop environment +detection and resource opening support for a selection of common and +standardised desktop environments. + +Copyright (C) 2005, 2006, 2007, 2008, 2009 Paul Boddie + +This program is free software; you can redistribute it and/or modify it under +the terms of the GNU Lesser General Public License as published by the Free +Software Foundation; either version 3 of the License, or (at your option) any +later version. + +This program is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more +details. + +You should have received a copy of the GNU Lesser General Public License along +with this program. If not, see . + +-------- + +Desktop Detection +----------------- + +To detect a specific desktop environment, use the get_desktop function. +To detect whether the desktop environment is standardised (according to the +proposed DESKTOP_LAUNCH standard), use the is_standard function. + +Opening URLs +------------ + +To open a URL in the current desktop environment, relying on the automatic +detection of that environment, use the desktop.open function as follows: + +desktop.open("http://www.python.org") + +To override the detected desktop, specify the desktop parameter to the open +function as follows: + +desktop.open("http://www.python.org", "KDE") # Insists on KDE +desktop.open("http://www.python.org", "GNOME") # Insists on GNOME +desktop.open("http://www.python.org", "MATE") # Insists on MATE + +Without overriding using the desktop parameter, the open function will attempt +to use the "standard" desktop opening mechanism which is controlled by the +DESKTOP_LAUNCH environment variable as described below. + +The DESKTOP_LAUNCH Environment Variable +--------------------------------------- + +The DESKTOP_LAUNCH environment variable must be shell-quoted where appropriate, +as shown in some of the following examples: + +DESKTOP_LAUNCH="kdialog --msgbox" Should present any opened URLs in + their entirety in a KDE message box. + (Command "kdialog" plus parameter.) +DESKTOP_LAUNCH="my\ opener" Should run the "my opener" program to + open URLs. + (Command "my opener", no parameters.) +DESKTOP_LAUNCH="my\ opener --url" Should run the "my opener" program to + open URLs. + (Command "my opener" plus parameter.) + +Details of the DESKTOP_LAUNCH environment variable convention can be found here: +http://lists.freedesktop.org/archives/xdg/2004-August/004489.html + +Other Modules +------------- + +The desktop.dialog module provides support for opening dialogue boxes. +The desktop.windows module permits the inspection of desktop windows. +""" + +__version__ = "0.4" + +import os +import sys + +# Provide suitable process creation functions. + +try: + import subprocess + def _run(cmd, shell, wait): + opener = subprocess.Popen(cmd, shell=shell) + if wait: opener.wait() + return opener.pid + + def _readfrom(cmd, shell): + opener = subprocess.Popen(cmd, shell=shell, stdin=subprocess.PIPE, stdout=subprocess.PIPE) + opener.stdin.close() + return opener.stdout.read() + + def _status(cmd, shell): + opener = subprocess.Popen(cmd, shell=shell) + opener.wait() + return opener.returncode == 0 + +except ImportError: + import popen2 + def _run(cmd, shell, wait): + opener = popen2.Popen3(cmd) + if wait: opener.wait() + return opener.pid + + def _readfrom(cmd, shell): + opener = popen2.Popen3(cmd) + opener.tochild.close() + opener.childerr.close() + return opener.fromchild.read() + + def _status(cmd, shell): + opener = popen2.Popen3(cmd) + opener.wait() + return opener.poll() == 0 + +import commands + +# Private functions. + +def _get_x11_vars(): + + "Return suitable environment definitions for X11." + + if not os.environ.get("DISPLAY", "").strip(): + return "DISPLAY=:0.0 " + else: + return "" + +def _is_xfce(): + + "Return whether XFCE is in use." + + # XFCE detection involves testing the output of a program. + + try: + return _readfrom(_get_x11_vars() + "xprop -root _DT_SAVE_MODE", shell=1).strip().endswith(' = "xfce4"') + except OSError: + return 0 + +def _is_x11(): + + "Return whether the X Window System is in use." + + return os.environ.has_key("DISPLAY") + +# Introspection functions. + +def get_desktop(): + + """ + Detect the current desktop environment, returning the name of the + environment. If no environment could be detected, None is returned. + """ + + if os.environ.has_key("KDE_FULL_SESSION") or \ + os.environ.has_key("KDE_MULTIHEAD"): + return "KDE" + elif os.environ.has_key("GNOME_DESKTOP_SESSION_ID") or \ + os.environ.has_key("GNOME_KEYRING_SOCKET"): + return "GNOME" + elif os.environ.has_key("MATE_DESKTOP_SESSION_ID") or \ + os.environ.has_key("MATE_KEYRING_SOCKET"): + return "MATE" + elif sys.platform == "darwin": + return "Mac OS X" + elif hasattr(os, "startfile"): + return "Windows" + elif _is_xfce(): + return "XFCE" + + # KDE, GNOME, MATE and XFCE run on X11, so we have to test for X11 last. + + if _is_x11(): + return "X11" + else: + return None + +def use_desktop(desktop): + + """ + Decide which desktop should be used, based on the detected desktop and a + supplied 'desktop' argument (which may be None). Return an identifier + indicating the desktop type as being either "standard" or one of the results + from the 'get_desktop' function. + """ + + # Attempt to detect a desktop environment. + + detected = get_desktop() + + # Start with desktops whose existence can be easily tested. + + if (desktop is None or desktop == "standard") and is_standard(): + return "standard" + elif (desktop is None or desktop == "Windows") and detected == "Windows": + return "Windows" + + # Test for desktops where the overriding is not verified. + + elif (desktop or detected) == "KDE": + return "KDE" + elif (desktop or detected) == "GNOME": + return "GNOME" + elif (desktop or detected) == "MATE": + return "MATE" + elif (desktop or detected) == "XFCE": + return "XFCE" + elif (desktop or detected) == "Mac OS X": + return "Mac OS X" + elif (desktop or detected) == "X11": + return "X11" + else: + return None + +def is_standard(): + + """ + Return whether the current desktop supports standardised application + launching. + """ + + return os.environ.has_key("DESKTOP_LAUNCH") + +# Activity functions. + +def open(url, desktop=None, wait=0): + + """ + Open the 'url' in the current desktop's preferred file browser. If the + optional 'desktop' parameter is specified then attempt to use that + particular desktop environment's mechanisms to open the 'url' instead of + guessing or detecting which environment is being used. + + Suggested values for 'desktop' are "standard", "KDE", "GNOME", "GNOME", + "XFCE", "Mac OS X", "Windows" where "standard" employs a DESKTOP_LAUNCH + environment variable to open the specified 'url'. DESKTOP_LAUNCH should + be a command, possibly followed by arguments, and must have any special + characters shell-escaped. + + The process identifier of the "opener" (ie. viewer, editor, browser or + program) associated with the 'url' is returned by this function. If the + process identifier cannot be determined, None is returned. + + An optional 'wait' parameter is also available for advanced usage and, if + 'wait' is set to a true value, this function will wait for the launching + mechanism to complete before returning (as opposed to immediately returning + as is the default behaviour). + """ + + # Decide on the desktop environment in use. + + desktop_in_use = use_desktop(desktop) + + if desktop_in_use == "standard": + arg = "".join([os.environ["DESKTOP_LAUNCH"], commands.mkarg(url)]) + return _run(arg, 1, wait) + + elif desktop_in_use == "Windows": + # NOTE: This returns None in current implementations. + return os.startfile(url) + + elif desktop_in_use == "KDE": + cmd = ["xdg-open", url] + + elif desktop_in_use == "GNOME": + cmd = ["xdg-open", url] + + elif desktop_in_use == "MATE": + cmd = ["xdg-open", url] + + elif desktop_in_use == "XFCE": + cmd = ["xdg-open", url] + + elif desktop_in_use == "Mac OS X": + cmd = ["open", url] + + elif desktop_in_use == "X11" and os.environ.has_key("BROWSER"): + cmd = [os.environ["BROWSER"], url] + + # Finish with an error where no suitable desktop was identified. + + else: + raise OSError, "Desktop '%s' not supported (neither DESKTOP_LAUNCH nor os.startfile could be used)" % desktop_in_use + + return _run(cmd, 0, wait) + +# vim: tabstop=4 expandtab shiftwidth=4 diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Markdown Preview/desktop/dialog.py b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Markdown Preview/desktop/dialog.py new file mode 100644 index 0000000..113af66 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Markdown Preview/desktop/dialog.py @@ -0,0 +1,551 @@ +#!/usr/bin/env python + +""" +Simple desktop dialogue box support for Python. + +Copyright (C) 2007, 2009 Paul Boddie + +This program is free software; you can redistribute it and/or modify it under +the terms of the GNU Lesser General Public License as published by the Free +Software Foundation; either version 3 of the License, or (at your option) any +later version. + +This program is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more +details. + +You should have received a copy of the GNU Lesser General Public License along +with this program. If not, see . + +-------- + +Opening Dialogue Boxes (Dialogs) +-------------------------------- + +To open a dialogue box (dialog) in the current desktop environment, relying on +the automatic detection of that environment, use the appropriate dialogue box +class: + +question = desktop.dialog.Question("Are you sure?") +result = question.open() + +To override the detected desktop, specify the desktop parameter to the open +function as follows: + +question.open("KDE") # Insists on KDE +question.open("GNOME") # Insists on GNOME +question.open("MATE") # Insists on MATE + +The dialogue box options are documented in each class's docstring. + +Available dialogue box classes are listed in the desktop.dialog.available +attribute. + +Supported desktop environments are listed in the desktop.dialog.supported +attribute. +""" + +from desktop import use_desktop, _run, _readfrom, _status + +class _wrapper: + def __init__(self, handler): + self.handler = handler + +class _readvalue(_wrapper): + def __call__(self, cmd, shell): + return self.handler(cmd, shell).strip() + +class _readinput(_wrapper): + def __call__(self, cmd, shell): + return self.handler(cmd, shell)[:-1] + +class _readvalues_kdialog(_wrapper): + def __call__(self, cmd, shell): + result = self.handler(cmd, shell).strip().strip('"') + if result: + return result.split('" "') + else: + return [] + +class _readvalues_zenity(_wrapper): + def __call__(self, cmd, shell): + result = self.handler(cmd, shell).strip() + if result: + return result.split("|") + else: + return [] + +class _readvalues_Xdialog(_wrapper): + def __call__(self, cmd, shell): + result = self.handler(cmd, shell).strip() + if result: + return result.split("/") + else: + return [] + +# Dialogue parameter classes. + +class String: + + "A generic parameter." + + def __init__(self, name): + self.name = name + + def convert(self, value, program): + return [value or ""] + +class Strings(String): + + "Multiple string parameters." + + def convert(self, value, program): + return value or [] + +class StringPairs(String): + + "Multiple string parameters duplicated to make identifiers." + + def convert(self, value, program): + l = [] + for v in value: + l.append(v) + l.append(v) + return l + +class StringKeyword: + + "A keyword parameter." + + def __init__(self, keyword, name): + self.keyword = keyword + self.name = name + + def convert(self, value, program): + return [self.keyword + "=" + (value or "")] + +class StringKeywords: + + "Multiple keyword parameters." + + def __init__(self, keyword, name): + self.keyword = keyword + self.name = name + + def convert(self, value, program): + l = [] + for v in value or []: + l.append(self.keyword + "=" + v) + return l + +class Integer(String): + + "An integer parameter." + + defaults = { + "width" : 40, + "height" : 15, + "list_height" : 10 + } + scale = 8 + + def __init__(self, name, pixels=0): + String.__init__(self, name) + if pixels: + self.factor = self.scale + else: + self.factor = 1 + + def convert(self, value, program): + if value is None: + value = self.defaults[self.name] + return [str(int(value) * self.factor)] + +class IntegerKeyword(Integer): + + "An integer keyword parameter." + + def __init__(self, keyword, name, pixels=0): + Integer.__init__(self, name, pixels) + self.keyword = keyword + + def convert(self, value, program): + if value is None: + value = self.defaults[self.name] + return [self.keyword + "=" + str(int(value) * self.factor)] + +class Boolean(String): + + "A boolean parameter." + + values = { + "kdialog" : ["off", "on"], + "zenity" : ["FALSE", "TRUE"], + "Xdialog" : ["off", "on"] + } + + def convert(self, value, program): + values = self.values[program] + if value: + return [values[1]] + else: + return [values[0]] + +class MenuItemList(String): + + "A menu item list parameter." + + def convert(self, value, program): + l = [] + for v in value: + l.append(v.value) + l.append(v.text) + return l + +class ListItemList(String): + + "A radiolist/checklist item list parameter." + + def __init__(self, name, status_first=0): + String.__init__(self, name) + self.status_first = status_first + + def convert(self, value, program): + l = [] + for v in value: + boolean = Boolean(None) + status = boolean.convert(v.status, program) + if self.status_first: + l += status + l.append(v.value) + l.append(v.text) + if not self.status_first: + l += status + return l + +# Dialogue argument values. + +class MenuItem: + + "A menu item which can also be used with radiolists and checklists." + + def __init__(self, value, text, status=0): + self.value = value + self.text = text + self.status = status + +# Dialogue classes. + +class Dialogue: + + commands = { + "KDE" : "kdialog", + "GNOME" : "zenity", + "MATE" : "zenity", + "XFCE" : "zenity", # NOTE: Based on observations with Xubuntu. + "X11" : "Xdialog" + } + + def open(self, desktop=None): + + """ + Open a dialogue box (dialog) using a program appropriate to the desktop + environment in use. + + If the optional 'desktop' parameter is specified then attempt to use + that particular desktop environment's mechanisms to open the dialog + instead of guessing or detecting which environment is being used. + + Suggested values for 'desktop' are "standard", "KDE", "GNOME", + "MATE", "Mac OS X", "Windows". + + The result of the dialogue interaction may be a string indicating user + input (for Input, Password, Menu, Pulldown), a list of strings + indicating selections of one or more items (for RadioList, CheckList), + or a value indicating true or false (for Question, Warning, Message, + Error). + + Where a string value may be expected but no choice is made, an empty + string may be returned. Similarly, where a list of values is expected + but no choice is made, an empty list may be returned. + """ + + # Decide on the desktop environment in use. + + desktop_in_use = use_desktop(desktop) + + # Get the program. + + try: + program = self.commands[desktop_in_use] + except KeyError: + raise OSError, "Desktop '%s' not supported (no known dialogue box command could be suggested)" % desktop_in_use + + # The handler is one of the functions communicating with the subprocess. + # Some handlers return boolean values, others strings. + + handler, options = self.info[program] + + cmd = [program] + for option in options: + if isinstance(option, str): + cmd.append(option) + else: + value = getattr(self, option.name, None) + cmd += option.convert(value, program) + + return handler(cmd, 0) + +class Simple(Dialogue): + def __init__(self, text, width=None, height=None): + self.text = text + self.width = width + self.height = height + +class Question(Simple): + + """ + A dialogue asking a question and showing response buttons. + Options: text, width (in characters), height (in characters) + Response: a boolean value indicating an affirmative response (true) or a + negative response + """ + + name = "question" + info = { + "kdialog" : (_status, ["--yesno", String("text")]), + "zenity" : (_status, ["--question", StringKeyword("--text", "text")]), + "Xdialog" : (_status, ["--stdout", "--yesno", String("text"), Integer("height"), Integer("width")]), + } + +class Warning(Simple): + + """ + A dialogue asking a question and showing response buttons. + Options: text, width (in characters), height (in characters) + Response: a boolean value indicating an affirmative response (true) or a + negative response + """ + + name = "warning" + info = { + "kdialog" : (_status, ["--warningyesno", String("text")]), + "zenity" : (_status, ["--warning", StringKeyword("--text", "text")]), + "Xdialog" : (_status, ["--stdout", "--yesno", String("text"), Integer("height"), Integer("width")]), + } + +class Message(Simple): + + """ + A message dialogue. + Options: text, width (in characters), height (in characters) + Response: a boolean value indicating an affirmative response (true) or a + negative response + """ + + name = "message" + info = { + "kdialog" : (_status, ["--msgbox", String("text")]), + "zenity" : (_status, ["--info", StringKeyword("--text", "text")]), + "Xdialog" : (_status, ["--stdout", "--msgbox", String("text"), Integer("height"), Integer("width")]), + } + +class Error(Simple): + + """ + An error dialogue. + Options: text, width (in characters), height (in characters) + Response: a boolean value indicating an affirmative response (true) or a + negative response + """ + + name = "error" + info = { + "kdialog" : (_status, ["--error", String("text")]), + "zenity" : (_status, ["--error", StringKeyword("--text", "text")]), + "Xdialog" : (_status, ["--stdout", "--msgbox", String("text"), Integer("height"), Integer("width")]), + } + +class Menu(Simple): + + """ + A menu of options, one of which being selectable. + Options: text, width (in characters), height (in characters), + list_height (in items), items (MenuItem objects) + Response: a value corresponding to the chosen item + """ + + name = "menu" + info = { + "kdialog" : (_readvalue(_readfrom), ["--menu", String("text"), MenuItemList("items")]), + "zenity" : (_readvalue(_readfrom), ["--list", StringKeyword("--text", "text"), StringKeywords("--column", "titles"), + MenuItemList("items")] + ), + "Xdialog" : (_readvalue(_readfrom), ["--stdout", "--menubox", + String("text"), Integer("height"), Integer("width"), Integer("list_height"), MenuItemList("items")] + ), + } + item = MenuItem + number_of_titles = 2 + + def __init__(self, text, titles, items=None, width=None, height=None, list_height=None): + + """ + Initialise a menu with the given heading 'text', column 'titles', and + optional 'items' (which may be added later), 'width' (in characters), + 'height' (in characters) and 'list_height' (in items). + """ + + Simple.__init__(self, text, width, height) + self.titles = ([""] * self.number_of_titles + titles)[-self.number_of_titles:] + self.items = items or [] + self.list_height = list_height + + def add(self, *args, **kw): + + """ + Add an item, passing the given arguments to the appropriate item class. + """ + + self.items.append(self.item(*args, **kw)) + +class RadioList(Menu): + + """ + A list of radio buttons, one of which being selectable. + Options: text, width (in characters), height (in characters), + list_height (in items), items (MenuItem objects), titles + Response: a list of values corresponding to chosen items (since some + programs, eg. zenity, appear to support multiple default + selections) + """ + + name = "radiolist" + info = { + "kdialog" : (_readvalues_kdialog(_readfrom), ["--radiolist", String("text"), ListItemList("items")]), + "zenity" : (_readvalues_zenity(_readfrom), + ["--list", "--radiolist", StringKeyword("--text", "text"), StringKeywords("--column", "titles"), + ListItemList("items", 1)] + ), + "Xdialog" : (_readvalues_Xdialog(_readfrom), ["--stdout", "--radiolist", + String("text"), Integer("height"), Integer("width"), Integer("list_height"), ListItemList("items")] + ), + } + number_of_titles = 3 + +class CheckList(Menu): + + """ + A list of checkboxes, many being selectable. + Options: text, width (in characters), height (in characters), + list_height (in items), items (MenuItem objects), titles + Response: a list of values corresponding to chosen items + """ + + name = "checklist" + info = { + "kdialog" : (_readvalues_kdialog(_readfrom), ["--checklist", String("text"), ListItemList("items")]), + "zenity" : (_readvalues_zenity(_readfrom), + ["--list", "--checklist", StringKeyword("--text", "text"), StringKeywords("--column", "titles"), + ListItemList("items", 1)] + ), + "Xdialog" : (_readvalues_Xdialog(_readfrom), ["--stdout", "--checklist", + String("text"), Integer("height"), Integer("width"), Integer("list_height"), ListItemList("items")] + ), + } + number_of_titles = 3 + +class Pulldown(Menu): + + """ + A pull-down menu of options, one of which being selectable. + Options: text, width (in characters), height (in characters), + items (list of values) + Response: a value corresponding to the chosen item + """ + + name = "pulldown" + info = { + "kdialog" : (_readvalue(_readfrom), ["--combobox", String("text"), Strings("items")]), + "zenity" : (_readvalue(_readfrom), + ["--list", "--radiolist", StringKeyword("--text", "text"), StringKeywords("--column", "titles"), + StringPairs("items")] + ), + "Xdialog" : (_readvalue(_readfrom), + ["--stdout", "--combobox", String("text"), Integer("height"), Integer("width"), Strings("items")]), + } + item = unicode + number_of_titles = 2 + +class Input(Simple): + + """ + An input dialogue, consisting of an input field. + Options: text, input, width (in characters), height (in characters) + Response: the text entered into the dialogue by the user + """ + + name = "input" + info = { + "kdialog" : (_readinput(_readfrom), + ["--inputbox", String("text"), String("data")]), + "zenity" : (_readinput(_readfrom), + ["--entry", StringKeyword("--text", "text"), StringKeyword("--entry-text", "data")]), + "Xdialog" : (_readinput(_readfrom), + ["--stdout", "--inputbox", String("text"), Integer("height"), Integer("width"), String("data")]), + } + + def __init__(self, text, data="", width=None, height=None): + Simple.__init__(self, text, width, height) + self.data = data + +class Password(Input): + + """ + A password dialogue, consisting of a password entry field. + Options: text, width (in characters), height (in characters) + Response: the text entered into the dialogue by the user + """ + + name = "password" + info = { + "kdialog" : (_readinput(_readfrom), + ["--password", String("text")]), + "zenity" : (_readinput(_readfrom), + ["--entry", StringKeyword("--text", "text"), "--hide-text"]), + "Xdialog" : (_readinput(_readfrom), + ["--stdout", "--password", "--inputbox", String("text"), Integer("height"), Integer("width")]), + } + +class TextFile(Simple): + + """ + A text file input box. + Options: filename, text, width (in characters), height (in characters) + Response: any text returned by the dialogue program (typically an empty + string) + """ + + name = "textfile" + info = { + "kdialog" : (_readfrom, ["--textbox", String("filename"), Integer("width", pixels=1), Integer("height", pixels=1)]), + "zenity" : (_readfrom, ["--text-info", StringKeyword("--filename", "filename"), IntegerKeyword("--width", "width", pixels=1), + IntegerKeyword("--height", "height", pixels=1)] + ), + "Xdialog" : (_readfrom, ["--stdout", "--textbox", String("filename"), Integer("height"), Integer("width")]), + } + + def __init__(self, filename, text="", width=None, height=None): + Simple.__init__(self, text, width, height) + self.filename = filename + +# Available dialogues. + +available = [Question, Warning, Message, Error, Menu, CheckList, RadioList, Input, Password, Pulldown, TextFile] + +# Supported desktop environments. + +supported = Dialogue.commands.keys() + +# vim: tabstop=4 expandtab shiftwidth=4 diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Markdown Preview/desktop/windows.py b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Markdown Preview/desktop/windows.py new file mode 100644 index 0000000..2b19e85 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Markdown Preview/desktop/windows.py @@ -0,0 +1,273 @@ +#!/usr/bin/env python + +""" +Simple desktop window enumeration for Python. + +Copyright (C) 2007, 2008, 2009 Paul Boddie + +This program is free software; you can redistribute it and/or modify it under +the terms of the GNU Lesser General Public License as published by the Free +Software Foundation; either version 3 of the License, or (at your option) any +later version. + +This program is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more +details. + +You should have received a copy of the GNU Lesser General Public License along +with this program. If not, see . + +-------- + +Finding Open Windows on the Desktop +----------------------------------- + +To obtain a list of windows, use the desktop.windows.list function as follows: + +windows = desktop.windows.list() + +To obtain the root window, typically the desktop background, use the +desktop.windows.root function as follows: + +root = desktop.windows.root() + +Each window object can be inspected through a number of methods. For example: + +name = window.name() +width, height = window.size() +x, y = window.position() +child_windows = window.children() + +See the desktop.windows.Window class for more information. +""" + +from desktop import _is_x11, _get_x11_vars, _readfrom, use_desktop +import re + +# System functions. + +def _xwininfo(identifier, action): + if identifier is None: + args = "-root" + else: + args = "-id " + identifier + + s = _readfrom(_get_x11_vars() + "xwininfo %s -%s" % (args, action), shell=1) + + # Return a mapping of keys to values for the "stats" action. + + if action == "stats": + d = {} + for line in s.split("\n"): + fields = line.split(":") + if len(fields) < 2: + continue + key, value = fields[0].strip(), ":".join(fields[1:]).strip() + d[key] = value + + return d + + # Otherwise, return the raw output. + + else: + return s + +def _get_int_properties(d, properties): + results = [] + for property in properties: + results.append(int(d[property])) + return results + +# Finder functions. + +def find_all(name): + return 1 + +def find_named(name): + return name is not None + +def find_by_name(name): + return lambda n, t=name: n == t + +# Window classes. +# NOTE: X11 is the only supported desktop so far. + +class Window: + + "A window on the desktop." + + _name_pattern = re.compile(r':\s+\(.*?\)\s+[-0-9x+]+\s+[-0-9+]+$') + _absent_names = "(has no name)", "(the root window) (has no name)" + + def __init__(self, identifier): + + "Initialise the window with the given 'identifier'." + + self.identifier = identifier + + # Finder methods (from above). + + self.find_all = find_all + self.find_named = find_named + self.find_by_name = find_by_name + + def __repr__(self): + return "Window(%r)" % self.identifier + + # Methods which deal with the underlying commands. + + def _get_handle_and_name(self, text): + fields = text.strip().split(" ") + handle = fields[0] + + # Get the "" part, stripping off the quotes. + + name = " ".join(fields[1:]) + if len(name) > 1 and name[0] == '"' and name[-1] == '"': + name = name[1:-1] + + if name in self._absent_names: + return handle, None + else: + return handle, name + + def _get_this_handle_and_name(self, line): + fields = line.split(":") + return self._get_handle_and_name(":".join(fields[1:])) + + def _get_descendant_handle_and_name(self, line): + match = self._name_pattern.search(line) + if match: + return self._get_handle_and_name(line[:match.start()].strip()) + else: + raise OSError, "Window information from %r did not contain window details." % line + + def _descendants(self, s, fn): + handles = [] + adding = 0 + for line in s.split("\n"): + if line.endswith("child:") or line.endswith("children:"): + if not adding: + adding = 1 + elif adding and line: + handle, name = self._get_descendant_handle_and_name(line) + if fn(name): + handles.append(handle) + return [Window(handle) for handle in handles] + + # Public methods. + + def children(self, all=0): + + """ + Return a list of windows which are children of this window. If the + optional 'all' parameter is set to a true value, all such windows will + be returned regardless of whether they have any name information. + """ + + s = _xwininfo(self.identifier, "children") + return self._descendants(s, all and self.find_all or self.find_named) + + def descendants(self, all=0): + + """ + Return a list of windows which are descendants of this window. If the + optional 'all' parameter is set to a true value, all such windows will + be returned regardless of whether they have any name information. + """ + + s = _xwininfo(self.identifier, "tree") + return self._descendants(s, all and self.find_all or self.find_named) + + def find(self, callable): + + """ + Return windows using the given 'callable' (returning a true or a false + value when invoked with a window name) for descendants of this window. + """ + + s = _xwininfo(self.identifier, "tree") + return self._descendants(s, callable) + + def name(self): + + "Return the name of the window." + + d = _xwininfo(self.identifier, "stats") + + # Format is 'xwininfo: Window id: "" + + return self._get_this_handle_and_name(d["xwininfo"])[1] + + def size(self): + + "Return a tuple containing the width and height of this window." + + d = _xwininfo(self.identifier, "stats") + return _get_int_properties(d, ["Width", "Height"]) + + def position(self): + + "Return a tuple containing the upper left co-ordinates of this window." + + d = _xwininfo(self.identifier, "stats") + return _get_int_properties(d, ["Absolute upper-left X", "Absolute upper-left Y"]) + + def displayed(self): + + """ + Return whether the window is displayed in some way (but not necessarily + visible on the current screen). + """ + + d = _xwininfo(self.identifier, "stats") + return d["Map State"] != "IsUnviewable" + + def visible(self): + + "Return whether the window is displayed and visible." + + d = _xwininfo(self.identifier, "stats") + return d["Map State"] == "IsViewable" + +def list(desktop=None): + + """ + Return a list of windows for the current desktop. If the optional 'desktop' + parameter is specified then attempt to use that particular desktop + environment's mechanisms to look for windows. + """ + + root_window = root(desktop) + window_list = [window for window in root_window.descendants() if window.displayed()] + window_list.insert(0, root_window) + return window_list + +def root(desktop=None): + + """ + Return the root window for the current desktop. If the optional 'desktop' + parameter is specified then attempt to use that particular desktop + environment's mechanisms to look for windows. + """ + + # NOTE: The desktop parameter is currently ignored and X11 is tested for + # NOTE: directly. + + if _is_x11(): + return Window(None) + else: + raise OSError, "Desktop '%s' not supported" % use_desktop(desktop) + +def find(callable, desktop=None): + + """ + Find and return windows using the given 'callable' for the current desktop. + If the optional 'desktop' parameter is specified then attempt to use that + particular desktop environment's mechanisms to look for windows. + """ + + return root(desktop).find(callable) + +# vim: tabstop=4 expandtab shiftwidth=4 diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Markdown Preview/github.css b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Markdown Preview/github.css new file mode 100644 index 0000000..23bb92f --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Markdown Preview/github.css @@ -0,0 +1,364 @@ +html { + margin: 0; + padding: 0; } + +body { + background-color: white; + border-radius: 3px; + border: 3px solid #EEE; + box-shadow: inset 0 0 0 1px #CECECE; + font-family: Helvetica,arial,sans-serif; + font-size: 14px; + line-height: 1.6; + width: 975px; + padding: 30px; + margin: 2em auto; } + +body > *:first-child { + margin-top: 0 !important; } +body > *:last-child { + margin-bottom: 0 !important; } + +a { + color: #4183C4; + text-decoration: none; } +a:hover { + text-decoration: underline; } +a.absent { + color: #cc0000; } +a.anchor { + display: block; + padding-left: 30px; + margin-left: -30px; + cursor: pointer; + position: absolute; + top: 0; + left: 0; + bottom: 0; } + +h1, h2, h3, h4, h5, h6 { + margin: 20px 0 10px; + padding: 0; + font-weight: bold; + -webkit-font-smoothing: antialiased; + cursor: text; + position: relative; } + +h1:hover a.anchor, h2:hover a.anchor, h3:hover a.anchor, h4:hover a.anchor, h5:hover a.anchor, h6:hover a.anchor { + background: url("../../images/modules/styleguide/para.png") no-repeat 10px center; + text-decoration: none; } + +h1 tt, h1 code { + font-size: inherit; } + +h2 tt, h2 code { + font-size: inherit; } + +h3 tt, h3 code { + font-size: inherit; } + +h4 tt, h4 code { + font-size: inherit; } + +h5 tt, h5 code { + font-size: inherit; } + +h6 tt, h6 code { + font-size: inherit; } + +h1 { + font-size: 28px; + color: black; } + +h2 { + font-size: 24px; + border-bottom: 1px solid #cccccc; + color: black; } + +h3 { + font-size: 18px; } + +h4 { + font-size: 16px; } + +h5 { + font-size: 14px; } + +h6 { + color: #777777; + font-size: 14px; } + +p, blockquote, ul, ol, dl, li, table, pre { + margin: 15px 0; } + +hr { + background: transparent url("https://a248.e.akamai.net/assets.github.com/assets/primer/markdown/dirty-shade-0e7d81b119cc9beae17b0c98093d121fa0050a74.png") repeat-x 0 0; + border: 0 none; + color: #ccc; + height: 4px; + padding: 0; } + +body > h2:first-child { + margin-top: 0; + padding-top: 0; } +body > h1:first-child { + margin-top: 0; + padding-top: 0; } + body > h1:first-child + h2 { + margin-top: 0; + padding-top: 0; } +body > h3:first-child, body > h4:first-child, body > h5:first-child, body > h6:first-child { + margin-top: 0; + padding-top: 0; } + +a:first-child h1, a:first-child h2, a:first-child h3, a:first-child h4, a:first-child h5, a:first-child h6 { + margin-top: 0; + padding-top: 0; } + +h1 p, h2 p, h3 p, h4 p, h5 p, h6 p { + margin-top: 0; } + +li p.first { + display: inline-block; } + +ul, ol { + padding-left: 30px; } + +ul :first-child, ol :first-child { + margin-top: 0; } + +ul :last-child, ol :last-child { + margin-bottom: 0; } + +dl { + padding: 0; } + dl dt { + font-size: 14px; + font-weight: bold; + font-style: italic; + padding: 0; + margin: 15px 0 5px; } + dl dt:first-child { + padding: 0; } + dl dt > :first-child { + margin-top: 0; } + dl dt > :last-child { + margin-bottom: 0; } + dl dd { + margin: 0 0 15px; + padding: 0 15px; } + dl dd > :first-child { + margin-top: 0; } + dl dd > :last-child { + margin-bottom: 0; } + +blockquote { + border-left: 4px solid #dddddd; + padding: 0 15px; + color: #777777; } + blockquote > :first-child { + margin-top: 0; } + blockquote > :last-child { + margin-bottom: 0; } + +table { + border-collapse: collapse; border-spacing: 0; padding: 0; } + table tr { + border-top: 1px solid #cccccc; + background-color: white; + margin: 0; + padding: 0; } + table tr:nth-child(2n) { + background-color: #f8f8f8; } + table tr th { + font-weight: bold; + border: 1px solid #cccccc; + text-align: left; + margin: 0; + padding: 6px 13px; } + table tr td { + border: 1px solid #cccccc; + text-align: left; + margin: 0; + padding: 6px 13px; } + table tr th :first-child, table tr td :first-child { + margin-top: 0; } + table tr th :last-child, table tr td :last-child { + margin-bottom: 0; } + +img { + max-width: 100%; } + +span.frame { + display: block; + overflow: hidden; } + span.frame > span { + border: 1px solid #dddddd; + display: block; + float: left; + overflow: hidden; + margin: 13px 0 0; + padding: 7px; + width: auto; } + span.frame span img { + display: block; + float: left; } + span.frame span span { + clear: both; + color: #333333; + display: block; + padding: 5px 0 0; } +span.align-center { + display: block; + overflow: hidden; + clear: both; } + span.align-center > span { + display: block; + overflow: hidden; + margin: 13px auto 0; + text-align: center; } + span.align-center span img { + margin: 0 auto; + text-align: center; } +span.align-right { + display: block; + overflow: hidden; + clear: both; } + span.align-right > span { + display: block; + overflow: hidden; + margin: 13px 0 0; + text-align: right; } + span.align-right span img { + margin: 0; + text-align: right; } +span.float-left { + display: block; + margin-right: 13px; + overflow: hidden; + float: left; } + span.float-left span { + margin: 13px 0 0; } +span.float-right { + display: block; + margin-left: 13px; + overflow: hidden; + float: right; } + span.float-right > span { + display: block; + overflow: hidden; + margin: 13px auto 0; + text-align: right; } + +code, tt { + margin: 0 2px; + padding: 0 5px; + white-space: nowrap; + border: 1px solid #eaeaea; + background-color: #f8f8f8; + border-radius: 3px; } + +pre code { + margin: 0; + padding: 0; + white-space: pre; + border: none; + background: transparent; } + +.highlight pre { + background-color: #f8f8f8; + border: 1px solid #cccccc; + font-size: 13px; + line-height: 19px; + overflow: auto; + padding: 6px 10px; + border-radius: 3px; } + +pre { + background-color: #f8f8f8; + border: 1px solid #cccccc; + font-size: 13px; + line-height: 19px; + overflow: auto; + padding: 6px 10px; + border-radius: 3px; } + pre code, pre tt { + background-color: transparent; + border: none; } + + +.markdown-body code,.markdown-body tt{margin:0 2px;padding:0px 5px;white-space:nowrap;border:1px solid #eaeaea;background-color:#f8f8f8;border-radius:3px} +.markdown-body pre>code{margin:0;padding:0;white-space:pre;border:none;background:transparent} +.markdown-body .highlight pre,.markdown-body pre{background-color:#f8f8f8;border:1px solid #ccc;font-size:13px;line-height:19px;overflow:auto;padding:6px 10px;border-radius:3px} +.markdown-body pre code,.markdown-body pre tt{background-color:transparent;border:none} +.highlight{background:#ffffff} +.highlight .c{color:#999988;font-style:italic} +.highlight .err{color:#a61717;background-color:#e3d2d2} +.highlight .k{font-weight:bold} +.highlight .o{font-weight:bold} +.highlight .cm{color:#999988;font-style:italic} +.highlight .cp{color:#999999;font-weight:bold} +.highlight .c1{color:#999988;font-style:italic} +.highlight .cs{color:#999999;font-weight:bold;font-style:italic} +.highlight .gd{color:#000000;background-color:#ffdddd} +.highlight .gd .x{color:#000000;background-color:#ffaaaa} +.highlight .ge{font-style:italic} +.highlight .gr{color:#aa0000} +.highlight .gh{color:#999999} +.highlight .gi{color:#000000;background-color:#ddffdd} +.highlight .gi .x{color:#000000;background-color:#aaffaa} +.highlight .go{color:#888888} +.highlight .gp{color:#555555} +.highlight .gs{font-weight:bold} +.highlight .gu{color:#800080;font-weight:bold} +.highlight .gt{color:#aa0000} +.highlight .kc{font-weight:bold} +.highlight .kd{font-weight:bold} +.highlight .kn{font-weight:bold} +.highlight .kp{font-weight:bold} +.highlight .kr{font-weight:bold} +.highlight .kt{color:#445588;font-weight:bold} +.highlight .m{color:#009999} +.highlight .s{color:#d14} +.highlight .na{color:#008080} +.highlight .nb{color:#0086B3} +.highlight .nc{color:#445588;font-weight:bold} +.highlight .no{color:#008080} +.highlight .ni{color:#800080} +.highlight .ne{color:#990000;font-weight:bold} +.highlight .nf{color:#990000;font-weight:bold} +.highlight .nn{color:#555555} +.highlight .nt{color:#000080} +.highlight .nv{color:#008080} +.highlight .ow{font-weight:bold} +.highlight .w{color:#bbbbbb} +.highlight .mf{color:#009999} +.highlight .mh{color:#009999} +.highlight .mi{color:#009999} +.highlight .mo{color:#009999} +.highlight .sb{color:#d14} +.highlight .sc{color:#d14} +.highlight .sd{color:#d14} +.highlight .s2{color:#d14} +.highlight .se{color:#d14} +.highlight .sh{color:#d14} +.highlight .si{color:#d14} +.highlight .sx{color:#d14} +.highlight .sr{color:#009926} +.highlight .s1{color:#d14} +.highlight .ss{color:#990073} +.highlight .bp{color:#999999} +.highlight .vc{color:#008080} +.highlight .vg{color:#008080} +.highlight .vi{color:#008080} +.highlight .il{color:#009999} +.highlight .gc{color:#999;background-color:#EAF2F5} +.type-csharp .highlight .k{color:#0000FF} +.type-csharp .highlight .kt{color:#0000FF} +.type-csharp .highlight .nf{color:#000000;font-weight:normal} +.type-csharp .highlight .nc{color:#2B91AF} +.type-csharp .highlight .nn{color:#000000} +.type-csharp .highlight .s{color:#A31515} +.type-csharp .highlight .sc{color:#A31515} + + diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Markdown Preview/markdown.css b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Markdown Preview/markdown.css new file mode 100644 index 0000000..b96117f --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Markdown Preview/markdown.css @@ -0,0 +1,122 @@ +html { font-size: 100%; overflow-y: scroll; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; } + +body{ + color:#444; + font-family:Georgia, Palatino, 'Palatino Linotype', Times, 'Times New Roman', + "Hiragino Sans GB", "STXihei", "微软雅黑", serif; + font-size:12px; + line-height:1.5em; + background:#fefefe; + width: 45em; + margin: 10px auto; + padding: 1em; + outline: 1300px solid #FAFAFA; +} + +a{ color: #0645ad; text-decoration:none;} +a:visited{ color: #0b0080; } +a:hover{ color: #06e; } +a:active{ color:#faa700; } +a:focus{ outline: thin dotted; } +a:hover, a:active{ outline: 0; } + +span.backtick { + border:1px solid #EAEAEA; + border-radius:3px; + background:#F8F8F8; + padding:0 3px 0 3px; +} + +::-moz-selection{background:rgba(255,255,0,0.3);color:#000} +::selection{background:rgba(255,255,0,0.3);color:#000} + +a::-moz-selection{background:rgba(255,255,0,0.3);color:#0645ad} +a::selection{background:rgba(255,255,0,0.3);color:#0645ad} + +p{ +margin:1em 0; +} + +img{ +max-width:100%; +} + +h1,h2,h3,h4,h5,h6{ +font-weight:normal; +color:#111; +line-height:1em; +} +h4,h5,h6{ font-weight: bold; } +h1{ font-size:2.5em; } +h2{ font-size:2em; border-bottom:1px solid silver; padding-bottom: 5px; } +h3{ font-size:1.5em; } +h4{ font-size:1.2em; } +h5{ font-size:1em; } +h6{ font-size:0.9em; } + +blockquote{ +color:#666666; +margin:0; +padding-left: 3em; +border-left: 0.5em #EEE solid; +} +hr { display: block; height: 2px; border: 0; border-top: 1px solid #aaa;border-bottom: 1px solid #eee; margin: 1em 0; padding: 0; } + + +pre , code, kbd, samp { + color: #000; + font-family: monospace; + font-size: 0.88em; + border-radius:3px; + background-color: #F8F8F8; + border: 1px solid #CCC; +} +pre { white-space: pre; white-space: pre-wrap; word-wrap: break-word; padding: 5px 12px;} +pre code { border: 0px !important; padding: 0;} +code { padding: 0 3px 0 3px; } + +b, strong { font-weight: bold; } + +dfn { font-style: italic; } + +ins { background: #ff9; color: #000; text-decoration: none; } + +mark { background: #ff0; color: #000; font-style: italic; font-weight: bold; } + +sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; } +sup { top: -0.5em; } +sub { bottom: -0.25em; } + +ul, ol { margin: 1em 0; padding: 0 0 0 2em; } +li p:last-child { margin:0 } +dd { margin: 0 0 0 2em; } + +img { border: 0; -ms-interpolation-mode: bicubic; vertical-align: middle; } + +table { border-collapse: collapse; border-spacing: 0; } +td { vertical-align: top; } + +@media only screen and (min-width: 480px) { +body{font-size:14px;} +} + +@media only screen and (min-width: 768px) { +body{font-size:16px;} +} + +@media print { + * { background: transparent !important; color: black !important; filter:none !important; -ms-filter: none !important; } + body{font-size:12pt; max-width:100%; outline:none;} + a, a:visited { text-decoration: underline; } + hr { height: 1px; border:0; border-bottom:1px solid black; } + a[href]:after { content: " (" attr(href) ")"; } + abbr[title]:after { content: " (" attr(title) ")"; } + .ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; } + pre, blockquote { border: 1px solid #999; padding-right: 1em; page-break-inside: avoid; } + tr, img { page-break-inside: avoid; } + img { max-width: 100% !important; } + @page :left { margin: 15mm 20mm 15mm 10mm; } + @page :right { margin: 15mm 10mm 15mm 20mm; } + p, h2, h3 { orphans: 3; widows: 3; } + h2, h3 { page-break-after: avoid; } +} diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Markdown Preview/markdown2.py b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Markdown Preview/markdown2.py new file mode 100644 index 0000000..3bad0c5 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Markdown Preview/markdown2.py @@ -0,0 +1,2322 @@ +#!/usr/bin/env python +# Copyright (c) 2012 Trent Mick. +# Copyright (c) 2007-2008 ActiveState Corp. +# License: MIT (http://www.opensource.org/licenses/mit-license.php) + +from __future__ import generators + +r"""A fast and complete Python implementation of Markdown. + +[from http://daringfireball.net/projects/markdown/] +> Markdown is a text-to-HTML filter; it translates an easy-to-read / +> easy-to-write structured text format into HTML. Markdown's text +> format is most similar to that of plain text email, and supports +> features such as headers, *emphasis*, code blocks, blockquotes, and +> links. +> +> Markdown's syntax is designed not as a generic markup language, but +> specifically to serve as a front-end to (X)HTML. You can use span-level +> HTML tags anywhere in a Markdown document, and you can use block level +> HTML tags (like
and as well). + +Module usage: + + >>> import markdown2 + >>> markdown2.markdown("*boo!*") # or use `html = markdown_path(PATH)` + u'

boo!

\n' + + >>> markdowner = Markdown() + >>> markdowner.convert("*boo!*") + u'

boo!

\n' + >>> markdowner.convert("**boom!**") + u'

boom!

\n' + +This implementation of Markdown implements the full "core" syntax plus a +number of extras (e.g., code syntax coloring, footnotes) as described on +. +""" + +cmdln_desc = """A fast and complete Python implementation of Markdown, a +text-to-HTML conversion tool for web writers. + +Supported extra syntax options (see -x|--extras option below and +see for details): + +* code-friendly: Disable _ and __ for em and strong. +* cuddled-lists: Allow lists to be cuddled to the preceding paragraph. +* fenced-code-blocks: Allows a code block to not have to be indented + by fencing it with '```' on a line before and after. Based on + with support for + syntax highlighting. +* footnotes: Support footnotes as in use on daringfireball.net and + implemented in other Markdown processors (tho not in Markdown.pl v1.0.1). +* header-ids: Adds "id" attributes to headers. The id value is a slug of + the header text. +* html-classes: Takes a dict mapping html tag names (lowercase) to a + string to use for a "class" tag attribute. Currently only supports + "pre" and "code" tags. Add an issue if you require this for other tags. +* markdown-in-html: Allow the use of `markdown="1"` in a block HTML tag to + have markdown processing be done on its contents. Similar to + but with + some limitations. +* metadata: Extract metadata from a leading '---'-fenced block. + See for details. +* nofollow: Add `rel="nofollow"` to add `` tags with an href. See + . +* pyshell: Treats unindented Python interactive shell sessions as + blocks. +* link-patterns: Auto-link given regex patterns in text (e.g. bug number + references, revision number references). +* smarty-pants: Replaces ' and " with curly quotation marks or curly + apostrophes. Replaces --, ---, ..., and . . . with en dashes, em dashes, + and ellipses. +* toc: The returned HTML string gets a new "toc_html" attribute which is + a Table of Contents for the document. (experimental) +* xml: Passes one-liner processing instructions and namespaced XML tags. +* wiki-tables: Google Code Wiki-style tables. See + . +""" + +# Dev Notes: +# - Python's regex syntax doesn't have '\z', so I'm using '\Z'. I'm +# not yet sure if there implications with this. Compare 'pydoc sre' +# and 'perldoc perlre'. + +__version_info__ = (2, 1, 1) +__version__ = '.'.join(map(str, __version_info__)) +__author__ = "Trent Mick" + +import os +import sys +from pprint import pprint +import re +import logging +try: + from hashlib import md5 +except ImportError: + from md5 import md5 +import optparse +from random import random, randint +import codecs + + +#---- Python version compat + +try: + from urllib.parse import quote # python3 +except ImportError: + from urllib import quote # python2 + +if sys.version_info[:2] < (2,4): + from sets import Set as set + def reversed(sequence): + for i in sequence[::-1]: + yield i + +# Use `bytes` for byte strings and `unicode` for unicode strings (str in Py3). +if sys.version_info[0] <= 2: + py3 = False + try: + bytes + except NameError: + bytes = str + base_string_type = basestring +elif sys.version_info[0] >= 3: + py3 = True + unicode = str + base_string_type = str + + + +#---- globals + +DEBUG = False +log = logging.getLogger("markdown") + +DEFAULT_TAB_WIDTH = 4 + + +SECRET_SALT = bytes(randint(0, 1000000)) +def _hash_text(s): + return 'md5-' + md5(SECRET_SALT + s.encode("utf-8")).hexdigest() + +# Table of hash values for escaped characters: +g_escape_table = dict([(ch, _hash_text(ch)) + for ch in '\\`*_{}[]()>#+-.!']) + + + +#---- exceptions + +class MarkdownError(Exception): + pass + + + +#---- public api + +def markdown_path(path, encoding="utf-8", + html4tags=False, tab_width=DEFAULT_TAB_WIDTH, + safe_mode=None, extras=None, link_patterns=None, + use_file_vars=False): + fp = codecs.open(path, 'r', encoding) + text = fp.read() + fp.close() + return Markdown(html4tags=html4tags, tab_width=tab_width, + safe_mode=safe_mode, extras=extras, + link_patterns=link_patterns, + use_file_vars=use_file_vars).convert(text) + +def markdown(text, html4tags=False, tab_width=DEFAULT_TAB_WIDTH, + safe_mode=None, extras=None, link_patterns=None, + use_file_vars=False): + return Markdown(html4tags=html4tags, tab_width=tab_width, + safe_mode=safe_mode, extras=extras, + link_patterns=link_patterns, + use_file_vars=use_file_vars).convert(text) + +class Markdown(object): + # The dict of "extras" to enable in processing -- a mapping of + # extra name to argument for the extra. Most extras do not have an + # argument, in which case the value is None. + # + # This can be set via (a) subclassing and (b) the constructor + # "extras" argument. + extras = None + + urls = None + titles = None + html_blocks = None + html_spans = None + html_removed_text = "[HTML_REMOVED]" # for compat with markdown.py + + # Used to track when we're inside an ordered or unordered list + # (see _ProcessListItems() for details): + list_level = 0 + + _ws_only_line_re = re.compile(r"^[ \t]+$", re.M) + + def __init__(self, html4tags=False, tab_width=4, safe_mode=None, + extras=None, link_patterns=None, use_file_vars=False): + if html4tags: + self.empty_element_suffix = ">" + else: + self.empty_element_suffix = " />" + self.tab_width = tab_width + + # For compatibility with earlier markdown2.py and with + # markdown.py's safe_mode being a boolean, + # safe_mode == True -> "replace" + if safe_mode is True: + self.safe_mode = "replace" + else: + self.safe_mode = safe_mode + + # Massaging and building the "extras" info. + if self.extras is None: + self.extras = {} + elif not isinstance(self.extras, dict): + self.extras = dict([(e, None) for e in self.extras]) + if extras: + if not isinstance(extras, dict): + extras = dict([(e, None) for e in extras]) + self.extras.update(extras) + assert isinstance(self.extras, dict) + if "toc" in self.extras and not "header-ids" in self.extras: + self.extras["header-ids"] = None # "toc" implies "header-ids" + self._instance_extras = self.extras.copy() + + self.link_patterns = link_patterns + self.use_file_vars = use_file_vars + self._outdent_re = re.compile(r'^(\t|[ ]{1,%d})' % tab_width, re.M) + + self._escape_table = g_escape_table.copy() + if "smarty-pants" in self.extras: + self._escape_table['"'] = _hash_text('"') + self._escape_table["'"] = _hash_text("'") + + def reset(self): + self.urls = {} + self.titles = {} + self.html_blocks = {} + self.html_spans = {} + self.list_level = 0 + self.extras = self._instance_extras.copy() + if "footnotes" in self.extras: + self.footnotes = {} + self.footnote_ids = [] + if "header-ids" in self.extras: + self._count_from_header_id = {} # no `defaultdict` in Python 2.4 + if "metadata" in self.extras: + self.metadata = {} + + # Per "rel" + # should only be used in tags with an "href" attribute. + _a_nofollow = re.compile(r"<(a)([^>]*href=)", re.IGNORECASE) + + def convert(self, text): + """Convert the given text.""" + # Main function. The order in which other subs are called here is + # essential. Link and image substitutions need to happen before + # _EscapeSpecialChars(), so that any *'s or _'s in the + # and tags get encoded. + + # Clear the global hashes. If we don't clear these, you get conflicts + # from other articles when generating a page which contains more than + # one article (e.g. an index page that shows the N most recent + # articles): + self.reset() + + if not isinstance(text, unicode): + #TODO: perhaps shouldn't presume UTF-8 for string input? + text = unicode(text, 'utf-8') + + if self.use_file_vars: + # Look for emacs-style file variable hints. + emacs_vars = self._get_emacs_vars(text) + if "markdown-extras" in emacs_vars: + splitter = re.compile("[ ,]+") + for e in splitter.split(emacs_vars["markdown-extras"]): + if '=' in e: + ename, earg = e.split('=', 1) + try: + earg = int(earg) + except ValueError: + pass + else: + ename, earg = e, None + self.extras[ename] = earg + + # Standardize line endings: + text = re.sub("\r\n|\r", "\n", text) + + # Make sure $text ends with a couple of newlines: + text += "\n\n" + + # Convert all tabs to spaces. + text = self._detab(text) + + # Strip any lines consisting only of spaces and tabs. + # This makes subsequent regexen easier to write, because we can + # match consecutive blank lines with /\n+/ instead of something + # contorted like /[ \t]*\n+/ . + text = self._ws_only_line_re.sub("", text) + + # strip metadata from head and extract + if "metadata" in self.extras: + text = self._extract_metadata(text) + + text = self.preprocess(text) + + if self.safe_mode: + text = self._hash_html_spans(text) + + # Turn block-level HTML blocks into hash entries + text = self._hash_html_blocks(text, raw=True) + + # Strip link definitions, store in hashes. + if "footnotes" in self.extras: + # Must do footnotes first because an unlucky footnote defn + # looks like a link defn: + # [^4]: this "looks like a link defn" + text = self._strip_footnote_definitions(text) + text = self._strip_link_definitions(text) + + text = self._run_block_gamut(text) + + if "footnotes" in self.extras: + text = self._add_footnotes(text) + + text = self.postprocess(text) + + text = self._unescape_special_chars(text) + + if self.safe_mode: + text = self._unhash_html_spans(text) + + if "nofollow" in self.extras: + text = self._a_nofollow.sub(r'<\1 rel="nofollow"\2', text) + + text += "\n" + + rv = UnicodeWithAttrs(text) + if "toc" in self.extras: + rv._toc = self._toc + if "metadata" in self.extras: + rv.metadata = self.metadata + return rv + + def postprocess(self, text): + """A hook for subclasses to do some postprocessing of the html, if + desired. This is called before unescaping of special chars and + unhashing of raw HTML spans. + """ + return text + + def preprocess(self, text): + """A hook for subclasses to do some preprocessing of the Markdown, if + desired. This is called after basic formatting of the text, but prior + to any extras, safe mode, etc. processing. + """ + return text + + # Is metadata if the content starts with '---'-fenced `key: value` + # pairs. E.g. (indented for presentation): + # --- + # foo: bar + # another-var: blah blah + # --- + _metadata_pat = re.compile("""^---[ \t]*\n((?:[ \t]*[^ \t:]+[ \t]*:[^\n]*\n)+)---[ \t]*\n""") + + def _extract_metadata(self, text): + # fast test + if not text.startswith("---"): + return text + match = self._metadata_pat.match(text) + if not match: + return text + + tail = text[len(match.group(0)):] + metadata_str = match.group(1).strip() + for line in metadata_str.split('\n'): + key, value = line.split(':', 1) + self.metadata[key.strip()] = value.strip() + + return tail + + + _emacs_oneliner_vars_pat = re.compile(r"-\*-\s*([^\r\n]*?)\s*-\*-", re.UNICODE) + # This regular expression is intended to match blocks like this: + # PREFIX Local Variables: SUFFIX + # PREFIX mode: Tcl SUFFIX + # PREFIX End: SUFFIX + # Some notes: + # - "[ \t]" is used instead of "\s" to specifically exclude newlines + # - "(\r\n|\n|\r)" is used instead of "$" because the sre engine does + # not like anything other than Unix-style line terminators. + _emacs_local_vars_pat = re.compile(r"""^ + (?P(?:[^\r\n|\n|\r])*?) + [\ \t]*Local\ Variables:[\ \t]* + (?P.*?)(?:\r\n|\n|\r) + (?P.*?\1End:) + """, re.IGNORECASE | re.MULTILINE | re.DOTALL | re.VERBOSE) + + def _get_emacs_vars(self, text): + """Return a dictionary of emacs-style local variables. + + Parsing is done loosely according to this spec (and according to + some in-practice deviations from this): + http://www.gnu.org/software/emacs/manual/html_node/emacs/Specifying-File-Variables.html#Specifying-File-Variables + """ + emacs_vars = {} + SIZE = pow(2, 13) # 8kB + + # Search near the start for a '-*-'-style one-liner of variables. + head = text[:SIZE] + if "-*-" in head: + match = self._emacs_oneliner_vars_pat.search(head) + if match: + emacs_vars_str = match.group(1) + assert '\n' not in emacs_vars_str + emacs_var_strs = [s.strip() for s in emacs_vars_str.split(';') + if s.strip()] + if len(emacs_var_strs) == 1 and ':' not in emacs_var_strs[0]: + # While not in the spec, this form is allowed by emacs: + # -*- Tcl -*- + # where the implied "variable" is "mode". This form + # is only allowed if there are no other variables. + emacs_vars["mode"] = emacs_var_strs[0].strip() + else: + for emacs_var_str in emacs_var_strs: + try: + variable, value = emacs_var_str.strip().split(':', 1) + except ValueError: + log.debug("emacs variables error: malformed -*- " + "line: %r", emacs_var_str) + continue + # Lowercase the variable name because Emacs allows "Mode" + # or "mode" or "MoDe", etc. + emacs_vars[variable.lower()] = value.strip() + + tail = text[-SIZE:] + if "Local Variables" in tail: + match = self._emacs_local_vars_pat.search(tail) + if match: + prefix = match.group("prefix") + suffix = match.group("suffix") + lines = match.group("content").splitlines(0) + #print "prefix=%r, suffix=%r, content=%r, lines: %s"\ + # % (prefix, suffix, match.group("content"), lines) + + # Validate the Local Variables block: proper prefix and suffix + # usage. + for i, line in enumerate(lines): + if not line.startswith(prefix): + log.debug("emacs variables error: line '%s' " + "does not use proper prefix '%s'" + % (line, prefix)) + return {} + # Don't validate suffix on last line. Emacs doesn't care, + # neither should we. + if i != len(lines)-1 and not line.endswith(suffix): + log.debug("emacs variables error: line '%s' " + "does not use proper suffix '%s'" + % (line, suffix)) + return {} + + # Parse out one emacs var per line. + continued_for = None + for line in lines[:-1]: # no var on the last line ("PREFIX End:") + if prefix: line = line[len(prefix):] # strip prefix + if suffix: line = line[:-len(suffix)] # strip suffix + line = line.strip() + if continued_for: + variable = continued_for + if line.endswith('\\'): + line = line[:-1].rstrip() + else: + continued_for = None + emacs_vars[variable] += ' ' + line + else: + try: + variable, value = line.split(':', 1) + except ValueError: + log.debug("local variables error: missing colon " + "in local variables entry: '%s'" % line) + continue + # Do NOT lowercase the variable name, because Emacs only + # allows "mode" (and not "Mode", "MoDe", etc.) in this block. + value = value.strip() + if value.endswith('\\'): + value = value[:-1].rstrip() + continued_for = variable + else: + continued_for = None + emacs_vars[variable] = value + + # Unquote values. + for var, val in list(emacs_vars.items()): + if len(val) > 1 and (val.startswith('"') and val.endswith('"') + or val.startswith('"') and val.endswith('"')): + emacs_vars[var] = val[1:-1] + + return emacs_vars + + # Cribbed from a post by Bart Lateur: + # + _detab_re = re.compile(r'(.*?)\t', re.M) + def _detab_sub(self, match): + g1 = match.group(1) + return g1 + (' ' * (self.tab_width - len(g1) % self.tab_width)) + def _detab(self, text): + r"""Remove (leading?) tabs from a file. + + >>> m = Markdown() + >>> m._detab("\tfoo") + ' foo' + >>> m._detab(" \tfoo") + ' foo' + >>> m._detab("\t foo") + ' foo' + >>> m._detab(" foo") + ' foo' + >>> m._detab(" foo\n\tbar\tblam") + ' foo\n bar blam' + """ + if '\t' not in text: + return text + return self._detab_re.subn(self._detab_sub, text)[0] + + # I broke out the html5 tags here and add them to _block_tags_a and + # _block_tags_b. This way html5 tags are easy to keep track of. + _html5tags = '|article|aside|header|hgroup|footer|nav|section|figure|figcaption' + + _block_tags_a = 'p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del' + _block_tags_a += _html5tags + + _strict_tag_block_re = re.compile(r""" + ( # save in \1 + ^ # start of line (with re.M) + <(%s) # start tag = \2 + \b # word break + (.*\n)*? # any number of lines, minimally matching + # the matching end tag + [ \t]* # trailing spaces/tabs + (?=\n+|\Z) # followed by a newline or end of document + ) + """ % _block_tags_a, + re.X | re.M) + + _block_tags_b = 'p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math' + _block_tags_b += _html5tags + + _liberal_tag_block_re = re.compile(r""" + ( # save in \1 + ^ # start of line (with re.M) + <(%s) # start tag = \2 + \b # word break + (.*\n)*? # any number of lines, minimally matching + .* # the matching end tag + [ \t]* # trailing spaces/tabs + (?=\n+|\Z) # followed by a newline or end of document + ) + """ % _block_tags_b, + re.X | re.M) + + _html_markdown_attr_re = re.compile( + r'''\s+markdown=("1"|'1')''') + def _hash_html_block_sub(self, match, raw=False): + html = match.group(1) + if raw and self.safe_mode: + html = self._sanitize_html(html) + elif 'markdown-in-html' in self.extras and 'markdown=' in html: + first_line = html.split('\n', 1)[0] + m = self._html_markdown_attr_re.search(first_line) + if m: + lines = html.split('\n') + middle = '\n'.join(lines[1:-1]) + last_line = lines[-1] + first_line = first_line[:m.start()] + first_line[m.end():] + f_key = _hash_text(first_line) + self.html_blocks[f_key] = first_line + l_key = _hash_text(last_line) + self.html_blocks[l_key] = last_line + return ''.join(["\n\n", f_key, + "\n\n", middle, "\n\n", + l_key, "\n\n"]) + key = _hash_text(html) + self.html_blocks[key] = html + return "\n\n" + key + "\n\n" + + def _hash_html_blocks(self, text, raw=False): + """Hashify HTML blocks + + We only want to do this for block-level HTML tags, such as headers, + lists, and tables. That's because we still want to wrap

s around + "paragraphs" that are wrapped in non-block-level tags, such as anchors, + phrase emphasis, and spans. The list of tags we're looking for is + hard-coded. + + @param raw {boolean} indicates if these are raw HTML blocks in + the original source. It makes a difference in "safe" mode. + """ + if '<' not in text: + return text + + # Pass `raw` value into our calls to self._hash_html_block_sub. + hash_html_block_sub = _curry(self._hash_html_block_sub, raw=raw) + + # First, look for nested blocks, e.g.: + #

+ #
+ # tags for inner block must be indented. + #
+ #
+ # + # The outermost tags must start at the left margin for this to match, and + # the inner nested divs must be indented. + # We need to do this before the next, more liberal match, because the next + # match will start at the first `
` and stop at the first `
`. + text = self._strict_tag_block_re.sub(hash_html_block_sub, text) + + # Now match more liberally, simply from `\n` to `\n` + text = self._liberal_tag_block_re.sub(hash_html_block_sub, text) + + # Special case just for
. It was easier to make a special + # case than to make the other regex more complicated. + if "", start_idx) + 3 + except ValueError: + break + + # Start position for next comment block search. + start = end_idx + + # Validate whitespace before comment. + if start_idx: + # - Up to `tab_width - 1` spaces before start_idx. + for i in range(self.tab_width - 1): + if text[start_idx - 1] != ' ': + break + start_idx -= 1 + if start_idx == 0: + break + # - Must be preceded by 2 newlines or hit the start of + # the document. + if start_idx == 0: + pass + elif start_idx == 1 and text[0] == '\n': + start_idx = 0 # to match minute detail of Markdown.pl regex + elif text[start_idx-2:start_idx] == '\n\n': + pass + else: + break + + # Validate whitespace after comment. + # - Any number of spaces and tabs. + while end_idx < len(text): + if text[end_idx] not in ' \t': + break + end_idx += 1 + # - Must be following by 2 newlines or hit end of text. + if text[end_idx:end_idx+2] not in ('', '\n', '\n\n'): + continue + + # Escape and hash (must match `_hash_html_block_sub`). + html = text[start_idx:end_idx] + if raw and self.safe_mode: + html = self._sanitize_html(html) + key = _hash_text(html) + self.html_blocks[key] = html + text = text[:start_idx] + "\n\n" + key + "\n\n" + text[end_idx:] + + if "xml" in self.extras: + # Treat XML processing instructions and namespaced one-liner + # tags as if they were block HTML tags. E.g., if standalone + # (i.e. are their own paragraph), the following do not get + # wrapped in a

tag: + # + # + # + _xml_oneliner_re = _xml_oneliner_re_from_tab_width(self.tab_width) + text = _xml_oneliner_re.sub(hash_html_block_sub, text) + + return text + + def _strip_link_definitions(self, text): + # Strips link definitions from text, stores the URLs and titles in + # hash references. + less_than_tab = self.tab_width - 1 + + # Link defs are in the form: + # [id]: url "optional title" + _link_def_re = re.compile(r""" + ^[ ]{0,%d}\[(.+)\]: # id = \1 + [ \t]* + \n? # maybe *one* newline + [ \t]* + ? # url = \2 + [ \t]* + (?: + \n? # maybe one newline + [ \t]* + (?<=\s) # lookbehind for whitespace + ['"(] + ([^\n]*) # title = \3 + ['")] + [ \t]* + )? # title is optional + (?:\n+|\Z) + """ % less_than_tab, re.X | re.M | re.U) + return _link_def_re.sub(self._extract_link_def_sub, text) + + def _extract_link_def_sub(self, match): + id, url, title = match.groups() + key = id.lower() # Link IDs are case-insensitive + self.urls[key] = self._encode_amps_and_angles(url) + if title: + self.titles[key] = title + return "" + + def _extract_footnote_def_sub(self, match): + id, text = match.groups() + text = _dedent(text, skip_first_line=not text.startswith('\n')).strip() + normed_id = re.sub(r'\W', '-', id) + # Ensure footnote text ends with a couple newlines (for some + # block gamut matches). + self.footnotes[normed_id] = text + "\n\n" + return "" + + def _strip_footnote_definitions(self, text): + """A footnote definition looks like this: + + [^note-id]: Text of the note. + + May include one or more indented paragraphs. + + Where, + - The 'note-id' can be pretty much anything, though typically it + is the number of the footnote. + - The first paragraph may start on the next line, like so: + + [^note-id]: + Text of the note. + """ + less_than_tab = self.tab_width - 1 + footnote_def_re = re.compile(r''' + ^[ ]{0,%d}\[\^(.+)\]: # id = \1 + [ \t]* + ( # footnote text = \2 + # First line need not start with the spaces. + (?:\s*.*\n+) + (?: + (?:[ ]{%d} | \t) # Subsequent lines must be indented. + .*\n+ + )* + ) + # Lookahead for non-space at line-start, or end of doc. + (?:(?=^[ ]{0,%d}\S)|\Z) + ''' % (less_than_tab, self.tab_width, self.tab_width), + re.X | re.M) + return footnote_def_re.sub(self._extract_footnote_def_sub, text) + + + _hr_data = [ + ('*', re.compile(r"^[ ]{0,3}\*(.*?)$", re.M)), + ('-', re.compile(r"^[ ]{0,3}\-(.*?)$", re.M)), + ('_', re.compile(r"^[ ]{0,3}\_(.*?)$", re.M)), + ] + + def _run_block_gamut(self, text): + # These are all the transformations that form block-level + # tags like paragraphs, headers, and list items. + + if "fenced-code-blocks" in self.extras: + text = self._do_fenced_code_blocks(text) + + text = self._do_headers(text) + + # Do Horizontal Rules: + # On the number of spaces in horizontal rules: The spec is fuzzy: "If + # you wish, you may use spaces between the hyphens or asterisks." + # Markdown.pl 1.0.1's hr regexes limit the number of spaces between the + # hr chars to one or two. We'll reproduce that limit here. + hr = "\n tags around block-level tags. + text = self._hash_html_blocks(text) + + text = self._form_paragraphs(text) + + return text + + def _pyshell_block_sub(self, match): + lines = match.group(0).splitlines(0) + _dedentlines(lines) + indent = ' ' * self.tab_width + s = ('\n' # separate from possible cuddled paragraph + + indent + ('\n'+indent).join(lines) + + '\n\n') + return s + + def _prepare_pyshell_blocks(self, text): + """Ensure that Python interactive shell sessions are put in + code blocks -- even if not properly indented. + """ + if ">>>" not in text: + return text + + less_than_tab = self.tab_width - 1 + _pyshell_block_re = re.compile(r""" + ^([ ]{0,%d})>>>[ ].*\n # first line + ^(\1.*\S+.*\n)* # any number of subsequent lines + ^\n # ends with a blank line + """ % less_than_tab, re.M | re.X) + + return _pyshell_block_re.sub(self._pyshell_block_sub, text) + + def _wiki_table_sub(self, match): + ttext = match.group(0).strip() + #print 'wiki table: %r' % match.group(0) + rows = [] + for line in ttext.splitlines(0): + line = line.strip()[2:-2].strip() + row = [c.strip() for c in re.split(r'(?', '

'] + for row in rows: + hrow = [''] + for cell in row: + hrow.append('') + hrow.append('') + hlines.append(''.join(hrow)) + hlines += ['', '
') + hrow.append(self._run_span_gamut(cell)) + hrow.append('
'] + return '\n'.join(hlines) + '\n' + + def _do_wiki_tables(self, text): + # Optimization. + if "||" not in text: + return text + + less_than_tab = self.tab_width - 1 + wiki_table_re = re.compile(r''' + (?:(?<=\n\n)|\A\n?) # leading blank line + ^([ ]{0,%d})\|\|.+?\|\|[ ]*\n # first line + (^\1\|\|.+?\|\|\n)* # any number of subsequent lines + ''' % less_than_tab, re.M | re.X) + return wiki_table_re.sub(self._wiki_table_sub, text) + + def _run_span_gamut(self, text): + # These are all the transformations that occur *within* block-level + # tags like paragraphs, headers, and list items. + + text = self._do_code_spans(text) + + text = self._escape_special_chars(text) + + # Process anchor and image tags. + text = self._do_links(text) + + # Make links out of things like `` + # Must come after _do_links(), because you can use < and > + # delimiters in inline links like [this](). + text = self._do_auto_links(text) + + if "link-patterns" in self.extras: + text = self._do_link_patterns(text) + + text = self._encode_amps_and_angles(text) + + text = self._do_italics_and_bold(text) + + if "smarty-pants" in self.extras: + text = self._do_smart_punctuation(text) + + # Do hard breaks: + text = re.sub(r" {2,}\n", " + | + # auto-link (e.g., ) + <\w+[^>]*> + | + # comment + | + <\?.*?\?> # processing instruction + ) + """, re.X) + + def _escape_special_chars(self, text): + # Python markdown note: the HTML tokenization here differs from + # that in Markdown.pl, hence the behaviour for subtle cases can + # differ (I believe the tokenizer here does a better job because + # it isn't susceptible to unmatched '<' and '>' in HTML tags). + # Note, however, that '>' is not allowed in an auto-link URL + # here. + escaped = [] + is_html_markup = False + for token in self._sorta_html_tokenize_re.split(text): + if is_html_markup: + # Within tags/HTML-comments/auto-links, encode * and _ + # so they don't conflict with their use in Markdown for + # italics and strong. We're replacing each such + # character with its corresponding MD5 checksum value; + # this is likely overkill, but it should prevent us from + # colliding with the escape values by accident. + escaped.append(token.replace('*', self._escape_table['*']) + .replace('_', self._escape_table['_'])) + else: + escaped.append(self._encode_backslash_escapes(token)) + is_html_markup = not is_html_markup + return ''.join(escaped) + + def _hash_html_spans(self, text): + # Used for safe_mode. + + def _is_auto_link(s): + if ':' in s and self._auto_link_re.match(s): + return True + elif '@' in s and self._auto_email_link_re.match(s): + return True + return False + + tokens = [] + is_html_markup = False + for token in self._sorta_html_tokenize_re.split(text): + if is_html_markup and not _is_auto_link(token): + sanitized = self._sanitize_html(token) + key = _hash_text(sanitized) + self.html_spans[key] = sanitized + tokens.append(key) + else: + tokens.append(token) + is_html_markup = not is_html_markup + return ''.join(tokens) + + def _unhash_html_spans(self, text): + for key, sanitized in list(self.html_spans.items()): + text = text.replace(key, sanitized) + return text + + def _sanitize_html(self, s): + if self.safe_mode == "replace": + return self.html_removed_text + elif self.safe_mode == "escape": + replacements = [ + ('&', '&'), + ('<', '<'), + ('>', '>'), + ] + for before, after in replacements: + s = s.replace(before, after) + return s + else: + raise MarkdownError("invalid value for 'safe_mode': %r (must be " + "'escape' or 'replace')" % self.safe_mode) + + _tail_of_inline_link_re = re.compile(r''' + # Match tail of: [text](/url/) or [text](/url/ "title") + \( # literal paren + [ \t]* + (?P # \1 + <.*?> + | + .*? + ) + [ \t]* + ( # \2 + (['"]) # quote char = \3 + (?P.*?) + \3 # matching quote + )? # title is optional + \) + ''', re.X | re.S) + _tail_of_reference_link_re = re.compile(r''' + # Match tail of: [text][id] + [ ]? # one optional space + (?:\n[ ]*)? # one optional newline followed by spaces + \[ + (?P<id>.*?) + \] + ''', re.X | re.S) + + def _do_links(self, text): + """Turn Markdown link shortcuts into XHTML <a> and <img> tags. + + This is a combination of Markdown.pl's _DoAnchors() and + _DoImages(). They are done together because that simplified the + approach. It was necessary to use a different approach than + Markdown.pl because of the lack of atomic matching support in + Python's regex engine used in $g_nested_brackets. + """ + MAX_LINK_TEXT_SENTINEL = 3000 # markdown2 issue 24 + + # `anchor_allowed_pos` is used to support img links inside + # anchors, but not anchors inside anchors. An anchor's start + # pos must be `>= anchor_allowed_pos`. + anchor_allowed_pos = 0 + + curr_pos = 0 + while True: # Handle the next link. + # The next '[' is the start of: + # - an inline anchor: [text](url "title") + # - a reference anchor: [text][id] + # - an inline img: ![text](url "title") + # - a reference img: ![text][id] + # - a footnote ref: [^id] + # (Only if 'footnotes' extra enabled) + # - a footnote defn: [^id]: ... + # (Only if 'footnotes' extra enabled) These have already + # been stripped in _strip_footnote_definitions() so no + # need to watch for them. + # - a link definition: [id]: url "title" + # These have already been stripped in + # _strip_link_definitions() so no need to watch for them. + # - not markup: [...anything else... + try: + start_idx = text.index('[', curr_pos) + except ValueError: + break + text_length = len(text) + + # Find the matching closing ']'. + # Markdown.pl allows *matching* brackets in link text so we + # will here too. Markdown.pl *doesn't* currently allow + # matching brackets in img alt text -- we'll differ in that + # regard. + bracket_depth = 0 + for p in range(start_idx+1, min(start_idx+MAX_LINK_TEXT_SENTINEL, + text_length)): + ch = text[p] + if ch == ']': + bracket_depth -= 1 + if bracket_depth < 0: + break + elif ch == '[': + bracket_depth += 1 + else: + # Closing bracket not found within sentinel length. + # This isn't markup. + curr_pos = start_idx + 1 + continue + link_text = text[start_idx+1:p] + + # Possibly a footnote ref? + if "footnotes" in self.extras and link_text.startswith("^"): + normed_id = re.sub(r'\W', '-', link_text[1:]) + if normed_id in self.footnotes: + self.footnote_ids.append(normed_id) + result = '<sup class="footnote-ref" id="fnref-%s">' \ + '<a href="#fn-%s">%s</a></sup>' \ + % (normed_id, normed_id, len(self.footnote_ids)) + text = text[:start_idx] + result + text[p+1:] + else: + # This id isn't defined, leave the markup alone. + curr_pos = p+1 + continue + + # Now determine what this is by the remainder. + p += 1 + if p == text_length: + return text + + # Inline anchor or img? + if text[p] == '(': # attempt at perf improvement + match = self._tail_of_inline_link_re.match(text, p) + if match: + # Handle an inline anchor or img. + is_img = start_idx > 0 and text[start_idx-1] == "!" + if is_img: + start_idx -= 1 + + url, title = match.group("url"), match.group("title") + if url and url[0] == '<': + url = url[1:-1] # '<url>' -> 'url' + # We've got to encode these to avoid conflicting + # with italics/bold. + url = url.replace('*', self._escape_table['*']) \ + .replace('_', self._escape_table['_']) + if title: + title_str = ' title="%s"' % ( + _xml_escape_attr(title) + .replace('*', self._escape_table['*']) + .replace('_', self._escape_table['_'])) + else: + title_str = '' + if is_img: + result = '<img src="%s" alt="%s"%s%s' \ + % (url.replace('"', '"'), + _xml_escape_attr(link_text), + title_str, self.empty_element_suffix) + if "smarty-pants" in self.extras: + result = result.replace('"', self._escape_table['"']) + curr_pos = start_idx + len(result) + text = text[:start_idx] + result + text[match.end():] + elif start_idx >= anchor_allowed_pos: + result_head = '<a href="%s"%s>' % (url, title_str) + result = '%s%s</a>' % (result_head, link_text) + if "smarty-pants" in self.extras: + result = result.replace('"', self._escape_table['"']) + # <img> allowed from curr_pos on, <a> from + # anchor_allowed_pos on. + curr_pos = start_idx + len(result_head) + anchor_allowed_pos = start_idx + len(result) + text = text[:start_idx] + result + text[match.end():] + else: + # Anchor not allowed here. + curr_pos = start_idx + 1 + continue + + # Reference anchor or img? + else: + match = self._tail_of_reference_link_re.match(text, p) + if match: + # Handle a reference-style anchor or img. + is_img = start_idx > 0 and text[start_idx-1] == "!" + if is_img: + start_idx -= 1 + link_id = match.group("id").lower() + if not link_id: + link_id = link_text.lower() # for links like [this][] + if link_id in self.urls: + url = self.urls[link_id] + # We've got to encode these to avoid conflicting + # with italics/bold. + url = url.replace('*', self._escape_table['*']) \ + .replace('_', self._escape_table['_']) + title = self.titles.get(link_id) + if title: + before = title + title = _xml_escape_attr(title) \ + .replace('*', self._escape_table['*']) \ + .replace('_', self._escape_table['_']) + title_str = ' title="%s"' % title + else: + title_str = '' + if is_img: + result = '<img src="%s" alt="%s"%s%s' \ + % (url.replace('"', '"'), + link_text.replace('"', '"'), + title_str, self.empty_element_suffix) + if "smarty-pants" in self.extras: + result = result.replace('"', self._escape_table['"']) + curr_pos = start_idx + len(result) + text = text[:start_idx] + result + text[match.end():] + elif start_idx >= anchor_allowed_pos: + result = '<a href="%s"%s>%s</a>' \ + % (url, title_str, link_text) + result_head = '<a href="%s"%s>' % (url, title_str) + result = '%s%s</a>' % (result_head, link_text) + if "smarty-pants" in self.extras: + result = result.replace('"', self._escape_table['"']) + # <img> allowed from curr_pos on, <a> from + # anchor_allowed_pos on. + curr_pos = start_idx + len(result_head) + anchor_allowed_pos = start_idx + len(result) + text = text[:start_idx] + result + text[match.end():] + else: + # Anchor not allowed here. + curr_pos = start_idx + 1 + else: + # This id isn't defined, leave the markup alone. + curr_pos = match.end() + continue + + # Otherwise, it isn't markup. + curr_pos = start_idx + 1 + + return text + + def header_id_from_text(self, text, prefix, n): + """Generate a header id attribute value from the given header + HTML content. + + This is only called if the "header-ids" extra is enabled. + Subclasses may override this for different header ids. + + @param text {str} The text of the header tag + @param prefix {str} The requested prefix for header ids. This is the + value of the "header-ids" extra key, if any. Otherwise, None. + @param n {int} The <hN> tag number, i.e. `1` for an <h1> tag. + @returns {str} The value for the header tag's "id" attribute. Return + None to not have an id attribute and to exclude this header from + the TOC (if the "toc" extra is specified). + """ + header_id = _slugify(text) + if prefix and isinstance(prefix, base_string_type): + header_id = prefix + '-' + header_id + if header_id in self._count_from_header_id: + self._count_from_header_id[header_id] += 1 + header_id += '-%s' % self._count_from_header_id[header_id] + else: + self._count_from_header_id[header_id] = 1 + return header_id + + _toc = None + def _toc_add_entry(self, level, id, name): + if self._toc is None: + self._toc = [] + self._toc.append((level, id, self._unescape_special_chars(name))) + + _setext_h_re = re.compile(r'^(.+)[ \t]*\n(=+|-+)[ \t]*\n+', re.M) + def _setext_h_sub(self, match): + n = {"=": 1, "-": 2}[match.group(2)[0]] + demote_headers = self.extras.get("demote-headers") + if demote_headers: + n = min(n + demote_headers, 6) + header_id_attr = "" + if "header-ids" in self.extras: + header_id = self.header_id_from_text(match.group(1), + self.extras["header-ids"], n) + if header_id: + header_id_attr = ' id="%s"' % header_id + html = self._run_span_gamut(match.group(1)) + if "toc" in self.extras and header_id: + self._toc_add_entry(n, header_id, html) + return "<h%d%s>%s</h%d>\n\n" % (n, header_id_attr, html, n) + + _atx_h_re = re.compile(r''' + ^(\#{1,6}) # \1 = string of #'s + [ \t]+ + (.+?) # \2 = Header text + [ \t]* + (?<!\\) # ensure not an escaped trailing '#' + \#* # optional closing #'s (not counted) + \n+ + ''', re.X | re.M) + def _atx_h_sub(self, match): + n = len(match.group(1)) + demote_headers = self.extras.get("demote-headers") + if demote_headers: + n = min(n + demote_headers, 6) + header_id_attr = "" + if "header-ids" in self.extras: + header_id = self.header_id_from_text(match.group(2), + self.extras["header-ids"], n) + if header_id: + header_id_attr = ' id="%s"' % header_id + html = self._run_span_gamut(match.group(2)) + if "toc" in self.extras and header_id: + self._toc_add_entry(n, header_id, html) + return "<h%d%s>%s</h%d>\n\n" % (n, header_id_attr, html, n) + + def _do_headers(self, text): + # Setext-style headers: + # Header 1 + # ======== + # + # Header 2 + # -------- + text = self._setext_h_re.sub(self._setext_h_sub, text) + + # atx-style headers: + # # Header 1 + # ## Header 2 + # ## Header 2 with closing hashes ## + # ... + # ###### Header 6 + text = self._atx_h_re.sub(self._atx_h_sub, text) + + return text + + + _marker_ul_chars = '*+-' + _marker_any = r'(?:[%s]|\d+\.)' % _marker_ul_chars + _marker_ul = '(?:[%s])' % _marker_ul_chars + _marker_ol = r'(?:\d+\.)' + + def _list_sub(self, match): + lst = match.group(1) + lst_type = match.group(3) in self._marker_ul_chars and "ul" or "ol" + result = self._process_list_items(lst) + if self.list_level: + return "<%s>\n%s</%s>\n" % (lst_type, result, lst_type) + else: + return "<%s>\n%s</%s>\n\n" % (lst_type, result, lst_type) + + def _do_lists(self, text): + # Form HTML ordered (numbered) and unordered (bulleted) lists. + + # Iterate over each *non-overlapping* list match. + pos = 0 + while True: + # Find the *first* hit for either list style (ul or ol). We + # match ul and ol separately to avoid adjacent lists of different + # types running into each other (see issue #16). + hits = [] + for marker_pat in (self._marker_ul, self._marker_ol): + less_than_tab = self.tab_width - 1 + whole_list = r''' + ( # \1 = whole list + ( # \2 + [ ]{0,%d} + (%s) # \3 = first list item marker + [ \t]+ + (?!\ *\3\ ) # '- - - ...' isn't a list. See 'not_quite_a_list' test case. + ) + (?:.+?) + ( # \4 + \Z + | + \n{2,} + (?=\S) + (?! # Negative lookahead for another list item marker + [ \t]* + %s[ \t]+ + ) + ) + ) + ''' % (less_than_tab, marker_pat, marker_pat) + if self.list_level: # sub-list + list_re = re.compile("^"+whole_list, re.X | re.M | re.S) + else: + list_re = re.compile(r"(?:(?<=\n\n)|\A\n?)"+whole_list, + re.X | re.M | re.S) + match = list_re.search(text, pos) + if match: + hits.append((match.start(), match)) + if not hits: + break + hits.sort() + match = hits[0][1] + start, end = match.span() + text = text[:start] + self._list_sub(match) + text[end:] + pos = end + + return text + + _list_item_re = re.compile(r''' + (\n)? # leading line = \1 + (^[ \t]*) # leading whitespace = \2 + (?P<marker>%s) [ \t]+ # list marker = \3 + ((?:.+?) # list item text = \4 + (\n{1,2})) # eols = \5 + (?= \n* (\Z | \2 (?P<next_marker>%s) [ \t]+)) + ''' % (_marker_any, _marker_any), + re.M | re.X | re.S) + + _last_li_endswith_two_eols = False + def _list_item_sub(self, match): + item = match.group(4) + leading_line = match.group(1) + leading_space = match.group(2) + if leading_line or "\n\n" in item or self._last_li_endswith_two_eols: + item = self._run_block_gamut(self._outdent(item)) + else: + # Recursion for sub-lists: + item = self._do_lists(self._outdent(item)) + if item.endswith('\n'): + item = item[:-1] + item = self._run_span_gamut(item) + self._last_li_endswith_two_eols = (len(match.group(5)) == 2) + return "<li>%s</li>\n" % item + + def _process_list_items(self, list_str): + # Process the contents of a single ordered or unordered list, + # splitting it into individual list items. + + # The $g_list_level global keeps track of when we're inside a list. + # Each time we enter a list, we increment it; when we leave a list, + # we decrement. If it's zero, we're not in a list anymore. + # + # We do this because when we're not inside a list, we want to treat + # something like this: + # + # I recommend upgrading to version + # 8. Oops, now this line is treated + # as a sub-list. + # + # As a single paragraph, despite the fact that the second line starts + # with a digit-period-space sequence. + # + # Whereas when we're inside a list (or sub-list), that line will be + # treated as the start of a sub-list. What a kludge, huh? This is + # an aspect of Markdown's syntax that's hard to parse perfectly + # without resorting to mind-reading. Perhaps the solution is to + # change the syntax rules such that sub-lists must start with a + # starting cardinal number; e.g. "1." or "a.". + self.list_level += 1 + self._last_li_endswith_two_eols = False + list_str = list_str.rstrip('\n') + '\n' + list_str = self._list_item_re.sub(self._list_item_sub, list_str) + self.list_level -= 1 + return list_str + + def _get_pygments_lexer(self, lexer_name): + try: + from pygments import lexers, util + except ImportError: + return None + try: + return lexers.get_lexer_by_name(lexer_name) + except util.ClassNotFound: + return None + + def _color_with_pygments(self, codeblock, lexer, **formatter_opts): + import pygments + import pygments.formatters + + class HtmlCodeFormatter(pygments.formatters.HtmlFormatter): + def _wrap_code(self, inner): + """A function for use in a Pygments Formatter which + wraps in <code> tags. + """ + yield 0, "<code>" + for tup in inner: + yield tup + yield 0, "</code>" + + def wrap(self, source, outfile): + """Return the source with a code, pre, and div.""" + return self._wrap_div(self._wrap_pre(self._wrap_code(source))) + + formatter_opts.setdefault("cssclass", "codehilite") + formatter = HtmlCodeFormatter(**formatter_opts) + return pygments.highlight(codeblock, lexer, formatter) + + def _code_block_sub(self, match, is_fenced_code_block=False): + lexer_name = None + if is_fenced_code_block: + lexer_name = match.group(1) + if lexer_name: + formatter_opts = self.extras['fenced-code-blocks'] or {} + codeblock = match.group(2) + codeblock = codeblock[:-1] # drop one trailing newline + else: + codeblock = match.group(1) + codeblock = self._outdent(codeblock) + codeblock = self._detab(codeblock) + codeblock = codeblock.lstrip('\n') # trim leading newlines + codeblock = codeblock.rstrip() # trim trailing whitespace + + # Note: "code-color" extra is DEPRECATED. + if "code-color" in self.extras and codeblock.startswith(":::"): + lexer_name, rest = codeblock.split('\n', 1) + lexer_name = lexer_name[3:].strip() + codeblock = rest.lstrip("\n") # Remove lexer declaration line. + formatter_opts = self.extras['code-color'] or {} + + if lexer_name: + lexer = self._get_pygments_lexer(lexer_name) + if lexer: + colored = self._color_with_pygments(codeblock, lexer, + **formatter_opts) + return "\n\n%s\n\n" % colored + + codeblock = self._encode_code(codeblock) + pre_class_str = self._html_class_str_from_tag("pre") + code_class_str = self._html_class_str_from_tag("code") + return "\n\n<pre%s><code%s>%s\n</code></pre>\n\n" % ( + pre_class_str, code_class_str, codeblock) + + def _html_class_str_from_tag(self, tag): + """Get the appropriate ' class="..."' string (note the leading + space), if any, for the given tag. + """ + if "html-classes" not in self.extras: + return "" + try: + html_classes_from_tag = self.extras["html-classes"] + except TypeError: + return "" + else: + if tag in html_classes_from_tag: + return ' class="%s"' % html_classes_from_tag[tag] + return "" + + def _do_code_blocks(self, text): + """Process Markdown `<pre><code>` blocks.""" + code_block_re = re.compile(r''' + (?:\n\n|\A\n?) + ( # $1 = the code block -- one or more lines, starting with a space/tab + (?: + (?:[ ]{%d} | \t) # Lines must start with a tab or a tab-width of spaces + .*\n+ + )+ + ) + ((?=^[ ]{0,%d}\S)|\Z) # Lookahead for non-space at line-start, or end of doc + ''' % (self.tab_width, self.tab_width), + re.M | re.X) + return code_block_re.sub(self._code_block_sub, text) + + _fenced_code_block_re = re.compile(r''' + (?:\n\n|\A\n?) + ^```([\w+-]+)?[ \t]*\n # opening fence, $1 = optional lang + (.*?) # $2 = code block content + ^```[ \t]*\n # closing fence + ''', re.M | re.X | re.S) + + def _fenced_code_block_sub(self, match): + return self._code_block_sub(match, is_fenced_code_block=True); + + def _do_fenced_code_blocks(self, text): + """Process ```-fenced unindented code blocks ('fenced-code-blocks' extra).""" + return self._fenced_code_block_re.sub(self._fenced_code_block_sub, text) + + # Rules for a code span: + # - backslash escapes are not interpreted in a code span + # - to include one or or a run of more backticks the delimiters must + # be a longer run of backticks + # - cannot start or end a code span with a backtick; pad with a + # space and that space will be removed in the emitted HTML + # See `test/tm-cases/escapes.text` for a number of edge-case + # examples. + _code_span_re = re.compile(r''' + (?<!\\) + (`+) # \1 = Opening run of ` + (?!`) # See Note A test/tm-cases/escapes.text + (.+?) # \2 = The code block + (?<!`) + \1 # Matching closer + (?!`) + ''', re.X | re.S) + + def _code_span_sub(self, match): + c = match.group(2).strip(" \t") + c = self._encode_code(c) + return "<code>%s</code>" % c + + def _do_code_spans(self, text): + # * Backtick quotes are used for <code></code> spans. + # + # * You can use multiple backticks as the delimiters if you want to + # include literal backticks in the code span. So, this input: + # + # Just type ``foo `bar` baz`` at the prompt. + # + # Will translate to: + # + # <p>Just type <code>foo `bar` baz</code> at the prompt.</p> + # + # There's no arbitrary limit to the number of backticks you + # can use as delimters. If you need three consecutive backticks + # in your code, use four for delimiters, etc. + # + # * You can use spaces to get literal backticks at the edges: + # + # ... type `` `bar` `` ... + # + # Turns to: + # + # ... type <code>`bar`</code> ... + return self._code_span_re.sub(self._code_span_sub, text) + + def _encode_code(self, text): + """Encode/escape certain characters inside Markdown code runs. + The point is that in code, these characters are literals, + and lose their special Markdown meanings. + """ + replacements = [ + # Encode all ampersands; HTML entities are not + # entities within a Markdown code span. + ('&', '&'), + # Do the angle bracket song and dance: + ('<', '<'), + ('>', '>'), + ] + for before, after in replacements: + text = text.replace(before, after) + hashed = _hash_text(text) + self._escape_table[text] = hashed + return hashed + + _strong_re = re.compile(r"(\*\*|__)(?=\S)(.+?[*_]*)(?<=\S)\1", re.S) + _em_re = re.compile(r"(\*|_)(?=\S)(.+?)(?<=\S)\1", re.S) + _code_friendly_strong_re = re.compile(r"\*\*(?=\S)(.+?[*_]*)(?<=\S)\*\*", re.S) + _code_friendly_em_re = re.compile(r"\*(?=\S)(.+?)(?<=\S)\*", re.S) + def _do_italics_and_bold(self, text): + # <strong> must go first: + if "code-friendly" in self.extras: + text = self._code_friendly_strong_re.sub(r"<strong>\1</strong>", text) + text = self._code_friendly_em_re.sub(r"<em>\1</em>", text) + else: + text = self._strong_re.sub(r"<strong>\2</strong>", text) + text = self._em_re.sub(r"<em>\2</em>", text) + return text + + # "smarty-pants" extra: Very liberal in interpreting a single prime as an + # apostrophe; e.g. ignores the fact that "round", "bout", "twer", and + # "twixt" can be written without an initial apostrophe. This is fine because + # using scare quotes (single quotation marks) is rare. + _apostrophe_year_re = re.compile(r"'(\d\d)(?=(\s|,|;|\.|\?|!|$))") + _contractions = ["tis", "twas", "twer", "neath", "o", "n", + "round", "bout", "twixt", "nuff", "fraid", "sup"] + def _do_smart_contractions(self, text): + text = self._apostrophe_year_re.sub(r"’\1", text) + for c in self._contractions: + text = text.replace("'%s" % c, "’%s" % c) + text = text.replace("'%s" % c.capitalize(), + "’%s" % c.capitalize()) + return text + + # Substitute double-quotes before single-quotes. + _opening_single_quote_re = re.compile(r"(?<!\S)'(?=\S)") + _opening_double_quote_re = re.compile(r'(?<!\S)"(?=\S)') + _closing_single_quote_re = re.compile(r"(?<=\S)'") + _closing_double_quote_re = re.compile(r'(?<=\S)"(?=(\s|,|;|\.|\?|!|$))') + def _do_smart_punctuation(self, text): + """Fancifies 'single quotes', "double quotes", and apostrophes. + Converts --, ---, and ... into en dashes, em dashes, and ellipses. + + Inspiration is: <http://daringfireball.net/projects/smartypants/> + See "test/tm-cases/smarty_pants.text" for a full discussion of the + support here and + <http://code.google.com/p/python-markdown2/issues/detail?id=42> for a + discussion of some diversion from the original SmartyPants. + """ + if "'" in text: # guard for perf + text = self._do_smart_contractions(text) + text = self._opening_single_quote_re.sub("‘", text) + text = self._closing_single_quote_re.sub("’", text) + + if '"' in text: # guard for perf + text = self._opening_double_quote_re.sub("“", text) + text = self._closing_double_quote_re.sub("”", text) + + text = text.replace("---", "—") + text = text.replace("--", "–") + text = text.replace("...", "…") + text = text.replace(" . . . ", "…") + text = text.replace(". . .", "…") + return text + + _block_quote_re = re.compile(r''' + ( # Wrap whole match in \1 + ( + ^[ \t]*>[ \t]? # '>' at the start of a line + .+\n # rest of the first line + (.+\n)* # subsequent consecutive lines + \n* # blanks + )+ + ) + ''', re.M | re.X) + _bq_one_level_re = re.compile('^[ \t]*>[ \t]?', re.M); + + _html_pre_block_re = re.compile(r'(\s*<pre>.+?</pre>)', re.S) + def _dedent_two_spaces_sub(self, match): + return re.sub(r'(?m)^ ', '', match.group(1)) + + def _block_quote_sub(self, match): + bq = match.group(1) + bq = self._bq_one_level_re.sub('', bq) # trim one level of quoting + bq = self._ws_only_line_re.sub('', bq) # trim whitespace-only lines + bq = self._run_block_gamut(bq) # recurse + + bq = re.sub('(?m)^', ' ', bq) + # These leading spaces screw with <pre> content, so we need to fix that: + bq = self._html_pre_block_re.sub(self._dedent_two_spaces_sub, bq) + + return "<blockquote>\n%s\n</blockquote>\n\n" % bq + + def _do_block_quotes(self, text): + if '>' not in text: + return text + return self._block_quote_re.sub(self._block_quote_sub, text) + + def _form_paragraphs(self, text): + # Strip leading and trailing lines: + text = text.strip('\n') + + # Wrap <p> tags. + grafs = [] + for i, graf in enumerate(re.split(r"\n{2,}", text)): + if graf in self.html_blocks: + # Unhashify HTML blocks + grafs.append(self.html_blocks[graf]) + else: + cuddled_list = None + if "cuddled-lists" in self.extras: + # Need to put back trailing '\n' for `_list_item_re` + # match at the end of the paragraph. + li = self._list_item_re.search(graf + '\n') + # Two of the same list marker in this paragraph: a likely + # candidate for a list cuddled to preceding paragraph + # text (issue 33). Note the `[-1]` is a quick way to + # consider numeric bullets (e.g. "1." and "2.") to be + # equal. + if (li and len(li.group(2)) <= 3 and li.group("next_marker") + and li.group("marker")[-1] == li.group("next_marker")[-1]): + start = li.start() + cuddled_list = self._do_lists(graf[start:]).rstrip("\n") + assert cuddled_list.startswith("<ul>") or cuddled_list.startswith("<ol>") + graf = graf[:start] + + # Wrap <p> tags. + graf = self._run_span_gamut(graf) + grafs.append("<p>" + graf.lstrip(" \t") + "</p>") + + if cuddled_list: + grafs.append(cuddled_list) + + return "\n\n".join(grafs) + + def _add_footnotes(self, text): + if self.footnotes: + footer = [ + '<div class="footnotes">', + '<hr' + self.empty_element_suffix, + '<ol>', + ] + for i, id in enumerate(self.footnote_ids): + if i != 0: + footer.append('') + footer.append('<li id="fn-%s">' % id) + footer.append(self._run_block_gamut(self.footnotes[id])) + backlink = ('<a href="#fnref-%s" ' + 'class="footnoteBackLink" ' + 'title="Jump back to footnote %d in the text.">' + '↩</a>' % (id, i+1)) + if footer[-1].endswith("</p>"): + footer[-1] = footer[-1][:-len("</p>")] \ + + ' ' + backlink + "</p>" + else: + footer.append("\n<p>%s</p>" % backlink) + footer.append('</li>') + footer.append('</ol>') + footer.append('</div>') + return text + '\n\n' + '\n'.join(footer) + else: + return text + + # Ampersand-encoding based entirely on Nat Irons's Amputator MT plugin: + # http://bumppo.net/projects/amputator/ + _ampersand_re = re.compile(r'&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)') + _naked_lt_re = re.compile(r'<(?![a-z/?\$!])', re.I) + _naked_gt_re = re.compile(r'''(?<![a-z0-9?!/'"-])>''', re.I) + + def _encode_amps_and_angles(self, text): + # Smart processing for ampersands and angle brackets that need + # to be encoded. + text = self._ampersand_re.sub('&', text) + + # Encode naked <'s + text = self._naked_lt_re.sub('<', text) + + # Encode naked >'s + # Note: Other markdown implementations (e.g. Markdown.pl, PHP + # Markdown) don't do this. + text = self._naked_gt_re.sub('>', text) + return text + + def _encode_backslash_escapes(self, text): + for ch, escape in list(self._escape_table.items()): + text = text.replace("\\"+ch, escape) + return text + + _auto_link_re = re.compile(r'<((https?|ftp):[^\'">\s]+)>', re.I) + def _auto_link_sub(self, match): + g1 = match.group(1) + return '<a href="%s">%s</a>' % (g1, g1) + + _auto_email_link_re = re.compile(r""" + < + (?:mailto:)? + ( + [-.\w]+ + \@ + [-\w]+(\.[-\w]+)*\.[a-z]+ + ) + > + """, re.I | re.X | re.U) + def _auto_email_link_sub(self, match): + return self._encode_email_address( + self._unescape_special_chars(match.group(1))) + + def _do_auto_links(self, text): + text = self._auto_link_re.sub(self._auto_link_sub, text) + text = self._auto_email_link_re.sub(self._auto_email_link_sub, text) + return text + + def _encode_email_address(self, addr): + # Input: an email address, e.g. "foo@example.com" + # + # Output: the email address as a mailto link, with each character + # of the address encoded as either a decimal or hex entity, in + # the hopes of foiling most address harvesting spam bots. E.g.: + # + # <a href="mailto:foo@e + # xample.com">foo + # @example.com</a> + # + # Based on a filter by Matthew Wickline, posted to the BBEdit-Talk + # mailing list: <http://tinyurl.com/yu7ue> + chars = [_xml_encode_email_char_at_random(ch) + for ch in "mailto:" + addr] + # Strip the mailto: from the visible part. + addr = '<a href="%s">%s</a>' \ + % (''.join(chars), ''.join(chars[7:])) + return addr + + def _do_link_patterns(self, text): + """Caveat emptor: there isn't much guarding against link + patterns being formed inside other standard Markdown links, e.g. + inside a [link def][like this]. + + Dev Notes: *Could* consider prefixing regexes with a negative + lookbehind assertion to attempt to guard against this. + """ + link_from_hash = {} + for regex, repl in self.link_patterns: + replacements = [] + for match in regex.finditer(text): + if hasattr(repl, "__call__"): + href = repl(match) + else: + href = match.expand(repl) + replacements.append((match.span(), href)) + for (start, end), href in reversed(replacements): + escaped_href = ( + href.replace('"', '"') # b/c of attr quote + # To avoid markdown <em> and <strong>: + .replace('*', self._escape_table['*']) + .replace('_', self._escape_table['_'])) + link = '<a href="%s">%s</a>' % (escaped_href, text[start:end]) + hash = _hash_text(link) + link_from_hash[hash] = link + text = text[:start] + hash + text[end:] + for hash, link in list(link_from_hash.items()): + text = text.replace(hash, link) + return text + + def _unescape_special_chars(self, text): + # Swap back in all the special characters we've hidden. + for ch, hash in list(self._escape_table.items()): + text = text.replace(hash, ch) + return text + + def _outdent(self, text): + # Remove one level of line-leading tabs or spaces + return self._outdent_re.sub('', text) + + +class MarkdownWithExtras(Markdown): + """A markdowner class that enables most extras: + + - footnotes + - code-color (only has effect if 'pygments' Python module on path) + + These are not included: + - pyshell (specific to Python-related documenting) + - code-friendly (because it *disables* part of the syntax) + - link-patterns (because you need to specify some actual + link-patterns anyway) + """ + extras = ["footnotes", "code-color"] + + +#---- internal support functions + +class UnicodeWithAttrs(unicode): + """A subclass of unicode used for the return value of conversion to + possibly attach some attributes. E.g. the "toc_html" attribute when + the "toc" extra is used. + """ + metadata = None + _toc = None + def toc_html(self): + """Return the HTML for the current TOC. + + This expects the `_toc` attribute to have been set on this instance. + """ + if self._toc is None: + return None + + def indent(): + return ' ' * (len(h_stack) - 1) + lines = [] + h_stack = [0] # stack of header-level numbers + for level, id, name in self._toc: + if level > h_stack[-1]: + lines.append("%s<ul>" % indent()) + h_stack.append(level) + elif level == h_stack[-1]: + lines[-1] += "</li>" + else: + while level < h_stack[-1]: + h_stack.pop() + if not lines[-1].endswith("</li>"): + lines[-1] += "</li>" + lines.append("%s</ul></li>" % indent()) + lines.append('%s<li><a href="#%s">%s</a>' % ( + indent(), id, name)) + while len(h_stack) > 1: + h_stack.pop() + if not lines[-1].endswith("</li>"): + lines[-1] += "</li>" + lines.append("%s</ul>" % indent()) + return '\n'.join(lines) + '\n' + toc_html = property(toc_html) + +## {{{ http://code.activestate.com/recipes/577257/ (r1) +_slugify_strip_re = re.compile(r'[^\w\s-]') +_slugify_hyphenate_re = re.compile(r'[-\s]+') +def _slugify(value): + """ + Normalizes string, converts to lowercase, removes non-alpha characters, + and converts spaces to hyphens. + + From Django's "django/template/defaultfilters.py". + """ + + try: + import unicodedata + value = unicodedata.normalize('NFKD', value) + except ImportError: + pass + value = value.encode('ascii', 'ignore').decode() + value = _slugify_strip_re.sub('', value).strip().lower() + return _slugify_hyphenate_re.sub('-', value) +## end of http://code.activestate.com/recipes/577257/ }}} + + +# From http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52549 +def _curry(*args, **kwargs): + function, args = args[0], args[1:] + def result(*rest, **kwrest): + combined = kwargs.copy() + combined.update(kwrest) + return function(*args + rest, **combined) + return result + +# Recipe: regex_from_encoded_pattern (1.0) +def _regex_from_encoded_pattern(s): + """'foo' -> re.compile(re.escape('foo')) + '/foo/' -> re.compile('foo') + '/foo/i' -> re.compile('foo', re.I) + """ + if s.startswith('/') and s.rfind('/') != 0: + # Parse it: /PATTERN/FLAGS + idx = s.rfind('/') + pattern, flags_str = s[1:idx], s[idx+1:] + flag_from_char = { + "i": re.IGNORECASE, + "l": re.LOCALE, + "s": re.DOTALL, + "m": re.MULTILINE, + "u": re.UNICODE, + } + flags = 0 + for char in flags_str: + try: + flags |= flag_from_char[char] + except KeyError: + raise ValueError("unsupported regex flag: '%s' in '%s' " + "(must be one of '%s')" + % (char, s, ''.join(list(flag_from_char.keys())))) + return re.compile(s[1:idx], flags) + else: # not an encoded regex + return re.compile(re.escape(s)) + +# Recipe: dedent (0.1.2) +def _dedentlines(lines, tabsize=8, skip_first_line=False): + """_dedentlines(lines, tabsize=8, skip_first_line=False) -> dedented lines + + "lines" is a list of lines to dedent. + "tabsize" is the tab width to use for indent width calculations. + "skip_first_line" is a boolean indicating if the first line should + be skipped for calculating the indent width and for dedenting. + This is sometimes useful for docstrings and similar. + + Same as dedent() except operates on a sequence of lines. Note: the + lines list is modified **in-place**. + """ + DEBUG = False + if DEBUG: + print("dedent: dedent(..., tabsize=%d, skip_first_line=%r)"\ + % (tabsize, skip_first_line)) + indents = [] + margin = None + for i, line in enumerate(lines): + if i == 0 and skip_first_line: continue + indent = 0 + for ch in line: + if ch == ' ': + indent += 1 + elif ch == '\t': + indent += tabsize - (indent % tabsize) + elif ch in '\r\n': + continue # skip all-whitespace lines + else: + break + else: + continue # skip all-whitespace lines + if DEBUG: print("dedent: indent=%d: %r" % (indent, line)) + if margin is None: + margin = indent + else: + margin = min(margin, indent) + if DEBUG: print("dedent: margin=%r" % margin) + + if margin is not None and margin > 0: + for i, line in enumerate(lines): + if i == 0 and skip_first_line: continue + removed = 0 + for j, ch in enumerate(line): + if ch == ' ': + removed += 1 + elif ch == '\t': + removed += tabsize - (removed % tabsize) + elif ch in '\r\n': + if DEBUG: print("dedent: %r: EOL -> strip up to EOL" % line) + lines[i] = lines[i][j:] + break + else: + raise ValueError("unexpected non-whitespace char %r in " + "line %r while removing %d-space margin" + % (ch, line, margin)) + if DEBUG: + print("dedent: %r: %r -> removed %d/%d"\ + % (line, ch, removed, margin)) + if removed == margin: + lines[i] = lines[i][j+1:] + break + elif removed > margin: + lines[i] = ' '*(removed-margin) + lines[i][j+1:] + break + else: + if removed: + lines[i] = lines[i][removed:] + return lines + +def _dedent(text, tabsize=8, skip_first_line=False): + """_dedent(text, tabsize=8, skip_first_line=False) -> dedented text + + "text" is the text to dedent. + "tabsize" is the tab width to use for indent width calculations. + "skip_first_line" is a boolean indicating if the first line should + be skipped for calculating the indent width and for dedenting. + This is sometimes useful for docstrings and similar. + + textwrap.dedent(s), but don't expand tabs to spaces + """ + lines = text.splitlines(1) + _dedentlines(lines, tabsize=tabsize, skip_first_line=skip_first_line) + return ''.join(lines) + + +class _memoized(object): + """Decorator that caches a function's return value each time it is called. + If called later with the same arguments, the cached value is returned, and + not re-evaluated. + + http://wiki.python.org/moin/PythonDecoratorLibrary + """ + def __init__(self, func): + self.func = func + self.cache = {} + def __call__(self, *args): + try: + return self.cache[args] + except KeyError: + self.cache[args] = value = self.func(*args) + return value + except TypeError: + # uncachable -- for instance, passing a list as an argument. + # Better to not cache than to blow up entirely. + return self.func(*args) + def __repr__(self): + """Return the function's docstring.""" + return self.func.__doc__ + + +def _xml_oneliner_re_from_tab_width(tab_width): + """Standalone XML processing instruction regex.""" + return re.compile(r""" + (?: + (?<=\n\n) # Starting after a blank line + | # or + \A\n? # the beginning of the doc + ) + ( # save in $1 + [ ]{0,%d} + (?: + <\?\w+\b\s+.*?\?> # XML processing instruction + | + <\w+:\w+\b\s+.*?/> # namespaced single tag + ) + [ \t]* + (?=\n{2,}|\Z) # followed by a blank line or end of document + ) + """ % (tab_width - 1), re.X) +_xml_oneliner_re_from_tab_width = _memoized(_xml_oneliner_re_from_tab_width) + +def _hr_tag_re_from_tab_width(tab_width): + return re.compile(r""" + (?: + (?<=\n\n) # Starting after a blank line + | # or + \A\n? # the beginning of the doc + ) + ( # save in \1 + [ ]{0,%d} + <(hr) # start tag = \2 + \b # word break + ([^<>])*? # + /?> # the matching end tag + [ \t]* + (?=\n{2,}|\Z) # followed by a blank line or end of document + ) + """ % (tab_width - 1), re.X) +_hr_tag_re_from_tab_width = _memoized(_hr_tag_re_from_tab_width) + + +def _xml_escape_attr(attr, skip_single_quote=True): + """Escape the given string for use in an HTML/XML tag attribute. + + By default this doesn't bother with escaping `'` to `'`, presuming that + the tag attribute is surrounded by double quotes. + """ + escaped = (attr + .replace('&', '&') + .replace('"', '"') + .replace('<', '<') + .replace('>', '>')) + if not skip_single_quote: + escaped = escaped.replace("'", "'") + return escaped + + +def _xml_encode_email_char_at_random(ch): + r = random() + # Roughly 10% raw, 45% hex, 45% dec. + # '@' *must* be encoded. I [John Gruber] insist. + # Issue 26: '_' must be encoded. + if r > 0.9 and ch not in "@_": + return ch + elif r < 0.45: + # The [1:] is to drop leading '0': 0x63 -> x63 + return '&#%s;' % hex(ord(ch))[1:] + else: + return '&#%s;' % ord(ch) + + + +#---- mainline + +class _NoReflowFormatter(optparse.IndentedHelpFormatter): + """An optparse formatter that does NOT reflow the description.""" + def format_description(self, description): + return description or "" + +def _test(): + import doctest + doctest.testmod() + +def main(argv=None): + if argv is None: + argv = sys.argv + if not logging.root.handlers: + logging.basicConfig() + + usage = "usage: %prog [PATHS...]" + version = "%prog "+__version__ + parser = optparse.OptionParser(prog="markdown2", usage=usage, + version=version, description=cmdln_desc, + formatter=_NoReflowFormatter()) + parser.add_option("-v", "--verbose", dest="log_level", + action="store_const", const=logging.DEBUG, + help="more verbose output") + parser.add_option("--encoding", + help="specify encoding of text content") + parser.add_option("--html4tags", action="store_true", default=False, + help="use HTML 4 style for empty element tags") + parser.add_option("-s", "--safe", metavar="MODE", dest="safe_mode", + help="sanitize literal HTML: 'escape' escapes " + "HTML meta chars, 'replace' replaces with an " + "[HTML_REMOVED] note") + parser.add_option("-x", "--extras", action="append", + help="Turn on specific extra features (not part of " + "the core Markdown spec). See above.") + parser.add_option("--use-file-vars", + help="Look for and use Emacs-style 'markdown-extras' " + "file var to turn on extras. See " + "<https://github.com/trentm/python-markdown2/wiki/Extras>") + parser.add_option("--link-patterns-file", + help="path to a link pattern file") + parser.add_option("--self-test", action="store_true", + help="run internal self-tests (some doctests)") + parser.add_option("--compare", action="store_true", + help="run against Markdown.pl as well (for testing)") + parser.set_defaults(log_level=logging.INFO, compare=False, + encoding="utf-8", safe_mode=None, use_file_vars=False) + opts, paths = parser.parse_args() + log.setLevel(opts.log_level) + + if opts.self_test: + return _test() + + if opts.extras: + extras = {} + for s in opts.extras: + splitter = re.compile("[,;: ]+") + for e in splitter.split(s): + if '=' in e: + ename, earg = e.split('=', 1) + try: + earg = int(earg) + except ValueError: + pass + else: + ename, earg = e, None + extras[ename] = earg + else: + extras = None + + if opts.link_patterns_file: + link_patterns = [] + f = open(opts.link_patterns_file) + try: + for i, line in enumerate(f.readlines()): + if not line.strip(): continue + if line.lstrip().startswith("#"): continue + try: + pat, href = line.rstrip().rsplit(None, 1) + except ValueError: + raise MarkdownError("%s:%d: invalid link pattern line: %r" + % (opts.link_patterns_file, i+1, line)) + link_patterns.append( + (_regex_from_encoded_pattern(pat), href)) + finally: + f.close() + else: + link_patterns = None + + from os.path import join, dirname, abspath, exists + markdown_pl = join(dirname(dirname(abspath(__file__))), "test", + "Markdown.pl") + if not paths: + paths = ['-'] + for path in paths: + if path == '-': + text = sys.stdin.read() + else: + fp = codecs.open(path, 'r', opts.encoding) + text = fp.read() + fp.close() + if opts.compare: + from subprocess import Popen, PIPE + print("==== Markdown.pl ====") + p = Popen('perl %s' % markdown_pl, shell=True, stdin=PIPE, stdout=PIPE, close_fds=True) + p.stdin.write(text.encode('utf-8')) + p.stdin.close() + perl_html = p.stdout.read().decode('utf-8') + if py3: + sys.stdout.write(perl_html) + else: + sys.stdout.write(perl_html.encode( + sys.stdout.encoding or "utf-8", 'xmlcharrefreplace')) + print("==== markdown2.py ====") + html = markdown(text, + html4tags=opts.html4tags, + safe_mode=opts.safe_mode, + extras=extras, link_patterns=link_patterns, + use_file_vars=opts.use_file_vars) + if py3: + sys.stdout.write(html) + else: + sys.stdout.write(html.encode( + sys.stdout.encoding or "utf-8", 'xmlcharrefreplace')) + if extras and "toc" in extras: + log.debug("toc_html: " + + html.toc_html.encode(sys.stdout.encoding or "utf-8", 'xmlcharrefreplace')) + if opts.compare: + test_dir = join(dirname(dirname(abspath(__file__))), "test") + if exists(join(test_dir, "test_markdown2.py")): + sys.path.insert(0, test_dir) + from test_markdown2 import norm_html_from_html + norm_html = norm_html_from_html(html) + norm_perl_html = norm_html_from_html(perl_html) + else: + norm_html = html + norm_perl_html = perl_html + print("==== match? %r ====" % (norm_perl_html == norm_html)) + + +if __name__ == "__main__": + sys.exit( main(sys.argv) ) diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Markdown Preview/package-metadata.json b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Markdown Preview/package-metadata.json new file mode 100644 index 0000000..94a33d4 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Markdown Preview/package-metadata.json @@ -0,0 +1 @@ +{"url": "https://github.com/revolunet/sublimetext-markdown-preview", "version": "2013.04.01.18.50.45", "description": "markdown preview plugin for sublime text 2"} \ No newline at end of file diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Markdown Preview/sample.html b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Markdown Preview/sample.html new file mode 100644 index 0000000..c63eacd --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Markdown Preview/sample.html @@ -0,0 +1,141 @@ +<h1 id="sample-markdown-cheat-sheet">Sample Markdown Cheat Sheet</h1> + +<p>This is a sample markdown file to help you write Markdown quickly :)</p> + +<p>If you use the fabulous <a href="http://sublimetext.com">Sublime Text 2 editor</a> along with the <a href="https://github.com/revolunet/sublimetext-markdown-preview">Markdown Preview plugin</a>, open your ST2 Palette with <code>CMD+P</code> then choose <code>Markdown Preview in browser</code> to see the result in your browser.</p> + +<h2 id="text-basics">Text basics</h2> + +<p>this is <em>italic</em> and this is <strong>bold</strong> . another <em>italic</em> and another <strong>bold</strong></p> + +<p>this is <code>important</code> text. and percentage signs : % and <code>%</code></p> + +<p>This is a paragraph with a footnote (builtin parser only). <sup class="footnote-ref" id="fnref-note-id"><a href="#fn-note-id">1</a></sup> </p> + +<p>Insert <code>[ toc ]</code> without spaces to generate a table of contents (builtin parser only).</p> + +<h2 id="indentation">Indentation</h2> + +<blockquote> + <p>Here is some indented text</p> + + <blockquote> + <p>even more indented</p> + </blockquote> +</blockquote> + +<h2 id="titles">Titles</h2> + +<h1 id="big-title-h1">Big title (h1)</h1> + +<h2 id="middle-title-h2">Middle title (h2)</h2> + +<h3 id="smaller-title-h3">Smaller title (h3)</h3> + +<h4 id="and-so-on-hx">and so on (hX)</h4> + +<h5 id="and-so-on-hx-2">and so on (hX)</h5> + +<h6 id="and-so-on-hx-3">and so on (hX)</h6> + +<h2 id="example-lists-1">Example lists (1)</h2> + +<ul> +<li>bullets can be <code>-</code>, <code>+</code>, or <code>*</code></li> +<li>bullet list 1</li> +<li><p>bullet list 2</p> + +<ul> +<li>sub item 1</li> +<li><p>sub item 2</p> + +<p>with indented text inside</p></li> +</ul></li> +<li><p>bullet list 3</p></li> +<li>bullet list 4</li> +<li>bullet list 5</li> +</ul> + +<h2 id="links">Links</h2> + +<p>This is an <a href="http://lmgtfy.com/">example inline link</a> and <a href="http://lmgtfy.com/" title="Hello, world">another one with a title</a>.</p> + +<p>Links can also be reference based : <a href="http://revolunet.com">reference 1</a> or <a href="http://revolunet.com" title="rich web apps">reference 2 with title</a>.</p> + +<p>References are usually placed at the bottom of the document</p> + +<h2 id="images">Images</h2> + +<p>A sample image :</p> + +<p><img src="http://www.revolunet.com/static/parisjs8/img/logo-revolunet-carre.jpg" alt="revolunet logo" title="revolunet logo" /></p> + +<p>As links, images can also use references instead of inline links :</p> + +<p><img src="http://www.revolunet.com/static/parisjs8/img/logo-revolunet-carre.jpg" alt="revolunet logo" title="revolunet logo" /></p> + +<h2 id="code">Code</h2> + +<p>It's quite easy to show code in markdown files.</p> + +<p>Backticks can be used to <code>highlight</code> some words.</p> + +<p>Also, any indented block is considered a code block.</p> + +<pre><code><script> + document.location = 'http://lmgtfy.com/?q=markdown+cheat+sheet'; +</script> +</code></pre> + +<h2 id="github-flavored-markdown">GitHub Flavored Markdown</h2> + +<p>If you use the Github parser, you can use some of <a href="http://github.github.com/github-flavored-markdown/">Github Flavored Markdown</a> syntax :</p> + +<ul> +<li>User/Project@SHA: revolunet/sublimetext-markdown-preview@7da61badeda468b5019869d11000307e07e07401</li> +<li>User/Project#Issue: revolunet/sublimetext-markdown-preview#1</li> +<li>User : @revolunet</li> +</ul> + +<p>Some Python code :</p> + +<pre><code>import random + +class CardGame(object): + """ a sample python class """ + NB_CARDS = 32 + def __init__(self, cards=5): + self.cards = random.sample(range(self.NB_CARDS), 5) + print 'ready to play' +</code></pre> + +<p>Some Javascript code :</p> + +<pre><code>var config = { + duration: 5, + comment: 'WTF' +} +// callbacks beauty un action +async_call('/path/to/api', function(json) { + another_call(json, function(result2) { + another_another_call(result2, function(result3) { + another_another_another_call(result3, function(result4) { + alert('And if all went well, i got my result :)'); + }); + }); + }); +}) +</code></pre> + +<h2 id="about">About</h2> + +<p>This plugin and this sample file is proudly brought to you by the <a href="http://revolunet.com">revolunet team</a></p> + +<div class="footnotes"> +<hr /> +<ol> +<li id="fn-note-id"> +<p>This is the text of the note. <a href="#fnref-note-id" class="footnoteBackLink" title="Jump back to footnote 1 in the text.">↩</a></p> +</li> +</ol> +</div> diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Markdown Preview/sample.md b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Markdown Preview/sample.md new file mode 100644 index 0000000..abf7b25 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Markdown Preview/sample.md @@ -0,0 +1,132 @@ +Sample Markdown Cheat Sheet +=========================== + +This is a sample markdown file to help you write Markdown quickly :) + +If you use the fabulous [Sublime Text 2 editor][ST2] along with the [Markdown Preview plugin][MarkdownPreview], open your ST2 Palette with `CMD+P` then choose `Markdown Preview in browser` to see the result in your browser. + +## Text basics +this is *italic* and this is **bold** . another _italic_ and another __bold__ + +this is `important` text. and percentage signs : % and `%` + +This is a paragraph with a footnote (builtin parser only). [^note-id] + +Insert `[ toc ]` without spaces to generate a table of contents (builtin parser only). + +## Indentation +> Here is some indented text +>> even more indented + +## Titles +# Big title (h1) +## Middle title (h2) +### Smaller title (h3) +#### and so on (hX) +##### and so on (hX) +###### and so on (hX) + +## Example lists (1) + + - bullets can be `-`, `+`, or `*` + - bullet list 1 + - bullet list 2 + - sub item 1 + - sub item 2 + + with indented text inside + + - bullet list 3 + + bullet list 4 + * bullet list 5 + +## Links + +This is an [example inline link](http://lmgtfy.com/) and [another one with a title](http://lmgtfy.com/ "Hello, world"). + +Links can also be reference based : [reference 1][ref1] or [reference 2 with title][ref2]. + +References are usually placed at the bottom of the document + +## Images + +A sample image : + +![revolunet logo](http://www.revolunet.com/static/parisjs8/img/logo-revolunet-carre.jpg "revolunet logo") + +As links, images can also use references instead of inline links : + +![revolunet logo][revolunet-logo] + + +## Code + +It's quite easy to show code in markdown files. + +Backticks can be used to `highlight` some words. + +Also, any indented block is considered a code block. + + <script> + document.location = 'http://lmgtfy.com/?q=markdown+cheat+sheet'; + </script> + +## GitHub Flavored Markdown + +If you use the Github parser, you can use some of [Github Flavored Markdown][gfm] syntax : + + * User/Project@SHA: revolunet/sublimetext-markdown-preview@7da61badeda468b5019869d11000307e07e07401 + * User/Project#Issue: revolunet/sublimetext-markdown-preview#1 + * User : @revolunet + +Some Python code : + +```python +import random + +class CardGame(object): + """ a sample python class """ + NB_CARDS = 32 + def __init__(self, cards=5): + self.cards = random.sample(range(self.NB_CARDS), 5) + print 'ready to play' +``` + +Some Javascript code : + +```js +var config = { + duration: 5, + comment: 'WTF' +} +// callbacks beauty un action +async_call('/path/to/api', function(json) { + another_call(json, function(result2) { + another_another_call(result2, function(result3) { + another_another_another_call(result3, function(result4) { + alert('And if all went well, i got my result :)'); + }); + }); + }); +}) +``` + +The Github Markdown also brings some [nice Emoji support][emoji] : :+1: :heart: :beer: + +[^note-id]: This is the text of the note. + +## About + +This plugin and this sample file is proudly brought to you by the [revolunet team][revolunet] + + [ref1]: http://revolunet.com + [ref2]: http://revolunet.com "rich web apps" + [MarkdownREF]: http://daringfireball.net/projects/markdown/basics + [MarkdownPreview]: https://github.com/revolunet/sublimetext-markdown-preview + [ST2]: http://sublimetext.com + [revolunet]: http://revolunet.com + [revolunet-logo]: http://www.revolunet.com/static/parisjs8/img/logo-revolunet-carre.jpg "revolunet logo" + [gfm]: http://github.github.com/github-flavored-markdown/ + [emoji]: http://www.emoji-cheat-sheet.com/ + + diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Missing Palette Commands/Missing.sublime-commands b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Missing Palette Commands/Missing.sublime-commands new file mode 100644 index 0000000..6fdf4ab --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Missing Palette Commands/Missing.sublime-commands @@ -0,0 +1,115 @@ +[ + // File Menu + { "caption": "Exit Sublime Text 2", "command": "exit" }, + { "caption": "New Window", "command": "new_window"}, + { "caption": "Close Window", "command": "close_window" }, + { "caption": "File: Save As", "command": "prompt_save_as" }, + { "caption": "File: Close", "command": "close" }, + { "caption": "File: Reopen Closed File", "command": "reopen_last_file" }, + + // Edit Menu + { "caption": "Code Folding: Fold All", "command": "fold_by_level", "args": {"level": 1} }, + + { "caption": "Permute Lines: Reverse", "command": "permute_lines", "args": {"operation": "reverse"} }, + { "caption": "Permute Lines: Unique", "command": "permute_lines", "args": {"operation": "unique"} }, + { "caption": "Permute Lines: Shuffle", "command": "permute_lines", "args": {"operation": "shuffle"} }, + + { "caption": "Permute Selections: Sort", "command": "sort_selection", "args": {"case_sensitive": false} }, + { "caption": "Permute Selections: Sort (Case Sensitive)", "command": "sort_selection", "args": {"case_sensitive": true} }, + { "caption": "Permute Selections: Reverse", "command": "permute_selection", "args": {"operation": "reverse"} }, + { "caption": "Permute Selections: Unique", "command": "permute_selection", "args": {"operation": "unique"} }, + { "caption": "Permute Selections: Shuffle", "command": "permute_selection", "args": {"operation": "shuffle"} }, + + // Find Menu + { "caption": "Find", "command": "show_panel", "args": {"panel": "find"} }, + { "caption": "Find in Files", "command": "show_panel", "args": {"panel": "find_in_files"} }, + { "caption": "Replace", "command": "show_panel", "args": {"panel": "replace"} }, + { "caption": "Show Find Results Panel", "command": "show_panel", "args": {"panel": "output.find_results"} }, + + { "caption": "Next Result", "command": "next_result" }, + { "caption": "Previous Result", "command": "previous_result" }, + + // View Menu + { "caption": "View: Toggle Fullscreen", "command": "toggle_full_screen" }, + { "caption": "View: Toggle Distraction Free mode", "command": "toggle_distraction_free" }, + { "caption": "View: Toggle Console", "command": "show_panel", "args": {"panel": "console", "toggle": true} }, + + { "caption": "Indentation: Indent Using Spaces", "command": "toggle_setting", "args": {"setting": "translate_tabs_to_spaces"} }, + { "caption": "Indentation: Tab Width: 1", "command": "set_setting", "args": {"setting": "tab_size", "value": 1} }, + { "caption": "Indentation: Tab Width: 2", "command": "set_setting", "args": {"setting": "tab_size", "value": 2} }, + { "caption": "Indentation: Tab Width: 3", "command": "set_setting", "args": {"setting": "tab_size", "value": 3} }, + { "caption": "Indentation: Tab Width: 4", "command": "set_setting", "args": {"setting": "tab_size", "value": 4} }, + { "caption": "Indentation: Tab Width: 5", "command": "set_setting", "args": {"setting": "tab_size", "value": 5} }, + { "caption": "Indentation: Tab Width: 6", "command": "set_setting", "args": {"setting": "tab_size", "value": 6} }, + { "caption": "Indentation: Tab Width: 7", "command": "set_setting", "args": {"setting": "tab_size", "value": 7} }, + { "caption": "Indentation: Tab Width: 8", "command": "set_setting", "args": {"setting": "tab_size", "value": 8} }, + { "caption": "Indentation: Guess Settings From Buffer", "command": "detect_indentation" }, + + { "caption": "Line Endings: Windows", "command": "set_line_ending", "args": {"type": "windows"} }, + { "caption": "Line Endings: Unix", "command": "set_line_ending", "args": {"type": "unix"} }, + { "caption": "Line Endings: Mac OS 9", "command": "set_line_ending", "args": {"type": "cr"} }, + + { "caption": "View: Toggle Spell Check", "command": "toggle_setting", "args": {"setting": "spell_check"} }, + { "caption": "Spell Check: Next Misspelling", "command": "next_misspelling" }, + { "caption": "Spell Check: Previous Misspelling", "command": "previous_misspelling" }, + + { "caption": "Ruler: None", "command": "set_setting", "args": {"setting": "rulers", "value": []}}, + { "caption": "Ruler: Column 70", "command": "set_setting", "args": {"setting": "rulers", "value": [70]}}, + { "caption": "Ruler: Column 78", "command": "set_setting", "args": {"setting": "rulers", "value": [78]}}, + { "caption": "Ruler: Column 80", "command": "set_setting", "args": {"setting": "rulers", "value": [80]}}, + { "caption": "Ruler: Column 100", "command": "set_setting", "args": {"setting": "rulers", "value": [100]}}, + { "caption": "Ruler: Column 120", "command": "set_setting", "args": {"setting": "rulers", "value": [120]}}, + + { "caption": "Word Wrap: Automatic Column", "command": "set_setting", "args": {"setting": "wrap_width", "value": 0}}, + { "caption": "Word Wrap: Column 70", "command": "set_setting", "args": {"setting": "wrap_width", "value": 70}}, + { "caption": "Word Wrap: Column 78", "command": "set_setting", "args": {"setting": "wrap_width", "value": 78}}, + { "caption": "Word Wrap: Column 80", "command": "set_setting", "args": {"setting": "wrap_width", "value": 80}}, + { "caption": "Word Wrap: Column 100", "command": "set_setting", "args": {"setting": "wrap_width", "value": 100}}, + { "caption": "Word Wrap: Column 120", "command": "set_setting", "args": {"setting": "wrap_width", "value": 120}}, + + { "caption": "Layout: Single", + "command": "set_layout", + "args": {"cols": [0.0, 1.0], "rows": [0.0, 1.0], "cells": [[0, 0, 1, 1]]} + }, + { "caption": "Layout: Columns: 2", + "command": "set_layout", + "args": {"cols": [0.0, 0.5, 1.0], "rows": [0.0, 1.0], "cells": [[0, 0, 1, 1], [1, 0, 2, 1]]} + }, + { "caption": "Layout: Columns: 3", + "command": "set_layout", + "args": {"cols": [0.0, 0.33, 0.66, 1.0], "rows": [0.0, 1.0], "cells": [[0, 0, 1, 1], [1, 0, 2, 1], [2, 0, 3, 1]]} + }, + { "caption": "Layout: Columns: 4", + "command": "set_layout", + "args": {"cols": [0.0, 0.25, 0.5, 0.75, 1.0], "rows": [0.0, 1.0], "cells": [[0, 0, 1, 1], [1, 0, 2, 1], [2, 0, 3, 1], [3, 0, 4, 1]]} + }, + { "caption": "Layout: Rows: 2", + "command": "set_layout", + "args": {"cols": [0.0, 1.0], "rows": [0.0, 0.5, 1.0], "cells": [[0, 0, 1, 1], [0, 1, 1, 2]]} + }, + { "caption": "Layout: Rows: 3", + "command": "set_layout", + "args": {"cols": [0.0, 1.0], "rows": [0.0, 0.33, 0.66, 1.0], "cells": [[0, 0, 1, 1], [0, 1, 1, 2], [0, 2, 1, 3]]} + }, + { "caption": "Layout: Grid: 4", + "command": "set_layout", + "args": {"cols": [0.0, 0.5, 1.0], "rows": [0.0, 0.5, 1.0], "cells": [[0, 0, 1, 1], [1, 0, 2, 1], [0, 1, 1, 2], [1, 1, 2, 2]]} + }, + + // Tools Menu + { "caption": "Cancel Build", "command": "exec", "args": {"kill": true} }, + { "caption": "Show Build Results Panel", "command": "show_panel", "args": {"panel": "output.exec"} }, + + // Project Menu + { "caption": "Switch Project in Window", "command": "prompt_select_project" }, + { "caption": "Project: Open Project", "command": "prompt_open_project" }, + { "caption": "Project: Edit Project", "command": "open_file", "args": {"file": "${project}"} }, + { "caption": "Project: Remove all Folders", "command": "close_folder_list" }, + { "caption": "Project: Refresh Folders", "command": "refresh_folder_list" }, + + // Preferences Menu + { "caption": "Preferences: Syntax Specific – User", "command": "open_file_settings" }, + { "caption": "Font: Increase Font Size", "command": "increase_font_size" }, + { "caption": "Font: Decrease Font Size", "command": "decrease_font_size" }, + { "caption": "Font: Reset Font Size", "command": "reset_font_size" } +] diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Missing Palette Commands/README.md b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Missing Palette Commands/README.md new file mode 100644 index 0000000..09f1d1b --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Missing Palette Commands/README.md @@ -0,0 +1,8 @@ +# Missing Palette Commands + +I really like the _Command Palette_ feature of Sublime Text 2. +The only problem I have with it is that some useful commands +have been omitted and are only available through the main menu. + +This package provides a `.sublime-commands` file that contains +the missing commands. diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Missing Palette Commands/package-metadata.json b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Missing Palette Commands/package-metadata.json new file mode 100644 index 0000000..e558006 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Missing Palette Commands/package-metadata.json @@ -0,0 +1 @@ +{"url": "https://github.com/fjl/Sublime-Missing-Palette-Commands", "version": "2012.08.08.06.49.39", "description": "Menu Commands that are missing from the Sublime Text 2 Command Palette"} \ No newline at end of file diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Related Files/.gitignore b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Related Files/.gitignore new file mode 100644 index 0000000..0d20b64 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Related Files/.gitignore @@ -0,0 +1 @@ +*.pyc diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Related Files/Default.sublime-commands b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Related Files/Default.sublime-commands new file mode 100644 index 0000000..d55e1e1 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Related Files/Default.sublime-commands @@ -0,0 +1,3 @@ +[ + { "caption": "Related Files", "command": "related_files" } +] diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Related Files/Default.sublime-keymap b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Related Files/Default.sublime-keymap new file mode 100644 index 0000000..9b0a2d1 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Related Files/Default.sublime-keymap @@ -0,0 +1,3 @@ +[ + { "keys": ["ctrl+super+p"], "command": "related_files"} +] \ No newline at end of file diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Related Files/Main.sublime-menu b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Related Files/Main.sublime-menu new file mode 100644 index 0000000..b9ddbed --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Related Files/Main.sublime-menu @@ -0,0 +1,27 @@ +[ + { + "caption": "Preferences", + "mnemonic": "n", + "id": "preferences", + "children": + [ + { + "caption": "Package Settings", + "mnemonic": "P", + "id": "package-settings", + "children": + [ + { + "caption": "RelatedFiles", + "children": + [ + { "command": "open_file", "args": {"file": "${packages}/Related Files/RelatedFiles.sublime-settings"}, "caption": "Settings – Default" }, + { "command": "open_file", "args": {"file": "${packages}/User/RelatedFiles.sublime-settings"}, "caption": "Settings – User" }, + { "caption": "-" } + ] + } + ] + } + ] + } +] diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Related Files/README.md b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Related Files/README.md new file mode 100644 index 0000000..f2fc0f2 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Related Files/README.md @@ -0,0 +1,36 @@ +# Sublime Text 2 - Related Files + +![Screenshot](https://raw.github.com/fabiokr/sublime-related-files/master/screenshots/list.png) + +This plugin provides a quick list of related files to the currently open file. + +My main use case is to list related files under a Ruby on Rails project. For example, for an opened "app/controllers/examples_controller.rb", related files would be "app/helpers/examples_helper.rb", "app/views/examples/**", and "spec/controllers/examples_controller_spec.rb". + +This plugin was inspired by the existing [Open Related](https://github.com/vojtajina/sublime-OpenRelated) and [Rails Related Files](https://github.com/luqman/SublimeText2RailsRelatedFiles). + +I wanted something between the two of them (a quick list of results that could be setup for any kinds of projects, not only Rails), so I created my own. + +# Key Shortcut + +The default shortcut is mapped to "ctrl+super+p". To change it to something more suitable for your needs, you can easily change that by copying the following and replacing the "keys" to your desired key combination: + +```json +{ "keys": ["ctrl+super+p"], "command": "related_files"} +``` + +# Configuration + +The plugins comes configured to lookup Rails related files, but you can add your own setups. Let's see an existing example: + +```json +// Test/specs for ruby files +".+\/(app|lib)\/(.+).rb": + [ + "spec/$2_spec.rb", + "test/$2_test.rb" + ] +``` + +The configuration has two parts: the key, which is a regular expression to match against the currently open file, and a list of globs to map the related files. + +You can use the $1, $2, etc. on the glob strings to be replace by the extracted parts from the regex. \ No newline at end of file diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Related Files/RelatedFiles.sublime-settings b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Related Files/RelatedFiles.sublime-settings new file mode 100644 index 0000000..eb9502c --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Related Files/RelatedFiles.sublime-settings @@ -0,0 +1,84 @@ +{ + "patterns": { + // Test/specs for ruby files + ".+\/(app|lib)\/(.+).rb": + [ + "spec/$2_spec.rb", + "test/$2_test.rb" + ], + + // Ruby files for test/specs + ".+\/(test|spec)\/(.+)_(test|spec).rb": + [ + "app/$2.rb", + "lib/$2.rb" + ], + + // Rails controllers + ".+\/app\/controllers\/(.+)_controller.rb": + [ + "app/views/$1/**", + "app/helpers/$1_helper.rb", + "config/routes.rb", + "spec/requests/$1_spec.rb", + "spec/routing/$1_routing_spec.rb" + ], + + // Rails helpers + ".+\/app\/helpers\/(.+)_helper.rb": + [ + "app/views/$1/**", + "app/controllers/$1_controller.rb", + "config/routes.rb", + "spec/requests/$1_spec.rb" + ], + + // Rails views + ".+\/app\/views\/(.+)\/[^\/].+": + [ + "app/views/$1/**", + "app/controllers/$1_controller.rb", + "app/helpers/$1_helper.rb", + "config/routes.rb", + "spec/controllers/$1_spec.rb", + "spec/requests/$1_spec.rb" + ], + + // Rails routes + ".+\/config\/routes.rb": + [ + "spec/routing/**" + ], + + // Rails libs + ".+\/(lib)\/(.+).rb": + [ + "spec/lib/$2_spec.rb", + "test/lib/$2_test.rb" + ], + + // Rails controllers specs + ".+/spec/controllers/(.+)_controller_spec.rb": + [ + "app/controllers/$1_controller.rb", + "app/helpers/$1_helper.rb", + "app/views/$1/**", + "config/routes.rb" + ], + + // Rails request specs + ".+/spec/requests/(.+)_spec.rb": + [ + "app/controllers/$1_controller.rb", + "app/helpers/$1_helper.rb", + "app/views/$1/**", + "config/routes.rb" + ], + + // Rails libs specs + ".+/spec/lib/(.+)_spec.rb": + [ + "lib/$1.rb" + ] + } +} diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Related Files/fixtures/example1/app/controllers/examples_controller.rb b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Related Files/fixtures/example1/app/controllers/examples_controller.rb new file mode 100644 index 0000000..f712c1a --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Related Files/fixtures/example1/app/controllers/examples_controller.rb @@ -0,0 +1,3 @@ +class ExamplesController < ApplicationController + +end \ No newline at end of file diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Related Files/fixtures/example1/app/helpers/examples_helper.rb b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Related Files/fixtures/example1/app/helpers/examples_helper.rb new file mode 100644 index 0000000..e69de29 diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Related Files/fixtures/example1/app/views/examples/index.html b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Related Files/fixtures/example1/app/views/examples/index.html new file mode 100644 index 0000000..e69de29 diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Related Files/fixtures/example1/app/views/examples/show.html b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Related Files/fixtures/example1/app/views/examples/show.html new file mode 100644 index 0000000..e69de29 diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Related Files/fixtures/example1/test/controllers/examples_controller_test.rb b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Related Files/fixtures/example1/test/controllers/examples_controller_test.rb new file mode 100644 index 0000000..e69de29 diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Related Files/fixtures/example2/app/controllers/examples_controller.rb b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Related Files/fixtures/example2/app/controllers/examples_controller.rb new file mode 100644 index 0000000..e69de29 diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Related Files/fixtures/example2/app/views/examples/index.html b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Related Files/fixtures/example2/app/views/examples/index.html new file mode 100644 index 0000000..e69de29 diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Related Files/fixtures/example2/app/views/examples/show.html b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Related Files/fixtures/example2/app/views/examples/show.html new file mode 100644 index 0000000..e69de29 diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Related Files/fixtures/example2/test/controllers/examples_controller_test.rb b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Related Files/fixtures/example2/test/controllers/examples_controller_test.rb new file mode 100644 index 0000000..e69de29 diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Related Files/package-metadata.json b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Related Files/package-metadata.json new file mode 100644 index 0000000..b709a77 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Related Files/package-metadata.json @@ -0,0 +1 @@ +{"url": "https://github.com/fabiokr/sublime-related-files", "version": "2013.03.15.08.29.58", "description": "A Sublime Text 2 plugin to list related files"} \ No newline at end of file diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Related Files/related.py b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Related Files/related.py new file mode 100644 index 0000000..a1c6007 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Related Files/related.py @@ -0,0 +1,86 @@ +import os +import re +import glob +import itertools + + +class Related(object): + # Initializes the RelatedFiles object. + # + # file_path - the file to look related files for + # patterns - a dictionary of patterns in the following format: + # {"(.+)_controller.rb": ["*/the/paths/$1/**", "*/test/$1_controller_test.rb"]} + # + # The glob paths will have their $i replaced by the matched groups within the file name + # matcher. + def __init__(self, file_path, patterns, folders): + self.__file_path = file_path + self.__patterns = patterns + self.__root = self.__root(folders) + self.__files = [] + self.__descriptions = [] + self.__build() + + # # Retrieves a list of all related descriptions. + def descriptions(self): + return self.__descriptions + + # # Retrieves a list of all related files paths. + def files(self): + return self.__files + + # Builds a list with all related files and sets self.descriptions and + # self.files. + def __build(self): + files = set() + + file_path = self.__to_posixpath(self.__file_path) + + # for each matching pattern + for regex, paths in self.__patterns.iteritems(): + match = re.compile(regex).match(file_path) + if match: + # returns a flattened file list + files.update(self.__files_for_paths(regex, match, paths)) + + # sorts items + files = list(files) + files.sort() + + self.__files = files + self.__descriptions = [self.__file_without_root(file) for file in files] + + # Returns the root folder for the given file and folders + def __root(self, folders): + for folder in folders: + if self.__file_path.startswith(os.path.join(folder, "")): + return folder + + # Retrieves a list of files fot the given match and paths + def __files_for_paths(self, regex, match, paths): + paths = [self.__replaced_path(match, path) for path in paths] + + files = [glob.glob(os.path.join(self.__root, path)) for path in paths] + flattened = [self.__to_posixpath(path) for path in list(itertools.chain.from_iterable(files))] + + # Ignores current file + if self.__file_path in flattened: + flattened.remove(unicode(self.__file_path)) + + return flattened + + # Retrieves the file name without the root part. + def __file_without_root(self, file): + return os.path.basename(self.__root) + file[len(self.__root):] + + # Retrieves a path with its interpolation vars replaces by the found groups + # on match. + def __replaced_path(self, match, path): + replaced_path = path + for i, group in enumerate(match.groups()): + replaced_path = replaced_path.replace("$%s" % (i + 1), group) + return replaced_path + + # Converts paths to posixpaths. + def __to_posixpath(self, path): + return re.sub("\\\\", "/", path) diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Related Files/related_files.py b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Related Files/related_files.py new file mode 100644 index 0000000..ef289f1 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Related Files/related_files.py @@ -0,0 +1,39 @@ +import sublime +import sublime_plugin +from related import * + + +class RelatedFilesCommand(sublime_plugin.WindowCommand): + def run(self, index=None): + active_file_path = self.__active_file_path() + + if active_file_path: + # Builds a list of related files for the current open file. + self.__related = Related(active_file_path, self.__patterns(), sublime.active_window().folders()) + + self.window.show_quick_panel(self.__related.descriptions(), self.__open_file) + else: + self.__status_msg("No open files") + + # Opens the file in path. + def __open_file(self, index): + if index >= 0: + self.window.open_file(self.__related.files()[index]) + else: + self.__status_msg("No related files found") + + # Retrieves the patterns from settings. + def __patterns(self): + return sublime.load_settings("RelatedFiles.sublime-settings").get('patterns') + + # Returns the activelly open file path from sublime. + def __active_file_path(self): + if self.window.active_view(): + file_path = self.window.active_view().file_name() + + if file_path and len(file_path) > 0: + return file_path + + # Displays a status message on sublime. + def __status_msg(self, message): + sublime.status_message(message) diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Related Files/related_test.py b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Related Files/related_test.py new file mode 100644 index 0000000..a47b52a --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Related Files/related_test.py @@ -0,0 +1,52 @@ +import unittest +import os +from related import * + + +class RelatedTest(unittest.TestCase): + + def test_descriptions_with_matches(self): + self.assertEqual(self.__related().descriptions(), [ + "example1/app/helpers/examples_helper.rb", + "example1/app/views/examples/index.html", + "example1/app/views/examples/show.html", + "example1/test/controllers/examples_controller_test.rb" + ]) + + def test_descriptions_without_matches(self): + self.assertEqual(self.__related_without_match().descriptions(), []) + + def test_files_with_matches(self): + self.assertEqual(self.__related().files(), [ + self.__expand("fixtures/example1/app/helpers/examples_helper.rb"), + self.__expand("fixtures/example1/app/views/examples/index.html"), + self.__expand("fixtures/example1/app/views/examples/show.html"), + self.__expand("fixtures/example1/test/controllers/examples_controller_test.rb") + ]) + + def test_files_without_matches(self): + self.assertEqual(self.__related_without_match().files(), []) + + def __patterns(self): + return { + ".+\/app\/controllers\/(.+)_controller.rb": ["app/views/$1/**", "app/helpers/$1_helper.rb"], + ".+\/app\/(.+).rb": ["test/$1_test.rb"] + } + + def __file(self): + return self.__expand("fixtures/example1/app/controllers/examples_controller.rb") + + def __folders(self): + return [self.__expand("fixtures/example1"), self.__expand("fixtures/example2")] + + def __expand(self, path): + return os.path.join(os.path.dirname(os.path.realpath(__file__)), path) + + def __related(self): + return Related(self.__file(), self.__patterns(), self.__folders()) + + def __related_without_match(self): + return Related("/should/not/match", self.__patterns(), self.__folders()) + +if __name__ == '__main__': + unittest.main() diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Related Files/screenshots/list.png b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Related Files/screenshots/list.png new file mode 100644 index 0000000..933c9ab Binary files /dev/null and b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Related Files/screenshots/list.png differ diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SmartMarkdown/.gitignore b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SmartMarkdown/.gitignore new file mode 100644 index 0000000..4a8e770 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SmartMarkdown/.gitignore @@ -0,0 +1,6 @@ +*.pyc +SmartMarkdown.sublime-project +SmartMarkdown.sublime-workspace +release.sh +test/* +.ropeproject diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SmartMarkdown/Default (Linux).sublime-keymap b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SmartMarkdown/Default (Linux).sublime-keymap new file mode 100644 index 0000000..a773003 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SmartMarkdown/Default (Linux).sublime-keymap @@ -0,0 +1,26 @@ +[ + { "keys": ["ctrl+;", "ctrl+n"], "command": "headline_move", + "args": {"forward": true, "same_level": false}, "context": + [ + { "key": "selector", "operator": "equal", "operand": "text.html.markdown" } + ] + }, + { "keys": ["ctrl+;", "ctrl+p"], "command": "headline_move", + "args": {"forward": false, "same_level": false}, "context": + [ + { "key": "selector", "operator": "equal", "operand": "text.html.markdown" } + ] + }, + { "keys": ["ctrl+;", "ctrl+f"], "command": "headline_move", + "args": {"forward": true, "same_level": true}, "context": + [ + { "key": "selector", "operator": "equal", "operand": "text.html.markdown" } + ] + }, + { "keys": ["ctrl+;", "ctrl+b"], "command": "headline_move", + "args": {"forward": false, "same_level": true}, "context": + [ + { "key": "selector", "operator": "equal", "operand": "text.html.markdown" } + ] + } +] \ No newline at end of file diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SmartMarkdown/Default (OSX).sublime-keymap b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SmartMarkdown/Default (OSX).sublime-keymap new file mode 100644 index 0000000..0d7fb6e --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SmartMarkdown/Default (OSX).sublime-keymap @@ -0,0 +1,26 @@ +[ + { "keys": ["ctrl+c", "ctrl+n"], "command": "headline_move", + "args": {"forward": true, "same_level": false}, "context": + [ + { "key": "selector", "operator": "equal", "operand": "text.html.markdown" } + ] + }, + { "keys": ["ctrl+c", "ctrl+p"], "command": "headline_move", + "args": {"forward": false, "same_level": false}, "context": + [ + { "key": "selector", "operator": "equal", "operand": "text.html.markdown" } + ] + }, + { "keys": ["ctrl+c", "ctrl+f"], "command": "headline_move", + "args": {"forward": true, "same_level": true}, "context": + [ + { "key": "selector", "operator": "equal", "operand": "text.html.markdown" } + ] + }, + { "keys": ["ctrl+c", "ctrl+b"], "command": "headline_move", + "args": {"forward": false, "same_level": true}, "context": + [ + { "key": "selector", "operator": "equal", "operand": "text.html.markdown" } + ] + } +] \ No newline at end of file diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SmartMarkdown/Default (Windows).sublime-keymap b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SmartMarkdown/Default (Windows).sublime-keymap new file mode 100644 index 0000000..a773003 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SmartMarkdown/Default (Windows).sublime-keymap @@ -0,0 +1,26 @@ +[ + { "keys": ["ctrl+;", "ctrl+n"], "command": "headline_move", + "args": {"forward": true, "same_level": false}, "context": + [ + { "key": "selector", "operator": "equal", "operand": "text.html.markdown" } + ] + }, + { "keys": ["ctrl+;", "ctrl+p"], "command": "headline_move", + "args": {"forward": false, "same_level": false}, "context": + [ + { "key": "selector", "operator": "equal", "operand": "text.html.markdown" } + ] + }, + { "keys": ["ctrl+;", "ctrl+f"], "command": "headline_move", + "args": {"forward": true, "same_level": true}, "context": + [ + { "key": "selector", "operator": "equal", "operand": "text.html.markdown" } + ] + }, + { "keys": ["ctrl+;", "ctrl+b"], "command": "headline_move", + "args": {"forward": false, "same_level": true}, "context": + [ + { "key": "selector", "operator": "equal", "operand": "text.html.markdown" } + ] + } +] \ No newline at end of file diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SmartMarkdown/Default.sublime-commands b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SmartMarkdown/Default.sublime-commands new file mode 100644 index 0000000..90028e7 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SmartMarkdown/Default.sublime-commands @@ -0,0 +1,27 @@ +[ + { + "caption": "Pandoc: Render Markdown to temp PDF and View", + "command": "pandoc_render", + "args":{"open_after":true, "target":"pdf", "save_result":false} + }, + { + "caption": "Pandoc: Render Markdown to temp HTML and View", + "command": "pandoc_render", + "args":{"open_after":true, "target":"html", "save_result":false} + }, + { + "caption": "Pandoc: Render Markdown to HTML", + "command": "pandoc_render", + "args":{"open_after":false, "target":"html", "save_result":true} + }, + { + "caption": "Pandoc: Render Markdown to PDF", + "command": "pandoc_render", + "args":{"open_after":false, "target":"pdf", "save_result":true} + }, + { + "caption": "Pandoc: Render Markdown DocX", + "command": "pandoc_render", + "args":{"open_after":false, "target":"docx", "save_result":true} + } +] \ No newline at end of file diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SmartMarkdown/Default.sublime-keymap b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SmartMarkdown/Default.sublime-keymap new file mode 100644 index 0000000..28a78b4 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SmartMarkdown/Default.sublime-keymap @@ -0,0 +1,72 @@ +[ + { "keys": ["tab"], "command": "smart_folding", "context": + [ + { "key": "selector", "operator": "equal", "operand": "markup.heading.markdown" } + ] + }, + { "keys": ["shift+tab"], "command": "global_folding", "context": + [ + { "key": "selector", "operator": "equal", "operand": "text.html.markdown" } + ] + }, + { "keys": ["enter"], "command": "smart_list", "context": + [ + { "key": "selector", "operator": "equal", "operand": "text.html.markdown" }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*([-+\\**]|\\d+\\.+)\\s+" } + ] + }, + { "keys": ["enter"], "command": "smart_list", "context": + [ + { "key": "selector", "operator": "equal", "operand": "text.html.markdown" }, + { "key": "selector", "operator": "equal", "operand": "markup.list" } + ] + }, + { "keys": ["tab"], "command": "smart_table", + "args": {"forward": true}, "context": + [ + { "key": "selector", "operator": "equal", "operand": "text.html.markdown" }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*(\\||\\+[-=])", + "match_all": true} + ] + }, + { "keys": ["tab"], "command": "smart_table", + "args": {"forward": true}, "context": + [ + { "key": "selector", "operator": "equal", "operand": "text.html.markdown" }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*" }, + { "key": "following_text", "operator": "regex_contains", "operand": "\\s*(\\||\\+[-=])", + "match_all": true} + ] + }, + { "keys": ["shift+tab"], "command": "smart_table", + "args": {"forward": false}, "context": + [ + { "key": "selector", "operator": "equal", "operand": "text.html.markdown" }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*(\\||\\+[-=])", + "match_all": true} + ] + }, + { "keys": ["shift+tab"], "command": "smart_table", + "args": {"forward": false}, "context": + [ + { "key": "selector", "operator": "equal", "operand": "text.html.markdown" }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*" }, + { "key": "following_text", "operator": "regex_contains", "operand": "\\s*(\\||\\+[-=])", + "match_all": true} + ] + }, + { + "keys": ["super+shift+."], "command": "change_heading_level", + "args": {"up": true}, "context": + [ + {"key": "selector", "operator": "equal", "operand": "text.html.markdown"} + ] + }, + { + "keys": ["super+shift+,"], "command": "change_heading_level", + "args": {"up": false}, "context": + [ + {"key": "selector", "operator": "equal", "operand": "text.html.markdown"} + ] + } +] diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SmartMarkdown/Main.sublime-menu b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SmartMarkdown/Main.sublime-menu new file mode 100644 index 0000000..91bce87 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SmartMarkdown/Main.sublime-menu @@ -0,0 +1,70 @@ +[ + { + "caption": "Preferences", + "mnemonic": "n", + "id": "preferences", + "children": + [ + { + "caption": "Package Settings", + "mnemonic": "P", + "id": "package-settings", + "children": + [ + { + "caption": "SmartMarkdown", + "children": + [ + { + "command": "open_file", "args": + { + "file": "${packages}/SmartMarkdown/SmartMarkdown.sublime-settings" + }, + "caption": "Settings – Default" + }, + { + "command": "open_file", "args": + { + "file": "${packages}/User/SmartMarkdown.sublime-settings" + }, + "caption": "Settings – User" + }, + { "caption": "-" }, + { + "command": "open_file", "args": + { + "file": "${packages}/SmartMarkdown/Default.sublime-keymap" + }, + "caption": "Key Bindings – Default" + }, + { + "command": "open_file", "args": + { + "file": "${packages}/User/Default (OSX).sublime-keymap", + "platform": "OSX" + }, + "caption": "Key Bindings – User" + }, + { + "command": "open_file", "args": + { + "file": "${packages}/User/Default (Linux).sublime-keymap", + "platform": "Linux" + }, + "caption": "Key Bindings – User" + }, + { + "command": "open_file", + "args": { + "file": "${packages}/User/Default (Windows).sublime-keymap", + "platform": "Windows" + }, + "caption": "Key Bindings – User" + } + ] + } + ] + } + ] + } +] diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SmartMarkdown/SmartMarkdown.sublime-settings b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SmartMarkdown/SmartMarkdown.sublime-settings new file mode 100644 index 0000000..69d1fb2 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SmartMarkdown/SmartMarkdown.sublime-settings @@ -0,0 +1,11 @@ +{ + /* Please specify the PATH of pdflatex if you wanna generate PDF */ + "tex_path": ["/usr/local/texlive/2011/bin/x86_64-darwin", + "/usr/local/texlive/2012/bin/x86_64-darwin"], + /* Provide your arguments here as a list e.g.: ["--latex-engine=xelatex", "--toc"] + arguments that are separated by space must be in separate slots. e.g. ["-H", "template.tex"] */ + "pandoc_args": [], + "pandoc_args_pdf": [], + "pandoc_args_html": [], + "pandoc_args_docx": [] +} \ No newline at end of file diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SmartMarkdown/headline.py b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SmartMarkdown/headline.py new file mode 100644 index 0000000..91dce43 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SmartMarkdown/headline.py @@ -0,0 +1,263 @@ +"""Some utility functions for working with headline of Markdown. + +Terminologies +- Headline :: The headline entity OR the text of the headline +- Content :: The content under the current headline. It stops after + encountering a headline with the same or higher level OR EOF. +""" +# Author: Muchenxuan Tong <demon386@gmail.com> + +import re +import sublime + +try: + from .utilities import is_region_void +except ValueError: + from utilities import is_region_void + +MATCH_PARENT = 1 # Match headlines at the same or higher level +MATCH_CHILD = 2 # Match headlines at the same or lower level +MATCH_SILBING = 3 # Only Match headlines at the same level. +MATCH_ANY = 4 # Any headlines would be matched. +ANY_LEVEL = -1 # level used when MATCH_ANY is used as match type + + +def region_of_content_of_headline_at_point(view, from_point): + """Extract the region of the content of under current headline.""" + _, level = headline_and_level_at_point(view, from_point) + if level == None: + return None + + if is_content_empty_at_point(view, from_point): + return None + + line_num, _ = view.rowcol(from_point) + content_line_start_point = view.text_point(line_num + 1, 0) + + next_headline, _ = find_headline(view, \ + content_line_start_point, \ + level, \ + True, \ + MATCH_PARENT) + if not is_region_void(next_headline): + end_pos = next_headline.a - 1 + else: + end_pos = view.size() + return sublime.Region(content_line_start_point, end_pos) + + +def headline_and_level_at_point(view, from_point, search_above_and_down=False): + """Return the current headline and level. + + If from_point is inside a headline, then return the headline and level. + Otherwise depends on the argument it might search above and down. + """ + line_region = view.line(from_point) + line_content = view.substr(line_region) + # Update the level in case it's headline.ANY_LEVEL + level = _extract_level_from_headline(line_content) + + # Search above and down + if level is None and search_above_and_down: + # Search above + headline_region, _ = find_headline(view,\ + from_point,\ + ANY_LEVEL, + False, + skip_folded=True) + if not is_region_void(headline_region): + line_content, level = headline_and_level_at_point(view,\ + headline_region.a) + # Search down + if level is None: + headline_region, _ = find_headline(view,\ + from_point,\ + ANY_LEVEL, + True, + skip_folded=True) + if not is_region_void(headline_region): + line_content, level = headline_and_level_at_point(view, headline_region.a) + + return line_content, level + + +def _extract_level_from_headline(headline): + """Extract the level of headline, None if not found. + + """ + re_string = _get_re_string(ANY_LEVEL, MATCH_ANY) + match = re.match(re_string, headline) + + if match: + return len(match.group(1)) + else: + return None + + +def is_content_empty_at_point(view, from_point): + """Check if the content under the current headline is empty. + + For implementation, check if next line is a headline a the same + or higher level. + + """ + _, level = headline_and_level_at_point(view, from_point) + if level is None: + raise ValueError("from_point must be inside a valid headline.") + + line_num, _ = view.rowcol(from_point) + next_line_region = view.line(view.text_point(line_num + 1, 0)) + next_line_content = view.substr(next_line_region) + next_line_level = _extract_level_from_headline(next_line_content) + + # Note that EOF works too in this case. + if next_line_level and next_line_level <= level: + return True + else: + return False + + +def find_headline(view, from_point, level, forward=True, \ + match_type=MATCH_ANY, skip_headline_at_point=False, \ + skip_folded=False): + """Return the region of the next headline or EOF. + + Parameters + ---------- + view: sublime.view + + from_point: int + From which to find. + + level: int + The headline level to match. + + forward: boolean + Search forward or backward + + match_type: int + MATCH_SILBING, MATCH_PARENT, MATCH_CHILD or MATCH_ANY. + + skip_headline_at_point: boolean + When searching whether skip the headline at point + + skip_folded: boolean + Whether to skip the folded region + + Returns + ------- + match_region: int + Matched region, or None if not found. + + match_level: int + The level of matched headline, or None if not found. + + """ + if skip_headline_at_point: + # Move the point to the next line if we are + # current in a headline already. + from_point = _get_new_point_if_already_in_headline(view, from_point, + forward) + + re_string = _get_re_string(level, match_type) + if forward: + match_region = view.find(re_string, from_point) + else: + all_match_regions = view.find_all(re_string) + match_region = _nearest_region_among_matches_from_point(view, \ + all_match_regions, \ + from_point, \ + False, \ + skip_folded) + + if skip_folded: + while (_is_region_folded(match_region, view)): + from_point = match_region.b + match_region = view.find(re_string, from_point) + + if not is_region_void(match_region): + if not is_scope_headline(view, match_region.a): + return find_headline(view, match_region.a, level, forward, \ + match_type, True, skip_folded) + else: + ## Extract the level of matched headlines according to the region + headline = view.substr(match_region) + match_level = _extract_level_from_headline(headline) + else: + match_level = None + return (match_region, match_level) + +def _get_re_string(level, match_type=MATCH_ANY): + """Get regular expression string according to match type. + + Return regular expression string, rather than compiled string. Since + sublime's view.find function needs string. + + Parameters + ---------- + match_type: int + MATCH_SILBING, MATCH_PARENT, MATCH_CHILD or ANY_LEVEL. + + """ + if match_type == MATCH_ANY: + re_string = r'^(#+)\s.*' + else: + try: + if match_type == MATCH_PARENT: + re_string = r'^(#{1,%d})\s.*' % level + elif match_type == MATCH_CHILD: + re_string = r'^(#{%d,})\s.*' % level + elif match_type == MATCH_SILBING: + re_string = r'^(#{%d,%d})\s.*' % (level, level) + except ValueError: + print("match_type has to be specified if level isn't ANY_LEVE") + return re_string + + +def _get_new_point_if_already_in_headline(view, from_point, forward=True): + line_content = view.substr(view.line(from_point)) + if _extract_level_from_headline(line_content): + line_num, _ = view.rowcol(from_point) + if forward: + return view.text_point(line_num + 1, 0) + else: + return view.text_point(line_num, 0) - 1 + else: + return from_point + + +def is_scope_headline(view, from_point): + return view.score_selector(from_point, "markup.heading") > 0 or \ + view.score_selector(from_point, "meta.block-level.markdown") > 0 + + +def _nearest_region_among_matches_from_point(view, all_match_regions, \ + from_point, forward=False, + skip_folded=True): + """Find the nearest matched region among all matched regions. + + None if not found. + + """ + nearest_region = None + + for r in all_match_regions: + if not forward and r.b <= from_point and \ + (not nearest_region or r.a > nearest_region.a): + candidate = r + elif forward and r.a >= from_point and \ + (not nearest_region or r.b < nearest_region.b): + candidate = r + else: + continue + if skip_folded and not _is_region_folded(candidate, view): + nearest_region = candidate + + return nearest_region + + +def _is_region_folded(region, view): + for i in view.folded_regions(): + if i.contains(region): + return True + return False diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SmartMarkdown/headline_level.py b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SmartMarkdown/headline_level.py new file mode 100644 index 0000000..3ad56b9 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SmartMarkdown/headline_level.py @@ -0,0 +1,21 @@ +"""This file is contributed by [David Smith](https://github.com/djs070) +""" +import sublime +import sublime_plugin + + +class ChangeHeadingLevelCommand(sublime_plugin.TextCommand): + def run(self, edit, up=True): + for region in self.view.sel(): + line = self.view.line(region) + if up: + # Increase heading level + if not self.view.substr(line)[0] in ['#', ' ']: + self.view.insert(edit, line.begin(), " ") + self.view.insert(edit, line.begin(), "#") + else: + # Decrease heading level + if self.view.substr(line)[0] == '#': + self.view.erase(edit, sublime.Region(line.begin(), line.begin() + 1)) + if self.view.substr(line)[0] == ' ': + self.view.erase(edit, sublime.Region(line.begin(), line.begin() + 1)) diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SmartMarkdown/headline_move.py b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SmartMarkdown/headline_move.py new file mode 100644 index 0000000..824d6a9 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SmartMarkdown/headline_move.py @@ -0,0 +1,61 @@ +"""This module provides commands for easily moving between headilnes. + +The feature is borrowed from [Org-mode](http://org-mode.org). + +""" +# Author: Muchenxuan Tong <demon386@gmail.com> + +import sublime +import sublime_plugin + +try: + from . import headline + from .utilities import is_region_void +except ValueError: + import headline + from utilities import is_region_void + + +class HeadlineMoveCommand(sublime_plugin.TextCommand): + def run(self, edit, forward=True, same_level=True): + """Move between headlines, forward or backward. + + If same_level is true, only move to headline with the same level + or higher level. + + """ + new_sel = [] + if same_level: + level_type = headline.MATCH_PARENT + else: + level_type = headline.MATCH_ANY + + for region in self.view.sel(): + if same_level: + _, level = headline.headline_and_level_at_point(self.view,\ + region.a, + search_above_and_down=True) + if level is None: + return + else: + level = headline.ANY_LEVEL + + match_region, _ = headline.find_headline(self.view, \ + region.a, \ + level, \ + forward, \ + level_type, \ + skip_headline_at_point=True,\ + skip_folded=True) + + if is_region_void(match_region): + return + new_sel.append(sublime.Region(match_region.a, match_region.a)) + + self.adjust_view(new_sel) + + def adjust_view(self, new_sel): + self.view.sel().clear() + for region in new_sel: + self.view.sel().add(region) + self.view.show(region) diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SmartMarkdown/license.txt b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SmartMarkdown/license.txt new file mode 100644 index 0000000..d71c44d --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SmartMarkdown/license.txt @@ -0,0 +1,7 @@ +Copyright (C) <2012> Muchenxuan Tong <demon386@gmail.com> + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SmartMarkdown/package-metadata.json b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SmartMarkdown/package-metadata.json new file mode 100644 index 0000000..b5e2cd5 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SmartMarkdown/package-metadata.json @@ -0,0 +1 @@ +{"url": "https://github.com/demon386/SmartMarkdown", "version": "2013.03.23.12.24.10", "description": "A plugin for facilitating editing markdown in Sublime Text 2. Features are borrowed from Org mode of Emacs."} \ No newline at end of file diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SmartMarkdown/pandoc_render.py b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SmartMarkdown/pandoc_render.py new file mode 100644 index 0000000..67f7320 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SmartMarkdown/pandoc_render.py @@ -0,0 +1,124 @@ +"""This file is initially forked from +[SublimePandoc](https://github.com/jclement/SublimePandoc) +by [DanielMe](https://github.com/DanielMe/) + +@todo naming convention should be foo_bar rather than fooBar. +@bug PDF export doesn't work in my Mac, gonna check it later. + +2012-07-02: Muchenxuan Tong changed some stylical errors (with SublimeLinter) +""" + +import sublime +import sublime_plugin +import webbrowser +import tempfile +import os +import os.path +import sys +import subprocess +from subprocess import PIPE + + +class PandocRenderCommand(sublime_plugin.TextCommand): + def is_enabled(self): + return self.view.score_selector(0, "text.html.markdown") > 0 + + def is_visible(self): + return True + + def run(self, edit, target="pdf", open_after=True, save_result=False): + if target not in ["html", "docx", "pdf"]: + raise Exception("Format %s currently unsopported" % target) + + self.setting = sublime.load_settings("SmartMarkdown.sublime-settings") + + encoding = self.view.encoding() + if encoding == 'Undefined': + encoding = 'UTF-8' + elif encoding == 'Western (Windows 1252)': + encoding = 'windows-1252' + contents = self.view.substr(sublime.Region(0, self.view.size())) + contents = contents.encode(encoding) + + file_name = self.view.file_name() + if file_name: + os.chdir(os.path.dirname(file_name)) + + # write buffer to temporary file + # This is useful because it means we don't need to save the buffer + tmp_md = tempfile.NamedTemporaryFile(delete=False, suffix=".md") + tmp_md.write(contents) + tmp_md.close() + + # output file... + suffix = "." + target + if save_result: + output_name = os.path.splitext(self.view.file_name())[0] + suffix + if not self.view.file_name(): + raise Exception("Please safe the buffer before trying to export with pandoc.") + else: + output = tempfile.NamedTemporaryFile(delete=False, suffix=suffix) + output.close() + output_name = output.name + + args = self.pandoc_args(target) + self.run_pandoc(tmp_md.name, output_name, args) + + if open_after: + self.open_result(output_name, target) + #os.unlink(tmp_md.name) + + def run_pandoc(self, infile, outfile, args): + cmd = ['pandoc'] + args + cmd += [infile, "-o", outfile] + + # Merge the path in settings + setting_path = self.setting.get("tex_path", []) + for p in setting_path: + if p not in os.environ["PATH"]: + os.environ["PATH"] += ":" + p + + try: + # Use the current directory as working dir whenever possible + file_name = self.view.file_name() + if file_name: + working_dir = os.path.dirname(file_name) + p = subprocess.Popen(cmd, stdout=PIPE, stderr=PIPE, + cwd=working_dir) + + else: + p = subprocess.Popen(cmd, stdout=PIPE, stderr=PIPE) + p.wait() + out, err = p.communicate() + if err: + raise Exception("Command: %s\n" % " ".join(cmd) + "\nErrors: " + err) + except Exception as e: + sublime.error_message("Fail to generate output.\n{0}".format(e)) + + def pandoc_args(self, target): + """ + Create a list of arguments for the pandoc command + depending on the target. + TODO: Actually do something sensible here + """ + # Merge the args in settings + args = self.setting.get("pandoc_args", []) + + if target == "pdf": + args += self.setting.get("pandoc_args_pdf", []) + if target == "html": + args += self.setting.get("pandoc_args_html", []) + ['-t', 'html5'] + if target == "docx": + args += self.setting.get("pandoc_args_docx", []) + ['-t', 'docx'] + return args + + def open_result(self, outfile, target): + if target == "html": + webbrowser.open_new_tab(outfile) + elif sys.platform == "win32": + os.startfile(outfile) + elif "mac" in sys.platform or "darwin" in sys.platform: + os.system("open %s" % outfile) + print(outfile) + elif "posix" in sys.platform or "linux" in sys.platform: + os.system("xdg-open %s" % outfile) diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SmartMarkdown/readme.md b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SmartMarkdown/readme.md new file mode 100644 index 0000000..6b0d6a0 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SmartMarkdown/readme.md @@ -0,0 +1,59 @@ +# SmartMarkdown for Sublime Text 2 & 3 + +Author: Muchenxuan Tong (demon386@gmail.com) + +## Introduction +The plugin is aimed at making editing Markdown in Sublime Text 2 easier and more powerful. Ideally, I hope we can bring several amazing features of [Org-mode](http://org-mode.org) of Emacs into Sublime Text. + +## Done +- **Smart Headline folding / unfolding**. Right now you can fold / unfold headlines by pressing **TAB** on it. I assume you use the following formats: # Section; ## Subsection; ### Subsubsection ... +- **Global Headline Folding / unfolding**. **Shift+Tab** to Fold / Unfold all at any position. +- **Smart Order / Unordered list**. When editing lists, you can just press **ENTER** and this plugin will automatically continue the list. Once the content of the list becomes empty it will stop. +- **Move between headlines**. + - Use **Ctrl+c Ctrl+n** to move to the next headline (any level); **Ctrl+c Ctrl+p** to the previous one, for Mac. (**Ctrl+; Ctrl+n** and **Ctrl+; Ctrl+p** for Windows and Linux) + - Use **Ctrl+c Ctrl+f** to move to the next headline (same level or higher level); **Ctrl+c Ctrl+b** to the previous one, for Mac. (**Ctrl+; Ctrlf** and **Ctrl+; Ctrl+b** for Windows and Linux) +- **Adjust headline level** Added by [David Smith](https://github.com/djs070). + - **Super+Shift+,** for decreasing and **Super+Shift+.** for increasing headline levels. +- **Smart table** + - Currently, the smart table suppose only the Grid table format of [Pandoc](http://johnmacfarlane.net/pandoc/README.html). Use monospaced fonts, otherwise it would appear bizarre. + - The behavior is like the table in Org-mode. If you are unfamiliar with Org-mode, just use | (vertical line) to separate the column (e.g. | header1 | header 2 |), and use the **TAB** to reformat the table at point. Everything would fall into the place. Add +- and then press TAB for adding separator between rows. Add += and then press TAB for adding separator between header and the table body. Read the Grid tables section of [Pandoc Userg's Guide](http://johnmacfarlane.net/pandoc/README.html#tables) for more information. + - Use **TAB** to move forward a cell in table, **Shift+TAB** to move backward. + - Personally I plan to use grid table as a basis and add command for converting to other table formats if necessary. +- **Basic Pandoc integration with Pandoc** By integrating [SublimePandoc](https://github.com/jclement/SublimePandoc). Added by [DanielMe](https://github.com/DanielMe/). + - **Note**: If you need to generate PDF output, please make sure you have pdflatex available ([MacTeX](http://www.tug.org/mactex/2012/) for Mac, or TeX Live for other OS). Please also specify "tex_path" in the package settings (Preference - Package Settings - SmartMarkdown - Settings - User (see Settings - Default as an example.)) + +## Todo +- **Embeded R & Python Code for reproducible research** +- **Better Pandoc integration** Actual support for different Pandoc command line options etc. +- ... + +## What's new +### v0.2: Support for Sublime Text 3 (added by [UNOwen](https://github.com/UNOwen).) +### v0.1.6: Add support and bindings for headline level changing. (added by [David Smith](https://github.com/djs070).) The key bindings are: **Super+Shift+,** for decreasing and **Super+Shift+.** for increasing. +### v0.1.5: Basic smart table (grid table) support added. Basic Pandoc intergration (added by [DanielMe](https://github.com/DanielMe/).) +### v0.1.3: Add support for global headling folding / unfolding. +### v0.1.2: Move between headlines supported! +- Use **Ctrl+c Ctrl+n** to move to the next headline (any level); **Ctrl+c Ctrl+p** to the previous one. +- Use **Ctrl+c Ctrl+f** to move to the next headline (same level or higher level); **Ctrl+c Ctrl+b** to the previous one. +- Fixed a bug on bullet list. Thanks to quodlibet (fixed in v0.1.1). + +### v0.1.0: Created! +- Smart Headline folding / unfolding is supported. +- Smart Lists is supported. + +## For Developers +- Whenever possible, please obey the [PEP 8](http://www.python.org/dev/peps/pep-0008/) style guide. This can be checked easily with the plugin SublimeLinter. +- git-flow is recommended (but not enforced) as a development work flow. For instruction please read [Why aren't you using git-flow?](http://jeffkreeftmeijer.com/2010/why-arent-you-using-git-flow/). To adapt it, a command line tool [gitflow](https://github.com/nvie/gitflow/) is highly recommended. +- Please work on the develop branch, it's newer than master. the master branch is for users. + +# License +The plugin is licensed under the MIT license. + + +Copyright (C) <2012> Muchenxuan Tong <demon386@gmail.com> + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SmartMarkdown/smart_folding.py b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SmartMarkdown/smart_folding.py new file mode 100644 index 0000000..350e11d --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SmartMarkdown/smart_folding.py @@ -0,0 +1,195 @@ +"""Smart folding is a feature borrowed from [Org-mode](http://org-mode.org). + +It enables folding / unfolding the headlines by simply pressing TAB on headlines. + +Global headline folding / unfolding is recommended to be trigged by Shift + TAB, +at anywhere. + +""" +# Author: Muchenxuan Tong <demon386@gmail.com> + +import re + +import sublime +import sublime_plugin + +try: + from . import headline + from .utilities import is_region_void +except ValueError: + import headline + from utilities import is_region_void + + +HEADLINE_PATTERN = re.compile(r'^(#+)\s.*') + + +class SmartFoldingCommand(sublime_plugin.TextCommand): + """Smart folding is used to fold / unfold headline at the point. + + It's designed to bind to TAB key, and if the current line is not + a headline, a \t would be inserted. + + """ + def run(self, edit): + ever_matched = False + for region in self.view.sel(): + matched = self.fold_or_unfold_headline_at_point(region.a) + if matched: + ever_matched = True + if not ever_matched: + for r in self.view.sel(): + self.view.insert(edit, r.a, '\t') + self.view.show(r) + + def fold_or_unfold_headline_at_point(self, from_point): + """Smart folding of the current headline. + + Unfold only when it's totally folded. Otherwise fold it. + + """ + _, level = headline.headline_and_level_at_point(self.view, + from_point) + # Not a headline, cancel + if level is None or not headline.is_scope_headline(self.view, from_point): + return False + + content_region = headline.region_of_content_of_headline_at_point(self.view, + from_point) + # If the content is empty, Nothing needs to be done. + if content_region is None: + # Return True because there is a headline anyway. + return True + + # Check if content region is folded to decide the action. + if self.is_region_totally_folded(content_region): + self.unfold_yet_fold_subheads(content_region, level) + else: + self.view.fold(content_region) + return True + + def is_region_totally_folded(self, region): + """Decide if the region is folded. Treat empty region as folded.""" + if (region is None) or (region.a == region.b): + return True + + for i in self.view.folded_regions(): + if i.contains(region): + return True + return False + + def unfold_yet_fold_subheads(self, region, level): + """Unfold the region while keeping the subheadlines folded.""" + ## First unfold all + self.view.unfold(region) + ## Fold subheads + child_headline_region, _ = headline.find_headline(self.view, region.a, level, True, \ + headline.MATCH_CHILD) + + while (not is_region_void(child_headline_region) and child_headline_region.b <= region.b): + child_content_region = headline.region_of_content_of_headline_at_point(self.view, + child_headline_region.a) + if child_content_region is not None: + self.view.fold(child_content_region) + search_start_point = child_content_region.b + else: + search_start_point = child_headline_region.b + + child_headline_region, _ = headline.find_headline(self.view, \ + search_start_point, level, True, \ + headline.MATCH_CHILD, + skip_headline_at_point=True) + + +class GlobalFoldingCommand(SmartFoldingCommand): + """Global folding / unfolding headlines at any point. + + Unfold only when top-level headlines are totally folded. + Otherwise fold. + + """ + def run(self, edit): + if self.is_global_folded(): + # Unfold all + self.unfold_all() + else: + self.fold_all() + + def is_global_folded(self): + """Check if all headlines are folded. + """ + region, level = headline.find_headline(self.view, 0, \ + headline.ANY_LEVEL, True) + # Treating no heeadline as folded, since unfolded all makes + # no harm in this situation. + if is_region_void(region): + return True + + point = region.a + # point can be zero + while (point is not None and region): + region = headline.region_of_content_of_headline_at_point(self.view, \ + point) + if not is_region_void(region): + point = region.b + if not self.is_region_totally_folded(region): + return False + else: + region, level = headline.find_headline(self.view, point, \ + headline.ANY_LEVEL, \ + True, + skip_headline_at_point=True) + if not is_region_void(region): + point = region.a + return True + + def unfold_all(self): + self.view.unfold(sublime.Region(0, self.view.size())) + self.view.show(self.view.sel()[0]) + + def fold_all(self): + region, level = headline.find_headline(self.view, \ + 0, \ + headline.ANY_LEVEL, \ + True) + + # At this point, headline region is sure to exist, otherwise it would be + # treated as gobal folded. (self.is_global_folded() would return True) + point = region.a + # point can be zero + while (point is not None and region): + region = headline.region_of_content_of_headline_at_point(self.view, \ + point) + if not is_region_void(region): + point = region.b + self.view.fold(region) + region, level = headline.find_headline(self.view, point, \ + headline.ANY_LEVEL, + True, \ + skip_headline_at_point=True) + if not is_region_void(region): + point = region.a + self.adjust_cursors_and_view() + + def adjust_cursors_and_view(self): + """After folder, adjust cursors and view. + + If the current point is inside the folded region, move it move + otherwise it's easy to perform some unintentional editing. + + """ + folded_regions = self.view.folded_regions() + new_sel = [] + + for r in self.view.sel(): + for folded in folded_regions: + if folded.contains(r): + new_sel.append(sublime.Region(folded.b, folded.b)) + break + else: + new_sel.append(r) + + self.view.sel().clear() + for r in new_sel: + self.view.sel().add(r) + self.view.show(r) diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SmartMarkdown/smart_list.py b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SmartMarkdown/smart_list.py new file mode 100644 index 0000000..c1e229f --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SmartMarkdown/smart_list.py @@ -0,0 +1,57 @@ +"""Smart list is used to automatially continue the current list.""" +# Author: Muchenxuan Tong <demon386@gmail.com> + +import re + +import sublime +import sublime_plugin + + +ORDER_LIST_PATTERN = re.compile(r"(\s*)(\d+)(\.\s+)\S+") +UNORDER_LIST_PATTERN = re.compile(r"(\s*[-+\**]+)(\s+)\S+") +EMPTY_LIST_PATTERN = re.compile(r"(\s*([-+\**]|\d+\.+))\s+$") + + +class SmartListCommand(sublime_plugin.TextCommand): + def run(self, edit): + for region in self.view.sel(): + line_region = self.view.line(region) + # the content before point at the current line. + before_point_region = sublime.Region(line_region.a, + region.a) + before_point_content = self.view.substr(before_point_region) + + # Disable smart list when folded. + folded = False + for i in self.view.folded_regions(): + if i.contains(before_point_region): + self.view.insert(edit, region.a, '\n') + folded = True + if folded: + break + + match = EMPTY_LIST_PATTERN.match(before_point_content) + if match: + self.view.erase(edit, before_point_region) + break + + match = ORDER_LIST_PATTERN.match(before_point_content) + if match: + insert_text = match.group(1) + \ + str(int(match.group(2)) + 1) + \ + match.group(3) + self.view.insert(edit, region.a, "\n" + insert_text) + break + + match = UNORDER_LIST_PATTERN.match(before_point_content) + if match: + insert_text = match.group(1) + match.group(2) + self.view.insert(edit, region.a, "\n" + insert_text) + break + + self.view.insert(edit, region.a, '\n') + self.adjust_view() + + def adjust_view(self): + for region in self.view.sel(): + self.view.show(region) diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SmartMarkdown/smart_table.py b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SmartMarkdown/smart_table.py new file mode 100644 index 0000000..51c6677 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SmartMarkdown/smart_table.py @@ -0,0 +1,87 @@ +"""Smart is inspired by the Table behavior of Org-mode. + +Markdown itself doesn't support grid table, yet pandoc does. + +@todo: add a key binding for converting grid table to the simple one +""" +# Author: Muchenxuan Tong <demon386@gmail.com> +# LICENSE: MIT + +import sublime +import sublime_plugin + +try: + from . import table +except ValueError: + import table + + +class SmartTable(sublime_plugin.TextCommand): + def run(self, edit, forward=True): + new_sel = [] + for r in self.view.sel(): + point = r.a + + for i in self.view.folded_regions(): + if i.contains(sublime.Region(point, point)): + return + t = table.convert_table_at_point_as_list(self.view, point) + t = table.reformat_table_list(t) + t_str = table.convert_table_list_to_str(t) + + # Both are 0-based + cur_row_num, cur_col_num = table.get_point_row_and_col(self.view, point) + table_row_num = len(t) + line_num, _ = self.view.rowcol(point) + start_line_num = line_num - cur_row_num + start_point = self.view.text_point(line_num - cur_row_num, 0) + end_line_num = line_num + table_row_num - cur_row_num - 1 + end_line_start_point = self.view.text_point(end_line_num, 0) + end_point = self.view.line(end_line_start_point).b + + # Erase the previous table region, use the new one for substitution. + self.view.erase(edit, sublime.Region(start_point, end_point)) + self.view.insert(edit, start_point, t_str) + + if forward: + if cur_col_num is None or cur_col_num >= len(t[0]) - 1: + line_num += 1 + while(table.is_line_separator(self.view, line_num)): + line_num += 1 + cur_col_num = 0 + else: + cur_col_num += 1 + else: + if cur_col_num is None or cur_col_num <= 0: + line_num -= 1 + while(table.is_line_separator(self.view, line_num)): + line_num -= 1 + cur_col_num = len(t[0]) - 1 + else: + cur_col_num -= 1 + + # Add a new line when at the end of the table. + if line_num < start_line_num or line_num > end_line_num: + col_pos = 0 + if line_num > end_line_num: + self.view.insert(edit, self.view.text_point(line_num, 0), "\n") + else: + col_pos = self.calculate_col_point(t, cur_col_num) + + new_sel.append(self.view.text_point(line_num, col_pos)) + + self.view.sel().clear() + for r in new_sel: + self.view.sel().add(r) + self.view.show(r) + + def calculate_col_point(self, formatted_table, col_num): + i = 0 + while table.SEPARATOR_PATTERN.match(formatted_table[i][0]): + i += 1 + + cols_length = [len(j) for j in formatted_table[i]] + point = 2 + for i in range(col_num): + point += cols_length[i] + 3 + return point diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SmartMarkdown/table.py b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SmartMarkdown/table.py new file mode 100644 index 0000000..41348c4 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SmartMarkdown/table.py @@ -0,0 +1,207 @@ +"""Utilities function for working with grid table of Pandoc + +Terminologies + +- Table list :: This is not a list of tables, but rather converting the table as +a nested python list. Each row is a sub-list in the table list. + +""" +# Author: Muchenxuan Tong <demon386@gmail.com> +# LICENSE: MIT + +import re +import copy + +import sublime + +try: + from . import utilities +except ValueError: + import utilities + +TABLE_PATTERN = re.compile(r"\s*\|") +SEPARATOR_PATTERN = re.compile(r"\s*(\+[=-])") + + +def convert_table_at_point_as_list(view, from_point): + """Get the table at the point. + Transform the table to python list. + + Returns + ------- + table: list + A nested list representing the table. + indent: "str" (@todo not impelmented yet) + String of indentation, used in every row. + + """ + table_above = convert_table_above_or_below_as_list(view, from_point, above=True) + table_below = convert_table_above_or_below_as_list(view, from_point, above=False) + row_at_point = convert_row_at_point_as_list(view, from_point) + + table = table_above + [row_at_point] + table_below + return table + + +def convert_table_above_or_below_as_list(view, from_point, above): + """Convert the table above the point as python list. + + Returns + ------- + table: list + A nested list representing the table. + + """ + line_num, _ = view.rowcol(from_point) + line_num += - 1 if above else 1 + + line_text = utilities.text_at_line(view, line_num) + table = [] + + while line_text and (TABLE_PATTERN.match(line_text) or + SEPARATOR_PATTERN.match(line_text)): + table.append(_convert_row_text_as_list(line_text)) + line_num += -1 if above else 1 + line_text = utilities.text_at_line(view, line_num) + + if above: + table = table[::-1] + + return table + + +def convert_row_at_point_as_list(view, from_point): + """Convert the row at point as a python list. + """ + line_num, _ = view.rowcol(from_point) + line_text = utilities.text_at_line(view, line_num) + + return _convert_row_text_as_list(line_text) + + +def _convert_row_text_as_list(row_text): + """Convert the text of a row into a python list. + + Paramters + --------- + row_text: str + The text of the row. + + Returns + ------- + lst: list + The converted list. + + """ + split_row = row_text.split("|") + + if len(split_row) > 2 and split_row[-1].strip() == "": + lst = split_row[1:-1] + else: + lst = split_row[1:] + + match = SEPARATOR_PATTERN.match(row_text) + if match: + lst = [match.group(1)] + + return [i.strip() for i in lst] + + +def reformat_table_list(table): + """Reformat & align the table list. + + After this, every column is of the same length, + and every row is of the same number of column. + + """ + cols_num = max([len(row) for row in table]) + cols_length = _get_cols_length(table, cols_num) + + new_table = [] + for row in table: + new_row = [] + if not SEPARATOR_PATTERN.match(row[0]): + for i in range(cols_num): + try: + col = row[i] + new_row.append(col + " " * (cols_length[i] - len(col))) + except: + new_row.append(" " * cols_length[i]) + else: + marker = row[0][1] + for i in range(cols_num): + new_row.append(marker * (cols_length[i] + 2)) + # Add a mark for recognization + new_row[0] = "+" + new_row[0] + new_table.append(new_row) + return new_table + + +def convert_table_list_to_str(table): + """Convert the python list to str for outputing. + + """ + table_str = "" + table = copy.deepcopy(table) + for row in table: + if SEPARATOR_PATTERN.match(row[0]): + row[0] = row[0][1:] # Remove the mark added in reformat_table_list + row_str = "+" + for col_str in row: + row_str += col_str + "+" + else: + row_str = "|" + for col_str in row: + row_str += " " + col_str + " " + "|" + table_str += row_str + "\n" + return table_str[:-1] + + +def _get_cols_length(table, cols_num): + """Return the max length of every columns. + """ + cols_length = [0] * cols_num + for row in table: + for (i, col) in enumerate(row): + col_len = len(col) + if col_len > cols_length[i]: + cols_length[i] = col_len + return cols_length + + +def get_point_row_and_col(view, from_point): + """Return the row and col the current point is in the table. + """ + line_num, _ = view.rowcol(from_point) + line_num -= 1 + + line_text = utilities.text_at_line(view, line_num) + row_num = 0 + while line_text and (TABLE_PATTERN.match(line_text) or + SEPARATOR_PATTERN.match(line_text)): + row_num += 1 + line_num -= 1 + line_text = utilities.text_at_line(view, line_num) + + line_start_point = view.line(from_point) + region = sublime.Region(line_start_point.a, from_point) + precedding_text = view.substr(region) + + split_row = precedding_text.split("|") + if len(split_row) >= 2: + col_num = len(split_row) - 2 + elif split_row[0].strip() == "": + col_num = -1 + else: + col_num = None + return (row_num, col_num) + + +def is_line_separator(view, line_num): + """Check if the current line is a separator. + """ + text = utilities.text_at_line(view, line_num) + if text and SEPARATOR_PATTERN.match(text): + return True + else: + return False diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SmartMarkdown/utilities.py b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SmartMarkdown/utilities.py new file mode 100644 index 0000000..2510143 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SmartMarkdown/utilities.py @@ -0,0 +1,23 @@ +"""Some utility functions for working with sublime. +""" + + +def text_at_line(view, line_num): + """Return the content at line. None if out of boundary.""" + if line_num < 0: + return None + + max_line_num, _ = view.rowcol(view.size()) + if line_num > max_line_num: + return None + + point = view.text_point(line_num, 0) + line_region = view.line(point) + return view.substr(line_region) + +def is_region_void(region): + if region == None: + return True + if region.a == -1 and region.b == -1: + return True + return False \ No newline at end of file diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Solarized Color Scheme/README.mkd b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Solarized Color Scheme/README.mkd new file mode 100644 index 0000000..a0d0f05 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Solarized Color Scheme/README.mkd @@ -0,0 +1,80 @@ +Solarized Colorscheme for Sublime Text +============================= + +See the [Solarized homepage](http://ethanschoonover.com/solarized) for screenshots, +details and colorscheme versions for Vim, Mutt, popular terminal emulators and +other applications. + + +Downloads +--------- + +If you have come across this page via github please visit the main [Solarized homepage](http://ethanschoonover.com/solarized). The original [Solarized repository] has many more themes and a number of [test files]. + +[Solarized homepage]: http://ethanschoonover.com/solarized +[Solarized repository]: https://github.com/altercation/solarized +[test files]: https://github.com/altercation/solarized/tree/master/utils/tests + + +Sublime Text Support +--------- + +This theme is fully compatible with [Sublime Text][Sublime]! + +To install it, ensure that you have installed Sublime Package Control following [these instructions][SublimePackage] + +Open the Sublime command palette with `Ctrl + Shift + P`, type / select `Package Control: Install Package`, +then from the package control list, type / select `Solarized Color Scheme (TextMate)` + +Note that packages are auto-updating, so as new modifications are made they will automatically be installed. + +[Sublime]: http://www.sublimetext.com/dev +[SublimePackage]: http://wbond.net/sublime_packages/package_control/installation + + +Contribute +--------- + +The goal is to get as-close-as-possible to the rendering of the same file in Vim. If you would like to help, here's how to get involved. + + +1. Fork this repo and checkout your own copy. +2. Download the [sample documents](https://github.com/altercation/solarized/tree/master/utils/tests). +3. Checkout this guide to [TextMate theme development](http://manual.macromates.com/en/themes). +4. Check the [issues](https://github.com/deplorableword/textmate-solarized/issues) to see what needs working on. + +Contributors +--------- +* [deplorableword](https://github.com/deplorableword) +* [fentie](https://github.com/fentie) +* [bmthykm](https://github.com/bmthykm) +* [Zegnat](https://github.com/zegnat) +* [markstory](https://github.com/markstory) +* [rays](https://github.com/rays) +* [joshcarr](https://github.com/joshcarr) +* [thatRD](https://github.com/thatRD) +* [oesmith](https://github.com/oesmith) +* [evanmoran](https://github.com/evanmoran) +* [iristyle](https://github.com/iristyle) +* [braver](https://github.com/braver) + +License +------- + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Solarized Color Scheme/Solarized (dark).tmTheme b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Solarized Color Scheme/Solarized (dark).tmTheme new file mode 100644 index 0000000..b15208e --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Solarized Color Scheme/Solarized (dark).tmTheme @@ -0,0 +1,2142 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>name</key> + <string>Solarized (dark)</string> + <key>settings</key> + <array> + <dict> + <key>settings</key> + <dict> + <key>background</key> + <string>#002B36</string> + <key>caret</key> + <string>#839496</string> + <key>foreground</key> + <string>#839496</string> + <key>invisibles</key> + <string>#073642</string> + <key>lineHighlight</key> + <string>#073642</string> + <key>selection</key> + <string>#EEE8D5</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Comment</string> + <key>scope</key> + <string>comment</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#586E75</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>String</string> + <key>scope</key> + <string>string</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#2AA198</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>StringNumber</string> + <key>scope</key> + <string>string</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#586E75</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Regexp</string> + <key>scope</key> + <string>string.regexp</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#DC322F</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Number</string> + <key>scope</key> + <string>constant.numeric</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#D33682</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Variable</string> + <key>scope</key> + <string>variable.language, variable.other</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#268BD2</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Keyword</string> + <key>scope</key> + <string>keyword</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#859900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Storage</string> + <key>scope</key> + <string>storage</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#859900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Class name</string> + <key>scope</key> + <string>entity.name.class, entity.name.type.class</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#268BD2</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Function name</string> + <key>scope</key> + <string>entity.name.function</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#268BD2</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Variable start</string> + <key>scope</key> + <string>punctuation.definition.variable</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#859900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Embedded code markers</string> + <key>scope</key> + <string>punctuation.section.embedded.begin, punctuation.section.embedded.end</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#DC322F</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Built-in constant</string> + <key>scope</key> + <string>constant.language, meta.preprocessor</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#B58900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Support.construct</string> + <key>scope</key> + <string>support.function.construct, keyword.other.new</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#DC322F</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>User-defined constant</string> + <key>scope</key> + <string>constant.character, constant.other</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#CB4B16</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Inherited class</string> + <key>scope</key> + <string>entity.other.inherited-class</string> + <key>settings</key> + <dict/> + </dict> + <dict> + <key>name</key> + <string>Function argument</string> + <key>scope</key> + <string>variable.parameter</string> + <key>settings</key> + <dict/> + </dict> + <dict> + <key>name</key> + <string>Tag name</string> + <key>scope</key> + <string>entity.name.tag</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string>bold</string> + <key>foreground</key> + <string>#268BD2</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Tag start/end</string> + <key>scope</key> + <string>punctuation.definition.tag.html, punctuation.definition.tag.begin, punctuation.definition.tag.end</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#586E75</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Tag attribute</string> + <key>scope</key> + <string>entity.other.attribute-name</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#93A1A1</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Library function</string> + <key>scope</key> + <string>support.function</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#268BD2</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Continuation</string> + <key>scope</key> + <string>punctuation.separator.continuation</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#DC322F</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Library constant</string> + <key>scope</key> + <string>support.constant</string> + <key>settings</key> + <dict/> + </dict> + <dict> + <key>name</key> + <string>Library class/type</string> + <key>scope</key> + <string>support.type, support.class</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#859900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Library Exception</string> + <key>scope</key> + <string>support.type.exception</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#CB4B16</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Special</string> + <key>scope</key> + <string>keyword.other.special-method</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#CB4B16</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Library variable</string> + <key>scope</key> + <string>support.other.variable</string> + <key>settings</key> + <dict/> + </dict> + <dict> + <key>name</key> + <string>Invalid</string> + <key>scope</key> + <string>invalid</string> + <key>settings</key> + <dict/> + </dict> + <dict> + <key>name</key> + <string>Quoted String</string> + <key>scope</key> + <string>string.quoted.double, string.quoted.single</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#2AA198</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Quotes</string> + <key>scope</key> + <string>punctuation.definition.string.begin, punctuation.definition.string.end</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#DC322F</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>CSS: Property</string> + <key>scope</key> + <string>entity.name.tag.css, support.type.property-name.css, meta.property-name.css</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#839496</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>CSS: @font-face</string> + <key>scope</key> + <string>source.css</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#268BD2</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>CSS: Selector</string> + <key>scope</key> + <string>meta.selector.css</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#839496</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>CSS: {}</string> + <key>scope</key> + <string>punctuation.section.property-list.css</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#268BD2</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>CSS: Numeric Value</string> + <key>scope</key> + <string>meta.property-value.css constant.numeric.css, keyword.other.unit.css,constant.other.color.rgb-value.css</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#268BD2</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>CSS: Value</string> + <key>scope</key> + <string>meta.property-value.css</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#2AA198</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>CSS: !Important</string> + <key>scope</key> + <string>keyword.other.important.css</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#DC322F</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>CSS: Standard Value</string> + <key>scope</key> + <string>support.constant.color</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#6C71C4</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>CSS: Tag</string> + <key>scope</key> + <string>entity.name.tag.css</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#859900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>CSS: : ,</string> + <key>scope</key> + <string>punctuation.separator.key-value.css, punctuation.terminator.rule.css</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#839496</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>CSS .class</string> + <key>scope</key> + <string>entity.other.attribute-name.class.css</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#B58900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>CSS :pseudo</string> + <key>scope</key> + <string>entity.other.attribute-name.pseudo-element.css, entity.other.attribute-name.pseudo-class.css</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#CB4B16</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>CSS: #id</string> + <key>scope</key> + <string>entity.other.attribute-name.id.css</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string>bold</string> + <key>foreground</key> + <string>#B58900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>JS: Function Name</string> + <key>scope</key> + <string>meta.function.js, entity.name.function.js, support.function.dom.js</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#B58900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>JS: Source</string> + <key>scope</key> + <string>text.html.basic source.js.embedded.html</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#B58900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>JS: Function</string> + <key>scope</key> + <string>storage.type.function.js</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#268BD2</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>JS: Numeric Constant</string> + <key>scope</key> + <string>constant.numeric.js</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#2AA198</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>JS: []</string> + <key>scope</key> + <string>meta.brace.square.js</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#268BD2</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>JS: Storage Type</string> + <key>scope</key> + <string>storage.type.js</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#268BD2</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>()</string> + <key>scope</key> + <string>meta.brace.round, punctuation.definition.parameters.begin.js, punctuation.definition.parameters.end.js</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#93A1A1</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>{}</string> + <key>scope</key> + <string>meta.brace.curly.js</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#268BD2</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>HTML: Doctype</string> + <key>scope</key> + <string>entity.name.tag.doctype.html, meta.tag.sgml.html, string.quoted.double.doctype.identifiers-and-DTDs.html</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string>italic</string> + <key>foreground</key> + <string>#839496</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>HTML: Comment Block</string> + <key>scope</key> + <string>comment.block.html</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string>italic</string> + <key>foreground</key> + <string>#839496</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>HTML: Script</string> + <key>scope</key> + <string>entity.name.tag.script.html</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string>italic</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>HTML: Style</string> + <key>scope</key> + <string>source.css.embedded.html string.quoted.double.html</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#2AA198</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>HTML: Text</string> + <key>scope</key> + <string>text.html.ruby</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string>bold</string> + <key>foreground</key> + <string>#839496</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>HTML: =</string> + <key>scope</key> + <string>text.html.basic meta.tag.other.html, text.html.basic meta.tag.any.html, text.html.basic meta.tag.block.any, text.html.basic meta.tag.inline.any, text.html.basic meta.tag.structure.any.html, text.html.basic source.js.embedded.html, punctuation.separator.key-value.html</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#657B83</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>HTML: something=</string> + <key>scope</key> + <string>text.html.basic entity.other.attribute-name.html</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#657B83</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>HTML: "</string> + <key>scope</key> + <string>text.html.basic meta.tag.structure.any.html punctuation.definition.string.begin.html, punctuation.definition.string.begin.html, punctuation.definition.string.end.html</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#2AA198</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>HTML: <tag></string> + <key>scope</key> + <string>entity.name.tag.block.any.html</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string>bold</string> + <key>foreground</key> + <string>#268BD2</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>HTML: style</string> + <key>scope</key> + <string>source.css.embedded.html entity.name.tag.style.html</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string>italic</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>HTML: <style></string> + <key>scope</key> + <string>entity.name.tag.style.html</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + </dict> + </dict> + <dict> + <key>name</key> + <string>HTML: {}</string> + <key>scope</key> + <string>text.html.basic punctuation.section.property-list.css</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + </dict> + </dict> + <dict> + <key>name</key> + <string>HTML: Embeddable</string> + <key>scope</key> + <string>source.css.embedded.html, comment.block.html</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string>italic</string> + <key>foreground</key> + <string>#839496</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Ruby: Variable definition</string> + <key>scope</key> + <string>punctuation.definition.variable.ruby</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#268BD2</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Ruby: Function Name</string> + <key>scope</key> + <string>meta.function.method.with-arguments.ruby</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#657B83</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Ruby: Variable</string> + <key>scope</key> + <string>variable.language.ruby</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#2AA198</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Ruby: Function</string> + <key>scope</key> + <string>entity.name.function.ruby</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#268BD2</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Ruby: Keyword Control</string> + <key>scope</key> + <string>keyword.control.ruby, keyword.control.def.ruby</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string>bold</string> + <key>foreground</key> + <string>#859900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Ruby: Class</string> + <key>scope</key> + <string>keyword.control.class.ruby, meta.class.ruby</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#859900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Ruby: Class Name</string> + <key>scope</key> + <string>entity.name.type.class.ruby</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#B58900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Ruby: Keyword</string> + <key>scope</key> + <string>keyword.control.ruby</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#859900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Ruby: Support Class</string> + <key>scope</key> + <string>support.class.ruby</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#B58900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Ruby: Special Method</string> + <key>scope</key> + <string>keyword.other.special-method.ruby</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#859900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Ruby: Constant</string> + <key>scope</key> + <string>constant.language.ruby, constant.numeric.ruby</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#2AA198</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Ruby: Constant Other</string> + <key>scope</key> + <string>variable.other.constant.ruby</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#B58900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Ruby: :symbol</string> + <key>scope</key> + <string>constant.other.symbol.ruby</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#2AA198</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Ruby: Punctuation Section ''</string> + <key>scope</key> + <string>punctuation.section.embedded.ruby, punctuation.definition.string.begin.ruby, punctuation.definition.string.end.ruby</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#DC322F</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Ruby: Special Method</string> + <key>scope</key> + <string>keyword.other.special-method.ruby</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#CB4B16</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>PHP: Include</string> + <key>scope</key> + <string>keyword.control.import.include.php</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#CB4B16</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Ruby: erb =</string> + <key>scope</key> + <string>text.html.ruby meta.tag.inline.any.html</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#839496</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Ruby: erb ""</string> + <key>scope</key> + <string>text.html.ruby punctuation.definition.string.begin, text.html.ruby punctuation.definition.string.end</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#2AA198</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>PHP: Quoted Single</string> + <key>scope</key> + <string>punctuation.definition.string.begin, punctuation.definition.string.end</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#839496</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>PHP: Class Names</string> + <key>scope</key> + <string>support.class.php</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#93A1A1</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>PHP: []</string> + <key>scope</key> + <string>keyword.operator.index-start.php, keyword.operator.index-end.php</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#DC322F</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>PHP: Array</string> + <key>scope</key> + <string>meta.array.php</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#586E75</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>PHP: Array()</string> + <key>scope</key> + <string>meta.array.php support.function.construct.php, meta.array.empty.php support.function.construct.php</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#B58900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>PHP: Array Construct</string> + <key>scope</key> + <string>support.function.construct.php</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#B58900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>PHP: Array Begin</string> + <key>scope</key> + <string>punctuation.definition.array.begin, punctuation.definition.array.end</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#DC322F</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>PHP: Numeric Constant</string> + <key>scope</key> + <string>constant.numeric.php</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#2AA198</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>PHP: New</string> + <key>scope</key> + <string>keyword.other.new.php</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#CB4B16</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>PHP: ::</string> + <key>scope</key> + <string>keyword.operator.class</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#93A1A1</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>PHP: Other Property</string> + <key>scope</key> + <string>variable.other.property.php</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#839496</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>PHP: Class</string> + <key>scope</key> + <string>storage.modifier.extends.php, storage.type.class.php, keyword.operator.class.php</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#B58900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>PHP: Semicolon</string> + <key>scope</key> + <string>punctuation.terminator.expression.php</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#839496</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>PHP: Inherited Class</string> + <key>scope</key> + <string>meta.other.inherited-class.php</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#586E75</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>PHP: Storage Type</string> + <key>scope</key> + <string>storage.type.php</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#859900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>PHP: Function</string> + <key>scope</key> + <string>entity.name.function.php</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#839496</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>PHP: Function Construct</string> + <key>scope</key> + <string>support.function.construct.php</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#859900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>PHP: Function Call</string> + <key>scope</key> + <string>entity.name.type.class.php, meta.function-call.php, meta.function-call.static.php, meta.function-call.object.php</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#839496</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>PHP: Comment</string> + <key>scope</key> + <string>keyword.other.phpdoc</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#839496</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>PHP: Source Emebedded</string> + <key>scope</key> + <string>source.php.embedded.block.html</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#CB4B16</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>PHP: Storage Type Function</string> + <key>scope</key> + <string>storage.type.function.php</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#CB4B16</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>C: constant</string> + <key>scope</key> + <string>constant.numeric.c</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#2AA198</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>C: Meta Preprocessor</string> + <key>scope</key> + <string>meta.preprocessor.c.include, meta.preprocessor.macro.c</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#CB4B16</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>C: Keyword</string> + <key>scope</key> + <string>keyword.control.import.define.c, keyword.control.import.include.c</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#CB4B16</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>C: Function Preprocessor</string> + <key>scope</key> + <string>entity.name.function.preprocessor.c</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#CB4B16</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>C: include <something.c></string> + <key>scope</key> + <string>meta.preprocessor.c.include string.quoted.other.lt-gt.include.c, meta.preprocessor.c.include punctuation.definition.string.begin.c, meta.preprocessor.c.include punctuation.definition.string.end.c</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#2AA198</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>C: Function</string> + <key>scope</key> + <string>support.function.C99.c, support.function.any-method.c, entity.name.function.c</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#586E75</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>C: "</string> + <key>scope</key> + <string>punctuation.definition.string.begin.c, punctuation.definition.string.end.c</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#2AA198</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>C: Storage Type</string> + <key>scope</key> + <string>storage.type.c</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#B58900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>diff: header</string> + <key>scope</key> + <string>meta.diff, meta.diff.header</string> + <key>settings</key> + <dict> + <key>background</key> + <string>#B58900</string> + <key>fontStyle</key> + <string>italic</string> + <key>foreground</key> + <string>#EEE8D5</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>diff: deleted</string> + <key>scope</key> + <string>markup.deleted</string> + <key>settings</key> + <dict> + <key>background</key> + <string>#EEE8D5</string> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#DC322F</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>diff: changed</string> + <key>scope</key> + <string>markup.changed</string> + <key>settings</key> + <dict> + <key>background</key> + <string>#EEE8D5</string> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#CB4B16</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>diff: inserted</string> + <key>scope</key> + <string>markup.inserted</string> + <key>settings</key> + <dict> + <key>background</key> + <string>#EEE8D5</string> + <key>foreground</key> + <string>#2AA198</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Markdown: Linebreak</string> + <key>scope</key> + <string>text.html.markdown meta.dummy.line-break</string> + <key>settings</key> + <dict> + <key>background</key> + <string>#B58900</string> + <key>foreground</key> + <string>#EEE8D5</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Markdown: Raw</string> + <key>scope</key> + <string>text.html.markdown markup.raw.inline</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#2AA198</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>reST raw</string> + <key>scope</key> + <string>text.restructuredtext markup.raw</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#2AA198</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Other: Removal</string> + <key>scope</key> + <string>other.package.exclude, other.remove</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#DC322F</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Other: Add</string> + <key>scope</key> + <string>other.add</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#2AA198</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Tex: {}</string> + <key>scope</key> + <string>punctuation.section.group.tex , punctuation.definition.arguments.begin.latex, punctuation.definition.arguments.end.latex, punctuation.definition.arguments.latex</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#DC322F</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Tex: {text}</string> + <key>scope</key> + <string>meta.group.braces.tex</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#B58900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Tex: Other Math</string> + <key>scope</key> + <string>string.other.math.tex</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#B58900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Tex: {var}</string> + <key>scope</key> + <string>variable.parameter.function.latex</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#CB4B16</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Tex: Math \\</string> + <key>scope</key> + <string>punctuation.definition.constant.math.tex</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#DC322F</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Tex: Constant Math</string> + <key>scope</key> + <string>text.tex.latex constant.other.math.tex, constant.other.general.math.tex, constant.other.general.math.tex, constant.character.math.tex</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#2AA198</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Tex: Other Math String</string> + <key>scope</key> + <string>string.other.math.tex</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#B58900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Tex: $</string> + <key>scope</key> + <string>punctuation.definition.string.begin.tex, punctuation.definition.string.end.tex</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#DC322F</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Tex: \label</string> + <key>scope</key> + <string>keyword.control.label.latex, text.tex.latex constant.other.general.math.tex</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#2AA198</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Tex: \label { }</string> + <key>scope</key> + <string>variable.parameter.definition.label.latex</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#DC322F</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Tex: Function</string> + <key>scope</key> + <string>support.function.be.latex</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#859900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Tex: Support Function Section</string> + <key>scope</key> + <string>support.function.section.latex</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#CB4B16</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Tex: Support Function</string> + <key>scope</key> + <string>support.function.general.tex</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#2AA198</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Tex: Comment</string> + <key>scope</key> + <string>punctuation.definition.comment.tex, comment.line.percentage.tex</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string>italic</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Tex: Reference Label</string> + <key>scope</key> + <string>keyword.control.ref.latex</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#2AA198</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Python: storage</string> + <key>scope</key> + <string>storage.type.class.python, storage.type.function.python, storage.modifier.global.python</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#859900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Python: import</string> + <key>scope</key> + <string>keyword.control.import.python, keyword.control.import.from.python</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#CB4B16</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Python: Support.exception</string> + <key>scope</key> + <string>support.type.exception.python</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#B58900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Shell: builtin</string> + <key>scope</key> + <string>support.function.builtin.shell</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#859900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Shell: variable</string> + <key>scope</key> + <string>variable.other.normal.shell</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#CB4B16</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Shell: DOT_FILES</string> + <key>scope</key> + <string>source.shell</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#268BD2</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Shell: meta scope in loop</string> + <key>scope</key> + <string>meta.scope.for-in-loop.shell, variable.other.loop.shell</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#586E75</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Shell: ""</string> + <key>scope</key> + <string>punctuation.definition.string.end.shell, punctuation.definition.string.begin.shell</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#859900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Shell: Meta Block</string> + <key>scope</key> + <string>meta.scope.case-block.shell, meta.scope.case-body.shell</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#586E75</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Shell: []</string> + <key>scope</key> + <string>punctuation.definition.logical-expression.shell</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#DC322F</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Shell: Comment</string> + <key>scope</key> + <string>comment.line.number-sign.shell</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string>italic</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Java: import</string> + <key>scope</key> + <string>keyword.other.import.java</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#CB4B16</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Java: meta-import</string> + <key>scope</key> + <string>storage.modifier.import.java</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#586E75</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Java: Class</string> + <key>scope</key> + <string>meta.class.java storage.modifier.java</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#B58900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Java: /* comment */</string> + <key>scope</key> + <string>source.java comment.block</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#586E75</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Java: /* @param */</string> + <key>scope</key> + <string>comment.block meta.documentation.tag.param.javadoc keyword.other.documentation.param.javadoc</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#586E75</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Perl: variables</string> + <key>scope</key> + <string>punctuation.definition.variable.perl, variable.other.readwrite.global.perl, variable.other.predefined.perl, keyword.operator.comparison.perl</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#B58900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Perl: functions</string> + <key>scope</key> + <string>support.function.perl</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#859900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Perl: comments</string> + <key>scope</key> + <string>comment.line.number-sign.perl</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string>italic</string> + <key>foreground</key> + <string>#586E75</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Perl: quotes</string> + <key>scope</key> + <string>punctuation.definition.string.begin.perl, punctuation.definition.string.end.perl</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#2AA198</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Perl: \char</string> + <key>scope</key> + <string>constant.character.escape.perl</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#DC322F</string> + </dict> + </dict> + + <dict> + <key>name</key> + <string>Markdown: Headings</string> + <key>scope</key> + <string>markup.heading.markdown, markup.heading.1.markdown, markup.heading.2.markdown, markup.heading.3.markdown, markup.heading.4.markdown, markup.heading.5.markdown, markup.heading.6.markdown</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#268BD2</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Markdown: Bold</string> + <key>scope</key> + <string>markup.bold.markdown</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string>bold</string> + <key>foreground</key> + <string>#839496</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Markdown: Italic</string> + <key>scope</key> + <string>markup.italic.markdown</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string>italic</string> + <key>foreground</key> + <string>#839496</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Markdown: Punctuation for Bold, Italic, and Inline Block</string> + <key>scope</key> + <string>punctuation.definition.bold.markdown, punctuation.definition.italic.markdown, punctuation.definition.raw.markdown</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#DC322F</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Markdown: Bulleted List</string> + <key>scope</key> + <string>markup.list.unnumbered.markdown</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#B58900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Markdown: Numbered List</string> + <key>scope</key> + <string>markup.list.numbered.markdown</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#859900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Markdown: Block and Inline Block</string> + <key>scope</key> + <string>markup.raw.block.markdown, markup.raw.inline.markdown</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#2AA198</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Markdown: Quote Block and Punctuation</string> + <key>scope</key> + <string>markup.quote.markdown, punctuation.definition.blockquote.markdown</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#6C71C4</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Markdown: Seperator</string> + <key>scope</key> + <string>meta.separator.markdown</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#D33682</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Markdown: Link and Reference URL</string> + <key>scope</key> + <string>meta.image.inline.markdown, markup.underline.link.markdown</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string>italic</string> + <key>foreground</key> + <string>#586E75</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Markdown: Link Title, Image Description</string> + <key>scope</key> + <string>string.other.link.title.markdown, string.other.link.description.markdown</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#93A1A1</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Markdown: Angle Brakets on Link and Image</string> + <key>scope</key> + <string>punctuation.definition.link.markdown</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#586E75</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Markdown: Parens on Link and Image </string> + <key>scope</key> + <string>punctuation.definition.metadata.markdown</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#586E75</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Markdown: Square Brakets on Link, Image, and Reference</string> + <key>scope</key> + <string>punctuation.definition.string.begin.markdown, punctuation.definition.string.end.markdown, punctuation.definition.constant.markdown</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#586E75</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>SublimeLinter Annotations</string> + <key>scope</key> + <string>sublimelinter.notes</string> + <key>settings</key> + <dict> + <key>background</key> + <string>#eee8d5</string> + <key>foreground</key> + <string>#eee8d5</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>SublimeLinter Error Outline</string> + <key>scope</key> + <string>sublimelinter.outline.illegal</string> + <key>settings</key> + <dict> + <key>background</key> + <string>#93a1a1</string> + <key>foreground</key> + <string>#93a1a1</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>SublimeLinter Error Underline</string> + <key>scope</key> + <string>sublimelinter.underline.illegal</string> + <key>settings</key> + <dict> + <key>background</key> + <string>#dc322f</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>SublimeLinter Warning Outline</string> + <key>scope</key> + <string>sublimelinter.outline.warning</string> + <key>settings</key> + <dict> + <key>background</key> + <string>#839496</string> + <key>foreground</key> + <string>#839496</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>SublimeLinter Warning Underline</string> + <key>scope</key> + <string>sublimelinter.underline.warning</string> + <key>settings</key> + <dict> + <key>background</key> + <string>#b58900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>SublimeLinter Violation Outline</string> + <key>scope</key> + <string>sublimelinter.outline.violation</string> + <key>settings</key> + <dict> + <key>background</key> + <string>#657b83</string> + <key>foreground</key> + <string>#657b83</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>SublimeLinter Violation Underline</string> + <key>scope</key> + <string>sublimelinter.underline.violation</string> + <key>settings</key> + <dict> + <key>background</key> + <string>#cb4b16</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>SublimeBracketHighlighter</string> + <key>scope</key> + <string>brackethighlighter.all</string> + <key>settings</key> + <dict> + <key>background</key> + <string>#002b36</string> + <key>foreground</key> + <string>#cb4b16</string> + </dict> + </dict> + </array> + <key>uuid</key> + <string>A4299D9B-1DE5-4BC4-87F6-A757E71B1597</string> +</dict> +</plist> diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Solarized Color Scheme/Solarized (light).tmTheme b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Solarized Color Scheme/Solarized (light).tmTheme new file mode 100644 index 0000000..b51af59 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Solarized Color Scheme/Solarized (light).tmTheme @@ -0,0 +1,2146 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>name</key> + <string>Solarized (light)</string> + <key>settings</key> + <array> + <dict> + <key>settings</key> + <dict> + <key>background</key> + <string>#FDF6E3</string> + <key>caret</key> + <string>#002B36</string> + <key>foreground</key> + <string>#586E75</string> + <key>invisibles</key> + <string>#EEE8D5</string> + <key>lineHighlight</key> + <string>#EEE8D5</string> + <key>selection</key> + <string>#073642</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Comment</string> + <key>scope</key> + <string>comment</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#93A1A1</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>String</string> + <key>scope</key> + <string>string</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#2AA198</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>StringNumber</string> + <key>scope</key> + <string>string</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#586E75</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Regexp</string> + <key>scope</key> + <string>string.regexp</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#DC322F</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Number</string> + <key>scope</key> + <string>constant.numeric</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#D33682</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Variable</string> + <key>scope</key> + <string>variable.language, variable.other</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#268BD2</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Keyword</string> + <key>scope</key> + <string>keyword</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#859900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Storage</string> + <key>scope</key> + <string>storage</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#859900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Class name</string> + <key>scope</key> + <string>entity.name.class, entity.name.type.class</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#268BD2</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Function name</string> + <key>scope</key> + <string>entity.name.function</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#268BD2</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Variable start</string> + <key>scope</key> + <string>punctuation.definition.variable</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#859900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Embedded code markers</string> + <key>scope</key> + <string>punctuation.section.embedded.begin, punctuation.section.embedded.end</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#DC322F</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Built-in constant</string> + <key>scope</key> + <string>constant.language, meta.preprocessor</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#B58900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Support.construct</string> + <key>scope</key> + <string>support.function.construct, keyword.other.new</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#DC322F</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>User-defined constant</string> + <key>scope</key> + <string>constant.character, constant.other</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#CB4B16</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Inherited class</string> + <key>scope</key> + <string>entity.other.inherited-class</string> + <key>settings</key> + <dict/> + </dict> + <dict> + <key>name</key> + <string>Function argument</string> + <key>scope</key> + <string>variable.parameter</string> + <key>settings</key> + <dict/> + </dict> + <dict> + <key>name</key> + <string>Tag name</string> + <key>scope</key> + <string>entity.name.tag</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string>bold</string> + <key>foreground</key> + <string>#268BD2</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Tag start/end</string> + <key>scope</key> + <string>punctuation.definition.tag.html, punctuation.definition.tag.begin, punctuation.definition.tag.end</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#93A1A1</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Tag attribute</string> + <key>scope</key> + <string>entity.other.attribute-name</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#93A1A1</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Library function</string> + <key>scope</key> + <string>support.function</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#268BD2</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Continuation</string> + <key>scope</key> + <string>punctuation.separator.continuation</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#DC322F</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Library constant</string> + <key>scope</key> + <string>support.constant</string> + <key>settings</key> + <dict/> + </dict> + <dict> + <key>name</key> + <string>Library class/type</string> + <key>scope</key> + <string>support.type, support.class</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#859900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Library Exception</string> + <key>scope</key> + <string>support.type.exception</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#CB4B16</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Special</string> + <key>scope</key> + <string>keyword.other.special-method</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#CB4B16</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Library variable</string> + <key>scope</key> + <string>support.other.variable</string> + <key>settings</key> + <dict/> + </dict> + <dict> + <key>name</key> + <string>Invalid</string> + <key>scope</key> + <string>invalid</string> + <key>settings</key> + <dict/> + </dict> + <dict> + <key>name</key> + <string>Quoted String</string> + <key>scope</key> + <string>string.quoted.double, string.quoted.single</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#2AA198</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Quotes</string> + <key>scope</key> + <string>punctuation.definition.string.begin, punctuation.definition.string.end</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#DC322F</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>CSS: Property</string> + <key>scope</key> + <string>entity.name.tag.css, support.type.property-name.css, meta.property-name.css</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#657B83</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>CSS: @font-face</string> + <key>scope</key> + <string>source.css</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#268BD2</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>CSS: Selector</string> + <key>scope</key> + <string>meta.selector.css</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#657B83</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>CSS: {}</string> + <key>scope</key> + <string>punctuation.section.property-list.css</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#268BD2</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>CSS: Numeric Value</string> + <key>scope</key> + <string>meta.property-value.css constant.numeric.css, keyword.other.unit.css,constant.other.color.rgb-value.css</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#268BD2</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>CSS: Value</string> + <key>scope</key> + <string>meta.property-value.css</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#2AA198</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>CSS: !Important</string> + <key>scope</key> + <string>keyword.other.important.css</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#DC322F</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>CSS: Standard Value</string> + <key>scope</key> + <string>support.constant.color</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#6C71C4</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>CSS: Tag</string> + <key>scope</key> + <string>entity.name.tag.css</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#859900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>CSS: : ,</string> + <key>scope</key> + <string>punctuation.separator.key-value.css, punctuation.terminator.rule.css</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#657B83</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>CSS .class</string> + <key>scope</key> + <string>entity.other.attribute-name.class.css</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#B58900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>CSS :pseudo</string> + <key>scope</key> + <string>entity.other.attribute-name.pseudo-element.css, entity.other.attribute-name.pseudo-class.css</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#CB4B16</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>CSS: #id</string> + <key>scope</key> + <string>entity.other.attribute-name.id.css</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string>bold</string> + <key>foreground</key> + <string>#B58900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>JS: Function Name</string> + <key>scope</key> + <string>meta.function.js, entity.name.function.js, support.function.dom.js</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#B58900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>JS: Source</string> + <key>scope</key> + <string>text.html.basic source.js.embedded.html</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#B58900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>JS: Function</string> + <key>scope</key> + <string>storage.type.function.js</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#268BD2</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>JS: Numeric Constant</string> + <key>scope</key> + <string>constant.numeric.js</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#2AA198</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>JS: []</string> + <key>scope</key> + <string>meta.brace.square.js</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#268BD2</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>JS: Storage Type</string> + <key>scope</key> + <string>storage.type.js</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#268BD2</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>()</string> + <key>scope</key> + <string>meta.brace.round, punctuation.definition.parameters.begin.js, punctuation.definition.parameters.end.js</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#93A1A1</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>{}</string> + <key>scope</key> + <string>meta.brace.curly.js</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#268BD2</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>HTML: Doctype</string> + <key>scope</key> + <string>entity.name.tag.doctype.html, meta.tag.sgml.html, string.quoted.double.doctype.identifiers-and-DTDs.html</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string>italic</string> + <key>foreground</key> + <string>#839496</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>HTML: Comment Block</string> + <key>scope</key> + <string>comment.block.html</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string>italic</string> + <key>foreground</key> + <string>#839496</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>HTML: Script</string> + <key>scope</key> + <string>entity.name.tag.script.html</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string>italic</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>HTML: Style</string> + <key>scope</key> + <string>source.css.embedded.html string.quoted.double.html</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#2AA198</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>HTML: Text</string> + <key>scope</key> + <string>text.html.ruby</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string>bold</string> + <key>foreground</key> + <string>#657b83</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>HTML: =</string> + <key>scope</key> + <string>text.html.basic meta.tag.other.html, text.html.basic meta.tag.any.html, text.html.basic meta.tag.block.any, text.html.basic meta.tag.inline.any, text.html.basic meta.tag.structure.any.html, text.html.basic source.js.embedded.html, punctuation.separator.key-value.html</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#657B83</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>HTML: something=</string> + <key>scope</key> + <string>text.html.basic entity.other.attribute-name.html</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#657B83</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>HTML: "</string> + <key>scope</key> + <string>text.html.basic meta.tag.structure.any.html punctuation.definition.string.begin.html, punctuation.definition.string.begin.html, punctuation.definition.string.end.html</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#2AA198</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>HTML: <tag></string> + <key>scope</key> + <string>entity.name.tag.block.any.html</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string>bold</string> + <key>foreground</key> + <string>#268BD2</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>HTML: style</string> + <key>scope</key> + <string>source.css.embedded.html entity.name.tag.style.html</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string>italic</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>HTML: <style></string> + <key>scope</key> + <string>entity.name.tag.style.html</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + </dict> + </dict> + <dict> + <key>name</key> + <string>HTML: {}</string> + <key>scope</key> + <string>text.html.basic punctuation.section.property-list.css</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + </dict> + </dict> + <dict> + <key>name</key> + <string>HTML: Embeddable</string> + <key>scope</key> + <string>source.css.embedded.html, comment.block.html</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string>italic</string> + <key>foreground</key> + <string>#839496</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Ruby: Variable definition</string> + <key>scope</key> + <string>punctuation.definition.variable.ruby</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#268BD2</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Ruby: Function Name</string> + <key>scope</key> + <string>meta.function.method.with-arguments.ruby</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#657B83</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Ruby: Variable</string> + <key>scope</key> + <string>variable.language.ruby</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#2AA198</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Ruby: Function</string> + <key>scope</key> + <string>entity.name.function.ruby</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#268BD2</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Ruby: Keyword Control</string> + <key>scope</key> + <string>keyword.control.ruby, keyword.control.def.ruby</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string>bold</string> + <key>foreground</key> + <string>#859900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Ruby: Class</string> + <key>scope</key> + <string>keyword.control.class.ruby, meta.class.ruby</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#859900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Ruby: Class Name</string> + <key>scope</key> + <string>entity.name.type.class.ruby</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#B58900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Ruby: Keyword</string> + <key>scope</key> + <string>keyword.control.ruby</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#859900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Ruby: Support Class</string> + <key>scope</key> + <string>support.class.ruby</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#B58900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Ruby: Special Method</string> + <key>scope</key> + <string>keyword.other.special-method.ruby</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#859900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Ruby: Constant</string> + <key>scope</key> + <string>constant.language.ruby, constant.numeric.ruby</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#2AA198</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Ruby: Constant Other</string> + <key>scope</key> + <string>variable.other.constant.ruby</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#B58900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Ruby: :symbol</string> + <key>scope</key> + <string>constant.other.symbol.ruby</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#2AA198</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Ruby: Punctuation Section ''</string> + <key>scope</key> + <string>punctuation.section.embedded.ruby, punctuation.definition.string.begin.ruby, punctuation.definition.string.end.ruby</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#DC322F</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Ruby: Special Method</string> + <key>scope</key> + <string>keyword.other.special-method.ruby</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#CB4B16</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>PHP: Include</string> + <key>scope</key> + <string>keyword.control.import.include.php</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#CB4B16</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Ruby: erb =</string> + <key>scope</key> + <string>text.html.ruby meta.tag.inline.any.html</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#839496</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Ruby: erb ""</string> + <key>scope</key> + <string>text.html.ruby punctuation.definition.string.begin, text.html.ruby punctuation.definition.string.end</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#2AA198</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>PHP: Quoted Single</string> + <key>scope</key> + <string>punctuation.definition.string.begin, punctuation.definition.string.end</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#839496</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>PHP: Class Names</string> + <key>scope</key> + <string>support.class.php</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#586E75</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>PHP: []</string> + <key>scope</key> + <string>keyword.operator.index-start.php, keyword.operator.index-end.php</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#DC322F</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>PHP: Array</string> + <key>scope</key> + <string>meta.array.php</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#586E75</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>PHP: Array()</string> + <key>scope</key> + <string>meta.array.php support.function.construct.php, meta.array.empty.php support.function.construct.php</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#B58900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>PHP: Array Construct</string> + <key>scope</key> + <string>support.function.construct.php</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#B58900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>PHP: Array Begin</string> + <key>scope</key> + <string>punctuation.definition.array.begin, punctuation.definition.array.end</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#DC322F</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>PHP: Numeric Constant</string> + <key>scope</key> + <string>constant.numeric.php</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#2AA198</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>PHP: New</string> + <key>scope</key> + <string>keyword.other.new.php</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#CB4B16</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>PHP: ::</string> + <key>scope</key> + <string>keyword.operator.class</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#586E75</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>PHP: Other Property</string> + <key>scope</key> + <string>variable.other.property.php</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#839496</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>PHP: Class</string> + <key>scope</key> + <string>storage.modifier.extends.php, storage.type.class.php, keyword.operator.class.php</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#B58900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>PHP: Semicolon</string> + <key>scope</key> + <string>punctuation.terminator.expression.php</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#657B83</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>PHP: Inherited Class</string> + <key>scope</key> + <string>meta.other.inherited-class.php</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#586E75</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>PHP: Storage Type</string> + <key>scope</key> + <string>storage.type.php</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#859900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>PHP: Function</string> + <key>scope</key> + <string>entity.name.function.php</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#839496</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>PHP: Function Construct</string> + <key>scope</key> + <string>support.function.construct.php</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#859900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>PHP: Function Call</string> + <key>scope</key> + <string>entity.name.type.class.php, meta.function-call.php, meta.function-call.static.php, meta.function-call.object.php</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#839496</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>PHP: Comment</string> + <key>scope</key> + <string>keyword.other.phpdoc</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#839496</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>PHP: Source Emebedded</string> + <key>scope</key> + <string>source.php.embedded.block.html</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#CB4B16</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>PHP: Storage Type Function</string> + <key>scope</key> + <string>storage.type.function.php</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#CB4B16</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>C: constant</string> + <key>scope</key> + <string>constant.numeric.c</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#2AA198</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>C: Meta Preprocessor</string> + <key>scope</key> + <string>meta.preprocessor.c.include, meta.preprocessor.macro.c</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#CB4B16</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>C: Keyword</string> + <key>scope</key> + <string>keyword.control.import.define.c, keyword.control.import.include.c</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#CB4B16</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>C: Function Preprocessor</string> + <key>scope</key> + <string>entity.name.function.preprocessor.c</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#CB4B16</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>C: include <something.c></string> + <key>scope</key> + <string>meta.preprocessor.c.include string.quoted.other.lt-gt.include.c, meta.preprocessor.c.include punctuation.definition.string.begin.c, meta.preprocessor.c.include punctuation.definition.string.end.c</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#2AA198</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>C: Function</string> + <key>scope</key> + <string>support.function.C99.c, support.function.any-method.c, entity.name.function.c</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#586E75</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>C: "</string> + <key>scope</key> + <string>punctuation.definition.string.begin.c, punctuation.definition.string.end.c</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#2AA198</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>C: Storage Type</string> + <key>scope</key> + <string>storage.type.c</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#B58900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>diff: header</string> + <key>scope</key> + <string>meta.diff, meta.diff.header</string> + <key>settings</key> + <dict> + <key>background</key> + <string>#B58900</string> + <key>fontStyle</key> + <string>italic</string> + <key>foreground</key> + <string>#EEE8D5</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>diff: deleted</string> + <key>scope</key> + <string>markup.deleted</string> + <key>settings</key> + <dict> + <key>background</key> + <string>#EEE8D5</string> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#DC322F</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>diff: changed</string> + <key>scope</key> + <string>markup.changed</string> + <key>settings</key> + <dict> + <key>background</key> + <string>#EEE8D5</string> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#CB4B16</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>diff: inserted</string> + <key>scope</key> + <string>markup.inserted</string> + <key>settings</key> + <dict> + <key>background</key> + <string>#EEE8D5</string> + <key>foreground</key> + <string>#2AA198</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Markdown: Linebreak</string> + <key>scope</key> + <string>text.html.markdown meta.dummy.line-break</string> + <key>settings</key> + <dict> + <key>background</key> + <string>#B58900</string> + <key>foreground</key> + <string>#EEE8D5</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Markdown: Raw</string> + <key>scope</key> + <string>text.html.markdown markup.raw.inline</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#2AA198</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>reST raw</string> + <key>scope</key> + <string>text.restructuredtext markup.raw</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#2AA198</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Other: Removal</string> + <key>scope</key> + <string>other.package.exclude, other.remove</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#DC322F</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Other: Add</string> + <key>scope</key> + <string>other.add</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#2AA198</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Tex: {}</string> + <key>scope</key> + <string>punctuation.section.group.tex , punctuation.definition.arguments.begin.latex, punctuation.definition.arguments.end.latex, punctuation.definition.arguments.latex</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#DC322F</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Tex: {text}</string> + <key>scope</key> + <string>meta.group.braces.tex</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#B58900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Tex: Other Math</string> + <key>scope</key> + <string>string.other.math.tex</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#B58900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Tex: {var}</string> + <key>scope</key> + <string>variable.parameter.function.latex</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#CB4B16</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Tex: Math \\</string> + <key>scope</key> + <string>punctuation.definition.constant.math.tex</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#DC322F</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Tex: Constant Math</string> + <key>scope</key> + <string>text.tex.latex constant.other.math.tex, constant.other.general.math.tex, constant.other.general.math.tex, constant.character.math.tex</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#2AA198</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Tex: Other Math String</string> + <key>scope</key> + <string>string.other.math.tex</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#B58900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Tex: $</string> + <key>scope</key> + <string>punctuation.definition.string.begin.tex, punctuation.definition.string.end.tex</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#DC322F</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Tex: \label</string> + <key>scope</key> + <string>keyword.control.label.latex, text.tex.latex constant.other.general.math.tex</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#2AA198</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Tex: \label { }</string> + <key>scope</key> + <string>variable.parameter.definition.label.latex</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#DC322F</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Tex: Function</string> + <key>scope</key> + <string>support.function.be.latex</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#859900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Tex: Support Function Section</string> + <key>scope</key> + <string>support.function.section.latex</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#CB4B16</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Tex: Support Function</string> + <key>scope</key> + <string>support.function.general.tex</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#2AA198</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Tex: Comment</string> + <key>scope</key> + <string>punctuation.definition.comment.tex, comment.line.percentage.tex</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string>italic</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Tex: Reference Label</string> + <key>scope</key> + <string>keyword.control.ref.latex</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#2AA198</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Python: storage</string> + <key>scope</key> + <string>storage.type.class.python, storage.type.function.python, storage.modifier.global.python</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#859900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Python: import</string> + <key>scope</key> + <string>keyword.control.import.python, keyword.control.import.from.python</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#CB4B16</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Python: Support.exception</string> + <key>scope</key> + <string>support.type.exception.python</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#B58900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Shell: builtin</string> + <key>scope</key> + <string>support.function.builtin.shell</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#859900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Shell: variable</string> + <key>scope</key> + <string>variable.other.normal.shell</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#CB4B16</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Shell: DOT_FILES</string> + <key>scope</key> + <string>source.shell</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#268BD2</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Shell: meta scope in loop</string> + <key>scope</key> + <string>meta.scope.for-in-loop.shell, variable.other.loop.shell</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#586E75</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Shell: ""</string> + <key>scope</key> + <string>punctuation.definition.string.end.shell, punctuation.definition.string.begin.shell</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#859900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Shell: Meta Block</string> + <key>scope</key> + <string>meta.scope.case-block.shell, meta.scope.case-body.shell</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#586E75</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Shell: []</string> + <key>scope</key> + <string>punctuation.definition.logical-expression.shell</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#DC322F</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Shell: Comment</string> + <key>scope</key> + <string>comment.line.number-sign.shell</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string>italic</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Java: import</string> + <key>scope</key> + <string>keyword.other.import.java</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#CB4B16</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Java: meta-import</string> + <key>scope</key> + <string>storage.modifier.import.java</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#586E75</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Java: Class</string> + <key>scope</key> + <string>meta.class.java storage.modifier.java</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#B58900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Java: /* comment */</string> + <key>scope</key> + <string>source.java comment.block</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#586E75</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Java: /* @param */</string> + <key>scope</key> + <string>comment.block meta.documentation.tag.param.javadoc keyword.other.documentation.param.javadoc</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#586E75</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Perl: variables</string> + <key>scope</key> + <string>punctuation.definition.variable.perl, variable.other.readwrite.global.perl, variable.other.predefined.perl, keyword.operator.comparison.perl</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#B58900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Perl: functions</string> + <key>scope</key> + <string>support.function.perl</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#859900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Perl: comments</string> + <key>scope</key> + <string>comment.line.number-sign.perl</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string>italic</string> + <key>foreground</key> + <string>#586E75</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Perl: quotes</string> + <key>scope</key> + <string>punctuation.definition.string.begin.perl, punctuation.definition.string.end.perl</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#2AA198</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Perl: \char</string> + <key>scope</key> + <string>constant.character.escape.perl</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#DC322F</string> + </dict> + </dict> + + <dict> + <key>name</key> + <string>Markdown: Headings</string> + <key>scope</key> + <string>markup.heading.markdown, markup.heading.1.markdown, markup.heading.2.markdown, markup.heading.3.markdown, markup.heading.4.markdown, markup.heading.5.markdown, markup.heading.6.markdown</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#268BD2</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Markdown: Bold</string> + <key>scope</key> + <string>markup.bold.markdown</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string>bold</string> + <key>foreground</key> + <string>#586E75</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Markdown: Italic</string> + <key>scope</key> + <string>markup.italic.markdown</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string>italic</string> + <key>foreground</key> + <string>#586E75</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Markdown: Punctuation for Bold, Italic, and Inline Block</string> + <key>scope</key> + <string>punctuation.definition.bold.markdown, punctuation.definition.italic.markdown, punctuation.definition.raw.markdown</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#DC322F</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Markdown: Bulleted List</string> + <key>scope</key> + <string>markup.list.unnumbered.markdown</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#B58900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Markdown: Numbered List</string> + <key>scope</key> + <string>markup.list.numbered.markdown</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#859900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Markdown: Block and Inline Block</string> + <key>scope</key> + <string>markup.raw.block.markdown, markup.raw.inline.markdown</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#2AA198</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>markup.quote.markdown</string> + <key>scope</key> + <string>markup.quote.markdown</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#6C71C4</string> + </dict> + </dict> + + <dict> + <key>name</key> + <string>punctuation.definition.blockquote.markdown</string> + <key>scope</key> + <string>punctuation.definition.blockquote.markdown</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#6C71C4</string> + </dict> + </dict> + + <dict> + <key>name</key> + <string>Markdown: Seperator</string> + <key>scope</key> + <string>meta.separator.markdown</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#D33682</string> + </dict> + </dict> + + <dict> + <key>name</key> + <string>Markdown: Link URL, Reference</string> + <key>scope</key> + <string>markup.underline.link.markdown</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#839496</string> + </dict> + </dict> + + <dict> + <key>name</key> + <string>Markdown: Link Title</string> + <key>scope</key> + <string>markup.underline.link.markdown</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#839496</string> + </dict> + </dict> + + <dict> + <key>name</key> + <string>Markdown: Link Punctuation</string> + <key>scope</key> + <string>meta.link.inet.markdown, meta.link.email.lt-gt.markdown, punctuation.definition.string.begin.markdown, punctuation.definition.string.end.markdown, punctuation.definition.link.markdown</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#DC322F</string> + </dict> + </dict> + + <dict> + <key>name</key> + <string>text plain</string> + <key>scope</key> + <string>text.plain</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#657B83</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>SublimeLinter Annotations</string> + <key>scope</key> + <string>sublimelinter.notes</string> + <key>settings</key> + <dict> + <key>background</key> + <string>#eee8d5</string> + <key>foreground</key> + <string>#eee8d5</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>SublimeLinter Error Outline</string> + <key>scope</key> + <string>sublimelinter.outline.illegal</string> + <key>settings</key> + <dict> + <key>background</key> + <string>#93a1a1</string> + <key>foreground</key> + <string>#93a1a1</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>SublimeLinter Error Underline</string> + <key>scope</key> + <string>sublimelinter.underline.illegal</string> + <key>settings</key> + <dict> + <key>background</key> + <string>#dc322f</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>SublimeLinter Warning Outline</string> + <key>scope</key> + <string>sublimelinter.outline.warning</string> + <key>settings</key> + <dict> + <key>background</key> + <string>#839496</string> + <key>foreground</key> + <string>#839496</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>SublimeLinter Warning Underline</string> + <key>scope</key> + <string>sublimelinter.underline.warning</string> + <key>settings</key> + <dict> + <key>background</key> + <string>#b58900</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>SublimeLinter Violation Outline</string> + <key>scope</key> + <string>sublimelinter.outline.violation</string> + <key>settings</key> + <dict> + <key>background</key> + <string>#657b83</string> + <key>foreground</key> + <string>#657b83</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>SublimeLinter Violation Underline</string> + <key>scope</key> + <string>sublimelinter.underline.violation</string> + <key>settings</key> + <dict> + <key>background</key> + <string>#cb4b16</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>SublimeBracketHighlighter</string> + <key>scope</key> + <string>brackethighlighter.all</string> + <key>settings</key> + <dict> + <key>background</key> + <string>#FDF6E3</string> + <key>foreground</key> + <string>#cb4b16</string> + </dict> + </dict> + </array> + <key>uuid</key> + <string>38E819D9-AE02-452F-9231-ECC3B204AFD7</string> +</dict> +</plist> diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Solarized Color Scheme/package-metadata.json b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Solarized Color Scheme/package-metadata.json new file mode 100644 index 0000000..8806a64 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/Solarized Color Scheme/package-metadata.json @@ -0,0 +1 @@ +{"url": "https://github.com/SublimeColors/Solarized", "version": "2012.11.02.15.06.04", "description": "A port of the popular Solarized Theme for Sublime Text 2"} \ No newline at end of file diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/StringEncode/Default.sublime-commands b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/StringEncode/Default.sublime-commands new file mode 100644 index 0000000..e98178c --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/StringEncode/Default.sublime-commands @@ -0,0 +1,66 @@ +[ + { + "caption": "StringEncode: HTML Entitize", + "command": "html_entitize" + }, + { + "caption": "StringEncode: HTML Deentitize", + "command": "html_deentitize" + }, + { + "caption": "StringEncode: XML Entitize", + "command": "xml_entitize" + }, + { + "caption": "StringEncode: XML Deentitize", + "command": "xml_deentitize" + }, + { + "caption": "StringEncode: Safe HTML Entitize", + "command": "safe_html_entitize" + }, + { + "caption": "StringEncode: Safe HTML Deentitize", + "command": "safe_html_deentitize" + }, + { + "caption": "StringEncode: JSON Escape", + "command": "json_escape" + }, + { + "caption": "StringEncode: JSON Unescape", + "command": "json_unescape" + }, + { + "caption": "StringEncode: URL Encode", + "command": "url_encode" + }, + { + "caption": "StringEncode: URL Decode", + "command": "url_decode" + }, + { + "caption": "StringEncode: Base64 Encode", + "command": "base64_encode" + }, + { + "caption": "StringEncode: Base64 Decode", + "command": "base64_decode" + }, + { + "caption": "StringEncode: Escape regex", + "command": "escape_regex" + }, + { + "caption": "StringEncode: Escape LIKE", + "command": "escape_like" + }, + { + "caption": "StringEncode: Decimal to Hexadecimal", + "command": "dec_hex" + }, + { + "caption": "StringEncode: Hexadecimal to Decimal", + "command": "hex_dec" + } +] diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/StringEncode/Example.sublime-keymap b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/StringEncode/Example.sublime-keymap new file mode 100644 index 0000000..84dce04 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/StringEncode/Example.sublime-keymap @@ -0,0 +1,14 @@ +[ + { "keys": ["super+shift+7"], "command": "xml_entitize", "scope": "text.xml" }, + { "keys": ["super+ctrl+7"], "command": "xml_deentitize", "scope": "text.xml" }, + { "keys": ["super+shift+7"], "command": "html_entitize" }, + { "keys": ["super+ctrl+7"], "command": "html_deentitize" }, + { "keys": ["super+shift+8"], "command": "json_escape" }, + { "keys": ["super+ctrl+8"], "command": "json_unescape" }, + { "keys": ["super+shift+6"], "command": "base64_encode" }, + { "keys": ["super+ctrl+6"], "command": "base64_decode" }, + { "keys": ["super+shift+5"], "command": "url_encode" }, + { "keys": ["super+ctrl+5"], "command": "url_decode" }, + { "keys": ["ctrl+shift+r"], "command": "escape_regex" }, + { "keys": ["super+ctrl+3"], "command": "hex_dec" } +] \ No newline at end of file diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/StringEncode/README.md b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/StringEncode/README.md new file mode 100644 index 0000000..18aa332 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/StringEncode/README.md @@ -0,0 +1,52 @@ +StringEncode plugin for Sublime Text 2 +====================================== + +Converts characters from one "encoding" to another using a transformation (think HTML entities, not character encodings). + +Installation +------------ + +1. Using Package Control, install "StringEncode" + +Or: + +1. Open the Sublime Text 2 Packages folder + - OS X: ~/Library/Application Support/Sublime Text 2/Packages/ + - Windows: %APPDATA%/Sublime Text 2/Packages/ + - Linux: ~/.Sublime Text 2/Packages/ +2. clone this repo +3. Install keymaps for the commands (see Example.sublime-keymap for my preferred keys) + +Commands +-------- + +`html_entitize`: Converts characters to their HTML entity + +`html_deentitize`: Converts HTML entities to a character + +`url_encode`: Uses urllib.quote to escape special URL characters + +`url_decode`: Uses urllib.unquote to convert escaped URL characters + +`json_escape`: Escapes a string and surrounds it in quotes, according to the JSON encoding. + +`json_unescape`: Unescapes a string (include the quotes!) according to JSON encoding. + +`base64_encode`: Uses base64 to encode into base64 + +`base64_decode`: Uses base64 to decode from base64 + +`escape_regex`: Escapes regex meta characters + +`escape_like`: Escapes SQL-LIKE meta characters + +`safe_html_entitize`: Converts characters to their HTML entity, but preserves HTML reserved characters + +`safe_html_deentitize`: Converts HTML entities to a character, but preserves HTML reserved characters + +TODO +---- + +`xml_entitize`: Converts characters to their XML entity + +`xml_deentitize`: Converts XML entities to a character diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/StringEncode/package-metadata.json b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/StringEncode/package-metadata.json new file mode 100644 index 0000000..f32ec30 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/StringEncode/package-metadata.json @@ -0,0 +1 @@ +{"url": "https://github.com/colinta/SublimeStringEncode", "version": "1.5.1", "description": "Converts characters from one encoding to another using a transformation (think HTML entities, not character encodings)."} \ No newline at end of file diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/StringEncode/package.json b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/StringEncode/package.json new file mode 100644 index 0000000..1da7f07 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/StringEncode/package.json @@ -0,0 +1,7 @@ +{ + "repo": "SublimeStringEncode", + "name": "StringEncode", + "description": "Converts characters from one encoding to another using a transformation (think HTML entities, not character encodings).", + "author": "Colin Thomas-Arnold (colinta)", + "homepage": "https://github.com/colinta/SublimeStringEncode" +} \ No newline at end of file diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/StringEncode/string_encode.py b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/StringEncode/string_encode.py new file mode 100644 index 0000000..efadd24 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/StringEncode/string_encode.py @@ -0,0 +1,165 @@ +# coding: utf8 + +import sublime_plugin +import urllib +import base64 +import re +import json + + +class StringEncode(sublime_plugin.TextCommand): + def run(self, edit): + e = self.view.begin_edit('encode') + regions = [region for region in self.view.sel()] + + # sort by region.end() DESC + def get_end(region): + return region.end() + regions.sort(key=get_end, reverse=True) + + for region in regions: + if region.empty(): + continue + text = self.view.substr(region) + replacement = self.encode(text) + self.view.replace(edit, region, replacement) + self.view.end_edit(e) + + +html_escape_table = { + u"\"": """, u"'": "'", u"<": "<", u">": ">", u"¡": "¡", u"¢": "¢", u"£": "£", u"¤": "¤", u"¥": "¥", u"¦": "¦", u"§": "§", u"¨": "¨", u"©": "©", u"ª": "ª", u"«": "«", u"¬": "¬", u"®": "®", u"¯": "¯", u"°": "°", u"±": "±", u"²": "²", u"³": "³", u"´": "´", u"µ": "µ", u"¶": "¶", u"·": "·", u"¸": "¸", u"¹": "¹", u"º": "º", u"»": "»", u"¼": "¼", u"½": "½", u"¾": "¾", u"¿": "¿", u"À": "À", u"Á": "Á", u"Â": "Â", u"Ã": "Ã", u"Ä": "Ä", u"Å": "Å", u"Æ": "Æ", u"Ç": "Ç", u"È": "È", u"É": "É", u"Ê": "Ê", u"Ë": "Ë", u"Ì": "Ì", u"Í": "Í", u"Î": "Î", u"Ï": "Ï", u"Ð": "Ð", u"Ñ": "Ñ", u"Ò": "Ò", u"Ó": "Ó", u"Ô": "Ô", u"Õ": "Õ", u"Ö": "Ö", u"×": "×", u"Ø": "Ø", u"Ù": "Ù", u"Ú": "Ú", u"Û": "Û", u"Ü": "Ü", u"Ý": "Ý", u"Þ": "Þ", u"ß": "ß", u"à": "à", u"á": "á", u"â": "â", u"ã": "ã", u"ä": "ä", u"å": "å", u"æ": "æ", u"ç": "ç", u"è": "è", u"é": "é", u"ê": "ê", u"ë": "ë", u"ì": "ì", u"í": "í", u"î": "î", u"ï": "ï", u"ð": "ð", u"ñ": "ñ", u"ò": "ò", u"ó": "ó", u"ô": "ô", u"õ": "õ", u"ö": "ö", u"÷": "÷", u"ø": "ø", u"ù": "ù", u"ú": "ú", u"û": "û", u"ü": "ü", u"ý": "ý", u"þ": "þ", u"ÿ": "ÿ", u"Œ": "Œ", u"œ": "œ", u"Š": "Š", u"š": "š", u"Ÿ": "Ÿ", u"ƒ": "ƒ", u"ˆ": "ˆ", u"˜": "˜", u"Α": "Α", u"Β": "Β", u"Γ": "Γ", u"Δ": "Δ", u"Ε": "Ε", u"Ζ": "Ζ", u"Η": "Η", u"Θ": "Θ", u"Ι": "Ι", u"Κ": "Κ", u"Λ": "Λ", u"Μ": "Μ", u"Ν": "Ν", u"Ξ": "Ξ", u"Ο": "Ο", u"Π": "Π", u"Ρ": "Ρ", u"Σ": "Σ", u"Τ": "Τ", u"Υ": "Υ", u"Φ": "Φ", u"Χ": "Χ", u"Ψ": "Ψ", u"Ω": "Ω", u"α": "α", u"β": "β", u"γ": "γ", u"δ": "δ", u"ε": "ε", u"ζ": "ζ", u"η": "η", u"θ": "θ", u"ι": "ι", u"κ": "κ", u"λ": "λ", u"μ": "μ", u"ν": "ν", u"ξ": "ξ", u"ο": "ο", u"π": "π", u"ρ": "ρ", u"ς": "ς", u"σ": "σ", u"τ": "τ", u"υ": "υ", u"φ": "φ", u"χ": "χ", u"ψ": "ψ", u"ω": "ω", u"ϑ": "ϑ", u"ϒ": "ϒ", u"ϖ": "ϖ", u"–": "–", u"—": "—", u"‘": "‘", u"’": "’", u"‚": "‚", u"“": "“", u"”": "”", u"„": "„", u"†": "†", u"‡": "‡", u"•": "•", u"…": "…", u"‰": "‰", u"′": "′", u"″": "″", u"‹": "‹", u"›": "›", u"‾": "‾", u"⁄": "⁄", u"€": "€", u"ℑ": "ℑ", u"℘": "℘", u"ℜ": "ℜ", u"™": "™", u"ℵ": "ℵ", u"←": "←", u"↑": "↑", u"→": "→", u"↓": "↓", u"↔": "↔", u"↵": "↵", u"⇐": "⇐", u"⇑": "⇑", u"⇒": "⇒", u"⇓": "⇓", u"⇔": "⇔", u"∀": "∀", u"∂": "∂", u"∃": "∃", u"∅": "∅", u"∇": "∇", u"∈": "∈", u"∉": "∉", u"∋": "∋", u"∏": "∏", u"∑": "∑", u"−": "−", u"∗": "∗", u"√": "√", u"∝": "∝", u"∞": "∞", u"∠": "∠", u"∧": "∧", u"∨": "∨", u"∩": "∩", u"∪": "∪", u"∫": "∫", u"∴": "∴", u"∼": "∼", u"≅": "≅", u"≈": "≈", u"≠": "≠", u"≡": "≡", u"≤": "≤", u"≥": "≥", u"⊂": "⊂", u"⊃": "⊃", u"⊄": "⊄", u"⊆": "⊆", u"⊇": "⊇", u"⊕": "⊕", u"⊗": "⊗", u"⊥": "⊥", u"⋅": "⋅", u"⌈": "⌈", u"⌉": "⌉", u"⌊": "⌊", u"⌋": "⌋", u"〈": "⟨", u"〉": "⟩", u"◊": "◊", u"♠": "♠", u"♣": "♣", u"♥": "♥", u"♦": "♦", +} +xml_escape_table = { + u"\"": """, u"'": "'", u"<": "<", u">": ">" +} +html_reserved_list = (u"\"", u"'", u"<", u">", u"&") + + +class HtmlEntitizeCommand(StringEncode): + def encode(self, text): + text = text.replace('&', '&') + for k in html_escape_table: + v = html_escape_table[k] + text = text.replace(k, v) + ret = '' + for i, c in enumerate(text): + if ord(c) > 127: + ret += hex(ord(c)).replace('0x', '&#x') + ';' + else: + ret += c + return ret + + +class HtmlDeentitizeCommand(StringEncode): + def encode(self, text): + for k in html_escape_table: + v = html_escape_table[k] + text = text.replace(v, k) + while re.search('&#[xX][a-fA-F0-9]+;', text): + match = re.search('&#[xX]([a-fA-F0-9]+);', text) + text = text.replace(match.group(0), unichr(int('0x' + match.group(1), 16))) + text = text.replace('&', '&') + return text + + +class SafeHtmlEntitizeCommand(StringEncode): + def encode(self, text): + for k in html_escape_table: + # skip HTML reserved characters + if k in html_reserved_list: + continue + v = html_escape_table[k] + text = text.replace(k, v) + ret = '' + for i, c in enumerate(text): + if ord(c) > 127: + ret += hex(ord(c)).replace('0x', '&#x') + ';' + else: + ret += c + return ret + + +class SafeHtmlDeentitizeCommand(StringEncode): + def encode(self, text): + for k in html_escape_table: + # skip HTML reserved characters + if k in html_reserved_list: + continue + v = html_escape_table[k] + text = text.replace(v, k) + while re.search('&#[xX][a-fA-F0-9]+;', text): + match = re.search('&#[xX]([a-fA-F0-9]+);', text) + text = text.replace(match.group(0), unichr(int('0x' + match.group(1), 16))) + text = text.replace('&', '&') + return text + + +class XmlEntitizeCommand(StringEncode): + def encode(self, text): + text = text.replace('&', '&') + for k in xml_escape_table: + v = xml_escape_table[k] + text = text.replace(k, v) + return text + + +class XmlDeentitizeCommand(StringEncode): + def encode(self, text): + for k in xml_escape_table: + v = xml_escape_table[k] + text = text.replace(v, k) + text = text.replace('&', '&') + return text + + +class JsonEscapeCommand(StringEncode): + def encode(self, text): + return json.dumps(text) + + +class JsonUnescapeCommand(StringEncode): + def encode(self, text): + return json.loads(text) + + +class UrlEncodeCommand(StringEncode): + def encode(self, text): + return urllib.quote(text) + + +class UrlDecodeCommand(StringEncode): + def encode(self, text): + return urllib.unquote(text) + + +class Base64EncodeCommand(StringEncode): + def encode(self, text): + return base64.b64encode(text) + + +class Base64DecodeCommand(StringEncode): + def encode(self, text): + return base64.b64decode(text) + + +class Escaper(StringEncode): + def encode(self, text): + return re.sub(r'(?<!\\)(%s)' % self.meta, r'\\\1', text) + + +class EscapeRegexCommand(Escaper): + meta = r'[\\*.+^$()\[\]\{\}]' + + +class EscapeLikeCommand(Escaper): + meta = r'[%_]' + + +class HexDecCommand(StringEncode): + def encode(self, text): + return str(int(text, 16)) + + +class DecHexCommand(StringEncode): + def encode(self, text): + return hex(int(text)) diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SublimeTODO/Default (Linux).sublime-keymap b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SublimeTODO/Default (Linux).sublime-keymap new file mode 100644 index 0000000..d050399 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SublimeTODO/Default (Linux).sublime-keymap @@ -0,0 +1,80 @@ +[ + + // { + // "keys": ["n"], "command": "goto_next_result", + // "context": [ + // { "key": "setting.todo_results", "operator": "equal", "operand": true } + // ] + // } + + { + "keys": ["n"], "command": "navigate_results", + "context": [ + {"key": "setting.command_mode", "operand": true} + // {"key": "setting.todo_results"} + ], + "args": {"direction": "forward"} + }, + + { + "keys": ["down"], "command": "navigate_results", + "context": [ + {"key": "setting.command_mode", "operand": true} + // {"key": "setting.todo_results"} + ], + "args": {"direction": "forward"} + }, + + { + "keys": ["j"], "command": "navigate_results", + "context": [ + {"key": "setting.command_mode", "operand": true} + // {"key": "setting.todo_results"} + ], + "args": {"direction": "forward"} + }, + + { + "keys": ["p"], "command": "navigate_results", + "context": [ + {"key": "setting.command_mode", "operand": true} + // {"key": "setting.todo_results"} + ], + "args": {"direction": "backward"} + }, + + { + "keys": ["up"], "command": "navigate_results", + "context": [ + {"key": "setting.command_mode", "operand": true} + //{"key": "setting.todo_results"} + ], + "args": {"direction": "backward"} + }, + + { + "keys": ["k"], "command": "navigate_results", + "context": [ + {"key": "setting.command_mode", "operand": true} + //{"key": "setting.todo_results"} + ], + "args": {"direction": "backward"} + }, + + { + "keys": ["c"], "command": "clear_selection", + "context": [ + {"key": "setting.command_mode", "operand": true} + // {"key": "setting.todo_results"} + ] + }, + + { + "keys": ["enter"], "command": "goto_comment", + "context": [ + {"key": "setting.command_mode", "operand": true} + // {"key": "setting.todo_results"} + ] + } + +] diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SublimeTODO/Default (Linux).sublime-mousemap b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SublimeTODO/Default (Linux).sublime-mousemap new file mode 100644 index 0000000..f3868a5 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SublimeTODO/Default (Linux).sublime-mousemap @@ -0,0 +1,6 @@ +[ + { + "button": "button1", "count": 2, "modifiers": ["shift"], + "command": "mouse_goto_comment" + } +] diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SublimeTODO/Default (OSX).sublime-keymap b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SublimeTODO/Default (OSX).sublime-keymap new file mode 100644 index 0000000..d050399 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SublimeTODO/Default (OSX).sublime-keymap @@ -0,0 +1,80 @@ +[ + + // { + // "keys": ["n"], "command": "goto_next_result", + // "context": [ + // { "key": "setting.todo_results", "operator": "equal", "operand": true } + // ] + // } + + { + "keys": ["n"], "command": "navigate_results", + "context": [ + {"key": "setting.command_mode", "operand": true} + // {"key": "setting.todo_results"} + ], + "args": {"direction": "forward"} + }, + + { + "keys": ["down"], "command": "navigate_results", + "context": [ + {"key": "setting.command_mode", "operand": true} + // {"key": "setting.todo_results"} + ], + "args": {"direction": "forward"} + }, + + { + "keys": ["j"], "command": "navigate_results", + "context": [ + {"key": "setting.command_mode", "operand": true} + // {"key": "setting.todo_results"} + ], + "args": {"direction": "forward"} + }, + + { + "keys": ["p"], "command": "navigate_results", + "context": [ + {"key": "setting.command_mode", "operand": true} + // {"key": "setting.todo_results"} + ], + "args": {"direction": "backward"} + }, + + { + "keys": ["up"], "command": "navigate_results", + "context": [ + {"key": "setting.command_mode", "operand": true} + //{"key": "setting.todo_results"} + ], + "args": {"direction": "backward"} + }, + + { + "keys": ["k"], "command": "navigate_results", + "context": [ + {"key": "setting.command_mode", "operand": true} + //{"key": "setting.todo_results"} + ], + "args": {"direction": "backward"} + }, + + { + "keys": ["c"], "command": "clear_selection", + "context": [ + {"key": "setting.command_mode", "operand": true} + // {"key": "setting.todo_results"} + ] + }, + + { + "keys": ["enter"], "command": "goto_comment", + "context": [ + {"key": "setting.command_mode", "operand": true} + // {"key": "setting.todo_results"} + ] + } + +] diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SublimeTODO/Default (OSX).sublime-mousemap b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SublimeTODO/Default (OSX).sublime-mousemap new file mode 100644 index 0000000..41485cf --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SublimeTODO/Default (OSX).sublime-mousemap @@ -0,0 +1,6 @@ +[ + { + "button": "button1", "count": 2, "modifiers": ["alt"], + "command": "mouse_goto_comment" + } +] \ No newline at end of file diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SublimeTODO/Default (Windows).sublime-keymap b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SublimeTODO/Default (Windows).sublime-keymap new file mode 100644 index 0000000..d050399 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SublimeTODO/Default (Windows).sublime-keymap @@ -0,0 +1,80 @@ +[ + + // { + // "keys": ["n"], "command": "goto_next_result", + // "context": [ + // { "key": "setting.todo_results", "operator": "equal", "operand": true } + // ] + // } + + { + "keys": ["n"], "command": "navigate_results", + "context": [ + {"key": "setting.command_mode", "operand": true} + // {"key": "setting.todo_results"} + ], + "args": {"direction": "forward"} + }, + + { + "keys": ["down"], "command": "navigate_results", + "context": [ + {"key": "setting.command_mode", "operand": true} + // {"key": "setting.todo_results"} + ], + "args": {"direction": "forward"} + }, + + { + "keys": ["j"], "command": "navigate_results", + "context": [ + {"key": "setting.command_mode", "operand": true} + // {"key": "setting.todo_results"} + ], + "args": {"direction": "forward"} + }, + + { + "keys": ["p"], "command": "navigate_results", + "context": [ + {"key": "setting.command_mode", "operand": true} + // {"key": "setting.todo_results"} + ], + "args": {"direction": "backward"} + }, + + { + "keys": ["up"], "command": "navigate_results", + "context": [ + {"key": "setting.command_mode", "operand": true} + //{"key": "setting.todo_results"} + ], + "args": {"direction": "backward"} + }, + + { + "keys": ["k"], "command": "navigate_results", + "context": [ + {"key": "setting.command_mode", "operand": true} + //{"key": "setting.todo_results"} + ], + "args": {"direction": "backward"} + }, + + { + "keys": ["c"], "command": "clear_selection", + "context": [ + {"key": "setting.command_mode", "operand": true} + // {"key": "setting.todo_results"} + ] + }, + + { + "keys": ["enter"], "command": "goto_comment", + "context": [ + {"key": "setting.command_mode", "operand": true} + // {"key": "setting.todo_results"} + ] + } + +] diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SublimeTODO/Default (Windows).sublime-mousemap b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SublimeTODO/Default (Windows).sublime-mousemap new file mode 100644 index 0000000..41485cf --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SublimeTODO/Default (Windows).sublime-mousemap @@ -0,0 +1,6 @@ +[ + { + "button": "button1", "count": 2, "modifiers": ["alt"], + "command": "mouse_goto_comment" + } +] \ No newline at end of file diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SublimeTODO/Default.sublime-commands b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SublimeTODO/Default.sublime-commands new file mode 100644 index 0000000..8e033e9 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SublimeTODO/Default.sublime-commands @@ -0,0 +1,10 @@ +[ + { + "caption": "Show TODOs: Project and open files", + "command": "todo" + }, + { + "caption": "Show TODOs: Open files only", + "command": "todo", "args": {"open_files_only": true} + } +] \ No newline at end of file diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SublimeTODO/README.markdown b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SublimeTODO/README.markdown new file mode 100644 index 0000000..509343b --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SublimeTODO/README.markdown @@ -0,0 +1,117 @@ +# Sublime TODOs + +A Sublime Text 2 plugin to extract and list TODO comments from open files and +project folders. + +Take a look at [this screencast](http://webdesign.tutsplus.com/tutorials/applications/quick-tip-streamline-your-todo-lists-in-sublime-text-2/) (courtesy of Shannon Huffman) for an overview. + + +# Install + +The preferred method is to use the [Sublime Package Manager](http://wbond.net/sublime_packages/package_control). Alternatively, checkout from github: + +```sh +$ cd Sublime Text 2/Packages +$ git clone https://robcowie@github.com/robcowie/SublimeTODO.git +``` + +# Config + +All plugin configuration must be placed in user or project-specific settings inside a `todo` object, for example; + +```javascript +{ + // other user config ... + "todo": { + "patterns": {} + } +} +``` + +See an example user settings file [here](https://gist.github.com/2049887). + + +## Adding comment patterns + +Extraction uses regular expressions that return one match group +representing the message. Default patterns are provided for `TODO`, `NOTE`, `FIXME` +and `CHANGED` comments. +To override or provide more patterns, add `patterns` to user settings, e.g. + +```javascript +"patterns": { + "TODO": "TODO[\\s]*?:+(?P<todo>.*)$", + "NOTE": "NOTE[\\s]*?:+(?P<note>.*)$", + "FIXME": "FIX ?ME[\\s]*?:+(?P<fixme>\\S.*)$", + "CHANGED": "CHANGED[\\s]*?:+(?P<changed>\\S.*)$" +} +``` + +Note that the pattern _must_ provide at least one named group which will be used to group the comments in results. + +By default, searching is not case sensitive. You can change this behaviour by adding + + "case_sensitive": true + +to the todo settings object. + + +## Excluding files and folders + +Global settings `folder_exclude_patterns`, `file_exclude_patterns` and `binary_file_patterns` are excluded from search results. + +To exclude further directories, add directory names (not glob pattern or regexp) to `folder_exclude_patterns` in todo settings: + +```javascript +"todo": { + "folder_exclude_patterns": [ + "vendor", + "tmp" + ] +} +``` + +To add file excludes, add glob patterns to `file_exclude_patterns`: + +```javascript +"file_exclude_patterns": [ + "*.css" +] +``` + + +## Results title + +Override the results view title by setting `result_title` + +```javascript +"result_title": "TODO Results" +``` + +# Usage + +`Show TODOs: Project and open files` scans all files in your project +`Show TODOs: Open files only` scans only open, saved files +Both are triggered from the command palette. No default key bindings are provided. + +## Navigating results + +Results can be navigated by keyboard and mouse: + + * `n`ext, `p`revious, `c`lear, `enter` + * `alt-double click` (`shift-double click` in Linux) + + Note that due to the lack of support for context in mousemaps right now, + alt-double click will trigger in _any_ document, though it should be a no-op. + +# License + +All of SublimeTODO is licensed under the MIT license. + +Copyright (c) 2012 Rob Cowie <szaz@mac.com> + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SublimeTODO/messages.json b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SublimeTODO/messages.json new file mode 100644 index 0000000..ce3c122 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SublimeTODO/messages.json @@ -0,0 +1,3 @@ +{ + "1.1.0": "messages/1.1.0.txt" +} diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SublimeTODO/messages/1.1.0.txt b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SublimeTODO/messages/1.1.0.txt new file mode 100644 index 0000000..647fe56 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SublimeTODO/messages/1.1.0.txt @@ -0,0 +1,6 @@ +SublimeTODO 1.1.0 Changelog: + + - Repo reorg to support explicit versioning and Package Control upgrade messages. + + - [LINUX] alt + dblclick is replaced by shift + dblclick to prevent clash + with common alt+click+drag method of moving windows. diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SublimeTODO/package-metadata.json b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SublimeTODO/package-metadata.json new file mode 100644 index 0000000..83e3860 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SublimeTODO/package-metadata.json @@ -0,0 +1 @@ +{"url": "https://github.com/robcowie/SublimeTODO", "version": "1.1.3", "description": "Extract TODO-type comments from open files and project folders"} \ No newline at end of file diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SublimeTODO/packages.json b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SublimeTODO/packages.json new file mode 100644 index 0000000..423b3cc --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SublimeTODO/packages.json @@ -0,0 +1,20 @@ +{ + "schema_version": "1.2", + "packages": [ + { + "name": "SublimeTODO", + "description": "Extract TODO-type comments from open files and project folders", + "author": "Rob Cowie", + "homepage": "https://github.com/robcowie/SublimeTODO", + "last_modified": "2012-11-12 10:16:00", + "platforms": { + "*": [ + { + "version": "1.1.2", + "url": "https://nodeload.github.com/robcowie/SublimeTODO/zipball/1.1.2" + } + ] + } + } + ] +} diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SublimeTODO/todo.py b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SublimeTODO/todo.py new file mode 100644 index 0000000..40c15c0 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SublimeTODO/todo.py @@ -0,0 +1,441 @@ +# -*- coding: utf-8 -*- + +## TODO: Implement TODO_IGNORE setting (http://mdeering.com/posts/004-get-your-textmate-todos-and-fixmes-under-control) +## TODO: Make the output clickable (å la find results) +## TODO: Occasional NoneType bug +## todo: Make the sections foldable (define them as regions?) + +"""""" + +from collections import namedtuple +from datetime import datetime +import functools +import fnmatch +from itertools import groupby +import logging +from os import path, walk +import re +import threading + +import sublime +import sublime_plugin + + +DEBUG = True + +DEFAULT_SETTINGS = { + 'result_title': 'TODO Results', + + 'core_patterns': { + 'TODO': r'TODO[\s]*?:+(?P<todo>.*)$', + 'NOTE': r'NOTE[\s]*?:+(?P<note>.*)$', + 'FIXME': r'FIX ?ME[\s]*?:+(?P<fixme>.*)$', + 'CHANGED': r'CHANGED[\s]*?:+(?P<changed>.*)$' + }, + + 'patterns': {} +} + +Message = namedtuple('Message', 'type, msg') + +## LOGGING SETUP +try: + from logging import NullHandler +except ImportError: + class NullHandler(logging.Handler): + def handle(self, record): + pass + + def emit(self, record): + pass + + def createLock(self): + self.lock = None + +log = logging.getLogger('SublimeTODO') +log.handlers = [] ## hack to prevent extraneous handlers on ST2 auto-reload +log.addHandler(NullHandler()) +log.setLevel(logging.INFO) +if DEBUG: + log.addHandler(logging.StreamHandler()) + log.setLevel(logging.DEBUG) + + +def do_when(conditional, callback, *args, **kwargs): + if conditional(): + return callback(*args, **kwargs) + sublime.set_timeout(functools.partial(do_when, conditional, callback, *args, **kwargs), 50) + + +class Settings(dict): + """Combine default and user settings""" + def __init__(self, user_settings): + settings = DEFAULT_SETTINGS.copy() + settings.update(user_settings) + ## Combine core_patterns and patterns + settings['core_patterns'].update(settings['patterns']) + settings['patterns'] = settings.pop('core_patterns') + super(Settings, self).__init__(settings) + + +class ThreadProgress(object): + def __init__(self, thread, message, success_message, file_counter): + self.thread = thread + self.message = message + self.success_message = success_message + self.file_counter = file_counter + self.addend = 1 + self.size = 8 + sublime.set_timeout(lambda: self.run(0), 100) + + def run(self, i): + if not self.thread.is_alive(): + if hasattr(self.thread, 'result') and not self.thread.result: + sublime.status_message('') + return + sublime.status_message(self.success_message) + return + + before = i % self.size + after = (self.size - 1) - before + sublime.status_message('%s [%s=%s] (%s files scanned)' % \ + (self.message, ' ' * before, ' ' * after, self.file_counter)) + if not after: + self.addend = -1 + if not before: + self.addend = 1 + i += self.addend + sublime.set_timeout(lambda: self.run(i), 100) + + + +class TodoExtractor(object): + def __init__(self, settings, filepaths, dirpaths, ignored_dirs, ignored_file_patterns, + file_counter): + self.filepaths = filepaths + self.dirpaths = dirpaths + self.patterns = settings['patterns'] + self.settings = settings + self.file_counter = file_counter + self.ignored_dirs = ignored_dirs + self.ignored_files = ignored_file_patterns + self.log = logging.getLogger('SublimeTODO.extractor') + + def iter_files(self): + """""" + seen_paths_ = [] + files = self.filepaths + dirs = self.dirpaths + exclude_dirs = self.ignored_dirs + + for filepath in files: + pth = path.realpath(path.abspath(filepath)) + if pth not in seen_paths_: + seen_paths_.append(pth) + yield pth + + for dirpath in dirs: + dirpath = path.abspath(dirpath) + for dirpath, dirnames, filenames in walk(dirpath): + ## remove excluded dirs + ## TODO: These are not patterns. Consider making them glob patterns + for dir in exclude_dirs: + if dir in dirnames: + self.log.debug(u'Ignoring dir: {0}'.format(dir)) + dirnames.remove(dir) + + for filepath in filenames: + pth = path.join(dirpath, filepath) + pth = path.realpath(path.abspath(pth)) + if pth not in seen_paths_: + seen_paths_.append(pth) + yield pth + + def filter_files(self, files): + """""" + exclude_patterns = [re.compile(patt) for patt in self.ignored_files] + for filepath in files: + if any(patt.match(filepath) for patt in exclude_patterns): + continue + yield filepath + + def search_targets(self): + """Yield filtered filepaths for message extraction""" + return self.filter_files(self.iter_files()) + + def extract(self): + """""" + message_patterns = '|'.join(self.patterns.values()) + case_sensitivity = 0 if self.settings.get('case_sensitive', False) else re.IGNORECASE + patt = re.compile(message_patterns, case_sensitivity) + for filepath in self.search_targets(): + try: + f = open(filepath) + self.log.debug(u'Scanning {0}'.format(filepath)) + for linenum, line in enumerate(f): + for mo in patt.finditer(line): + ## Remove the non-matched groups + matches = [Message(msg_type, msg) for msg_type, msg in mo.groupdict().iteritems() if msg] + for match in matches: + yield {'filepath': filepath, 'linenum': linenum + 1, 'match': match} + except IOError: + ## Probably a broken symlink + f = None + finally: + self.file_counter.increment() + if f is not None: + f.close() + + +class TodoRenderer(object): + def __init__(self, settings, window, file_counter): + self.window = window + self.settings = settings + self.file_counter = file_counter + + @property + def view_name(self): + """The name of the new results view. Defined in settings.""" + return self.settings['result_title'] + + @property + def header(self): + hr = u'+ {0} +'.format('-' * 76) + return u'{hr}\n| TODOS @ {0:<68} |\n| {1:<76} |\n{hr}\n'.format( + datetime.now().strftime('%A %d %B %Y %H:%M').decode("utf-8"), + u'{0} files scanned'.format(self.file_counter), + hr=hr) + + @property + def view(self): + existing_results = [v for v in self.window.views() + if v.name() == self.view_name and v.is_scratch()] + if existing_results: + v = existing_results[0] + else: + v = self.window.new_file() + v.set_name(self.view_name) + v.set_scratch(True) + v.settings().set('todo_results', True) + return v + + def format(self, messages): + """Yield lines for rendering into results view. Includes headers and + blank lines. + Lines are returned in the form (type, content, [data]) where type is either + 'header', 'whitespace' or 'result' + """ + key_func = lambda m: m['match'].type + messages = sorted(messages, key=key_func) + + for message_type, matches in groupby(messages, key=key_func): + matches = list(matches) + if matches: + yield ('header', u'\n## {0} ({1})'.format(message_type.upper().decode('utf8', 'ignore'), len(matches)), {}) + for idx, m in enumerate(matches, 1): + msg = m['match'].msg.decode('utf8', 'ignore') ## Don't know the file encoding + filepath = path.basename(m['filepath']) + line = u"{idx}. {filepath}:{linenum} {msg}".format( + idx=idx, filepath=filepath, linenum=m['linenum'], msg=msg) + yield ('result', line, m) + + def render_to_view(self, formatted_results): + """This blocks the main thread, so make it quick""" + ## Header + result_view = self.view + edit = result_view.begin_edit() + result_view.erase(edit, sublime.Region(0, result_view.size())) + result_view.insert(edit, result_view.size(), self.header) + result_view.end_edit(edit) + + ## Region : match_dicts + regions = {} + + ## Result sections + for linetype, line, data in formatted_results: + edit = result_view.begin_edit() + insert_point = result_view.size() + result_view.insert(edit, insert_point, line) + if linetype == 'result': + rgn = sublime.Region(insert_point, result_view.size()) + regions[rgn] = data + result_view.insert(edit, result_view.size(), u'\n') + result_view.end_edit(edit) + + result_view.add_regions('results', regions.keys(), '') + + ## Store {Region : data} map in settings + ## TODO: Abstract this out to a storage class Storage.get(region) ==> data dict + ## Region() cannot be stored in settings, so convert to a primitive type + # d_ = regions + d_ = dict(('{0},{1}'.format(k.a, k.b), v) for k, v in regions.iteritems()) + result_view.settings().set('result_regions', d_) + + ## Set syntax and settings + result_view.set_syntax_file('Packages/SublimeTODO/todo_results.hidden-tmLanguage') + result_view.settings().set('line_padding_bottom', 2) + result_view.settings().set('line_padding_top', 2) + result_view.settings().set('word_wrap', False) + result_view.settings().set('command_mode', True) + self.window.focus_view(result_view) + + +class WorkerThread(threading.Thread): + def __init__(self, extractor, renderer): + self.extractor = extractor + self.renderer = renderer + threading.Thread.__init__(self) + + def run(self): + ## Extract in this thread + todos = self.extractor.extract() + rendered = list(self.renderer.format(todos)) + + ## Render into new window in main thread + def render(): + self.renderer.render_to_view(rendered) + sublime.set_timeout(render, 10) + + +class FileScanCounter(object): + """Thread-safe counter used to update the status bar""" + def __init__(self): + self.ct = 0 + self.lock = threading.RLock() + self.log = logging.getLogger('SublimeTODO') + + def __call__(self, filepath): + self.log.debug(u'Scanning %s' % filepath) + self.increment() + + def __str__(self): + with self.lock: + return '%d' % self.ct + + def increment(self): + with self.lock: + self.ct += 1 + + def reset(self): + with self.lock: + self.ct = 0 + + +class TodoCommand(sublime_plugin.TextCommand): + + def search_paths(self, window, open_files_only=False): + """Return (filepaths, dirpaths)""" + return ( + [view.file_name() for view in window.views() if view.file_name()], + window.folders() if not open_files_only else [] + ) + + def run(self, edit, open_files_only=False): + window = self.view.window() + settings = Settings(self.view.settings().get('todo', {})) + + + ## TODO: Cleanup this init code. Maybe move it to the settings object + filepaths, dirpaths = self.search_paths(window, open_files_only=open_files_only) + + ignored_dirs = settings.get('folder_exclude_patterns', []) + ## Get exclude patterns from global settings + ## Is there really no better way to access global settings? + global_settings = sublime.load_settings('Global.sublime-settings') + ignored_dirs.extend(global_settings.get('folder_exclude_patterns', [])) + + exclude_file_patterns = settings.get('file_exclude_patterns', []) + exclude_file_patterns.extend(global_settings.get('file_exclude_patterns', [])) + exclude_file_patterns.extend(global_settings.get('binary_file_patterns', [])) + exclude_file_patterns = [fnmatch.translate(patt) for patt in exclude_file_patterns] + + file_counter = FileScanCounter() + extractor = TodoExtractor(settings, filepaths, dirpaths, ignored_dirs, + exclude_file_patterns, file_counter) + renderer = TodoRenderer(settings, window, file_counter) + + worker_thread = WorkerThread(extractor, renderer) + worker_thread.start() + ThreadProgress(worker_thread, 'Finding TODOs', '', file_counter) + + +class NavigateResults(sublime_plugin.TextCommand): + DIRECTION = {'forward': 1, 'backward': -1} + STARTING_POINT = {'forward': -1, 'backward': 0} + + def __init__(self, view): + super(NavigateResults, self).__init__(view) + + def run(self, edit, direction): + view = self.view + settings = view.settings() + results = self.view.get_regions('results') + if not results: + sublime.status_message('No results to navigate') + return + + ##NOTE: numbers stored in settings are coerced to floats or longs + selection = int(settings.get('selected_result', self.STARTING_POINT[direction])) + selection = selection + self.DIRECTION[direction] + try: + target = results[selection] + except IndexError: + target = results[0] + selection = 0 + + settings.set('selected_result', selection) + ## Create a new region for highlighting + target = target.cover(target) + view.add_regions('selection', [target], 'selected', 'dot') + view.show(target) + + +class ClearSelection(sublime_plugin.TextCommand): + def run(self, edit): + self.view.erase_regions('selection') + self.view.settings().erase('selected_result') + + +class GotoComment(sublime_plugin.TextCommand): + def __init__(self, *args): + self.log = logging.getLogger('SublimeTODO.nav') + super(GotoComment, self).__init__(*args) + + def run(self, edit): + ## Get the idx of selected result region + selection = int(self.view.settings().get('selected_result', -1)) + ## Get the region + selected_region = self.view.get_regions('results')[selection] + ## Convert region to key used in result_regions (this is tedious, but + ## there is no other way to store regions with associated data) + data = self.view.settings().get('result_regions')['{0},{1}'.format(selected_region.a, selected_region.b)] + self.log.debug(u'Goto comment at {filepath}:{linenum}'.format(**data)) + new_view = self.view.window().open_file(data['filepath']) + do_when(lambda: not new_view.is_loading(), lambda: new_view.run_command("goto_line", {"line": data['linenum']})) + + +class MouseGotoComment(sublime_plugin.TextCommand): + def __init__(self, *args): + self.log = logging.getLogger('SublimeTODO.nav') + super(MouseGotoComment, self).__init__(*args) + + def highlight(self, region): + target = region.cover(region) + self.view.add_regions('selection', [target], 'selected', 'dot') + self.view.show(target) + + def get_result_region(self, pos): + line = self.view.line(pos) + return line + + def run(self, edit): + if not self.view.settings().get('result_regions'): + return + ## get selected line + pos = self.view.sel()[0].end() + result = self.get_result_region(pos) + self.highlight(result) + data = self.view.settings().get('result_regions')['{0},{1}'.format(result.a, result.b)] + self.log.debug(u'Goto comment at {filepath}:{linenum}'.format(**data)) + new_view = self.view.window().open_file(data['filepath']) + do_when(lambda: not new_view.is_loading(), lambda: new_view.run_command("goto_line", {"line": data['linenum']})) diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SublimeTODO/todo_results.hidden-tmLanguage b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SublimeTODO/todo_results.hidden-tmLanguage new file mode 100644 index 0000000..e0cd6b4 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/SublimeTODO/todo_results.hidden-tmLanguage @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>name</key> + <string>TODO Results</string> + + <key>patterns</key> + <array> + <dict> + <key>match</key> + <!-- <string>^[\s]{0,2}([\d]+\.) ([^\(]+) \(([\d]+)\)(:) (.*)$</string> --> + <string>^[\s]{0,2}([\d]+\.) ([^:]+)(:)([\d]+) (.*)$</string> + <key>captures</key> + <dict> + <key>1</key> + <dict> + <key>name</key> + <string>constant.numeric.item-number.todo-list</string> + </dict> + <key>2</key> + <dict> + <key>name</key> + <string>entity.name.filename.todo-list</string> + </dict> + <key>3</key> + <dict> + <key>name</key> + <string>punctuation.definition.delimiter</string> + </dict> + <key>4</key> + <dict> + <key>name</key> + <string>constant.numeric.line-number.todo-list</string> + </dict> + <key>5</key> + <dict> + <key>name</key> + <string>entity.name.match.todo-list</string> + </dict> + </dict> + </dict> + </array> + <key>scopeName</key> + <string>text.todo-list</string> + <key>uuid</key> + <string>2ce8c28e-9c29-4f7f-bc65-7c5311732d29</string> +</dict> +</plist> diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/TrailingSpaces/.gitignore b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/TrailingSpaces/.gitignore new file mode 100644 index 0000000..3aa864b --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/TrailingSpaces/.gitignore @@ -0,0 +1 @@ +TODO.md diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/TrailingSpaces/Default.sublime-commands b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/TrailingSpaces/Default.sublime-commands new file mode 100644 index 0000000..dd4df34 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/TrailingSpaces/Default.sublime-commands @@ -0,0 +1,10 @@ +[ + { + "caption": "Trailing Spaces: Toggle Trailing Spaces Highlighting", + "command": "toggle_trailing_spaces" + }, + { + "caption": "Trailing Spaces: Delete Trailing Spaces", + "command": "delete_trailing_spaces" + } +] diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/TrailingSpaces/MIT-LICENSE b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/TrailingSpaces/MIT-LICENSE new file mode 100644 index 0000000..7104d54 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/TrailingSpaces/MIT-LICENSE @@ -0,0 +1,20 @@ +Copyright 2010 Jean-Denis Vauguet + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/TrailingSpaces/Main.sublime-menu b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/TrailingSpaces/Main.sublime-menu new file mode 100644 index 0000000..3d966e3 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/TrailingSpaces/Main.sublime-menu @@ -0,0 +1,123 @@ +[ + { + "id": "edit", + "children": + [ + { + "caption": "Trailing Spaces", + "id": "trailing-spaces", + "children": + [ + { + "command": "delete_trailing_spaces", + "caption": "Delete" + }, + { "caption": "-" }, + { + "command": "toggle_trailing_spaces_modified_lines_only", + "caption": "Modified Lines Only", + "checkbox": true + }, + { + "command": "toggle_trailing_spaces", + "caption": "Highlight Regions", + "checkbox": true + } + ] + } + ] + }, + { + "id": "preferences", + "children": + [ + { + "caption": "Package Settings", + "mnemonic": "P", + "id": "package-settings", + "children": + [ + { + "caption": "Trailing Spaces", + "children": + [ + { + "command": "open_file", + "args": { + "file": "${packages}/TrailingSpaces/README.md", + "platform": "Windows" + }, + "caption": "Help" + }, + { + "command": "open_file", + "args": { + "file": "${packages}/TrailingSpaces/README.md", + "platform": "OSX" + }, + "caption": "Help" + }, + { + "command": "open_file", + "args": { + "file": "${packages}/TrailingSpaces/README.md", + "platform": "Linux" + }, + "caption": "Help" + }, + { "caption": "-" }, + { + "command": "open_file", + "args": { + "file": "${packages}/TrailingSpaces/trailing_spaces.sublime-settings", + "platform": "Windows" + }, + "caption": "Settings - Default" + }, + { + "command": "open_file", + "args": { + "file": "${packages}/TrailingSpaces/trailing_spaces.sublime-settings", + "platform": "OSX" + }, + "caption": "Settings - Default" + }, + { + "command": "open_file", + "args": { + "file": "${packages}/TrailingSpaces/trailing_spaces.sublime-settings", + "platform": "Linux" + }, + "caption": "Settings - Default" + }, + { + "command": "open_file", + "args": { + "file": "${packages}/User/trailing_spaces.sublime-settings", + "platform": "Windows" + }, + "caption": "Settings - User" + }, + { + "command": "open_file", + "args": { + "file": "${packages}/User/trailing_spaces.sublime-settings", + "platform": "OSX" + }, + "caption": "Settings - User" + }, + { + "command": "open_file", + "args": { + "file": "${packages}/User/trailing_spaces.sublime-settings", + "platform": "Linux" + }, + "caption": "Settings - User" + } + ] + } + ] + } + ] + } +] diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/TrailingSpaces/README.md b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/TrailingSpaces/README.md new file mode 100644 index 0000000..0627b55 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/TrailingSpaces/README.md @@ -0,0 +1,313 @@ +Trailing Spaces +=============== + +A [Sublime Text 2](http://www.sublimetext.com/2) and +[3](http://www.sublimetext.com/3) plugin that allows you to… + +**highlight trailing spaces and delete them in a flash!** + +Synopsis +-------- + +Sublime Text provides a way to automate deletion of trailing spaces *upon file +saving* (more on this at the end of this file). Depending on your settings, it +may be more handy to just highlight them and/or delete them by hand, at any +time. This plugin provides just that, and a *lot* of options to fine-tune the +way you want to decimate trailing spaces. + +Installation +------------ + +It is available through +[Sublime Package Contol](http://wbond.net/sublime_packages/package_control) and +this is the recommended way of installation (brings configuration instructions, +automatic updates with changelogs…). + +### Alternative installation methods + +#### From github + +You can install from github if you want, although Package Control automates +just that. Go to your `Packages` subdirectory under ST2's data directory: + +* Windows: `%APPDATA%\Sublime Text 2` +* OS X: `~/Library/Application Support/Sublime Text 2` +* Linux: `~/.config/sublime-text-2` +* Portable Installation: `Sublime Text 2/Data` + +Then clone this repository: + + git clone git://github.com/SublimeText/TrailingSpaces.git + +#### Manually + +[Download](https://github.com/SublimeText/TrailingSpaces/archive/master.zip) +the plugin as a zip. Copy the *Trailing Spaces* directory to its location +(see prior section). + +Usage +----- + +### Deletion + +The main feature you gain from using this plugin is that of deleting all +trailing spaces in the currently edited document. In order to use this +deletion feature, you may either: + +* click on "Edit / Trailing Spaces / Delete"; +* bind the deletion command to a keyboard shortcut: + +To add a key binding, open "Preferences / Key Bindings - User" and add: + +``` js +{ "keys": ["ctrl+shift+t"], "command": "delete_trailing_spaces" } +``` + +With this setting, pressing <kbd>Ctrl + Shift + t</kbd> will delete all +trailing spaces at once in the current file! For OSX users, quoting wbond: +"When porting a key binding across OSes, it is common for the ctrl key on +Windows and Linux to be swapped out for super on OS X" +(eg. use "super+ctrl+t" instead). + +*Beware*: the binding from this example overrides the default ST's mapping +for reopening last closed file. You can look at the default bindings in +"Preferences / Key Bindings - Default". + +### Toggling highlighting + +At any time, you can toggle highlighting on and off. You may either: + +- click on "Edit / Trailing Spaces / Highlight Regions" +- bind the toggling command to a keyboard shortcut: + +``` js +// I like "d", as in "detect" (overrides a default binding, though). +{ "keys": ["ctrl+shift+d"], "command": "toggle_trailing_spaces" } +``` + +Options +------- + +Several options are available to customize the plugin's behavior. Those +settings are stored in a configuration file, as JSON. You must use a specific +file: Go to "Preferences / Package Settings / Trailing Spaces / Settings +- User" to add you custom settings. You can look at the default values in +"Settings - Default", in the same menu. + +A few of them are also accessible through the "Edit / Trailing Spaces" menu. +Sometimes, editing a setting will require a fresh Sublime Text to be applied +properly, so try relaunching ST before reporting an issue ;) + +All settings are global (ie. applied to all opened documents). + +### Changing the highlighting color + +*Default: "invalid"* + +You may change the highlighting color, providing a color scope name such as + "error", "comment"… just like that: + +``` js +{ "trailing_spaces_highlight_color": "comment" } +``` + +The scope should be defined in your current theme file. Here is a dummy, +fully-fledged example (feel free to cut irrelevant pieces for your settings) +of such a custom color scope: + +``` xml +<dict> + <key>name</key> + <string>Invalid - Illegal</string> + <key>scope</key> + <string>invalid.illegal</string> + <key>settings</key> + <dict> + <key>background</key> + <string>#F93232</string> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#F9F2CE</string> + </dict> +</dict> +``` + +You would then use the value of "invalid.illegal". + +### Keeping trailing spaces invisible + +You can make trailing spaces "invisible" yet still rely on the deletion +command. To do that, set the highlight scope to an empty string: + +``` js +{ "trailing_spaces_highlight_color": "" } +``` + +Beware: this is **not** the same as *disabling* the highlighting (see "On- +Demand Matching" below). With this setting, the plugin still runs when opening +a file, and in the background afterwards; you just won't see the trailing +spaces (they are being highlighted with a "transparent" color). + +### Include Current Line + +*Default: true* + +Highlighting of trailing spaces in the currently edited line can be annoying: +each time you are about to start a new word, the space you type is matched as +a trailing spaces. Currently edited line can thus be ignored: + +``` js +{ "trailing_spaces_include_current_line": false } +``` + +Even though the trailing spaces are not highlighted on this line, they are +still internally matched and will be delete when firing the deletion command. + +### Include Empty Lines + +*Default: true* + +When firing the deletion command, empty lines are matched as trailing regions, +and end up being deleted. You can specifically ignore them: + +``` js +{ "trailing_spaces_include_empty_lines": false } +``` + +They will not be highlighted either. + +### Modified Lines Only + +*Default: false (reopen ST to update)* + +When firing the deletion command, trailing regions *in the entire document* are +deleted. There are some use-cases when deleting trailing spaces *only on lines +you edited* is smarter; for instance when commiting changes to some third-party +source code. + +At any time, you can change which area is covered when deleting trailing +regions. You may either: + +- click on "Edit / Trailing Spaces / Modified Lines Only" +- specify as a setting: + +``` js +{ "trailing_spaces_modified_lines_only": true } +``` + +There is also a command to toggle this feature on and off. You may thus define +a key binding: + +``` js +{ "keys": ["pick+a+shortcut"], "command": "toggle_trailing_spaces_modified_lines_only" } +``` + +### Trim On Save + +*Default: false* + +Setting this to `true` will ensure trailing spaces are deleted when you save +your document. It abides by the other settings, such as *Modified Lines Only*. + +``` js +{ "trailing_spaces_trim_on_save": true } +``` + +### Save After Trim + +*Default: false* + +You may not want to always trim trailing spaces on save, but the other way +around could prove useful. Setting this to `true` will automatically save your +document after you fire the deletion command: + +``` js +{ "trailing_spaces_save_after_trim": true } +``` + +It is obviously ignored if *Trim On Save* is on. + +### Live Matching vs On-demand Matching + +*Default: true (reopen ST to update)* + +By default, trailing regions are matched every time you edit the document, and +when you open it. + +This feature is entirely optional and you may set it off: firing the deletion +command will cause the trailing spaces to be deleted as expected even though +they were not matched prior to your request. If you are afraid of the plugin +to cause slowness (for instance, you already installed several *heavy* +plugins), you can disable live matching: + +``` js +{ "trailing_spaces_enabled": false } +``` + +In this case, for no trailing regions are matched until you request them to be +deleted, no highlighting occurs—it is in fact disabled, regardless of your +"scope" setting. If you want to check the trailing spaces regions, you can +toggle highlighting on and off. In this case, it may come in handy to define +a binding for the toggling command. When "On-demand Matching" is on and some +trailing spaces are highlighted, added ones will obviously not be. Toggling +highlight off and on will refresh them. + +### For power-users only! + +#### Disabled for large files + +The plugin is disabled altogether for large files, for it may cause slowness. +The default threshold is around 1 million of characters. This is +configurable (in "File Settings - User") and the unit is number of chars: + +``` js +{ "trailing_spaces_file_max_size": 1000} +``` + +#### The matching pattern + +*Default: [ \t]+* + +Trailing spaces are line-ending regions containing at least one simple space, +tabs, or both. This pattern should be all you ever need, but if you *do* want +to abide by another definition to cover edge-cases, go ahead: + +``` js +// *danger* will match newline chars and many other folks +"trailing_spaces_regexp": "[\\s]+" +``` + +About Sublime Text's built-in features +-------------------------------------- + +Trailing Spaces is designed to be a drop-in replacement of the limited +*Trim Whitespace On Save* built-in feature. ST is indeed able to delete +trailing spaces upon saving files, and maybe that's all you need! + +In order to enable this behavior, edit "Preferences / Settings - User" +to add the following: + +``` js +{ "trim_trailing_white_space_on_save": true } +``` + +As Trailing Spaces bypasses this setting, you will have to uninstall it to +benefit from this setting. + +Made a little less obvious in the documentation are settings to showcase +whitespaces (*not only trailing ones!*): + +``` js +{ "draw_white_space": "all" } +``` + +and to ensure a newline is kept at end of file upon saving: + +``` js +{ "ensure_newline_at_eof_on_save": true } +``` + +The former will display *all* whitespaces in your files. There is another value +of "selection" which display whitespaces under (you got it) your current text +selection. diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/TrailingSpaces/messages.json b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/TrailingSpaces/messages.json new file mode 100644 index 0000000..efaff86 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/TrailingSpaces/messages.json @@ -0,0 +1,4 @@ +{ + "install": "messages/install.txt", + "v1.0.0": "messages/v1.0.0.txt" +} diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/TrailingSpaces/messages/install.txt b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/TrailingSpaces/messages/install.txt new file mode 100644 index 0000000..141f30c --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/TrailingSpaces/messages/install.txt @@ -0,0 +1,40 @@ + + + Thank you for installing Trailing Spaces + ---------------------------------------- + + You're now ready to give trailing spaces *a hard time*! + + Wait… I guess Package Control just introduced some of them :( + Why don't you try clicking "Edit / Trailing Spaces / Delete"? + + + +Documentation +============= + +Although the usage of this plugin is dead simple, it comes with several options. All +details are available in the documentation, and you can read it by clicking on +"Preferences / Package Settings / Trailing Spaces / Help", or in a prettier form, by +browsing https://github.com/SublimeText/TrailingSpaces. + +Key Binding +=========== + +This plugin does not come with a default key binding for the deletion command. You can +pick your own key binding and define it in "Preferences / Key Bindings - User", or just +stick to using the menu entry under "Edit". Check the help for advice on this. + +Upgrades & Issues +================= + +Package Control will automatically update all packages every time the editor is started, +so there is nothing for you to worry about. If you however do find the plugin not to work +as it used to, head to the issues tracker (see links below) to report the problem. + +Useful Links +============ + +* Documentation & Code: https://github.com/SublimeText/TrailingSpaces +* Report issues / Request New Features / Roadmap: https://github.com/SublimeText/TrailingSpaces/issues +* Follow me on twitter: @jdvauguet diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/TrailingSpaces/messages/v1.0.0.txt b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/TrailingSpaces/messages/v1.0.0.txt new file mode 100644 index 0000000..adb1f3b --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/TrailingSpaces/messages/v1.0.0.txt @@ -0,0 +1,65 @@ + + + Trailing Spaces update [v1.0.0] + ------------------------------- + + Hope you've been happy gaving trailin' a hard time so far. + + I added several features to help you in this honorable quest… + + All details accessible through: + + "Preferences / Package Settings / Trailing Spaces / Help" + + + +New feature: Modified Lines Only +================================ + +As proposed by a fellow user, it is now possible to target only the lines +modified by You and You Only when deleting trailing spaces. + +This feature will certainly please coders who edit third-party code filled +with trailing spaces but do not want to commit giant diffs, just their little +fix, while keeping it clean. + +New feature: Trim On Save +========================= + +This option allows for automatic deletion upon saving. No more lost trailing +spaces! A perfect combo to the "Modified Lines Only" setting I guess. + +New feature: Save After Trim +============================ + +A different kind of automation: many users just want those trailings out and +forget 'bout them. It is now made even easier with this auto-saving hook. Fire +the deletion command, and your document is clean on the hard drive! + +At the current time, "Trim On Save" and "Save After Trim" cannot be both +enabled (the former wins), but this is on the roadmap. + +New Menu +======== + +Some of the settings seemed a bit more important than the others. Along the +deletion command, the toggling command/state and the "Modified Lines Only" +setting have been elected first-class citizens of the new "Edit / Trailing +Spaces" menu. Any change made by click here is live, persistent and reflected +in the JSON settings file. Settings are global to all open documents. + +Improvements & Misc. +==================== + +- Support for custom matching patterns (danger!). +- Performance improvements (reduced overhead, with some room for further + improvements). +- Better documentation (both code & user doc). +- Lazy "On-demand" matching improved. + +Useful Links +============ + +* Documentation & Code: https://github.com/SublimeText/TrailingSpaces +* Report issues / Request New Features / Roadmap: https://github.com/SublimeText/TrailingSpaces/issues +* Follow me on twitter: @jdvauguet diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/TrailingSpaces/package-metadata.json b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/TrailingSpaces/package-metadata.json new file mode 100644 index 0000000..52d06dd --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/TrailingSpaces/package-metadata.json @@ -0,0 +1 @@ +{"url": "https://github.com/SublimeText/TrailingSpaces", "version": "2013.03.07.20.09.52", "description": "Highlight trailing spaces and delete them in a flash."} \ No newline at end of file diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/TrailingSpaces/packages.json b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/TrailingSpaces/packages.json new file mode 100644 index 0000000..f7bb205 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/TrailingSpaces/packages.json @@ -0,0 +1,20 @@ +{ + "schema_version": "1.2", + "packages": [ + { + "name": "TrailingSpaces", + "description": "Highlight trailing spaces and delete them in a flash.", + "author": "Jean-Denis Vauguet", + "homepage": "https://github.com/SublimeText/TrailingSpaces/", + "last_modified": "2013-03-08 01:00:00", + "platforms": { + "*": [ + { + "version": "1.0.0", + "url": "https://nodeload.github.com/SublimeText/TrailingSpaces/zip/v1.0.0" + } + ] + } + } + ] +} diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/TrailingSpaces/trailing_spaces.py b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/TrailingSpaces/trailing_spaces.py new file mode 100644 index 0000000..57a8902 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/TrailingSpaces/trailing_spaces.py @@ -0,0 +1,453 @@ +''' +Provides both a trailing spaces highlighter and a deletion command. + +See README.md for details. + +@author: Jean-Denis Vauguet <jd@vauguet.fr>, Oktay Acikalin <ok@ryotic.de> +@license: MIT (http://www.opensource.org/licenses/mit-license.php) +@since: 2011-02-25 +''' + +import sublime +import sublime_plugin +import difflib +import codecs + +DEFAULT_MAX_FILE_SIZE = 1048576 +DEFAULT_IS_ENABLED = True +DEFAULT_MODIFIED_LINES_ONLY = False + +# Global settings object and flags. +# Flags duplicate some of the (core) JSON settings, in case the settings file has +# been corrupted or is empty (ST2 really dislikes that!) +ts_settings_filename = "trailing_spaces.sublime-settings" +ts_settings = None +trailing_spaces_live_matching = DEFAULT_IS_ENABLED +trim_modified_lines_only = DEFAULT_MODIFIED_LINES_ONLY +startup_queue = [] +on_disk = None + + +# Private: Loads settings and sets whether the plugin (live matching) is enabled. +# +# Returns nothing. +def plugin_loaded(): + global ts_settings_filename, ts_settings, trailing_spaces_live_matching + global current_highlighting_scope, trim_modified_lines_only, startup_queue + global DEFAULT_COLOR_SCOPE_NAME, on_disk + + ts_settings = sublime.load_settings(ts_settings_filename) + trailing_spaces_live_matching = bool(ts_settings.get("trailing_spaces_enabled", + DEFAULT_IS_ENABLED)) + current_highlighting_scope = ts_settings.get("trailing_spaces_highlight_color", + "invalid") + DEFAULT_COLOR_SCOPE_NAME = current_highlighting_scope + trim_modified_lines_only = bool(ts_settings.get("trailing_spaces_modified_lines_only", + DEFAULT_MODIFIED_LINES_ONLY)) + + if trailing_spaces_live_matching: + for view in startup_queue: + match_trailing_spaces(view) + else: + current_highlighting_scope = "" + if ts_settings.get("trailing_spaces_highlight_color") != current_highlighting_scope: + persist_settings() + + +# Private: Updates user's settings with in-memory values. +# +# Allows for persistent settings from the menu. +# +# Returns nothing. +def persist_settings(): + sublime.save_settings(ts_settings_filename) + + +# Private: Determine if the view is a "Find results" view. +# +# view - the view, you know +# +# Returns True or False. +def is_find_results(view): + return view.settings().get('syntax') and "Find Results" in view.settings().get('syntax') + + +# Private: Get the regions matching trailing spaces. +# +# As the core regexp matches lines, the regions are, well, "per lines". +# +# view - the view, you know +# +# Returns both the list of regions which map to trailing spaces and the list of +# regions which are to be highlighted, as a list [matched, highlightable]. +def find_trailing_spaces(view): + sel = view.sel()[0] + line = view.line(sel.b) + include_empty_lines = bool(ts_settings.get("trailing_spaces_include_empty_lines", + DEFAULT_IS_ENABLED)) + include_current_line = bool(ts_settings.get("trailing_spaces_include_current_line", + DEFAULT_IS_ENABLED)) + regexp = ts_settings.get("trailing_spaces_regexp") + "$" + no_empty_lines_regexp = "(?<=\S)%s$" % regexp + + offending_lines = view.find_all(regexp if include_empty_lines else no_empty_lines_regexp) + + if include_current_line: + return [offending_lines, offending_lines] + else: + current_offender = view.find(regexp if include_empty_lines else no_empty_lines_regexp, line.a) + removal = False if current_offender == None else line.intersects(current_offender) + highlightable = [i for i in offending_lines if i != current_offender] if removal else offending_lines + return [offending_lines, highlightable] + + +# Private: Find the fraking trailing spaces in the view and flags them as such! +# +# It will refresh highlighted regions as well. Does not execute if the +# document's size exceeds the file_max_size setting, or if the fired in a view +# which is not a legacy document (helper/build views and so on). +# +# view - the view, you know +# +# Returns nothing. +def match_trailing_spaces(view): + if ts_settings is None: + startup_queue.append(view) + return + + # Silently pass if file is too big. + if max_size_exceeded(view): + return + + if not is_find_results(view): + (matched, highlightable) = find_trailing_spaces(view) + add_trailing_spaces_regions(view, matched) + highlight_trailing_spaces_regions(view, highlightable) + + +# Private: Checks whether the document is bigger than the max_size setting. +# +# view - the view, you know +# +# Returns True or False. +def max_size_exceeded(view): + return view.size() > ts_settings.get('trailing_spaces_file_max_size', + DEFAULT_MAX_FILE_SIZE) + + +# Private: Marks specified regions as trailing spaces. +# +# view - the view, you know +# regions - regions qualified as trailing spaces +# +# Returns nothing. +def add_trailing_spaces_regions(view, regions): + view.erase_regions('TrailingSpacesMatchedRegions') + view.add_regions('TrailingSpacesMatchedRegions', + regions, + "", + "", + sublime.HIDE_ON_MINIMAP) + + +# Private: Highlights specified regions as trailing spaces. +# +# It will use the scope enforced by the state of the toggable highlighting. +# +# view - the view, you know +# regions - regions qualified as trailing spaces +# +# Returns nothing. +def highlight_trailing_spaces_regions(view, regions): + view.erase_regions("TrailingSpacesHighlightedRegions") + view.add_regions('TrailingSpacesHighlightedRegions', + regions, + current_highlighting_scope or "", + "", + sublime.HIDE_ON_MINIMAP) + + +# Private: Toggles highlighting of all trailing spaces in the view. +# +# It has no effect is the plugin is disabled. +# +# view - the view, you know +# +# Returns True (highlighting was turned on) or False (turned off). +def toggle_highlighting(view): + global current_highlighting_scope + + # If the scope is that of an invisible, there is nothing to toggle. + if DEFAULT_COLOR_SCOPE_NAME == "": + return "disabled!" + + # If performing live, highlighted trailing regions must be updated + # internally. + if not trailing_spaces_live_matching: + (matched, highlightable) = find_trailing_spaces(view) + highlight_trailing_spaces_regions(view, highlightable) + + scope = DEFAULT_COLOR_SCOPE_NAME if current_highlighting_scope == "" else "" + current_highlighting_scope = scope + highlight_trailing_spaces_regions(view, view.get_regions('TrailingSpacesHighlightedRegions')) + return "off" if current_highlighting_scope == "" else "on" + + +# Clear all the highlighted regions in all views. +# +# FIXME: this is not used! Delete? +# +# window - the window, you know +# +# Returns nothing. +def clear_trailing_spaces_highlight(window): + for view in window.views(): + view.erase_regions('TrailingSpacesMatchedRegions') + + +# Find edited lines since last save, as line numbers, based on diff. +# +# It uses a Differ object to compute the diff between the file as red on the +# disk, and the current buffer (which may differ from the disk's state). See +# http://docs.python.org/2/library/difflib.html for details about diff codes. +# +# It relies on a full diff, so it may be expensive computation for very large +# files (diff generation + looping through all lines). +# +# old - a buffer of lines, as in "old version" +# new - a buffer of lines, as in "new version" +# +# Returns the list of edited line numbers. +def modified_lines_as_numbers(old, new): + d = difflib.Differ() + diffs = d.compare(old, new) + + # Pretty Naive Algorithm (tm): + # - split off the "Differ code", to check whether: + # - the line is in either in both files or just b: increment the line number + # - the line is only in b: it qualifies as an edited line! + # Starting from -1 as ST2 is internally 0-based for lines. + lineNum = -1 + edited_lines = [] + for line in diffs: + code = line[:2] + # those lines with "? " are not real! watch out! + if code in (" ", "+ "): + lineNum += 1 + if code == "+ ": + edited_lines.append(lineNum) + + return False if not edited_lines else edited_lines + + +# Private: Find the dirty lines. +# +# view - the view, you know +# +# Returns the list of regions matching dirty lines. +def get_modified_lines(view): + try: + on_disk + on_buffer = view.substr(sublime.Region(0, view.size())).splitlines() + except UnicodeDecodeError: + sublime.status_message("File format incompatible with this feature (UTF-8 files only)") + return + + lines = [] + line_numbers = modified_lines_as_numbers(on_disk, on_buffer) + if line_numbers: + lines = [view.full_line(view.text_point(number,0)) for number in line_numbers] + return lines + + +# Private: Finds the trailing spaces regions to be deleted. +# +# It abides by the user settings: while in mode "Only Modified Lines", it returns +# the subset of trailing spaces regions which are within dirty lines; otherwise, it +# returns all trailing spaces regions for the document. +# +# view - the view, you know +# +# Returns a list of regions to be deleted. +def find_regions_to_delete(view): + # If the plugin has been running in the background, regions have been matched. + # Otherwise, we must find trailing spaces right now! + if trailing_spaces_live_matching: + regions = view.get_regions('TrailingSpacesMatchedRegions') + else: + (regions, highlightable) = find_trailing_spaces(view) + + # Filtering is required in case triming is restricted to dirty regions only. + if trim_modified_lines_only: + modified_lines = get_modified_lines(view) + + # If there are no dirty lines, don't do nothing. + if not modified_lines: + return + + # Super-private: filters trailing spaces regions to dirty lines only. + # + # As one cannot perform a smart find_all within arbitrary boundaries, we must do some + # extra work: + # - we want to loop through the modified lines set, not the whole trailing regions + # - but we need a way to match modified lines with trailings to those very regions + # + # Hence the reversed dict on regions: keys are the text_point of the begining of + # each region, values are the region's actual boundaries. As a Region is unhashable, + # trailing regions are being recreated later on from those two values. + # + # We loop then loop through the modified lines: for each line, we get its begining + # text_point, and check whether it matches a line with trailing spaces in the + # reversed dict. If so, this is a match (a modified line with trailing spaces), so + # we can re-create and store a Region for the relevant trailing spaces boundaries. + # + # Returns the filtered list of trailing spaces regions for the modified lines set. + def only_those_with_trailing_spaces(): + regions_by_begin = {} + matches = [] + for region in regions: + begin = view.line(region).begin() + regions_by_begin[begin] = (region.begin(), region.end()) + + for line in modified_lines: + text_point = line.begin() + if text_point in regions_by_begin: + matches.append(sublime.Region(regions_by_begin[text_point][0], regions_by_begin[text_point][1])) + + return matches + + regions = only_those_with_trailing_spaces() + + return regions + +# Private: Deletes the trailing spaces regions. +# +# view - the view, you know +# edit - the Edit object spawned by the deletion command +# +# Returns the number of deleted regions. +def delete_trailing_regions(view, edit): + regions = find_regions_to_delete(view) + + if regions: + # Trick: reversing the regions takes care of the growing offset while + # deleting the successive regions. + regions.reverse() + for r in regions: + view.erase(edit, r) + return len(regions) + else: + return 0 + + +# Public: Toggles the highlighting on or off. +class ToggleTrailingSpacesCommand(sublime_plugin.WindowCommand): + def run(self): + view = self.window.active_view() + if max_size_exceeded(view): + sublime.status_message("File is too big, trailing spaces handling disabled.") + return + + state = toggle_highlighting(view) + ts_settings.set("trailing_spaces_highlight_color", current_highlighting_scope) + persist_settings() + sublime.status_message('Highlighting of trailing spaces is %s' % state) + + def is_checked(self): + return current_highlighting_scope != "" + + +# Public: Toggles "Modified Lines Only" mode on or off. +class ToggleTrailingSpacesModifiedLinesOnlyCommand(sublime_plugin.WindowCommand): + def run(self): + global trim_modified_lines_only + + was_on = ts_settings.get("trailing_spaces_modified_lines_only") + ts_settings.set("trailing_spaces_modified_lines_only", not was_on) + persist_settings() + + # TODO: use ts_settings.add_on_change() when it lands in ST3 + trim_modified_lines_only = ts_settings.get('trailing_spaces_modified_lines_only') + message = "Let's trim trailing spaces everywhere" if was_on \ + else "Let's trim trailing spaces only on modified lines" + sublime.status_message(message) + + def is_checked(self): + return ts_settings.get("trailing_spaces_modified_lines_only") + + +# Public: Matches and highlights trailing spaces on key events, according to the +# current settings. +class TrailingSpacesListener(sublime_plugin.EventListener): + def on_modified(self, view): + if trailing_spaces_live_matching: + match_trailing_spaces(view) + + def on_activated(self, view): + if trailing_spaces_live_matching: + match_trailing_spaces(view) + + def on_selection_modified(self, view): + if trailing_spaces_live_matching: + match_trailing_spaces(view) + + def on_activated(self, view): + self.freeze_last_version(view) + if trailing_spaces_live_matching: + match_trailing_spaces(view) + + def on_pre_save(self, view): + self.freeze_last_version(view) + if ts_settings.get("trailing_spaces_trim_on_save"): + view.run_command("delete_trailing_spaces") + + # Toggling messes with what is red from the disk, and it breaks the diff + # used when modified_lines_only is true. Honestly, I don't know why (yet). + # Anyway, let's cache the persisted version of the document's buffer for + # later use on specific event, so that we always have a decent version of + # "what's on the disk" to work with. + def freeze_last_version(self, view): + global on_disk + + file_name = view.file_name() + # For some reasons, the on_activated hook gets fired on a ghost document + # from time to time. + if file_name: + on_disk = codecs.open(file_name, "r", "utf-8").read().splitlines() + + +# Public: Deletes the trailing spaces. +class DeleteTrailingSpacesCommand(sublime_plugin.TextCommand): + def run(self, edit): + if max_size_exceeded(self.view): + sublime.status_message("File is too big, trailing spaces handling disabled.") + return + + deleted = delete_trailing_regions(self.view, edit) + + if deleted: + if ts_settings.get("trailing_spaces_save_after_trim") \ + and not ts_settings.get("trailing_spaces_trim_on_save"): + sublime.set_timeout(lambda: self.save(self.view), 10) + + msg_parts = {"nbRegions": deleted, + "plural": 's' if deleted > 1 else ''} + message = "Deleted %(nbRegions)s trailing spaces region%(plural)s" % msg_parts + else: + message = "No trailing spaces to delete!" + + sublime.status_message(message) + + def save(self, view): + if view.file_name() is None: + view.run_command('prompt_save_as') + else: + view.run_command('save') + + +# ST3 features a plugin_loaded hook which is called when ST's API is ready. +# +# We must therefore call our init callback manually on ST2. It must be the last +# thing in this plugin (thanks, beloved contributors!). +if not int(sublime.version()) > 3000: + plugin_loaded() diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/TrailingSpaces/trailing_spaces.sublime-settings b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/TrailingSpaces/trailing_spaces.sublime-settings new file mode 100644 index 0000000..235c739 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/TrailingSpaces/trailing_spaces.sublime-settings @@ -0,0 +1,56 @@ +// Trailing Spaces' default settings. +// +// In order to tweak the settings, you should NOT edit this file, but instead +// the user-specific, empty-by-default version under "Preferences / Package +// Settings / Trailing Spaces / Settings - User". +// +// See Trailing Spaces' README for detailled instructions. +{ + // By default, Trailing Spaces is "live". It means the trailing spaces + // regions will be matched in the background, and highlighted if a color + // scope is defined, when the document is opened and edited. + // Set to false to disable live matching and highlighting (the deletion + // command remains available, so-called "lazy matching"). + "trailing_spaces_enabled" : true, + + // Highlight color is specified as a scope. You may define and use a custom + // scope to better fit your colorscheme. + "trailing_spaces_highlight_color" : "invalid", + + // By default, empty lines are cleared as well when calling the deletion + // command. + // Set to false to ignore empty lines upon deletion. + "trailing_spaces_include_empty_lines" : true, + + // By default, the line being currently edited will have its trailing + // spaces highlighted. + // Set to false to ignore trailing spaces on the edited line. + "trailing_spaces_include_current_line" : true, + + // By default, trailing spaces are deleted within the whole document. + // Set to true to affect only the lines you edited since last save. + // Trailing spaces will still be searched for and highlighted in the whole + // document. + "trailing_spaces_modified_lines_only": false, + + // By default, nothing happens on save. + // Set to true to trim trailing spaces before saving, with respect to the + // other settings. + "trailing_spaces_trim_on_save": false, + + // By default, deleting trailing spaces does not cause the document to be + // saved. + // Set to true to force saving after trailing spaces have been deleted. + // This setting is irrelevant and will be ignored if trim_on_save is true. + "trailing_spaces_save_after_trim": false, + + // ---- NEXT SETTINGS ARE FOR POWER USERS ONLY! ---- + + // Highlighting will be disabled if the edited file's size is larger than + // this. + // Adjust the value (in number of chars) to whatever fits your performance. + "trailing_spaces_file_max_size" : 1048576, + + // By default, only simple spaces and tabs are matched as "trailing spaces". + "trailing_spaces_regexp": "[ \t]+" +} diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ZZZ.EthanBrown.SublimeKeyMap.Editor/Default (Windows).sublime-keymap b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ZZZ.EthanBrown.SublimeKeyMap.Editor/Default (Windows).sublime-keymap new file mode 100644 index 0000000..adac1a1 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ZZZ.EthanBrown.SublimeKeyMap.Editor/Default (Windows).sublime-keymap @@ -0,0 +1,522 @@ + [ + // since we assign Ctrl+Shift+V to clipboard manager, use paste / indent with default Ctrl+v + { "keys": ["ctrl+v"], "command": "paste_and_indent" }, + + //HACK: override the vertical column selections to use Ctrl+Shift in RDP + { "keys": ["ctrl+shift+up"], "command": "select_lines", "args": {"forward": false} }, + { "keys": ["ctrl+shift+down"], "command": "select_lines", "args": {"forward": true} }, + + //HACK: restore default shift+tab keybindings because SmartMarkdown messes with them too much + { "keys": ["shift+tab"], "command": "insert", "args": {"characters": "\t"} }, + { "keys": ["shift+tab"], "command": "unindent", "context": + [ + { "key": "setting.shift_tab_unindent", "operator": "equal", "operand": true } + ] + }, + { "keys": ["shift+tab"], "command": "unindent", "context": + [ + { "key": "preceding_text", "operator": "regex_match", "operand": "^[\t ]*" } + ] + }, + { "keys": ["shift+tab"], "command": "unindent", "context": + [ + { "key": "text", "operator": "regex_contains", "operand": "\n" } + ] + }, + { "keys": ["shift+tab"], "command": "prev_field", "context": + [ + { "key": "has_prev_field", "operator": "equal", "operand": true } + ] + }, + + //Abacus - https://github.com/khiltd/Abacus + { "keys": ["ctrl+alt+\\"], "command": "abacus" }, + + // Bracketeer - https://github.com/colinta/SublimeBracketeer + { "keys": ["super+]"], "command": "bracketeer_indent" }, + { "keys": ["ctrl+shift+["], "command": "bracketeer_select" }, + { "keys": ["ctrl+["], "command": "bracketeer_goto", "args": { "goto": "left" } }, + { "keys": ["ctrl+]"], "command": "bracketeer_goto", "args": { "goto": "right" } }, + { "keys": ["ctrl+alt+["], "command": "bracketeer_goto", "args": { "goto": "both" } }, + { "keys": ["ctrl+alt+]"], "command": "bracketeer_goto", "args": { "goto": "both" } }, + //| + //| BRACKETEER + //| + { "keys": ["{"], "command": "bracketeer", "args": { "braces": "{}", "unindent": true } }, + { "keys": ["}"], "command": "bracketeer", "args": { "braces": "{}", "pressed": "}", "unindent": true } }, + { "keys": ["["], "command": "bracketeer", "args": { "braces": "[]" } }, + { "keys": ["]"], "command": "bracketeer", "args": { "braces": "[]", "pressed": "]" } }, + { "keys": ["("], "command": "bracketeer", "args": { "braces": "()" } }, + { "keys": [")"], "command": "bracketeer", "args": { "braces": "()", "pressed": ")" } }, + //| reStructured Text + { "keys": ["alt+`"], "command": "bracketeer", "args": { "braces": "````", "pressed": "``" }, "context": + [ + { "key": "selector", "operator": "equal", "operand": "text.restructuredtext" } + ] + }, + { "keys": ["*"], "command": "bracketeer", "args": { "braces": "**", "pressed": "*" }, "context": + [ + { "key": "selector", "operator": "equal", "operand": "text.restructuredtext" } + ] + }, + //| DJANGO CURLIES + // For django, liquid, jinja. All the grammars *I* have list 'source.smarty' as + // when the cursor is inside "{}"s + { "keys": ["{"], "command": "bracketeer", "args": { "braces": "{ }" }, "context": + [{ "key": "selector", "operator": "equal", "operand": "source.smarty" }] + }, + { "keys": ["{"], "command": "bracketeer", "args": { "braces": "{ }" }, "context": + [{ "key": "selector", "operator": "equal", "operand": "meta.brace.curly" }] + }, + { "keys": ["%"], "command": "bracketeer", "args": { "braces": "% %" }, "context": + [{ "key": "selector", "operator": "equal", "operand": "source.smarty" }] + }, + { "keys": ["%"], "command": "bracketeer", "args": { "braces": "% %" }, "context": + [ + { "key": "selector", "operator": "equal", "operand": "meta.brace.curly" }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "<$", "match_all": true } + ] + }, + { "keys": ["%"], "command": "insert_snippet", "args": { "contents": " $1 %>$0" }, "context": + [ + { "key": "selector", "operator": "equal", "operand": "source.ruby" }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "<%$", "match_all": true } + ] + }, + { "keys": [">"], "command": "insert_snippet", "args": { "contents": ">$1<% $0" }, "context": + [ + { "key": "selector", "operator": "equal", "operand": "source.ruby" }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "%$", "match_all": true } + ] + }, + { "keys": ["="], "command": "insert_snippet", "args": { "contents": "= $1 %>$0" }, "context": + [ + { "key": "selector", "operator": "equal", "operand": "source.ruby" }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "<%$", "match_all": true } + ] + }, + { "keys": ["-"], "command": "insert_snippet", "args": { "contents": "- $1 %>$0" }, "context": + [ + { "key": "selector", "operator": "equal", "operand": "source.ruby" }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "<%$", "match_all": true } + ] + }, + { "keys": ["#"], "command": "bracketeer", "args": { "braces": "# #" }, "context": + [{ "key": "selector", "operator": "equal", "operand": "source.smarty" }] + }, + //| QUOTES + { "keys": ["\""], "command": "bracketeer", "args": { "braces": "\"\"", "pressed": "\"" } }, + { "keys": ["ctrl+'","ctrl+'"], "command": "bracketeer", "args": { "braces": "\"\"\"\n\n\"\"\"" } }, + { "keys": ["'"], "command": "bracketeer", "args": { "braces": "''", "pressed": "'" } }, + { "keys": ["ctrl+'","'"], "command": "bracketeer", "args": { "braces": "'''\n\n'''" } }, + { "keys": ["`"], "command": "bracketeer", "args": { "braces": "``", "pressed": "`" } }, + { "keys": ["ctrl+'","`"], "command": "insert_snippet", "args": { "contents": "```${1:syntax}\n$0\n```" } }, + { "keys": ["«"], "command": "bracketeer", "args": { "braces": "«»" } }, + { "keys": ["»"], "command": "bracketeer", "args": { "braces": "«»", "pressed": "»" } }, + { "keys": ["‹"], "command": "bracketeer", "args": { "braces": "‹›" } }, + { "keys": ["›"], "command": "bracketeer", "args": { "braces": "‹›", "pressed": "›" } }, + { "keys": ["“"], "command": "bracketeer", "args": { "braces": "“”" } }, + { "keys": ["”"], "command": "bracketeer", "args": { "braces": "“”", "pressed": "”" } }, + { "keys": ["‘"], "command": "bracketeer", "args": { "braces": "‘’" } }, + { "keys": ["’"], "command": "bracketeer", "args": { "braces": "‘’", "pressed": "’" } }, + //| + //| AUTO DELETE MATCHING '', "", [], etc. + //| + { "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Left Right.sublime-macro"}, "context": + [ + { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "\"$" }, + { "key": "following_text", "operator": "regex_contains", "operand": "^\"" } + ] + }, + { "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Left Right.sublime-macro"}, "context": + [ + { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "'$" }, + { "key": "following_text", "operator": "regex_contains", "operand": "^'" } + ] + }, + { "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Left Right.sublime-macro"}, "context": + [ + { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "`$" }, + { "key": "following_text", "operator": "regex_contains", "operand": "^`" } + ] + }, + { "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Left Right.sublime-macro"}, "context": + [ + { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "«$" }, + { "key": "following_text", "operator": "regex_contains", "operand": "^»" } + ] + }, + { "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Left Right.sublime-macro"}, "context": + [ + { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "‹$" }, + { "key": "following_text", "operator": "regex_contains", "operand": "^›" } + ] + }, + { "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Left Right.sublime-macro"}, "context": + [ + { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "“$" }, + { "key": "following_text", "operator": "regex_contains", "operand": "^”" } + ] + }, + { "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Left Right.sublime-macro"}, "context": + [ + { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "‘$" }, + { "key": "following_text", "operator": "regex_contains", "operand": "^’" } + ] + }, + { "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Left Right.sublime-macro"}, "context": + [ + { "key": "selector", "operator": "equal", "operand": "text.restructuredtext" }, + { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "\\*$" }, + { "key": "following_text", "operator": "regex_contains", "operand": "^\\*" } + ] + }, + //| + //| Bracket and select + //| + { "keys": ["ctrl+alt+[", "backspace"], "command": "bracketeer", "args": { "braces": "", "select": true, "replace": true }, "context": + [{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }] + }, + { "keys": ["ctrl+[", "{"], "command": "bracketeer", "args": { "braces": "{}", "select": true }, "context": + [{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }] + }, + { "keys": ["ctrl+alt+[", "{"], "command": "bracketeer", "args": { "braces": "{}", "select": true, "replace": true }, "context": + [{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }] + }, + { "keys": ["ctrl+[", " "], "command": "bracketeer", "args": { "braces": " ", "select": true }, "context": + [{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }] + }, + { "keys": ["ctrl+alt+[", " "], "command": "bracketeer", "args": { "braces": " ", "select": true, "replace": true }, "context": + [{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }] + }, + { "keys": ["ctrl+[", "["], "command": "bracketeer", "args": { "braces": "[]", "select": true }, "context": + [{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }] + }, + { "keys": ["ctrl+alt+[", "["], "command": "bracketeer", "args": { "braces": "[]", "select": true, "replace": true }, "context": + [{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }] + }, + { "keys": ["ctrl+[", "("], "command": "bracketeer", "args": { "braces": "()", "select": true }, "context": + [{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }] + }, + { "keys": ["ctrl+alt+[", "("], "command": "bracketeer", "args": { "braces": "()", "select": true, "replace": true }, "context": + [{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }] + }, + { "keys": ["ctrl+[", "\""], "command": "bracketeer", "args": { "braces": "\"\"", "select": true }, "context": + [{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }] + }, + { "keys": ["ctrl+alt+[", "\""], "command": "bracketeer", "args": { "braces": "\"\"", "select": true, "replace": true }, "context": + [{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }] + }, + { "keys": ["ctrl+[", "ctrl+shift+'"], "command": "bracketeer", "args": { "braces": "\"\"\"\"\"\"", "select": true }, "context": + [{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }] + }, + { "keys": ["ctrl+alt+[", "ctrl+shift+'"], "command": "bracketeer", "args": { "braces": "\"\"\"\"\"\"", "select": true, "replace": true }, "context": + [{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }] + }, + { "keys": ["ctrl+[", "'"], "command": "bracketeer", "args": { "braces": "''", "select": true }, "context": + [{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }] + }, + { "keys": ["ctrl+alt+[", "'"], "command": "bracketeer", "args": { "braces": "''", "select": true, "replace": true }, "context": + [{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }] + }, + { "keys": ["ctrl+[", "ctrl+'"], "command": "bracketeer", "args": { "braces": "''''''", "select": true }, "context": + [{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }] + }, + { "keys": ["ctrl+alt+[", "ctrl+'"], "command": "bracketeer", "args": { "braces": "''''''", "select": true, "replace": true }, "context": + [{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }] + }, + { "keys": ["ctrl+[", "`"], "command": "bracketeer", "args": { "braces": "``", "select": true }, "context": + [{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }] + }, + { "keys": ["ctrl+alt+[", "`"], "command": "bracketeer", "args": { "braces": "``", "select": true, "replace": true }, "context": + [{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }] + }, + { "keys": ["ctrl+[", "ctrl+`"], "command": "bracketeer", "args": { "braces": "``````", "select": true }, "context": + [{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }] + }, + { "keys": ["ctrl+alt+[", "ctrl+`"], "command": "bracketeer", "args": { "braces": "``````", "select": true, "replace": true }, "context": + [{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }] + }, + { "keys": ["ctrl+[", "«"], "command": "bracketeer", "args": { "braces": "«»", "select": true }, "context": + [{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }] + }, + { "keys": ["ctrl+alt+[", "«"], "command": "bracketeer", "args": { "braces": "«»", "select": true, "replace": true }, "context": + [{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }] + }, + { "keys": ["ctrl+[", "‹"], "command": "bracketeer", "args": { "braces": "‹›", "select": true }, "context": + [{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }] + }, + { "keys": ["ctrl+alt+[", "‹"], "command": "bracketeer", "args": { "braces": "‹›", "select": true, "replace": true }, "context": + [{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }] + }, + { "keys": ["ctrl+[", "“"], "command": "bracketeer", "args": { "braces": "“”", "select": true }, "context": + [{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }] + }, + { "keys": ["ctrl+alt+[", "“"], "command": "bracketeer", "args": { "braces": "“”", "select": true, "replace": true }, "context": + [{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }] + }, + { "keys": ["ctrl+[", "‘"], "command": "bracketeer", "args": { "braces": "‘’", "select": true }, "context": + [{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }] + }, + { "keys": ["ctrl+alt+[", "‘"], "command": "bracketeer", "args": { "braces": "‘’", "select": true, "replace": true }, "context": + [{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }] + }, + { "keys": ["ctrl+[", "alt+`"], "command": "bracketeer", "args": { "braces": "````", "select": true }, "context": + [{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }] + }, + { "keys": ["ctrl+alt+[", "alt+`"], "command": "bracketeer", "args": { "braces": "````", "select": true, "replace": true }, "context": + [{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }] + }, + { "keys": ["ctrl+[", "*"], "command": "bracketeer", "args": { "braces": "**", "select": true }, "context": + [ + { "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }, + { "key": "selector", "operator": "equal", "operand": "text.restructuredtext" } + ] + }, + { "keys": ["ctrl+alt+[", "*"], "command": "bracketeer", "args": { "braces": "**", "select": true, "replace": true }, "context": + [ + { "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }, + { "key": "selector", "operator": "equal", "operand": "text.restructuredtext" } + ] + }, + + //BracketHighlighter - https://github.com/facelessuser/BracketHighlighter/ + { + "keys": ["ctrl+shift+b", "ctrl+shift+b"], "command": "bracket_highlighter_key", + "args": {"lines": true} + }, + { + "keys": ["alt+up"], "command": "bracket_highlighter_key", + "args": + { + "lines" : true, + "plugin": + { + "type": ["quote","bracket","tag"], + "command": "bracket_plugins.select_bracket", + "args": {"select": "left"} + } + } + }, + { + "keys": ["alt+down"], "command": "bracket_highlighter_key", + "args": + { + "lines" : true, + "plugin": + { + "type": ["quote","bracket","tag"], + "command": "bracket_plugins.select_bracket", + "args": {"select": "right"} + } + } + }, + { + "keys": ["ctrl+shift+b","ctrl+shift+s"], "command": "bracket_highlighter_key", + "args": + { + "lines" : true, + "plugin": + { + "type": ["quote","bracket","tag"], + "command": "bracket_plugins.select_bracket" + } + } + }, + { + "keys": ["ctrl+shift+b","ctrl+shift+t"], "command": "bracket_highlighter_key", + "args": + { + "ignore": ["quote"], + "plugin": + { + "type": ["tag"], + "command": "bracket_plugins.select_tag" + } + } + }, + { + "keys": ["ctrl+shift+b","ctrl+shift+n"], "command": "bracket_highlighter_key", + "args": + { + "ignore": ["quote"], + "plugin": + { + "type": ["tag"], + "command": "bracket_plugins.select_attr", + "args": {"direction": "right"} + } + } + }, + { + "keys": ["ctrl+shift+b","ctrl+shift+q"], "command": "bracket_highlighter_key", + "args": + { + "plugin": {"type": ["quote"],"command" : "bracket_plugins.swap_quotes"} + } + }, + { + "keys": ["ctrl+shift+b","ctrl+shift+j"], "command": "swap_brackets" + }, + { + "keys": ["ctrl+shift+b","ctrl+shift+["], "command": "bracket_highlighter_key", + "args": + { + "plugin": {"type": ["quote", "tag", "bracket"],"command" : "bracket_plugins.fold_bracket"} + } + }, + + // ClipboardManager - https://github.com/colinta/SublimeClipboardManager + { "keys": ["ctrl+x"], "command": "clipboard_manager_cut" }, + { "keys": ["ctrl+c"], "command": "clipboard_manager_copy" }, + { "keys": ["ctrl+v"], "command": "clipboard_manager_paste", "args": { "indent": true } }, + { "keys": ["ctrl+alt+v"], "command": "clipboard_manager_next_and_paste" }, + { "keys": ["ctrl+shift+alt+v"], "command": "clipboard_manager_previous_and_paste" }, + //{ "keys": ["ctrl+pageup"], "command": "clipboard_manager_next" }, + //{ "keys": ["ctrl+pagedown"], "command": "clipboard_manager_previous" }, + //{ "keys": ["ctrl+home"], "command": "clipboard_manager_show" }, + { "keys": ["ctrl+shift+v"], "command": "clipboard_manager_choose_and_paste" }, + + // EasyMotion - https://github.com/tednaleid/sublime-EasyMotion + { + "keys": ["ctrl+.", "<character>"], + "command": "easy_motion", "args": {"select_text": false} + }, + { + "keys": ["ctrl+.", "enter"], + "command": "easy_motion", "args": {"select_text": false, "character": "enter"} + }, + { + "keys": ["ctrl+shift+.", "<character>"], + "command": "easy_motion", "args": {"select_text": true} + }, + { + "keys": ["ctrl+shift+.", "enter"], + "command": "easy_motion", "args": {"select_text": true, "character": "enter"} + }, + + // ExportHTML - https://github.com/facelessuser/ExportHtml + // use defaults + + // FileDiffs - https://github.com/colinta/SublimeFileDiffs + { "keys": ["ctrl+shift+d"], "command": "file_diff_menu" }, + + // MarkDown Preview - https://github.com/revolunet/sublimetext-markdown-preview + { "keys": ["ctrl+alt+m"], "command": "markdown_preview", "args": {"target": "browser"} }, + + // Smart Markdown - https://github.com/demon386/SmartMarkdown + // accept all the defaults for building lists and tables + { "keys": ["tab"], "command": "smart_folding", "context": + [{ "key": "selector", "operator": "equal", "operand": "markup.heading.markdown" }] + }, + { "keys": ["enter"], "command": "smart_list", "context": [ + { "key": "selector", "operator": "equal", "operand": "text.html.markdown" }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*([-+\\**]|\\d+\\.+)\\s+" } + ]}, + { "keys": ["enter"], "command": "smart_list", "context": [ + { "key": "selector", "operator": "equal", "operand": "text.html.markdown" }, + { "key": "selector", "operator": "equal", "operand": "markup.list" } + ]}, + { "keys": ["tab"], "command": "smart_table", "args": {"forward": true}, "context": [ + { "key": "selector", "operator": "equal", "operand": "text.html.markdown" }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*(\\||\\+[-=])", "match_all": true} + ]}, + { "keys": ["tab"], "command": "smart_table", "args": {"forward": true}, "context": [ + { "key": "selector", "operator": "equal", "operand": "text.html.markdown" }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*" }, + { "key": "following_text", "operator": "regex_contains", "operand": "\\s*(\\||\\+[-=])", "match_all": true} + ]}, + { "keys": ["shift+tab"], "command": "smart_table", "args": {"forward": false}, "context": [ + { "key": "selector", "operator": "equal", "operand": "text.html.markdown" }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*(\\||\\+[-=])", + "match_all": true} + ]}, + { "keys": ["shift+tab"], "command": "smart_table", "args": {"forward": false}, "context": [ + { "key": "selector", "operator": "equal", "operand": "text.html.markdown" }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*" }, + { "key": "following_text", "operator": "regex_contains", "operand": "\\s*(\\||\\+[-=])", "match_all": true} + ]}, + { + "keys": ["super+shift+."], "command": "change_heading_level", "args": {"up": true}, "context": [ + {"key": "selector", "operator": "equal", "operand": "text.html.markdown"} + ]}, + { + "keys": ["super+shift+,"], "command": "change_heading_level", "args": {"up": false}, "context": [ + {"key": "selector", "operator": "equal", "operand": "text.html.markdown"} + ]}, + + //Sublime Text 2 - Related Files - https://github.com/fabiokr/sublime-related-files + { "keys": ["ctrl+alt+t"], "command": "related_files" }, + + //SublimeTODO - https://github.com/robcowie/SublimeTODO + // { + // "keys": ["n"], "command": "goto_next_result", + // "context": [{ "key": "setting.todo_results", "operator": "equal", "operand": true }] + // } + { + "keys": ["n"], "command": "navigate_results", + //// {"key": "setting.todo_results"} + "context": [ {"key": "setting.command_mode", "operand": true}], + "args": {"direction": "forward"} + }, + { + "keys": ["down"], "command": "navigate_results", + // {"key": "setting.todo_results"} + "context": [{"key": "setting.command_mode", "operand": true}], + "args": {"direction": "forward"} + }, + { + "keys": ["j"], "command": "navigate_results", + "context": [{"key": "setting.command_mode", "operand": true}], + // {"key": "setting.todo_results"} + "args": {"direction": "forward"} + }, + { + "keys": ["p"], "command": "navigate_results", + // {"key": "setting.todo_results"} + "context": [{"key": "setting.command_mode", "operand": true}], + "args": {"direction": "backward"} + }, + { + "keys": ["up"], "command": "navigate_results", + //{"key": "setting.todo_results"} + "context": [{"key": "setting.command_mode", "operand": true}], + "args": {"direction": "backward"} + }, + { + "keys": ["k"], "command": "navigate_results", + "context": [{"key": "setting.command_mode", "operand": true}], + //{"key": "setting.todo_results"} + "args": {"direction": "backward"} + }, + { + "keys": ["c"], "command": "clear_selection", + // {"key": "setting.todo_results"} + "context": [{"key": "setting.command_mode", "operand": true}] + }, + { + "keys": ["enter"], "command": "goto_comment", + // {"key": "setting.todo_results"} + "context": [{"key": "setting.command_mode", "operand": true}] + }, + + //Snippet Browsing Keybindings + { "keys": ["shift+f1"], "command": "show_overlay", + "args": {"overlay": "command_palette", "text": "snippet"} } +] diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ZZZ.EthanBrown.SublimeKeyMap.Editor/README.md b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ZZZ.EthanBrown.SublimeKeyMap.Editor/README.md new file mode 100644 index 0000000..94d0340 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ZZZ.EthanBrown.SublimeKeyMap.Editor/README.md @@ -0,0 +1,38 @@ +SublimeKeyMap.Editor +==================== + +A simple repository used to host / share my customized Sublime Text 2 key bindings for Sublime editor enhancement plugins + +Designed to be incorporated into `Package Control.sublime-settings` like: + +```json +{ + "installed_packages": + [ + "Abacus", + "Block Cursor Everywhere", + "Bracketeer", + "BracketHighlighter", + "Clipboard Manager", + "EasyMotion", + "ExportHtml", + "FileDiffs", + "Markdown Preview", + "Missing Palette Commands", + "Related Files", + "SmartMarkdown", + "Solarized Color Scheme", + "StringEncode", + "SublimeTODO", + "TrailingSpaces", + ], + "package_name_map": { + "SublimeKeyMap.Editor": "ZZZ.EthanBrown.SublimeKeyMap.Editor" + }, + "repositories": + [ + "https://github.com/abrookins/OpenSearchResult", + "https://github.com/Iristyle/SublimeKeyMap.Editor" + ] +} +``` diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ZZZ.EthanBrown.SublimeKeyMap.Editor/package-metadata.json b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ZZZ.EthanBrown.SublimeKeyMap.Editor/package-metadata.json new file mode 100644 index 0000000..2745b25 --- /dev/null +++ b/EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/ZZZ.EthanBrown.SublimeKeyMap.Editor/package-metadata.json @@ -0,0 +1 @@ +{"url": "https://github.com/Iristyle/SublimeKeyMap.Editor", "version": "2013.03.26.11.48.08", "description": "A simple repository used to host / share my customized Sublime Text 2 key bindings for Sublime editor enhancement plugins"} \ No newline at end of file diff --git a/EthanBrown.SublimeText2.EditorPackages/tools/chocolateyInstall.ps1 b/EthanBrown.SublimeText2.EditorPackages/tools/chocolateyInstall.ps1 index a41db9d..be15821 100644 --- a/EthanBrown.SublimeText2.EditorPackages/tools/chocolateyInstall.ps1 +++ b/EthanBrown.SublimeText2.EditorPackages/tools/chocolateyInstall.ps1 @@ -27,6 +27,9 @@ try { Copy-Item @params } + $packageCache = Join-Path (Get-CurrentDirectory) 'PackageCache' + Install-SublimePackagesFromCache -Directory $packageCache + Install-SublimePackageControl $packageControl = Join-Path $current 'Package Control.sublime-settings' Merge-PackageControlSettings -FilePath $packageControl diff --git a/EthanBrown.SublimeText2.GitPackages/EthanBrown.SublimeText2.GitPackages.nuspec b/EthanBrown.SublimeText2.GitPackages/EthanBrown.SublimeText2.GitPackages.nuspec index 0d6a51f..97a94cc 100644 --- a/EthanBrown.SublimeText2.GitPackages/EthanBrown.SublimeText2.GitPackages.nuspec +++ b/EthanBrown.SublimeText2.GitPackages/EthanBrown.SublimeText2.GitPackages.nuspec @@ -3,7 +3,7 @@ <metadata> <id>EthanBrown.SublimeText2.GitPackages</id> <title>Sublime Text 2 - Git Integration Packages - 0.0.3 + 0.1.0 Various Ethan Brown A number of packages helpful for increased editor productivity when using Git. @@ -56,10 +56,11 @@ --> false https://raw.github.com/Iristyle/ChocolateyPackages/master/SublimeText2.app/Sublime_Text.png - + * Use a local package cache to prevent first-time package restore / load errors + diff --git a/EthanBrown.SublimeText2.GitPackages/tools/PackageCache/EditorConfig/.editorconfig b/EthanBrown.SublimeText2.GitPackages/tools/PackageCache/EditorConfig/.editorconfig new file mode 100644 index 0000000..b722c2e --- /dev/null +++ b/EthanBrown.SublimeText2.GitPackages/tools/PackageCache/EditorConfig/.editorconfig @@ -0,0 +1,9 @@ +# editorconfig.org +root = true + +[*] +indent_style = tab +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true diff --git a/EthanBrown.SublimeText2.GitPackages/tools/PackageCache/EditorConfig/.gitattributes b/EthanBrown.SublimeText2.GitPackages/tools/PackageCache/EditorConfig/.gitattributes new file mode 100644 index 0000000..176a458 --- /dev/null +++ b/EthanBrown.SublimeText2.GitPackages/tools/PackageCache/EditorConfig/.gitattributes @@ -0,0 +1 @@ +* text=auto diff --git a/EthanBrown.SublimeText2.GitPackages/tools/PackageCache/EditorConfig/EditorConfig.py b/EthanBrown.SublimeText2.GitPackages/tools/PackageCache/EditorConfig/EditorConfig.py new file mode 100644 index 0000000..54d2ae7 --- /dev/null +++ b/EthanBrown.SublimeText2.GitPackages/tools/PackageCache/EditorConfig/EditorConfig.py @@ -0,0 +1,71 @@ +import sublime_plugin +from editorconfig import get_properties, EditorConfigError + + +LINE_ENDINGS = { + 'lf': 'unix', + 'crlf': 'windows', + 'cr': 'cr' +} + +CHARSETS = { + 'latin1': 'Western (ISO 8859-1)', + 'utf-8': 'utf-8', + 'utf-8-bom': 'utf-8 with bom', + 'utf-16be': 'utf-16 be', + 'utf-16le': 'utf-16 le' +} + +class EditorConfig(sublime_plugin.EventListener): + def on_load(self, view): + self.init(view, False) + + def on_pre_save(self, view): + self.init(view, True) + + def init(self, view, pre_save): + path = view.file_name() + if not path: + return + try: + config = get_properties(path) + except EditorConfigError: + print 'Error occurred while getting EditorConfig properties' + else: + if config: + if pre_save: + self.apply_charset(view, config) + else: + self.apply_config(view, config) + + def apply_charset(self, view, config): + charset = config.get('charset') + if charset in CHARSETS: + view.set_encoding(CHARSETS[charset]) + + def apply_config(self, view, config): + settings = view.settings() + indent_style = config.get('indent_style') + indent_size = config.get('indent_size') + end_of_line = config.get('end_of_line') + trim_trailing_whitespace = config.get('trim_trailing_whitespace') + insert_final_newline = config.get('insert_final_newline') + if indent_style == 'space': + settings.set('translate_tabs_to_spaces', True) + elif indent_style == 'tab': + settings.set('translate_tabs_to_spaces', False) + if indent_size: + try: + settings.set('tab_size', int(indent_size)) + except ValueError: + pass + if end_of_line in LINE_ENDINGS: + view.set_line_endings(LINE_ENDINGS[end_of_line]) + if trim_trailing_whitespace == 'true': + settings.set('trim_trailing_white_space_on_save', True) + elif trim_trailing_whitespace == 'false': + settings.set('trim_trailing_white_space_on_save', False) + if insert_final_newline == 'true': + settings.set('ensure_newline_at_eof_on_save', True) + elif insert_final_newline == 'false': + settings.set('ensure_newline_at_eof_on_save', False) diff --git a/EthanBrown.SublimeText2.GitPackages/tools/PackageCache/EditorConfig/editorconfig/__init__.py b/EthanBrown.SublimeText2.GitPackages/tools/PackageCache/EditorConfig/editorconfig/__init__.py new file mode 100644 index 0000000..e3a577a --- /dev/null +++ b/EthanBrown.SublimeText2.GitPackages/tools/PackageCache/EditorConfig/editorconfig/__init__.py @@ -0,0 +1,19 @@ +"""EditorConfig Python Core""" + +from editorconfig.versiontools import join_version + +VERSION = (0, 11, 1, "final") + +__all__ = ['get_properties', 'EditorConfigError', 'exceptions'] + +__version__ = join_version(VERSION) + + +def get_properties(filename): + """Locate and parse EditorConfig files for the given filename""" + handler = EditorConfigHandler(filename) + return handler.get_configurations() + + +from editorconfig.handler import EditorConfigHandler +from editorconfig.exceptions import * diff --git a/EthanBrown.SublimeText2.GitPackages/tools/PackageCache/EditorConfig/editorconfig/compat.py b/EthanBrown.SublimeText2.GitPackages/tools/PackageCache/EditorConfig/editorconfig/compat.py new file mode 100644 index 0000000..ebd0405 --- /dev/null +++ b/EthanBrown.SublimeText2.GitPackages/tools/PackageCache/EditorConfig/editorconfig/compat.py @@ -0,0 +1,18 @@ +"""EditorConfig Python2/Python3/Jython compatibility utilities""" +import sys +import types + +__all__ = ['slice', 'u'] + + +if sys.version_info[0] == 2: + slice = types.SliceType +else: + slice = slice + + +if sys.version_info[0] == 2: + import codecs + u = lambda s: codecs.unicode_escape_decode(s)[0] +else: + u = lambda s: s diff --git a/EthanBrown.SublimeText2.GitPackages/tools/PackageCache/EditorConfig/editorconfig/exceptions.py b/EthanBrown.SublimeText2.GitPackages/tools/PackageCache/EditorConfig/editorconfig/exceptions.py new file mode 100644 index 0000000..545732b --- /dev/null +++ b/EthanBrown.SublimeText2.GitPackages/tools/PackageCache/EditorConfig/editorconfig/exceptions.py @@ -0,0 +1,27 @@ +"""EditorConfig exception classes + +Licensed under PSF License (see LICENSE.txt file). + +""" + + +class EditorConfigError(Exception): + """Parent class of all exceptions raised by EditorConfig""" + + +try: + from ConfigParser import ParsingError as _ParsingError +except: + from configparser import ParsingError as _ParsingError + + +class ParsingError(_ParsingError, EditorConfigError): + """Error raised if an EditorConfig file could not be parsed""" + + +class PathError(ValueError, EditorConfigError): + """Error raised if invalid filepath is specified""" + + +class VersionError(ValueError, EditorConfigError): + """Error raised if invalid version number is specified""" diff --git a/EthanBrown.SublimeText2.GitPackages/tools/PackageCache/EditorConfig/editorconfig/fnmatch.py b/EthanBrown.SublimeText2.GitPackages/tools/PackageCache/EditorConfig/editorconfig/fnmatch.py new file mode 100644 index 0000000..a1d5f10 --- /dev/null +++ b/EthanBrown.SublimeText2.GitPackages/tools/PackageCache/EditorConfig/editorconfig/fnmatch.py @@ -0,0 +1,126 @@ +"""Filename matching with shell patterns. + +fnmatch(FILENAME, PATTERN) matches according to the local convention. +fnmatchcase(FILENAME, PATTERN) always takes case in account. + +The functions operate by translating the pattern into a regular +expression. They cache the compiled regular expressions for speed. + +The function translate(PATTERN) returns a regular expression +corresponding to PATTERN. (It does not compile it.) + +Based on code from fnmatch.py file distributed with Python 2.6. + +Licensed under PSF License (see LICENSE.txt file). + +Changes to original fnmatch module: +- translate function supports ``*`` and ``**`` similarly to fnmatch C library +""" + +import os +import re + +__all__ = ["fnmatch", "fnmatchcase", "translate"] + +_cache = {} + + +def fnmatch(name, pat): + """Test whether FILENAME matches PATTERN. + + Patterns are Unix shell style: + + - ``*`` matches everything except path separator + - ``**`` matches everything + - ``?`` matches any single character + - ``[seq]`` matches any character in seq + - ``[!seq]`` matches any char not in seq + - ``{s1,s2,s3}`` matches any of the strings given (separated by commas) + + An initial period in FILENAME is not special. + Both FILENAME and PATTERN are first case-normalized + if the operating system requires it. + If you don't want this, use fnmatchcase(FILENAME, PATTERN). + """ + + name = os.path.normcase(name).replace(os.sep, "/") + return fnmatchcase(name, pat) + + +def fnmatchcase(name, pat): + """Test whether FILENAME matches PATTERN, including case. + + This is a version of fnmatch() which doesn't case-normalize + its arguments. + """ + + if not pat in _cache: + res = translate(pat) + _cache[pat] = re.compile(res) + return _cache[pat].match(name) is not None + + +def translate(pat): + """Translate a shell PATTERN to a regular expression. + + There is no way to quote meta-characters. + """ + + i, n = 0, len(pat) + res = '' + escaped = False + while i < n: + c = pat[i] + i = i + 1 + if c == '*': + j = i + if j < n and pat[j] == '*': + res = res + '.*' + else: + res = res + '[^/]*' + elif c == '?': + res = res + '.' + elif c == '[': + j = i + if j < n and pat[j] == '!': + j = j + 1 + if j < n and pat[j] == ']': + j = j + 1 + while j < n and (pat[j] != ']' or escaped): + escaped = pat[j] == '\\' and not escaped + j = j + 1 + if j >= n: + res = res + '\\[' + else: + stuff = pat[i:j] + i = j + 1 + if stuff[0] == '!': + stuff = '^' + stuff[1:] + elif stuff[0] == '^': + stuff = '\\' + stuff + res = '%s[%s]' % (res, stuff) + elif c == '{': + j = i + groups = [] + while j < n and pat[j] != '}': + k = j + while k < n and (pat[k] not in (',', '}') or escaped): + escaped = pat[k] == '\\' and not escaped + k = k + 1 + group = pat[j:k] + for char in (',', '}', '\\'): + group = group.replace('\\' + char, char) + groups.append(group) + j = k + if j < n and pat[j] == ',': + j = j + 1 + if j < n and pat[j] == '}': + groups.append('') + if j >= n or len(groups) < 2: + res = res + '\\{' + else: + res = '%s(%s)' % (res, '|'.join(map(re.escape, groups))) + i = j + 1 + else: + res = res + re.escape(c) + return res + '\Z(?ms)' diff --git a/EthanBrown.SublimeText2.GitPackages/tools/PackageCache/EditorConfig/editorconfig/handler.py b/EthanBrown.SublimeText2.GitPackages/tools/PackageCache/EditorConfig/editorconfig/handler.py new file mode 100644 index 0000000..6bab2be --- /dev/null +++ b/EthanBrown.SublimeText2.GitPackages/tools/PackageCache/EditorConfig/editorconfig/handler.py @@ -0,0 +1,125 @@ +"""EditorConfig file handler + +Provides ``EditorConfigHandler`` class for locating and parsing +EditorConfig files relevant to a given filepath. + +Licensed under PSF License (see LICENSE.txt file). + +""" + +import os + +from editorconfig import VERSION +from editorconfig.ini import EditorConfigParser +from editorconfig.exceptions import PathError, VersionError + + +__all__ = ['EditorConfigHandler'] + + +def get_filenames(path, filename): + """Yield full filepath for filename in each directory in and above path""" + path_list = [] + while True: + path_list.append(os.path.join(path, filename)) + newpath = os.path.dirname(path) + if path == newpath: + break + path = newpath + return path_list + + +class EditorConfigHandler(object): + + """ + Allows locating and parsing of EditorConfig files for given filename + + In addition to the constructor a single public method is provided, + ``get_configurations`` which returns the EditorConfig options for + the ``filepath`` specified to the constructor. + + """ + + def __init__(self, filepath, conf_filename='.editorconfig', version=None): + """Create EditorConfigHandler for matching given filepath""" + self.filepath = filepath + self.conf_filename = conf_filename + self.version = version + self.options = None + + def get_configurations(self): + + """ + Find EditorConfig files and return all options matching filepath + + Special exceptions that may be raised by this function include: + + - ``VersionError``: self.version is invalid EditorConfig version + - ``PathError``: self.filepath is not a valid absolute filepath + - ``ParsingError``: improperly formatted EditorConfig file found + + """ + + self.check_assertions() + path, filename = os.path.split(self.filepath) + conf_files = get_filenames(path, self.conf_filename) + + # Attempt to find and parse every EditorConfig file in filetree + for filename in conf_files: + parser = EditorConfigParser(self.filepath) + parser.read(filename) + + # Merge new EditorConfig file's options into current options + old_options = self.options + self.options = parser.options + if old_options: + self.options.update(old_options) + + # Stop parsing if parsed file has a ``root = true`` option + if parser.root_file: + break + + self.preprocess_values() + return self.options + + def check_assertions(self): + + """Raise error if filepath or version have invalid values""" + + # Raise ``PathError`` if filepath isn't an absolute path + if not os.path.isabs(self.filepath): + raise PathError("Input file must be a full path name.") + + # Raise ``VersionError`` if version specified is greater than current + if self.version is not None and self.version[:3] > VERSION[:3]: + raise VersionError( + "Required version is greater than the current version.") + + def preprocess_values(self): + + """Preprocess option values for consumption by plugins""" + + opts = self.options + + # Lowercase option value for certain options + for name in ["end_of_line", "indent_style", "indent_size", + "insert_final_newline", "trim_trailing_whitespace", "charset"]: + if name in opts: + opts[name] = opts[name].lower() + + # Set indent_size to "tab" if indent_size is unspecified and + # indent_style is set to "tab". + if (opts.get("indent_style") == "tab" and + not "indent_size" in opts and self.version >= VERSION[:3]): + opts["indent_size"] = "tab" + + # Set tab_width to indent_size if indent_size is specified and + # tab_width is unspecified + if ("indent_size" in opts and "tab_width" not in opts and + opts["indent_size"] != "tab"): + opts["tab_width"] = opts["indent_size"] + + # Set indent_size to tab_width if indent_size is "tab" + if ("indent_size" in opts and "tab_width" in opts and + opts["indent_size"] == "tab"): + opts["indent_size"] = opts["tab_width"] diff --git a/EthanBrown.SublimeText2.GitPackages/tools/PackageCache/EditorConfig/editorconfig/ini.py b/EthanBrown.SublimeText2.GitPackages/tools/PackageCache/EditorConfig/editorconfig/ini.py new file mode 100644 index 0000000..3f58fed --- /dev/null +++ b/EthanBrown.SublimeText2.GitPackages/tools/PackageCache/EditorConfig/editorconfig/ini.py @@ -0,0 +1,150 @@ +"""EditorConfig file parser + +Based on code from ConfigParser.py file distributed with Python 2.6. + +Licensed under PSF License (see LICENSE.txt file). + +Changes to original ConfigParser: + +- Special characters can be used in section names +- Octothorpe can be used for comments (not just at beginning of line) +- Only track INI options in sections that match target filename +- Stop parsing files with when ``root = true`` is found + +""" + +import re +from codecs import open +import posixpath +from os import sep +from os.path import normcase, dirname + +from editorconfig.exceptions import ParsingError +from editorconfig.fnmatch import fnmatch +from editorconfig.odict import OrderedDict +from editorconfig.compat import u + + +__all__ = ["ParsingError", "EditorConfigParser"] + + +class EditorConfigParser(object): + + """Parser for EditorConfig-style configuration files + + Based on RawConfigParser from ConfigParser.py in Python 2.6. + """ + + # Regular expressions for parsing section headers and options. + # Allow ``]`` and escaped ``;`` and ``#`` characters in section headers + SECTCRE = re.compile( + r'\s*\[' # [ + r'(?P
([^#;]|\\#|\\;)+)' # very permissive! + r'\]' # ] + ) + # Regular expression for parsing option name/values. + # Allow any amount of whitespaces, followed by separator + # (either ``:`` or ``=``), followed by any amount of whitespace and then + # any characters to eol + OPTCRE = re.compile( + r'\s*(?P'+item.namePretty()+'') + + if len(items) > 0: + sublime.set_clipboard("\n".join(items)); + if len(items) > 1 : + sublime.status_message("Items copied") + else : + sublime.status_message("Item copied") + + def is_enabled(self, paths = []): + return SideBarSelection(paths).len() > 0 and SideBarSelection(paths).hasItemsUnderProject() + +class SideBarCopyTagImgCommand(sublime_plugin.WindowCommand): + + def run(self, paths = []): + items = [] + for item in SideBarSelection(paths).getSelectedImages(): + try: + image_type, width, height = self.getImageInfo(item.contentBinary()) + items.append('') + except: + items.append('') + if len(items) > 0: + sublime.set_clipboard("\n".join(items)); + if len(items) > 1 : + sublime.status_message("Items copied") + else : + sublime.status_message("Item copied") + + #Project:http://code.google.com/p/bfg-pages/ + #License:http://www.opensource.org/licenses/bsd-license.php + def getImageInfo(self, data): + import StringIO + import struct + data = str(data) + size = len(data) + height = -1 + width = -1 + content_type = '' + + # handle GIFs + if (size >= 10) and data[:6] in ('GIF87a', 'GIF89a'): + # Check to see if content_type is correct + content_type = 'image/gif' + w, h = struct.unpack("= 24) and data.startswith('\211PNG\r\n\032\n') + and (data[12:16] == 'IHDR')): + content_type = 'image/png' + w, h = struct.unpack(">LL", data[16:24]) + width = int(w) + height = int(h) + + # Maybe this is for an older PNG version. + elif (size >= 16) and data.startswith('\211PNG\r\n\032\n'): + # Check to see if we have the right content type + content_type = 'image/png' + w, h = struct.unpack(">LL", data[8:16]) + width = int(w) + height = int(h) + + # handle JPEGs + elif (size >= 2) and data.startswith('\377\330'): + content_type = 'image/jpeg' + jpeg = StringIO.StringIO(data) + jpeg.read(2) + b = jpeg.read(1) + try: + while (b and ord(b) != 0xDA): + while (ord(b) != 0xFF): b = jpeg.read(1) + while (ord(b) == 0xFF): b = jpeg.read(1) + if (ord(b) >= 0xC0 and ord(b) <= 0xC3): + jpeg.read(3) + h, w = struct.unpack(">HH", jpeg.read(4)) + break + else: + jpeg.read(int(struct.unpack(">H", jpeg.read(2))[0])-2) + b = jpeg.read(1) + width = int(w) + height = int(h) + except struct.error: + pass + except ValueError: + pass + return content_type, width, height + + def is_enabled(self, paths = []): + return SideBarSelection(paths).hasImages() and SideBarSelection(paths).hasItemsUnderProject() + +class SideBarCopyTagStyleCommand(sublime_plugin.WindowCommand): + def run(self, paths = []): + items = [] + for item in SideBarSelection(paths).getSelectedFilesWithExtension('css'): + items.append('') + + if len(items) > 0: + sublime.set_clipboard("\n".join(items)); + if len(items) > 1 : + sublime.status_message("Items copied") + else : + sublime.status_message("Item copied") + + def is_enabled(self, paths = []): + return SideBarSelection(paths).hasFilesWithExtension('css') and SideBarSelection(paths).hasItemsUnderProject() + +class SideBarCopyTagScriptCommand(sublime_plugin.WindowCommand): + def run(self, paths = []): + items = [] + for item in SideBarSelection(paths).getSelectedFilesWithExtension('js'): + items.append('') + + if len(items) > 0: + sublime.set_clipboard("\n".join(items)); + if len(items) > 1 : + sublime.status_message("Items copied") + else : + sublime.status_message("Item copied") + + def is_enabled(self, paths = []): + return SideBarSelection(paths).hasFilesWithExtension('js') and SideBarSelection(paths).hasItemsUnderProject() + +class SideBarCopyProjectDirectoriesCommand(sublime_plugin.WindowCommand): + def run(self, paths = []): + items = [] + for directory in SideBarProject().getDirectories(): + items.append(directory) + + if len(items) > 0: + sublime.set_clipboard("\n".join(items)); + if len(items) > 1 : + sublime.status_message("Items copied") + else : + sublime.status_message("Item copied") + + def is_enabled(self, paths = []): + return True + +class SideBarCopyContentUtf8Command(sublime_plugin.WindowCommand): + def run(self, paths = []): + items = [] + for item in SideBarSelection(paths).getSelectedFiles(): + items.append(item.contentUTF8()) + + if len(items) > 0: + sublime.set_clipboard("\n".join(items)); + if len(items) > 1 : + sublime.status_message("Items content copied") + else : + sublime.status_message("Item content copied") + + def is_enabled(self, paths = []): + return SideBarSelection(paths).hasFiles() + +class SideBarCopyContentBase64Command(sublime_plugin.WindowCommand): + def run(self, paths = []): + items = [] + for item in SideBarSelection(paths).getSelectedFiles(): + items.append(item.contentBase64()) + + if len(items) > 0: + sublime.set_clipboard("\n".join(items)); + if len(items) > 1 : + sublime.status_message("Items content copied") + else : + sublime.status_message("Item content copied") + + def is_enabled(self, paths = []): + return SideBarSelection(paths).hasFiles() + +class SideBarCopyUrlCommand(sublime_plugin.WindowCommand): + def run(self, paths = []): + items = [] + project = SideBarProject() + url = project.getPreference('url_production') + if url: + if url[-1:] != '/': + url = url+'/' + for item in SideBarSelection(paths).getSelectedItems(): + if item.isUnderCurrentProject(): + items.append(url + item.pathRelativeFromProjectEncoded()) + + if len(items) > 0: + sublime.set_clipboard("\n".join(items)); + if len(items) > 1 : + sublime.status_message("Items URL copied") + else : + sublime.status_message("Item URL copied") + + def is_enabled(self, paths = []): + return SideBarSelection(paths).hasItemsUnderProject() + +class SideBarDuplicateCommand(sublime_plugin.WindowCommand): + def run(self, paths = [], new = False): + import functools + self.window.run_command('hide_panel'); + self.window.show_input_panel("Duplicate As:", new or SideBarSelection(paths).getSelectedItems()[0].path(), functools.partial(self.on_done, SideBarSelection(paths).getSelectedItems()[0].path()), None, None) + + def on_done(self, old, new): + item = SideBarItem(old, os.path.isdir(old)) + try: + if not item.copy(new): + sublime.error_message("Unable to duplicate, destination exists.") + self.run([old], new) + return + except: + sublime.error_message("Unable to copy:\n\n"+old+"\n\nto\n\n"+new) + self.run([old], new) + return + item = SideBarItem(new, os.path.isdir(new)) + if item.isFile(): + item.edit(); + SideBarProject().refresh(); + + def is_enabled(self, paths = []): + return SideBarSelection(paths).len() == 1 and SideBarSelection(paths).hasProjectDirectories() == False + +class SideBarRenameCommand(sublime_plugin.WindowCommand): + def run(self, paths = [], newLeaf = False): + import functools + branch, leaf = os.path.split(SideBarSelection(paths).getSelectedItems()[0].path()) + self.window.run_command('hide_panel'); + self.window.show_input_panel("New Name:", newLeaf or leaf, functools.partial(self.on_done, SideBarSelection(paths).getSelectedItems()[0].path(), branch), None, None) + + def on_done(self, old, branch, leaf): + self.window.run_command('hide_panel'); + leaf = leaf.strip(); + new = os.path.join(branch, leaf) + item = SideBarItem(old, os.path.isdir(old)) + try: + if not item.move(new): + sublime.error_message("Unable to rename, destination exists.") + self.run([old], leaf) + return + except: + sublime.error_message("Unable to rename:\n\n"+old+"\n\nto\n\n"+new) + self.run([old], leaf) + raise + return + SideBarProject().refresh(); + + def is_enabled(self, paths = []): + return SideBarSelection(paths).len() == 1 and SideBarSelection(paths).hasProjectDirectories() == False + +class SideBarMoveCommand(sublime_plugin.WindowCommand): + def run(self, paths = [], new = False): + import functools + self.window.run_command('hide_panel'); + self.window.show_input_panel("New Location:", new or SideBarSelection(paths).getSelectedItems()[0].path(), functools.partial(self.on_done, SideBarSelection(paths).getSelectedItems()[0].path()), None, None) + + def on_done(self, old, new): + item = SideBarItem(old, os.path.isdir(old)) + try: + if not item.move(new): + sublime.error_message("Unable to move, destination exists.") + self.run([old], new) + return + except: + sublime.error_message("Unable to move:\n\n"+old+"\n\nto\n\n"+new) + self.run([old], new) + return + SideBarProject().refresh(); + + def is_enabled(self, paths = []): + return SideBarSelection(paths).len() == 1 and SideBarSelection(paths).hasProjectDirectories() == False + +class SideBarDeleteCommand(sublime_plugin.WindowCommand): + def run(self, paths = [], confirmed = 'False'): + + if confirmed == 'False' and s.get('confirm_before_deleting', True): + if sublime.platform() == 'osx': + if sublime.ok_cancel_dialog('delete the selected items?'): + self.run(paths, 'True') + else: + self.confirm([item.path() for item in SideBarSelection(paths).getSelectedItems()], [item.pathWithoutProject() for item in SideBarSelection(paths).getSelectedItems()]) + else: + try: + for item in SideBarSelection(paths).getSelectedItemsWithoutChildItems(): + if s.get('close_affected_buffers_when_deleting_even_if_dirty', False): + item.close_associated_buffers() + send2trash(item.path()) + SideBarProject().refresh(); + except: + import functools + self.window.show_input_panel("BUG!", '', '', None, None) + self.window.run_command('hide_panel'); + self.window.show_input_panel("Permanently Delete:", SideBarSelection(paths).getSelectedItems()[0].path(), functools.partial(self.on_done, SideBarSelection(paths).getSelectedItems()[0].path()), None, None) + + def confirm(self, paths, display_paths): + import functools + window = sublime.active_window() + window.show_input_panel("BUG!", '', '', None, None) + window.run_command('hide_panel'); + + yes = [] + yes.append('Yes, delete the selected items.'); + for item in display_paths: + yes.append(item); + + no = [] + no.append('No'); + no.append('Cancel the operation.'); + if sublime.platform() == 'osx': + sublime.set_timeout(lambda:window.show_quick_panel([yes, no], functools.partial(self.on_confirm, paths)), 200); + else: + window.show_quick_panel([yes, no], functools.partial(self.on_confirm, paths)) + + def on_confirm(self, paths, result): + if result != -1: + if result == 0: + self.run(paths, 'True') + + def on_done(self, old, new): + if s.get('close_affected_buffers_when_deleting_even_if_dirty', False): + item = SideBarItem(new, os.path.isdir(new)) + item.close_associated_buffers() + self.remove(new) + SideBarProject().refresh(); + + def remove(self, path): + if os.path.isfile(path) or os.path.islink(path): + self.remove_safe_file(path) + else: + for content in os.listdir(path): + file = os.path.join(path, content) + if os.path.isfile(file) or os.path.islink(file): + self.remove_safe_file(file) + else: + self.remove(file) + self.remove_safe_dir(path) + + def remove_safe_file(self, path): + if not SideBarSelection().isNone(path): + try: + os.remove(path) + except: + print "Unable to remove file:\n\n"+path + else: + print 'path is none' + print path + + def remove_safe_dir(self, path): + if not SideBarSelection().isNone(path): + try: + os.rmdir(path) + except: + print "Unable to remove folder:\n\n"+path + + def is_enabled(self, paths = []): + return SideBarSelection(paths).len() > 0 and SideBarSelection(paths).hasProjectDirectories() == False + + +class SideBarEmptyCommand(sublime_plugin.WindowCommand): + def run(self, paths = [], confirmed = 'False'): + + if confirmed == 'False' and s.get('confirm_before_deleting', True): + if sublime.platform() == 'osx': + if sublime.ok_cancel_dialog('empty the content of the folder?'): + self.run(paths, 'True') + else: + self.confirm([item.path() for item in SideBarSelection(paths).getSelectedDirectoriesOrDirnames()], [item.pathWithoutProject() for item in SideBarSelection(paths).getSelectedDirectoriesOrDirnames()]) + else: + try: + for item in SideBarSelection(paths).getSelectedDirectoriesOrDirnames(): + for content in os.listdir(item.path()): + file = os.path.join(item.path(), content) + if not SideBarSelection().isNone(file): + send2trash(file) + if s.get('close_affected_buffers_when_deleting_even_if_dirty', False): + item.close_associated_buffers() + except: + pass + SideBarProject().refresh(); + + def confirm(self, paths, display_paths): + import functools + window = sublime.active_window() + window.show_input_panel("BUG!", '', '', None, None) + window.run_command('hide_panel'); + + yes = [] + yes.append('Yes, empty the selected items.'); + for item in display_paths: + yes.append(item); + + no = [] + no.append('No'); + no.append('Cancel the operation.'); + if sublime.platform() == 'osx': + sublime.set_timeout(lambda:window.show_quick_panel([yes, no], functools.partial(self.on_confirm, paths)), 200); + else: + window.show_quick_panel([yes, no], functools.partial(self.on_confirm, paths)) + + def on_confirm(self, paths, result): + if result != -1: + if result == 0: + self.run(paths, 'True') + + def is_enabled(self, paths = []): + return SideBarSelection(paths).len() > 0 + + def is_visible(self, paths =[]): + return not s.get('disabled_menuitem_empty') + +class SideBarRevealCommand(sublime_plugin.WindowCommand): + def run(self, paths = []): + for item in SideBarSelection(paths).getSelectedItems(): + item.reveal() + + def is_enabled(self, paths = []): + return SideBarSelection(paths).len() > 0 + +class SideBarProjectOpenFileCommand(sublime_plugin.WindowCommand): + def run(self, paths = []): + project = SideBarProject() + if project.hasOpenedProject(): + SideBarItem(project.getProjectFile(), False).edit(); + +class SideBarProjectOpenProjectPreviewUrlsFileCommand(sublime_plugin.WindowCommand): + def run(self, paths = []): + SideBarItem(sublime.packages_path()+'/../Settings/SideBarEnhancements.json', False).edit(); + +class SideBarProjectItemAddCommand(sublime_plugin.WindowCommand): + def run(self, paths = []): + project = SideBarProject() + if project.hasOpenedProject(): + for item in SideBarSelection(paths).getSelectedDirectories(): + project.rootAdd(item.path()) + + def is_enabled(self, paths = []): + return SideBarSelection(paths).hasDirectories() + +class SideBarProjectItemExcludeCommand(sublime_plugin.WindowCommand): + def run(self, paths = []): + project = SideBarProject() + if project.hasOpenedProject(): + for item in SideBarSelection(paths).getSelectedItems(): + if item.isDirectory(): + project.excludeDirectory(item.path()) + else: + project.excludeFile(item.path()) + + def is_enabled(self, paths = []): + return SideBarSelection(paths).len() > 0 + +class SideBarOpenInBrowserCommand(sublime_plugin.WindowCommand): + def run(self, paths = [], type = False): + + browser = s.get("default_browser") + if browser == '': + browser = 'firefox' + + if type == False or type == 'testing': + type = 'url_testing' + elif type == 'production': + type = 'url_production' + else: + type = 'url_testing' + + for item in SideBarSelection(paths).getSelectedItems(): + if item.projectURL(type): + self.try_open(item.projectURL(type), browser) + else: + self.try_open(item.uri(), browser) + + # def run(self, paths = [], type = False): + # import webbrowser + # try: + # browser = webbrowser.get(s.get("default_browser")) + # except: + # browser = webbrowser + + # if type == False or type == 'testing': + # type = 'url_testing' + # elif type == 'production': + # type = 'url_production' + # else: + # type = 'url_testing' + + # for item in SideBarSelection(paths).getSelectedItems(): + # if item.projectURL(type): + # browser.open_new_tab(item.projectURL(type) + item.pathRelativeFromProjectEncoded()) + # else: + # browser.open_new_tab(item.uri()) + + def try_open(self, url, browser): + import subprocess + + browser = browser.lower().strip(); + items = [] + + if browser == 'chrome': + if sublime.platform() == 'osx': + items.extend(['open']) + commands = ['-a', '/Applications/Google Chrome.app', url] + elif sublime.platform() == 'windows': + # read local app data path from registry + aKey = _winreg.OpenKey(_winreg.HKEY_CURRENT_USER, r"Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders") + reg_value, reg_type = _winreg.QueryValueEx (aKey, "Local AppData") + + if s.get('portable_browser') != '': + items.extend([s.get('portable_browser')]) + items.extend([ + '%HOMEPATH%\\AppData\\Local\\Google\\Chrome\\Application\\chrome.exe' + + ,reg_value+'\\Chrome\\Application\\chrome.exe' + ,reg_value+'\\Google\\Chrome\\Application\\chrome.exe' + ,'%HOMEPATH%\\Google\\Chrome\\Application\\chrome.exe' + ,'%PROGRAMFILES%\\Google\\Chrome\\Application\\chrome.exe' + ,'%PROGRAMFILES(X86)%\\Google\\Chrome\\Application\\chrome.exe' + ,'%USERPROFILE%\\Local\ Settings\\Application\ Data\\Google\\Chrome\\chrome.exe' + ,'%HOMEPATH%\\Chromium\\Application\\chrome.exe' + ,'%PROGRAMFILES%\\Chromium\\Application\\chrome.exe' + ,'%PROGRAMFILES(X86)%\\Chromium\\Application\\chrome.exe' + ,'%HOMEPATH%\\Local\ Settings\\Application\ Data\\Google\\Chrome\\Application\\chrome.exe' + ,'%HOMEPATH%\\Local Settings\\Application Data\\Google\\Chrome\\Application\\chrome.exe' + ,'chrome.exe' + ]) + + + commands = ['-new-tab', url] + else: + + if s.get('portable_browser') != '': + items.extend([s.get('portable_browser')]) + items.extend([ + '/usr/bin/google-chrome' + ,'chrome' + ,'google-chrome' + ]) + commands = ['-new-tab', url] + + elif browser == 'chromium': + if sublime.platform() == 'osx': + items.extend(['open']) + commands = ['-a', '/Applications/Chromium.app', url] + elif sublime.platform() == 'windows': + # read local app data path from registry + aKey = _winreg.OpenKey(_winreg.HKEY_CURRENT_USER, r"Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders") + reg_value, reg_type = _winreg.QueryValueEx (aKey, "Local AppData") + if s.get('portable_browser') != '': + items.extend([s.get('portable_browser')]) + items.extend([ + '%HOMEPATH%\\AppData\\Local\\Google\\Chrome SxS\\Application\\chrome.exe' + + , reg_value+'\\Chromium\\Application\\chromium.exe' + ,'%USERPROFILE%\\Local Settings\\Application Data\\Google\\Chrome\\chromium.exe' + ,'%USERPROFILE%\\Local\ Settings\\Application\ Data\\Google\\Chrome\\chromium.exe' + ,'%HOMEPATH%\\Chromium\\Application\\chromium.exe' + ,'%PROGRAMFILES%\\Chromium\\Application\\chromium.exe' + ,'%PROGRAMFILES(X86)%\\Chromium\\Application\\chromium.exe' + ,'%HOMEPATH%\\Local Settings\\Application\ Data\\Google\\Chrome\\Application\\chromium.exe' + ,'%HOMEPATH%\\Local Settings\\Application Data\\Google\\Chrome\\Application\\chromium.exe' + ,'chromium.exe' + + , reg_value+'\\Chromium\\Application\\chrome.exe' + ,'%USERPROFILE%\\Local Settings\\Application Data\\Google\\Chrome\\chrome.exe' + ,'%USERPROFILE%\\Local\ Settings\\Application\ Data\\Google\\Chrome\\chrome.exe' + ,'%HOMEPATH%\\Chromium\\Application\\chrome.exe' + ,'%PROGRAMFILES%\\Chromium\\Application\\chrome.exe' + ,'%PROGRAMFILES(X86)%\\Chromium\\Application\\chrome.exe' + ,'%HOMEPATH%\\Local\ Settings\\Application\ Data\\Google\\Chrome\\Application\\chrome.exe' + ,'%HOMEPATH%\\Local Settings\\Application Data\\Google\\Chrome\\Application\\chrome.exe' + ,'chrome.exe' + + ]) + commands = ['-new-tab', url] + else: + if s.get('portable_browser') != '': + items.extend([s.get('portable_browser')]) + items.extend([ + '/usr/bin/chromium' + ,'chromium' + ]) + commands = ['-new-tab', url] + elif browser == 'firefox': + if sublime.platform() == 'osx': + items.extend(['open']) + commands = ['-a', '/Applications/Firefox.app', url] + else: + if s.get('portable_browser') != '': + items.extend([s.get('portable_browser')]) + items.extend([ + '/usr/bin/firefox' + + ,'%PROGRAMFILES%\\Nightly\\firefox.exe' + ,'%PROGRAMFILES(X86)%\\Nightly\\firefox.exe' + + ,'%PROGRAMFILES%\\Mozilla Firefox\\firefox.exe' + ,'%PROGRAMFILES(X86)%\\Mozilla Firefox\\firefox.exe' + + ,'firefox' + ,'firefox.exe' + ]) + commands = ['-new-tab', url] + elif browser == 'opera': + if sublime.platform() == 'osx': + items.extend(['open']) + commands = ['-a', '/Applications/Opera.app', url] + else: + if s.get('portable_browser') != '': + items.extend([s.get('portable_browser')]) + items.extend([ + '/usr/bin/opera' + ,'/usr/bin/opera-next' + ,'/usr/bin/operamobile' + + ,'%PROGRAMFILES%\\Opera\\opera.exe' + ,'%PROGRAMFILES(X86)%\\Opera\\opera.exe' + + ,'%PROGRAMFILES%\\Opera Next\\opera.exe' + ,'%PROGRAMFILES(X86)%\\Opera Next\\opera.exe' + + ,'%PROGRAMFILES%\\Opera Mobile Emulator\\OperaMobileEmu.exe' + ,'%PROGRAMFILES(X86)%\\Opera Mobile Emulator\\OperaMobileEmu.exe' + + ,'opera' + ,'opera.exe' + ]) + commands = ['-newtab', url] + elif browser == 'safari': + if sublime.platform() == 'osx': + items.extend(['open']) + commands = ['-a', 'Safari', url] + else: + if s.get('portable_browser') != '': + items.extend([s.get('portable_browser')]) + items.extend([ + '/usr/bin/safari' + + ,'%PROGRAMFILES%\\Safari\\Safari.exe' + ,'%PROGRAMFILES(X86)%\\Safari\\Safari.exe' + + ,'Safari' + ,'Safari.exe' + ]) + commands = ['-new-tab', '-url', url] + else: + sublime.error_message('Browser "'+browser+'" not found!\nUse any of the following: firefox, chrome, chromium, opera, safari') + return + + for item in items: + try: + command2 = list(commands) + command2.insert(0, expand_vars(item)) + subprocess.Popen(command2) + return + except: + try: + command2 = list(commands) + command2.insert(0, item) + subprocess.Popen(command2) + return + except: + pass + + sublime.error_message('Browser "'+browser+'" not found!\nIs installed? Which location...?') + + def is_enabled(self, paths = []): + return SideBarSelection(paths).len() > 0 + + def is_visible(self, paths =[]): + return not s.get('disabled_menuitem_open_in_browser') + +class SideBarOpenInNewWindowCommand(sublime_plugin.WindowCommand): + def run(self, paths = []): + import subprocess + for item in SideBarSelection(paths).getSelectedDirectoriesOrDirnames(): + if sublime.platform() == 'osx': + try: + subprocess.Popen(['subl', '.'], cwd=item.pathSystem()) + except: + try: + subprocess.Popen(['sublime', '.'], cwd=item.pathSystem()) + except: + subprocess.Popen(['/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl', '.'], cwd=item.pathSystem()) + elif sublime.platform() == 'windows': + try: + subprocess.Popen(['subl', '.'], cwd=item.pathSystem(), shell=True) + except: + try: + subprocess.Popen(['sublime', '.'], cwd=item.pathSystem(), shell=True) + except: + subprocess.Popen(['sublime_text.exe', '.'], cwd=item.pathSystem(), shell=True) + else: + try: + subprocess.Popen(['subl', '.'], cwd=item.pathSystem()) + except: + subprocess.Popen(['sublime', '.'], cwd=item.pathSystem()) + + def is_visible(self, paths =[]): + return not s.get('disabled_menuitem_open_in_new_window') + +class SideBarOpenWithFinderCommand(sublime_plugin.WindowCommand): + def run(self, paths = []): + import subprocess + for item in SideBarSelection(paths).getSelectedDirectoriesOrDirnames(): + subprocess.Popen(['open', item.nameSystem()], cwd=item.dirnameSystem()) + + def is_visible(self, paths =[]): + return sublime.platform() == 'osx' + +class SideBarProjectItemRemoveFolderCommand(sublime_plugin.WindowCommand): + def run(self, paths = []): + self.window.run_command('remove_folder', {"dirs":paths}) + + def is_enabled(self, paths =[]): + return SideBarSelection(paths).len() == 1 and SideBarSelection(paths).hasProjectDirectories() == True diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/StatusBarFileSize.py b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/StatusBarFileSize.py new file mode 100644 index 0000000..0c0caa7 --- /dev/null +++ b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/StatusBarFileSize.py @@ -0,0 +1,24 @@ +import sublime, sublime_plugin +from hurry.filesize import size +from os.path import getsize + +s = sublime.load_settings('Side Bar.sublime-settings') + +class StatusBarFileSize(sublime_plugin.EventListener): + + def on_load(self, v): + if s.get('statusbar_file_size') and v.file_name(): + try: + self.show(v, size(getsize(v.file_name()))) + except: + pass + + def on_post_save(self, v): + if s.get('statusbar_file_size') and v.file_name(): + try: + self.show(v, size(getsize(v.file_name()))) + except: + pass + + def show(self, v, size): + v.set_status('statusbar_file_size', size); \ No newline at end of file diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/StatusBarModifiedTime.py b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/StatusBarModifiedTime.py new file mode 100644 index 0000000..6336365 --- /dev/null +++ b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/StatusBarModifiedTime.py @@ -0,0 +1,25 @@ +import sublime, sublime_plugin, time +from os.path import getmtime + +s = sublime.load_settings('Side Bar.sublime-settings') + +class StatusBarModifiedTime(sublime_plugin.EventListener): + + def on_load(self, v): + if s.get('statusbar_modified_time') and v.file_name(): + try: + self.show(v, getmtime(v.file_name())) + except: + pass + + def on_post_save(self, v): + if s.get('statusbar_modified_time') and v.file_name(): + try: + self.show(v, getmtime(v.file_name())) + except: + pass + + def show(self, v, mtime): + v.set_status('statusbar_modified_time', time.strftime(s.get('statusbar_modified_time_format'), time.localtime(mtime))); + + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/disable_default/Side Bar Mount Point.sublime-menu.txt b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/disable_default/Side Bar Mount Point.sublime-menu.txt new file mode 100644 index 0000000..3411b67 --- /dev/null +++ b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/disable_default/Side Bar Mount Point.sublime-menu.txt @@ -0,0 +1,4 @@ +[ + { "caption": "-", "id": "folder_commands" }, + { "caption": "Remove Folder from Project", "command": "remove_folder", "args": { "dirs": []} } +] diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/disable_default/Side Bar.sublime-menu.txt b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/disable_default/Side Bar.sublime-menu.txt new file mode 100644 index 0000000..3d308b9 --- /dev/null +++ b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/disable_default/Side Bar.sublime-menu.txt @@ -0,0 +1,11 @@ +[ + { "caption": "New File", "command": "new_file_at", "args": {"dirs": []} }, + { "caption": "Rename…", "command": "rename_path", "args": {"paths": []} }, + { "caption": "Delete File", "command": "delete_file", "args": {"files": []} }, + { "caption": "Open Containing Folder…", "command": "open_containing_folder", "args": {"files": []} }, + { "caption": "-", "id": "folder_commands" }, + { "caption": "New Folder…", "command": "new_folder", "args": {"dirs": []} }, + { "caption": "Delete Folder", "command": "delete_folder", "args": {"dirs": []} }, + { "caption": "Find in Folder…", "command": "find_in_folder", "args": {"dirs": []} }, + { "caption": "-", "id": "end" } +] diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/hurry/PKG-INFO b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/hurry/PKG-INFO new file mode 100644 index 0000000..fe3aadb --- /dev/null +++ b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/hurry/PKG-INFO @@ -0,0 +1,71 @@ +Metadata-Version: 1.0 +Name: hurry.filesize +Version: 0.9 +Summary: A simple Python library for human readable file sizes (or anything sized in bytes). +Home-page: UNKNOWN +Author: Martijn Faassen, Startifact +Author-email: faassen@startifact.com +License: ZPL 2.1 +Description: hurry.filesize + ============== + + hurry.filesize a simple Python library that can take a number of bytes and + returns a human-readable string with the size in it, in kilobytes (K), + megabytes (M), etc. + + The default system it uses is "traditional", where multipliers of 1024 + increase the unit size:: + + >>> from hurry.filesize import size + >>> size(1024) + '1K' + + An alternative, slightly more verbose system:: + + >>> from hurry.filesize import alternative + >>> size(1, system=alternative) + '1 byte' + >>> size(10, system=alternative) + '10 bytes' + >>> size(1024, system=alternative) + '1 KB' + + A verbose system:: + + >>> from hurry.filesize import verbose + >>> size(10, system=verbose) + '10 bytes' + >>> size(1024, system=verbose) + '1 kilobyte' + >>> size(2000, system=verbose) + '1 kilobyte' + >>> size(3000, system=verbose) + '2 kilobytes' + >>> size(1024 * 1024, system=verbose) + '1 megabyte' + >>> size(1024 * 1024 * 3, system=verbose) + '3 megabytes' + + You can also use the SI system, where multipliers of 1000 increase the unit + size:: + + >>> from hurry.filesize import si + >>> size(1000, system=si) + '1K' + + + Changes + ======= + + 0.9 (2009-03-11) + ---------------- + + * Initial public release. + + Download + ======== + +Keywords: file size bytes +Platform: UNKNOWN +Classifier: Programming Language :: Python +Classifier: Topic :: Software Development :: Libraries :: Python Modules diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/hurry/README.txt b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/hurry/README.txt new file mode 100644 index 0000000..f5aa749 --- /dev/null +++ b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/hurry/README.txt @@ -0,0 +1,47 @@ +hurry.filesize +============== + +hurry.filesize a simple Python library that can take a number of bytes and +returns a human-readable string with the size in it, in kilobytes (K), +megabytes (M), etc. + +The default system it uses is "traditional", where multipliers of 1024 +increase the unit size:: + + >>> from hurry.filesize import size + >>> size(1024) + '1K' + +An alternative, slightly more verbose system:: + + >>> from hurry.filesize import alternative + >>> size(1, system=alternative) + '1 byte' + >>> size(10, system=alternative) + '10 bytes' + >>> size(1024, system=alternative) + '1 KB' + +A verbose system:: + + >>> from hurry.filesize import verbose + >>> size(10, system=verbose) + '10 bytes' + >>> size(1024, system=verbose) + '1 kilobyte' + >>> size(2000, system=verbose) + '1 kilobyte' + >>> size(3000, system=verbose) + '2 kilobytes' + >>> size(1024 * 1024, system=verbose) + '1 megabyte' + >>> size(1024 * 1024 * 3, system=verbose) + '3 megabytes' + +You can also use the SI system, where multipliers of 1000 increase the unit +size:: + + >>> from hurry.filesize import si + >>> size(1000, system=si) + '1K' + diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/hurry/__init__.py b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/hurry/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/hurry/filesize.py b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/hurry/filesize.py new file mode 100644 index 0000000..32065fe --- /dev/null +++ b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/hurry/filesize.py @@ -0,0 +1,110 @@ + +traditional = [ + (1024 ** 5, 'P'), + (1024 ** 4, 'T'), + (1024 ** 3, 'G'), + (1024 ** 2, 'M'), + (1024 ** 1, 'K'), + (1024 ** 0, 'B'), + ] + +alternative = [ + (1024 ** 5, ' PB'), + (1024 ** 4, ' TB'), + (1024 ** 3, ' GB'), + (1024 ** 2, ' MB'), + (1024 ** 1, ' KB'), + (1024 ** 0, (' byte', ' bytes')), + ] + +verbose = [ + (1024 ** 5, (' petabyte', ' petabytes')), + (1024 ** 4, (' terabyte', ' terabytes')), + (1024 ** 3, (' gigabyte', ' gigabytes')), + (1024 ** 2, (' megabyte', ' megabytes')), + (1024 ** 1, (' kilobyte', ' kilobytes')), + (1024 ** 0, (' byte', ' bytes')), + ] + +iec = [ + (1024 ** 5, 'Pi'), + (1024 ** 4, 'Ti'), + (1024 ** 3, 'Gi'), + (1024 ** 2, 'Mi'), + (1024 ** 1, 'Ki'), + (1024 ** 0, ''), + ] + +si = [ + (1000 ** 5, 'P'), + (1000 ** 4, 'T'), + (1000 ** 3, 'G'), + (1000 ** 2, 'M'), + (1000 ** 1, 'K'), + (1000 ** 0, 'B'), + ] + + + +def size(bytes, system=traditional): + """Human-readable file size. + + Using the traditional system, where a factor of 1024 is used:: + + >>> size(10) + '10B' + >>> size(100) + '100B' + >>> size(1000) + '1000B' + >>> size(2000) + '1K' + >>> size(10000) + '9K' + >>> size(20000) + '19K' + >>> size(100000) + '97K' + >>> size(200000) + '195K' + >>> size(1000000) + '976K' + >>> size(2000000) + '1M' + + Using the SI system, with a factor 1000:: + + >>> size(10, system=si) + '10B' + >>> size(100, system=si) + '100B' + >>> size(1000, system=si) + '1K' + >>> size(2000, system=si) + '2K' + >>> size(10000, system=si) + '10K' + >>> size(20000, system=si) + '20K' + >>> size(100000, system=si) + '100K' + >>> size(200000, system=si) + '200K' + >>> size(1000000, system=si) + '1M' + >>> size(2000000, system=si) + '2M' + + """ + for factor, suffix in system: + if bytes >= factor: + break + amount = int(bytes/factor) + if isinstance(suffix, tuple): + singular, multiple = suffix + if amount == 1: + suffix = singular + else: + suffix = multiple + return str(amount) + suffix + diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/license.txt b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/license.txt new file mode 100644 index 0000000..ed95cfe --- /dev/null +++ b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/license.txt @@ -0,0 +1,19 @@ +"None are so hopelessly enslaved as those who falsely believe they are free." + Johann Wolfgang von Goethe + +Copyright (C) 2012 Tito Bouzout + +This license apply to all the files inside this program unless noted +different for some files or portions of code inside these files. + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation. http://www.gnu.org/licenses/gpl.html + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see http://www.gnu.org/licenses/gpl.html \ No newline at end of file diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/messages/11.13.2012.1305.0.txt b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/messages/11.13.2012.1305.0.txt new file mode 100644 index 0000000..36d23ff --- /dev/null +++ b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/messages/11.13.2012.1305.0.txt @@ -0,0 +1,21 @@ + + +SideBarEnhancements Changelog: + + ## Shorcuts collisioning with Sublime2's built-in shortcuts have been removed. + + If you miss these + + - Go to "Preferences" -> "Browse Packages" -> "User" + - Open or create file "Default.sublime-keymap" + + - Add this content: + + , { "keys": ["ctrl+t"], "command": "side_bar_new_file2" }, + { "keys": ["f2"], "command": "side_bar_rename" }, + { "keys": ["ctrl+alt+f"], "command": "side_bar_find_files_path_containing" } + + + ## If you have problems configuring F12 key + + - https://github.com/titoBouzout/SideBarEnhancements#f12-key \ No newline at end of file diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/package-metadata.json b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/package-metadata.json new file mode 100644 index 0000000..28bde61 --- /dev/null +++ b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/package-metadata.json @@ -0,0 +1 @@ +{"url": "https://github.com/titoBouzout/SideBarEnhancements", "version": "2013.03.24.15.45.28", "description": "Enhancements to Sublime Text sidebar. Files and folders."} \ No newline at end of file diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/readme.md b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/readme.md new file mode 100644 index 0000000..90e7f3d --- /dev/null +++ b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/readme.md @@ -0,0 +1,193 @@ +# Sublime Text 3 Compatibilty + +Please see: https://github.com/titoBouzout/SideBarEnhancements/tree/st3atyourownrisk + +# Description + + +Provides enhancements to the operations on Side Bar of Files and Folders for Sublime Text 2. See: http://www.sublimetext.com/ + +Notably provides delete as "move to trash", open with.. a and clipboard. Close, move, open and restore buffers affected by a rename/move command. + +Provides the basics: new file/folder, edit, open/run, reveal, find in selected/parent/project, cut, copy, paste, paste in parent, rename, move, delete, refresh.... + +The not so basic: copy paths as URIs, URLs, content as UTF8, content as data:uri base64 ( nice for embedding into CSS! ), copy as tags img/a/script/style, duplicate + + +Preference to control if a buffer should be closed when affected by a deletion operation. + +Allows to display "file modified date" and "file size" on statusbar. + +All commands available for files and folders(when applicable) . + +[img]http://dl.dropbox.com/u/43596449/tito/sublime/SideBar/screenshot.png[/img] + + + +# F12 key + +F12 key allows you to open the current file in browser. +If you want to add a url to that feature: + + * Right click any file on sidebar and select: "Project -> Edit Projects Preview URLs" + * Edit this file, and add your paths and URLs with the following structure: + +``` +{ + "S:/www/domain.tld":{ + "url_testing":"http://testing", + "url_production":"http://domain.tld" + }, + "C:/Users/luna/some/domain2.tld":{ + "url_testing":"http://testing1", + "url_production":"http://productiontld2" + } +} +``` + +```url_testing``` allows you to set the url of your local server, opened via F12 + +```url_production``` allows you to set the url of your production server, opened via ALT+F12 + +# Notes on configuring the `Open With` menu: + +Definitions file: `User/SidebarEnhancements/Open With/Side Bar.sublime-menu` (note the extra subfolder levels). +To open it, right-click on any file in an open project and select `Open With > Edit Applications...` + +- On OSX, the 'application' property simply takes the *name* of an application, to which the file at hand's full path will be passed as if with `open ...`, e.g.: "application": "Google Chrome" +- On OSX, invoking *shell* commands is NOT supported. + +# Todo + + * Use a real clipboard integrated with the OS + +# Installation + +Install this repository via "Package Control" http://wbond.net/sublime_packages/package_control + +# FAQ + +Q: Uninstall? + + * Follow the instructions here: https://github.com/titoBouzout/SideBarEnhancements/issues/18 + +Q: Why the menu is not shown on `Open Files`? + +- It should be mentioned that the package's context menu is only available for files and folders **in a project (section `Folders` in the side bar)**, and _not_ on the open files listed at the top of the side bar, due to a limitation of ST2. + +# Using the External Libraries + + + * "getImageInfo" to get width and height for images from "bfg-pages". See: http://code.google.com/p/bfg-pages/ + * "desktop" to be able to open files with system handlers. See: http://pypi.python.org/pypi/desktop + * "send2trash" to be able to send to the trash instead of deleting for ever!. See: http://pypi.python.org/pypi/Send2Trash + * "hurry.filesize" to be able to format file sizes. See: http://pypi.python.org/pypi/hurry.filesize/ + +# Source-code + + +https://github.com/titoBouzout/SideBarEnhancements + +# Forum Thread + + +http://www.sublimetext.com/forum/viewtopic.php?f=5&t=3331 + +# Contributors: + + - Leif Ringstad + - Sven Axelsson + - Dalibor Simacek + - Stephen Horne + +# Update v1.2: + +* Improved: Feature "find advanced -> in paths containing" or CTRL+ALT+F now provides instant search, contribution by @ryecroft, thanks a lot! +* Fix: When only 1 tab is open and setting "close_windows_when_empty" is true. If the user renames or delete the current file will cause the application to close by itself (it will be perceived as a crash but is not). +* New: Add to the command palette useful commands as duplicate, reveal, move, open project file, open in browser, refresh, rename +* New: added keybindings F12 to open in local server, ALT+F12 to open in production server. +* New: Allows to copy the URL of the selected items. +* Improved: When renaming/moving remember the tab position and syntax. +* small fixes: +- Correct display of commands that are available only for projects +- Be sure to return None if there is no open project +- only display a message when using the clipboard if something was copied. + +# Update v1.1: + +* New: Add boolean preference "confirm_before_deleting" which controls if a the package should ask the user to delete files and folders +* New: When using copy, cut or paste the editor will ask for "replace items" when these items exists. Note: When a folder exists the package will merge the two as in the OS. + +# Update v1.0: + +* New: Add boolean preference "close_affected_buffers_when_deleting_even_if_dirty" which controls if a buffer should be closed when affected by a deletion operation- + +# Update v0.9: + + +* Minor tweaks and fixes. +* Fix: Re-enable move to trash for OSX +* New: Allow to display "file modified time" and "file size" on statusbar via preferences. +* Fix: Disable of built-in function is now automatic. +* On the way: exclude from project, promote as project folder. ( requires restart to apply changes, looks like there is no way to reload project files.) +* Fix: Many appends of same directory to "sys.path" + +# Update v0.8: + + +* Full review for when the user has selection of multiples items. +* New: Added support for bookmarks and marks for when a view is moved. + +# Update v0.7: + + +* New: After a rename of a file or folder, the affected views will update(reload) to reflect the new location keeping intact content, selections, folded regions and scroll position. +* New: File path search + +# Update v0.6: + + +* Fix: Paste was pasting on parent folder (Misinterpretation of boolean) +* Fix: "Open with" works on Linux +* Improved: Allow case change on Windows when renaming a file or folder +* Improved: Update to "find commands" for version 2134 + +# Update v0.5: + + +* Change: Removed "files" prefix from commands. +* New: Ability to copy a path relative to the current view +* New: Ability to "paste in parent" +* New: Ctrl+T will ask for a new file on same folder as current view +* Improved: Context menu open faster + +# Update v0.4: + + +* Fix: "Open / Run" fixed on Linux thanks to project [desktop](http://pypi.python.org/pypi/desktop ) +* Improved: "Paste" command copy permission bits, last access time, last modification time, and flags +* Improved: "Delete" command send files to trash thanks to [Send2Trash](http://pypi.python.org/pypi/Send2Trash ) . NOTE: If "Delete" fails to send to trash it will ask for "Permanently Delete" On confirmation it delete the item forever. + +# Update v0.3: + + +* Fixed: Open should run correctly with some strange characters on paths +* New: "Open with.." is enabled and allows to set custom applications for different file extensions. +* New: "Copy content as Data URI" ( handy for embedding images on CSS files ) +* Improved: Copy img tags now add attributes width and height thanks to project [bfg-pages](http://code.google.com/p/bfg-pages/ ) and suggestion from nobleach. + +# Update v0.2: + + + * Copy paths and names in various formats. + * Removed license to not conflict with sublime + +# Update v0.1: + + + * Tweaks here, tweaks there. + * Renamed repository + * New: "edit" will open the file with sublime text. + * New: "open" will call to the command line with the file path + * New: a disabled "open with" for future use + * Tweaks: ids to all context elements diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/send2trash/__init__.py b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/send2trash/__init__.py new file mode 100644 index 0000000..ea77870 --- /dev/null +++ b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/send2trash/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2010 Hardcoded Software (http://www.hardcoded.net) + +# This software is licensed under the "BSD" License as described in the "LICENSE" file, +# which should be included with this package. The terms are also available at +# http://www.hardcoded.net/licenses/bsd_license + +import sys + +if sys.platform == 'darwin': + from .plat_osx import send2trash +elif sys.platform == 'win32': + from .plat_win import send2trash +else: + from .plat_other import send2trash \ No newline at end of file diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/send2trash/plat_osx.py b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/send2trash/plat_osx.py new file mode 100644 index 0000000..ba58b6f --- /dev/null +++ b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/send2trash/plat_osx.py @@ -0,0 +1,44 @@ +# Copyright 2010 Hardcoded Software (http://www.hardcoded.net) + +# This software is licensed under the "BSD" License as described in the "LICENSE" file, +# which should be included with this package. The terms are also available at +# http://www.hardcoded.net/licenses/bsd_license + +from ctypes import cdll, byref, Structure, c_char, c_char_p +from ctypes.util import find_library + +Foundation = cdll.LoadLibrary(find_library('Foundation')) +CoreServices = cdll.LoadLibrary(find_library('CoreServices')) + +GetMacOSStatusCommentString = Foundation.GetMacOSStatusCommentString +GetMacOSStatusCommentString.restype = c_char_p +FSPathMakeRefWithOptions = CoreServices.FSPathMakeRefWithOptions +FSMoveObjectToTrashSync = CoreServices.FSMoveObjectToTrashSync + +kFSPathMakeRefDefaultOptions = 0 +kFSPathMakeRefDoNotFollowLeafSymlink = 0x01 + +kFSFileOperationDefaultOptions = 0 +kFSFileOperationOverwrite = 0x01 +kFSFileOperationSkipSourcePermissionErrors = 0x02 +kFSFileOperationDoNotMoveAcrossVolumes = 0x04 +kFSFileOperationSkipPreflight = 0x08 + +class FSRef(Structure): + _fields_ = [('hidden', c_char * 80)] + +def check_op_result(op_result): + if op_result: + msg = GetMacOSStatusCommentString(op_result).decode('utf-8') + raise OSError(msg) + +def send2trash(path): + if not isinstance(path, bytes): + path = path.encode('utf-8') + fp = FSRef() + opts = kFSPathMakeRefDoNotFollowLeafSymlink + op_result = FSPathMakeRefWithOptions(path, opts, byref(fp), None) + check_op_result(op_result) + opts = kFSFileOperationDefaultOptions + op_result = FSMoveObjectToTrashSync(byref(fp), None, opts) + check_op_result(op_result) diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/send2trash/plat_other.py b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/send2trash/plat_other.py new file mode 100644 index 0000000..6c9b438 --- /dev/null +++ b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/send2trash/plat_other.py @@ -0,0 +1,154 @@ +# Copyright 2010 Hardcoded Software (http://www.hardcoded.net) + +# This software is licensed under the "BSD" License as described in the "LICENSE" file, +# which should be included with this package. The terms are also available at +# http://www.hardcoded.net/licenses/bsd_license + +# This is a reimplementation of plat_other.py with reference to the +# freedesktop.org trash specification: +# [1] http://www.freedesktop.org/wiki/Specifications/trash-spec +# [2] http://www.ramendik.ru/docs/trashspec.html +# See also: +# [3] http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html +# +# For external volumes this implementation will raise an exception if it can't +# find or create the user's trash directory. + +#import sys +import os +import os.path as op +from datetime import datetime +import stat +from urllib import quote + +FILES_DIR = 'files' +INFO_DIR = 'info' +INFO_SUFFIX = '.trashinfo' + +# Default of ~/.local/share [3] +XDG_DATA_HOME = op.expanduser(os.environ.get('XDG_DATA_HOME', '~/.local/share')) +HOMETRASH = op.join(XDG_DATA_HOME, 'Trash') + +uid = os.getuid() +TOPDIR_TRASH = '.Trash' +TOPDIR_FALLBACK = '.Trash-' + str(uid) + +def is_parent(parent, path): + path = op.realpath(path) # In case it's a symlink + parent = op.realpath(parent) + return path.startswith(parent) + +def format_date(date): + return date.strftime("%Y-%m-%dT%H:%M:%S") + +def info_for(src, topdir): + # ...it MUST not include a ".."" directory, and for files not "under" that + # directory, absolute pathnames must be used. [2] + if topdir is None or not is_parent(topdir, src): + src = op.abspath(src) + else: + src = op.relpath(src, topdir) + + info = "[Trash Info]\n" + info += "Path=" + quote(src) + "\n" + info += "DeletionDate=" + format_date(datetime.now()) + "\n" + return info + +def check_create(dir): + # use 0700 for paths [3] + if not op.exists(dir): + os.makedirs(dir, 0o700) + +def trash_move(src, dst, topdir=None): + filename = op.basename(src) + filespath = op.join(dst, FILES_DIR) + infopath = op.join(dst, INFO_DIR) + base_name, ext = op.splitext(filename) + + counter = 0 + destname = filename + while op.exists(op.join(filespath, destname)) or op.exists(op.join(infopath, destname + INFO_SUFFIX)): + counter += 1 + destname = '%s %s%s' % (base_name, counter, ext) + + check_create(filespath) + check_create(infopath) + + os.rename(src, op.join(filespath, destname)) + f = open(op.join(infopath, destname + INFO_SUFFIX), 'w') + f.write(info_for(src, topdir)) + f.close() + +def find_mount_point(path): + # Even if something's wrong, "/" is a mount point, so the loop will exit. + # Use realpath in case it's a symlink + path = op.realpath(path) # Required to avoid infinite loop + while not op.ismount(path): + path = op.split(path)[0] + return path + +def find_ext_volume_global_trash(volume_root): + # from [2] Trash directories (1) check for a .Trash dir with the right + # permissions set. + trash_dir = op.join(volume_root, TOPDIR_TRASH) + if not op.exists(trash_dir): + return None + + mode = os.lstat(trash_dir).st_mode + # vol/.Trash must be a directory, cannot be a symlink, and must have the + # sticky bit set. + if not op.isdir(trash_dir) or op.islink(trash_dir) or not (mode & stat.S_ISVTX): + return None + + trash_dir = op.join(trash_dir, str(uid)) + try: + check_create(trash_dir) + except OSError: + return None + return trash_dir + +def find_ext_volume_fallback_trash(volume_root): + # from [2] Trash directories (1) create a .Trash-$uid dir. + trash_dir = op.join(volume_root, TOPDIR_FALLBACK) + # Try to make the directory, if we can't the OSError exception will escape + # be thrown out of send2trash. + check_create(trash_dir) + return trash_dir + +def find_ext_volume_trash(volume_root): + trash_dir = find_ext_volume_global_trash(volume_root) + if trash_dir is None: + trash_dir = find_ext_volume_fallback_trash(volume_root) + return trash_dir + +# Pull this out so it's easy to stub (to avoid stubbing lstat itself) +def get_dev(path): + return os.lstat(path).st_dev + +def send2trash(path): + #if not isinstance(path, str): + # path = str(path, sys.getfilesystemencoding()) + #if not op.exists(path): + # raise OSError("File not found: %s" % path) + # ...should check whether the user has the necessary permissions to delete + # it, before starting the trashing operation itself. [2] + #if not os.access(path, os.W_OK): + # raise OSError("Permission denied: %s" % path) + # if the file to be trashed is on the same device as HOMETRASH we + # want to move it there. + path_dev = get_dev(path) + + # If XDG_DATA_HOME or HOMETRASH do not yet exist we need to stat the + # home directory, and these paths will be created further on if needed. + trash_dev = get_dev(op.expanduser('~')) + + if path_dev == trash_dev: + topdir = XDG_DATA_HOME + dest_trash = HOMETRASH + else: + topdir = find_mount_point(path) + trash_dev = get_dev(topdir) + if trash_dev != path_dev: + raise OSError("Couldn't find mount point for %s" % path) + dest_trash = find_ext_volume_trash(topdir) + trash_move(path, dest_trash, topdir) diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/send2trash/plat_win.py b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/send2trash/plat_win.py new file mode 100644 index 0000000..8f56817 --- /dev/null +++ b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/send2trash/plat_win.py @@ -0,0 +1,56 @@ +# Copyright 2010 Hardcoded Software (http://www.hardcoded.net) + +# This software is licensed under the "BSD" License as described in the "LICENSE" file, +# which should be included with this package. The terms are also available at +# http://www.hardcoded.net/licenses/bsd_license + +from ctypes import windll, Structure, byref, c_uint +from ctypes.wintypes import HWND, UINT, LPCWSTR, BOOL +#import os.path as op + +shell32 = windll.shell32 +SHFileOperationW = shell32.SHFileOperationW + +class SHFILEOPSTRUCTW(Structure): + _fields_ = [ + ("hwnd", HWND), + ("wFunc", UINT), + ("pFrom", LPCWSTR), + ("pTo", LPCWSTR), + ("fFlags", c_uint), + ("fAnyOperationsAborted", BOOL), + ("hNameMappings", c_uint), + ("lpszProgressTitle", LPCWSTR), + ] + +FO_MOVE = 1 +FO_COPY = 2 +FO_DELETE = 3 +FO_RENAME = 4 + +FOF_MULTIDESTFILES = 1 +FOF_SILENT = 4 +FOF_NOCONFIRMATION = 16 +FOF_ALLOWUNDO = 64 +FOF_NOERRORUI = 1024 + +def send2trash(path): + # + #if not isinstance(path, str): + # path = str(path, 'mbcs') + #if not op.isabs(path): + # path = op.abspath(path) + fileop = SHFILEOPSTRUCTW() + fileop.hwnd = 0 + fileop.wFunc = FO_DELETE + fileop.pFrom = LPCWSTR(path + '\0') + fileop.pTo = None + fileop.fFlags = FOF_ALLOWUNDO | FOF_NOCONFIRMATION | FOF_NOERRORUI | FOF_SILENT + fileop.fAnyOperationsAborted = 0 + fileop.hNameMappings = 0 + fileop.lpszProgressTitle = None + result = SHFileOperationW(byref(fileop)) + if result: + msg = "Couldn't perform operation. Error code: %d" % result + raise OSError(msg) + diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/sidebar/SideBarItem.py b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/sidebar/SideBarItem.py new file mode 100644 index 0000000..8b08881 --- /dev/null +++ b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/sidebar/SideBarItem.py @@ -0,0 +1,480 @@ +# coding=utf8 +import sublime +import os +import re +import shutil + +from SideBarProject import SideBarProject + +try: + import desktop +except: + pass + +class Object(): + pass + +def expand_vars(path): + for k, v in os.environ.iteritems(): + try: + # dirty hack, this should be autofixed in python3 + k = unicode(k.encode('utf8')) + v = unicode(v.encode('utf8')) + path = path.replace(u'%'+k+'%', v).replace(u'%'+k.lower()+'%', v) + except: + pass + return path + +class SideBarItem: + + def __init__(self, path, is_directory): + self._path = path + self._is_directory = is_directory + + def path(self, path = ''): + if path == '': + return self._path + else: + self._path = path + self._is_directory = os.path.isdir(path) + return path + + def pathSystem(self): + import sys + return self.path().encode(sys.getfilesystemencoding()) + + def pathWithoutProject(self): + path = self.path() + for directory in SideBarProject().getDirectories(): + path = path.replace(directory, '', 1) + return path.replace('\\', '/') + + def pathProject(self): + path = self.path() + for directory in SideBarProject().getDirectories(): + path2 = path.replace(directory, '', 1) + if path2 != path: + return directory + return False + + def projectURL(self, type): + filename = os.path.normpath(os.path.join(sublime.packages_path(), '..', 'Settings', 'SideBarEnhancements.json')) + if os.path.lexists(filename): + #try: + import json + data = file(filename, 'r').read() + data = data.replace('\t', ' ').replace('\\', '/').replace('\\', '/').replace('//', '/').replace('//', '/').replace('http:/', 'http://').replace('https:/', 'https://') + data = json.loads(data, strict=False) + + for path in data.keys(): + path2 = expand_vars(path) + print '-------------------------------------------------------' + print 'searching:' + path2 = path2.replace('\\', '/').replace('\\', '/').replace('//', '/').replace('//', '/') + print path2 + print 'in:' + path3 = self.path().replace('\\', '/').replace('\\', '/').replace('//', '/').replace('//', '/') + print path3 + print '-------------------------------------------------------' + path4 = re.sub(re.compile("^"+re.escape(path2), re.IGNORECASE), '', path3); + print path4 + if path4 != path3: + url = data[path][type] + if url: + if url[-1:] != '/': + url = url+'/' + import urllib + return url+(re.sub("^/", '', urllib.quote(path4.encode('utf-8')))); + + #except: + # return False + else: + return False + + def isUnderCurrentProject(self): + path = self.path() + path2 = self.path() + for directory in SideBarProject().getDirectories(): + path2 = path2.replace(directory, '', 1) + return path != path2 + + def pathRelativeFromProject(self): + return re.sub('^/+', '', self.pathWithoutProject()) + + def pathRelativeFromProjectEncoded(self): + import urllib + return urllib.quote(self.pathRelativeFromProject().encode('utf-8')) + + def pathRelativeFromView(self): + return os.path.relpath(self.path(), os.path.dirname(sublime.active_window().active_view().file_name())).replace('\\', '/') + + def pathRelativeFromViewEncoded(self): + import urllib + return urllib.quote(os.path.relpath(self.path(), os.path.dirname(sublime.active_window().active_view().file_name())).replace('\\', '/').encode('utf-8')) + + def pathAbsoluteFromProject(self): + return self.pathWithoutProject() + + def pathAbsoluteFromProjectEncoded(self): + import urllib + return urllib.quote(self.pathAbsoluteFromProject().encode('utf-8')) + + def uri(self): + import urllib + return 'file:'+urllib.pathname2url(self.path().encode('utf-8')); + + def join(self, name): + return os.path.join(self.path(), name) + + def dirname(self): + branch, leaf = os.path.split(self.path()) + return branch; + + def forCwdSystemPath(self): + if self.isDirectory(): + return self.pathSystem() + else: + return self.dirnameSystem() + + def forCwdSystemName(self): + if self.isDirectory(): + return '.' + else: + path = self.pathSystem() + branch = self.dirnameSystem() + leaf = path.replace(branch, '', 1).replace('\\', '').replace('/', '') + return leaf + + def forCwdSystemPathRelativeFrom(self, relativeFrom): + relative = SideBarItem(relativeFrom, os.path.isdir(relativeFrom)) + path = self.pathSystem().replace(relative.pathSystem(), '', 1).replace('\\', '/') + if path == '': + return '.' + else: + return re.sub('^/+', '', path) + + def forCwdSystemPathRelativeFromRecursive(self, relativeFrom): + relative = SideBarItem(relativeFrom, os.path.isdir(relativeFrom)) + path = self.pathSystem().replace(relative.pathSystem(), '', 1).replace('\\', '/') + if path == '': + return '.' + else: + if self.isDirectory(): + return re.sub('^/+', '', path)+'/' + else: + return re.sub('^/+', '', path) + + def dirnameSystem(self): + import sys + return self.dirname().encode(sys.getfilesystemencoding()) + + def dirnameCreate(self): + try: + os.makedirs(self.dirname()) + except: + pass + + def name(self): + branch, leaf = os.path.split(self.path()) + return leaf; + + def nameSystem(self): + import sys + return self.name().encode(sys.getfilesystemencoding()) + + def nameEncoded(self): + import urllib + return urllib.quote(self.name().encode('utf-8')); + + def namePretty(self): + return self.name().replace(self.extension(), '').replace('-', ' ').replace('_', ' ').strip(); + + def open(self): + if sublime.platform() == 'osx': + import subprocess + subprocess.Popen(['open', self.nameSystem()], cwd=self.dirnameSystem()) + elif sublime.platform() == 'windows': + import subprocess + subprocess.Popen([self.nameSystem()], cwd=self.dirnameSystem(), shell=True) + else: + desktop.open(self.path()) + + def edit(self): + return sublime.active_window().open_file(self.path()) + + def isDirectory(self): + return self._is_directory + + def isFile(self): + return self.isDirectory() == False + + def contentUTF8(self): + import codecs + return codecs.open(self.path(), 'r', 'utf-8').read() + + def contentBinary(self): + return file(self.path(), "rb").read() + + def contentBase64(self): + return 'data:'+self.mime()+';base64,'+(file(self.path(), "rb").read().encode("base64").replace('\n', '')) + + def reveal(self): + sublime.active_window().run_command("open_dir", {"dir": self.dirname(), "file": self.name()} ) + + def write(self, content): + file(self.path(), 'w+').write(content) + + def mime(self): + import mimetypes + return mimetypes.guess_type(self.path())[0] or 'application/octet-stream' + + def extension(self): + return os.path.splitext('name'+self.name())[1].lower() + + def exists(self): + return os.path.isdir(self.path()) or os.path.isfile(self.path()) + + def create(self): + if self.isDirectory(): + self.dirnameCreate() + os.makedirs(self.path()) + else: + self.dirnameCreate() + self.write('') + + def copy(self, location, replace = False): + location = SideBarItem(location, os.path.isdir(location)); + if location.exists() and replace == False: + return False + elif location.exists() and location.isFile(): + os.remove(location.path()) + + location.dirnameCreate(); + if self.isDirectory(): + if location.exists(): + self.copy_recursive(self.path(), location.path()) + else: + shutil.copytree(self.path(), location.path()) + else: + shutil.copy2(self.path(), location.path()) + return True + + def copy_recursive(self, _from, _to): + + if os.path.isfile(_from) or os.path.islink(_from): + try: + os.makedirs(os.path.dirname(_to)); + except: + pass + if os.path.exists(_to): + os.remove(_to) + shutil.copy2(_from, _to) + else: + try: + os.makedirs(_to); + except: + pass + for content in os.listdir(_from): + __from = os.path.join(_from, content) + __to = os.path.join(_to, content) + self.copy_recursive(__from, __to) + + def move(self, location, replace = False): + location = SideBarItem(location, os.path.isdir(location)); + if location.exists() and replace == False: + if self.path().lower() == location.path().lower(): + pass + else: + return False + elif location.exists() and location.isFile(): + os.remove(location.path()) + + if self.path().lower() == location.path().lower(): + location.dirnameCreate(); + os.rename(self.path(), location.path()+'.sublime-temp') + os.rename(location.path()+'.sublime-temp', location.path()) + self._move_moveViews(self.path(), location.path()) + else: + location.dirnameCreate(); + if location.exists(): + self.move_recursive(self.path(), location.path()) + else: + os.rename(self.path(), location.path()) + self._move_moveViews(self.path(), location.path()) + return True + + def move_recursive(self, _from, _to): + if os.path.isfile(_from) or os.path.islink(_from): + try: + os.makedirs(os.path.dirname(_to)); + except: + pass + if os.path.exists(_to): + os.remove(_to) + os.rename(_from, _to) + else: + try: + os.makedirs(_to); + except: + pass + for content in os.listdir(_from): + __from = os.path.join(_from, content) + __to = os.path.join(_to, content) + self.move_recursive(__from, __to) + os.rmdir(_from) + + def _move_moveViews(self, old, location): + for window in sublime.windows(): + active_view = window.active_view() + views = [] + for view in window.views(): + if view.file_name(): + views.append(view) + views.reverse(); + for view in views: + if old == view.file_name(): + active_view = self._move_moveView(window, view, location, active_view) + elif view.file_name().find(old+'\\') == 0: + active_view = self._move_moveView(window, view, view.file_name().replace(old+'\\', location+'\\', 1), active_view) + elif view.file_name().find(old+'/') == 0: + active_view = self._move_moveView(window, view, view.file_name().replace(old+'/', location+'/', 1), active_view) + + def _move_moveView(self, window, view, location, active_view): + if active_view == view: + is_active_view = True + else: + is_active_view = False + + options = Object() + + options.scroll = view.viewport_position() + + options.selections = [[item.a, item.b] for item in view.sel()] + + options.marks = [[item.a, item.b] for item in view.get_regions("mark")] + + options.bookmarks = [[item.a, item.b] for item in view.get_regions("bookmarks")] + + if int(sublime.version()) >= 2167: + options.folds = [[item.a, item.b] for item in view.folded_regions()] + else: + options.folds = [[item.a, item.b] for item in view.unfold(sublime.Region(0, view.size()))] + + options.syntax = view.settings().get('syntax') + + try: + _window = window or view.window() or sublime.active_window() + options.position = _window.get_view_index(view) + except: + options.position = False + + window.focus_view(view) + if view.is_dirty(): + options.content = view.substr(sublime.Region(0, view.size())) + view.window().run_command('revert') + else: + options.content = False + + _view = view + view = window.open_file(location) + window.focus_view(_view) + window.run_command('close') + + sublime.set_timeout(lambda: self._move_restoreView(view, options, window), 200) + + if is_active_view: + window.focus_view(view) + return view + else: + window.focus_view(active_view) + return active_view + + def _move_restoreView(self, view, options, window): + if view.is_loading(): + sublime.set_timeout(lambda: self._move_restoreView(view, options, window), 100) + else: + if options.content != False: + edit = view.begin_edit() + view.replace(edit, sublime.Region(0, view.size()), options.content); + view.sel().clear() + view.sel().add(sublime.Region(0)) + view.end_edit(edit) + + if options.position != False: + try: + _window = window or view.window() or sublime.active_window() + group, index = options.position + _window.set_view_index(view, group, index) + except: + pass + + if options.syntax: + view.settings().set('syntax', options.syntax); + + for r in options.folds: + view.fold(sublime.Region(r[0], r[1])) + + view.sel().clear() + for r in options.selections: + view.sel().add(sublime.Region(r[0], r[1])) + + rs = [] + for r in options.marks: + rs.append(sublime.Region(r[0], r[1])) + if len(rs): + view.add_regions("mark", rs, "mark", "dot", sublime.HIDDEN | sublime.PERSISTENT) + + rs = [] + for r in options.bookmarks: + rs.append(sublime.Region(r[0], r[1])) + if len(rs): + view.add_regions("bookmarks", rs, "bookmarks", "bookmark", sublime.HIDDEN | sublime.PERSISTENT) + + view.set_viewport_position(options.scroll, False) + + def close_associated_buffers(self): + path = self.path() + closed_items = [] + for window in sublime.windows(): + active_view = window.active_view() + views = [] + for view in window.views(): + if view.file_name(): + views.append(view) + views.reverse(); + for view in views: + if path == view.file_name(): + if view.window(): + closed_items.append([view.file_name(), view.window(), view.window().get_view_index(view)]) + if len(window.views()) == 1: + window.new_file() + window.focus_view(view) + window.run_command('revert') + window.run_command('close') + elif view.file_name().find(path+'\\') == 0: + if view.window(): + closed_items.append([view.file_name(), view.window(), view.window().get_view_index(view)]) + if len(window.views()) == 1: + window.new_file() + window.focus_view(view) + window.run_command('revert') + window.run_command('close') + elif view.file_name().find(path+'/') == 0: + if view.window(): + closed_items.append([view.file_name(), view.window(), view.window().get_view_index(view)]) + if len(window.views()) == 1: + window.new_file() + window.focus_view(view) + window.run_command('revert') + window.run_command('close') + + # try to repaint + try: + window.focus_view(active_view) + window.focus_view(window.active_view()) + except: + try: + window.focus_view(window.active_view()) + except: + pass + return closed_items diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/sidebar/SideBarProject.py b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/sidebar/SideBarProject.py new file mode 100644 index 0000000..7ceae07 --- /dev/null +++ b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/sidebar/SideBarProject.py @@ -0,0 +1,119 @@ +import sublime +import re +import os + +class SideBarProject: + + def getDirectories(self): + return sublime.active_window().folders() + + def hasOpenedProject(self): + return self.getProjectFile() != None + + def getDirectoryFromPath(self, path): + for directory in self.getDirectories(): + maybe_path = path.replace(directory, '', 1) + if maybe_path != path: + return directory + + def getProjectFile(self): + if not self.getDirectories(): + return None + import json + data = file(os.path.normpath(os.path.join(sublime.packages_path(), '..', 'Settings', 'Session.sublime_session')), 'r').read() + data = data.replace('\t', ' ') + data = json.loads(data, strict=False) + projects = data['workspaces']['recent_workspaces'] + + if os.path.lexists(os.path.join(sublime.packages_path(), '..', 'Settings', 'Auto Save Session.sublime_session')): + data = file(os.path.normpath(os.path.join(sublime.packages_path(), '..', 'Settings', 'Auto Save Session.sublime_session')), 'r').read() + data = data.replace('\t', ' ') + data = json.loads(data, strict=False) + if 'workspaces' in data and 'recent_workspaces' in data['workspaces'] and data['workspaces']['recent_workspaces']: + projects += data['workspaces']['recent_workspaces'] + projects = list(set(projects)) + for project_file in projects: + project_file = re.sub(r'^/([^/])/', '\\1:/', project_file); + project_json = json.loads(file(project_file, 'r').read(), strict=False) + if 'folders' in project_json: + folders = project_json['folders'] + found_all = True + for directory in self.getDirectories(): + found = False + for folder in folders: + folder_path = re.sub(r'^/([^/])/', '\\1:/', folder['path']); + if folder_path == directory.replace('\\', '/'): + found = True + break; + if found == False: + found_all = False + break; + if found_all: + return project_file + return None + + def getProjectJson(self): + if not self.hasOpenedProject(): + return None + import json + return json.loads(file(self.getProjectFile(), 'r').read(), strict=False) + + def excludeDirectory(self, path): + import json + project_file = self.getProjectFile(); + project = self.getProjectJson() + + path = re.sub(r'^([^/])\:/', '/\\1/', path.replace('\\', '/')) + + for folder in project['folders']: + if path.find(folder['path']) == 0: + try: + folder['folder_exclude_patterns'].append(re.sub(r'/+$', '', path.replace(folder['path']+'/', '', 1))) + except: + folder['folder_exclude_patterns'] = [re.sub(r'/+$', '', path.replace(folder['path']+'/', '', 1))] + file(project_file, 'w+').write(json.dumps(project, indent=1)) + return + + def excludeFile(self, path): + import json + project_file = self.getProjectFile(); + project = self.getProjectJson() + + path = re.sub(r'^([^/])\:/', '/\\1/', path.replace('\\', '/')) + + for folder in project['folders']: + if path.find(folder['path']) == 0: + try: + folder['file_exclude_patterns'].append(path.replace(folder['path']+'/', '', 1)) + except: + folder['file_exclude_patterns'] = [path.replace(folder['path']+'/', '', 1)] + file(project_file, 'w+').write(json.dumps(project, indent=1)) + return + + def rootAdd(self, path): + import json + project_file = self.getProjectFile(); + project = self.getProjectJson() + + path = re.sub(r'^([^/])\:/', '/\\1/', path.replace('\\', '/')) + project['folders'].append({'path':path}); + + file(project_file, 'w+').write(json.dumps(project, indent=1)) + + def refresh(self): + try: + sublime.set_timeout(lambda:sublime.active_window().run_command('refresh_folder_list'), 200); + sublime.set_timeout(lambda:sublime.active_window().run_command('refresh_folder_list'), 600); + sublime.set_timeout(lambda:sublime.active_window().run_command('refresh_folder_list'), 1300); + sublime.set_timeout(lambda:sublime.active_window().run_command('refresh_folder_list'), 2300); + except: + pass + + def getPreference(self, name): + if not self.hasOpenedProject(): + return None + project = self.getProjectJson() + try: + return project[name] + except: + return None \ No newline at end of file diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/sidebar/SideBarSelection.py b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/sidebar/SideBarSelection.py new file mode 100644 index 0000000..00748e7 --- /dev/null +++ b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/sidebar/SideBarSelection.py @@ -0,0 +1,186 @@ +# coding=utf8 +import sublime +import os +import re + +from SideBarProject import SideBarProject +from SideBarItem import SideBarItem + +class SideBarSelection: + + def __init__(self, paths = []): + + if len(paths) < 1: + try: + path = sublime.active_window().active_view().file_name() + if self.isNone(path): + paths = [] + else: + paths = [path] + except: + paths = [] + self._paths = paths + self._paths.sort() + self._obtained_selection_information_basic = False + self._obtained_selection_information_extended = False + + def len(self): + return len(self._paths) + + def hasDirectories(self): + self._obtainSelectionInformationBasic() + return self._has_directories + + def hasFiles(self): + self._obtainSelectionInformationBasic() + return self._has_files + + def hasOnlyDirectories(self): + self._obtainSelectionInformationBasic() + return self._only_directories + + def hasOnlyFiles(self): + self._obtainSelectionInformationBasic() + return self._only_files + + def hasProjectDirectories(self): + if self.hasDirectories(): + project_directories = SideBarProject().getDirectories() + for item in self.getSelectedDirectories(): + if item.path() in project_directories: + return True + return False + else: + return False + + def hasItemsUnderProject(self): + for item in self.getSelectedItems(): + if item.isUnderCurrentProject(): + return True + return False + + def hasImages(self): + return self.hasFilesWithExtension('gif|jpg|jpeg|png') + + def hasFilesWithExtension(self, extensions): + extensions = re.compile('('+extensions+')$', re.I); + for item in self.getSelectedFiles(): + if extensions.search(item.path()): + return True; + return False + + def getSelectedItems(self): + self._obtainSelectionInformationExtended() + return self._files + self._directories; + + def getSelectedItemsWithoutChildItems(self): + self._obtainSelectionInformationExtended() + items = [] + for item in self._items_without_containing_child_items: + items.append(SideBarItem(item, os.path.isdir(item))) + return items + + def getSelectedDirectories(self): + self._obtainSelectionInformationExtended() + return self._directories; + + def getSelectedFiles(self): + self._obtainSelectionInformationExtended() + return self._files; + + def getSelectedDirectoriesOrDirnames(self): + self._obtainSelectionInformationExtended() + return self._directories_or_dirnames; + + def getSelectedImages(self): + return self.getSelectedFilesWithExtension('gif|jpg|jpeg|png') + + def getSelectedFilesWithExtension(self, extensions): + items = [] + extensions = re.compile('('+extensions+')$', re.I); + for item in self.getSelectedFiles(): + if extensions.search(item.path()): + items.append(item) + return items + + def _obtainSelectionInformationBasic(self): + if not self._obtained_selection_information_basic: + self._obtained_selection_information_basic = True + + self._has_directories = False + self._has_files = False + self._only_directories = False + self._only_files = False + + for path in self._paths: + if self._has_directories == False and os.path.isdir(path): + self._has_directories = True + if self._has_files == False and os.path.isdir(path) == False: + self._has_files = True + if self._has_files and self._has_directories: + break + + if self._has_files and self._has_directories: + self._only_directories = False + self._only_files = False + elif self._has_files: + self._only_files = True + elif self._has_directories: + self._only_directories = True + + def _obtainSelectionInformationExtended(self): + if not self._obtained_selection_information_extended: + self._obtained_selection_information_extended = True + + self._directories = [] + self._files = [] + self._directories_or_dirnames = [] + self._items_without_containing_child_items = [] + + _directories = [] + _files = [] + _directories_or_dirnames = [] + _items_without_containing_child_items = [] + + for path in self._paths: + if os.path.isdir(path): + item = SideBarItem(path, True) + if item.path() not in _directories: + _directories.append(item.path()) + self._directories.append(item) + if item.path() not in _directories_or_dirnames: + _directories_or_dirnames.append(item.path()) + self._directories_or_dirnames.append(item) + _items_without_containing_child_items = self._itemsWithoutContainingChildItems(_items_without_containing_child_items, item.path()) + else: + item = SideBarItem(path, False) + if item.path() not in _files: + _files.append(item.path()) + self._files.append(item) + _items_without_containing_child_items = self._itemsWithoutContainingChildItems(_items_without_containing_child_items, item.path()) + item = SideBarItem(os.path.dirname(path), True) + if item.path() not in _directories_or_dirnames: + _directories_or_dirnames.append(item.path()) + self._directories_or_dirnames.append(item) + + self._items_without_containing_child_items = _items_without_containing_child_items + + def _itemsWithoutContainingChildItems(self, items, item): + new_list = [] + add = True + for i in items: + if i.find(item+'\\') == 0 or i.find(item+'/') == 0: + continue + else: + new_list.append(i) + if (item+'\\').find(i+'\\') == 0 or (item+'/').find(i+'/') == 0: + add = False + if add: + new_list.append(item) + return new_list + + def isNone(self, path): + if path == None or path == '' or path == '.' or path == '..' or path == './' or path == '/' or path == '//' or path == '\\' or path == '\\\\' or path == '\\\\\\\\': + return True + else: + return False diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/sidebar/__init__.py b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/sidebar/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/sidebar/desktop/__init__.py b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/sidebar/desktop/__init__.py new file mode 100644 index 0000000..d8bfcc8 --- /dev/null +++ b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/sidebar/desktop/__init__.py @@ -0,0 +1,281 @@ +#!/usr/bin/env python + +""" +Simple desktop integration for Python. This module provides desktop environment +detection and resource opening support for a selection of common and +standardised desktop environments. + +Copyright (C) 2005, 2006, 2007, 2008, 2009 Paul Boddie + +This program is free software; you can redistribute it and/or modify it under +the terms of the GNU Lesser General Public License as published by the Free +Software Foundation; either version 3 of the License, or (at your option) any +later version. + +This program is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more +details. + +You should have received a copy of the GNU Lesser General Public License along +with this program. If not, see . + +-------- + +Desktop Detection +----------------- + +To detect a specific desktop environment, use the get_desktop function. +To detect whether the desktop environment is standardised (according to the +proposed DESKTOP_LAUNCH standard), use the is_standard function. + +Opening URLs +------------ + +To open a URL in the current desktop environment, relying on the automatic +detection of that environment, use the desktop.open function as follows: + +desktop.open("http://www.python.org") + +To override the detected desktop, specify the desktop parameter to the open +function as follows: + +desktop.open("http://www.python.org", "KDE") # Insists on KDE +desktop.open("http://www.python.org", "GNOME") # Insists on GNOME + +Without overriding using the desktop parameter, the open function will attempt +to use the "standard" desktop opening mechanism which is controlled by the +DESKTOP_LAUNCH environment variable as described below. + +The DESKTOP_LAUNCH Environment Variable +--------------------------------------- + +The DESKTOP_LAUNCH environment variable must be shell-quoted where appropriate, +as shown in some of the following examples: + +DESKTOP_LAUNCH="kdialog --msgbox" Should present any opened URLs in + their entirety in a KDE message box. + (Command "kdialog" plus parameter.) +DESKTOP_LAUNCH="my\ opener" Should run the "my opener" program to + open URLs. + (Command "my opener", no parameters.) +DESKTOP_LAUNCH="my\ opener --url" Should run the "my opener" program to + open URLs. + (Command "my opener" plus parameter.) + +Details of the DESKTOP_LAUNCH environment variable convention can be found here: +http://lists.freedesktop.org/archives/xdg/2004-August/004489.html + +Other Modules +------------- + +The desktop.dialog module provides support for opening dialogue boxes. +The desktop.windows module permits the inspection of desktop windows. +""" + +__version__ = "0.4" + +import os +import sys + +# Provide suitable process creation functions. + +try: + import subprocess + def _run(cmd, shell, wait): + opener = subprocess.Popen(cmd, shell=shell) + if wait: opener.wait() + return opener.pid + + def _readfrom(cmd, shell): + opener = subprocess.Popen(cmd, shell=shell, stdin=subprocess.PIPE, stdout=subprocess.PIPE) + opener.stdin.close() + return opener.stdout.read() + + def _status(cmd, shell): + opener = subprocess.Popen(cmd, shell=shell) + opener.wait() + return opener.returncode == 0 + +except ImportError: + import popen2 + def _run(cmd, shell, wait): + opener = popen2.Popen3(cmd) + if wait: opener.wait() + return opener.pid + + def _readfrom(cmd, shell): + opener = popen2.Popen3(cmd) + opener.tochild.close() + opener.childerr.close() + return opener.fromchild.read() + + def _status(cmd, shell): + opener = popen2.Popen3(cmd) + opener.wait() + return opener.poll() == 0 + +import commands + +# Private functions. + +def _get_x11_vars(): + + "Return suitable environment definitions for X11." + + if not os.environ.get("DISPLAY", "").strip(): + return "DISPLAY=:0.0 " + else: + return "" + +def _is_xfce(): + + "Return whether XFCE is in use." + + # XFCE detection involves testing the output of a program. + + try: + return _readfrom(_get_x11_vars() + "xprop -root _DT_SAVE_MODE", shell=1).strip().endswith(' = "xfce4"') + except OSError: + return 0 + +def _is_x11(): + + "Return whether the X Window System is in use." + + return os.environ.has_key("DISPLAY") + +# Introspection functions. + +def get_desktop(): + + """ + Detect the current desktop environment, returning the name of the + environment. If no environment could be detected, None is returned. + """ + + if os.environ.has_key("KDE_FULL_SESSION") or \ + os.environ.has_key("KDE_MULTIHEAD"): + return "KDE" + elif os.environ.has_key("GNOME_DESKTOP_SESSION_ID") or \ + os.environ.has_key("GNOME_KEYRING_SOCKET"): + return "GNOME" + elif sys.platform == "darwin": + return "Mac OS X" + elif hasattr(os, "startfile"): + return "Windows" + elif _is_xfce(): + return "XFCE" + + # KDE, GNOME and XFCE run on X11, so we have to test for X11 last. + + if _is_x11(): + return "X11" + else: + return None + +def use_desktop(desktop): + + """ + Decide which desktop should be used, based on the detected desktop and a + supplied 'desktop' argument (which may be None). Return an identifier + indicating the desktop type as being either "standard" or one of the results + from the 'get_desktop' function. + """ + + # Attempt to detect a desktop environment. + + detected = get_desktop() + + # Start with desktops whose existence can be easily tested. + + if (desktop is None or desktop == "standard") and is_standard(): + return "standard" + elif (desktop is None or desktop == "Windows") and detected == "Windows": + return "Windows" + + # Test for desktops where the overriding is not verified. + + elif (desktop or detected) == "KDE": + return "KDE" + elif (desktop or detected) == "GNOME": + return "GNOME" + elif (desktop or detected) == "XFCE": + return "XFCE" + elif (desktop or detected) == "Mac OS X": + return "Mac OS X" + elif (desktop or detected) == "X11": + return "X11" + else: + return None + +def is_standard(): + + """ + Return whether the current desktop supports standardised application + launching. + """ + + return os.environ.has_key("DESKTOP_LAUNCH") + +# Activity functions. + +def open(url, desktop=None, wait=0): + + """ + Open the 'url' in the current desktop's preferred file browser. If the + optional 'desktop' parameter is specified then attempt to use that + particular desktop environment's mechanisms to open the 'url' instead of + guessing or detecting which environment is being used. + + Suggested values for 'desktop' are "standard", "KDE", "GNOME", "XFCE", + "Mac OS X", "Windows" where "standard" employs a DESKTOP_LAUNCH environment + variable to open the specified 'url'. DESKTOP_LAUNCH should be a command, + possibly followed by arguments, and must have any special characters + shell-escaped. + + The process identifier of the "opener" (ie. viewer, editor, browser or + program) associated with the 'url' is returned by this function. If the + process identifier cannot be determined, None is returned. + + An optional 'wait' parameter is also available for advanced usage and, if + 'wait' is set to a true value, this function will wait for the launching + mechanism to complete before returning (as opposed to immediately returning + as is the default behaviour). + """ + + # Decide on the desktop environment in use. + + desktop_in_use = use_desktop(desktop) + + if desktop_in_use == "standard": + arg = "".join([os.environ["DESKTOP_LAUNCH"], commands.mkarg(url)]) + return _run(arg, 1, wait) + + elif desktop_in_use == "Windows": + # NOTE: This returns None in current implementations. + return os.startfile(url) + + elif desktop_in_use == "KDE": + cmd = ["kfmclient", "exec", url] + + elif desktop_in_use == "GNOME": + cmd = ["gnome-open", url] + + elif desktop_in_use == "XFCE": + cmd = ["exo-open", url] + + elif desktop_in_use == "Mac OS X": + cmd = ["open", url] + + elif desktop_in_use == "X11" and os.environ.has_key("BROWSER"): + cmd = [os.environ["BROWSER"], url] + + # Finish with an error where no suitable desktop was identified. + + else: + raise OSError, "Desktop '%s' not supported (neither DESKTOP_LAUNCH nor os.startfile could be used)" % desktop_in_use + + return _run(cmd, 0, wait) + +# vim: tabstop=4 expandtab shiftwidth=4 diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/sidebar/desktop/dialog.py b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/sidebar/desktop/dialog.py new file mode 100644 index 0000000..9525004 --- /dev/null +++ b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/sidebar/desktop/dialog.py @@ -0,0 +1,549 @@ +#!/usr/bin/env python + +""" +Simple desktop dialogue box support for Python. + +Copyright (C) 2007, 2009 Paul Boddie + +This program is free software; you can redistribute it and/or modify it under +the terms of the GNU Lesser General Public License as published by the Free +Software Foundation; either version 3 of the License, or (at your option) any +later version. + +This program is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more +details. + +You should have received a copy of the GNU Lesser General Public License along +with this program. If not, see . + +-------- + +Opening Dialogue Boxes (Dialogs) +-------------------------------- + +To open a dialogue box (dialog) in the current desktop environment, relying on +the automatic detection of that environment, use the appropriate dialogue box +class: + +question = desktop.dialog.Question("Are you sure?") +result = question.open() + +To override the detected desktop, specify the desktop parameter to the open +function as follows: + +question.open("KDE") # Insists on KDE +question.open("GNOME") # Insists on GNOME + +The dialogue box options are documented in each class's docstring. + +Available dialogue box classes are listed in the desktop.dialog.available +attribute. + +Supported desktop environments are listed in the desktop.dialog.supported +attribute. +""" + +from desktop import use_desktop, _run, _readfrom, _status + +class _wrapper: + def __init__(self, handler): + self.handler = handler + +class _readvalue(_wrapper): + def __call__(self, cmd, shell): + return self.handler(cmd, shell).strip() + +class _readinput(_wrapper): + def __call__(self, cmd, shell): + return self.handler(cmd, shell)[:-1] + +class _readvalues_kdialog(_wrapper): + def __call__(self, cmd, shell): + result = self.handler(cmd, shell).strip().strip('"') + if result: + return result.split('" "') + else: + return [] + +class _readvalues_zenity(_wrapper): + def __call__(self, cmd, shell): + result = self.handler(cmd, shell).strip() + if result: + return result.split("|") + else: + return [] + +class _readvalues_Xdialog(_wrapper): + def __call__(self, cmd, shell): + result = self.handler(cmd, shell).strip() + if result: + return result.split("/") + else: + return [] + +# Dialogue parameter classes. + +class String: + + "A generic parameter." + + def __init__(self, name): + self.name = name + + def convert(self, value, program): + return [value or ""] + +class Strings(String): + + "Multiple string parameters." + + def convert(self, value, program): + return value or [] + +class StringPairs(String): + + "Multiple string parameters duplicated to make identifiers." + + def convert(self, value, program): + l = [] + for v in value: + l.append(v) + l.append(v) + return l + +class StringKeyword: + + "A keyword parameter." + + def __init__(self, keyword, name): + self.keyword = keyword + self.name = name + + def convert(self, value, program): + return [self.keyword + "=" + (value or "")] + +class StringKeywords: + + "Multiple keyword parameters." + + def __init__(self, keyword, name): + self.keyword = keyword + self.name = name + + def convert(self, value, program): + l = [] + for v in value or []: + l.append(self.keyword + "=" + v) + return l + +class Integer(String): + + "An integer parameter." + + defaults = { + "width" : 40, + "height" : 15, + "list_height" : 10 + } + scale = 8 + + def __init__(self, name, pixels=0): + String.__init__(self, name) + if pixels: + self.factor = self.scale + else: + self.factor = 1 + + def convert(self, value, program): + if value is None: + value = self.defaults[self.name] + return [str(int(value) * self.factor)] + +class IntegerKeyword(Integer): + + "An integer keyword parameter." + + def __init__(self, keyword, name, pixels=0): + Integer.__init__(self, name, pixels) + self.keyword = keyword + + def convert(self, value, program): + if value is None: + value = self.defaults[self.name] + return [self.keyword + "=" + str(int(value) * self.factor)] + +class Boolean(String): + + "A boolean parameter." + + values = { + "kdialog" : ["off", "on"], + "zenity" : ["FALSE", "TRUE"], + "Xdialog" : ["off", "on"] + } + + def convert(self, value, program): + values = self.values[program] + if value: + return [values[1]] + else: + return [values[0]] + +class MenuItemList(String): + + "A menu item list parameter." + + def convert(self, value, program): + l = [] + for v in value: + l.append(v.value) + l.append(v.text) + return l + +class ListItemList(String): + + "A radiolist/checklist item list parameter." + + def __init__(self, name, status_first=0): + String.__init__(self, name) + self.status_first = status_first + + def convert(self, value, program): + l = [] + for v in value: + boolean = Boolean(None) + status = boolean.convert(v.status, program) + if self.status_first: + l += status + l.append(v.value) + l.append(v.text) + if not self.status_first: + l += status + return l + +# Dialogue argument values. + +class MenuItem: + + "A menu item which can also be used with radiolists and checklists." + + def __init__(self, value, text, status=0): + self.value = value + self.text = text + self.status = status + +# Dialogue classes. + +class Dialogue: + + commands = { + "KDE" : "kdialog", + "GNOME" : "zenity", + "XFCE" : "zenity", # NOTE: Based on observations with Xubuntu. + "X11" : "Xdialog" + } + + def open(self, desktop=None): + + """ + Open a dialogue box (dialog) using a program appropriate to the desktop + environment in use. + + If the optional 'desktop' parameter is specified then attempt to use + that particular desktop environment's mechanisms to open the dialog + instead of guessing or detecting which environment is being used. + + Suggested values for 'desktop' are "standard", "KDE", "GNOME", + "Mac OS X", "Windows". + + The result of the dialogue interaction may be a string indicating user + input (for Input, Password, Menu, Pulldown), a list of strings + indicating selections of one or more items (for RadioList, CheckList), + or a value indicating true or false (for Question, Warning, Message, + Error). + + Where a string value may be expected but no choice is made, an empty + string may be returned. Similarly, where a list of values is expected + but no choice is made, an empty list may be returned. + """ + + # Decide on the desktop environment in use. + + desktop_in_use = use_desktop(desktop) + + # Get the program. + + try: + program = self.commands[desktop_in_use] + except KeyError: + raise OSError, "Desktop '%s' not supported (no known dialogue box command could be suggested)" % desktop_in_use + + # The handler is one of the functions communicating with the subprocess. + # Some handlers return boolean values, others strings. + + handler, options = self.info[program] + + cmd = [program] + for option in options: + if isinstance(option, str): + cmd.append(option) + else: + value = getattr(self, option.name, None) + cmd += option.convert(value, program) + + return handler(cmd, 0) + +class Simple(Dialogue): + def __init__(self, text, width=None, height=None): + self.text = text + self.width = width + self.height = height + +class Question(Simple): + + """ + A dialogue asking a question and showing response buttons. + Options: text, width (in characters), height (in characters) + Response: a boolean value indicating an affirmative response (true) or a + negative response + """ + + name = "question" + info = { + "kdialog" : (_status, ["--yesno", String("text")]), + "zenity" : (_status, ["--question", StringKeyword("--text", "text")]), + "Xdialog" : (_status, ["--stdout", "--yesno", String("text"), Integer("height"), Integer("width")]), + } + +class Warning(Simple): + + """ + A dialogue asking a question and showing response buttons. + Options: text, width (in characters), height (in characters) + Response: a boolean value indicating an affirmative response (true) or a + negative response + """ + + name = "warning" + info = { + "kdialog" : (_status, ["--warningyesno", String("text")]), + "zenity" : (_status, ["--warning", StringKeyword("--text", "text")]), + "Xdialog" : (_status, ["--stdout", "--yesno", String("text"), Integer("height"), Integer("width")]), + } + +class Message(Simple): + + """ + A message dialogue. + Options: text, width (in characters), height (in characters) + Response: a boolean value indicating an affirmative response (true) or a + negative response + """ + + name = "message" + info = { + "kdialog" : (_status, ["--msgbox", String("text")]), + "zenity" : (_status, ["--info", StringKeyword("--text", "text")]), + "Xdialog" : (_status, ["--stdout", "--msgbox", String("text"), Integer("height"), Integer("width")]), + } + +class Error(Simple): + + """ + An error dialogue. + Options: text, width (in characters), height (in characters) + Response: a boolean value indicating an affirmative response (true) or a + negative response + """ + + name = "error" + info = { + "kdialog" : (_status, ["--error", String("text")]), + "zenity" : (_status, ["--error", StringKeyword("--text", "text")]), + "Xdialog" : (_status, ["--stdout", "--msgbox", String("text"), Integer("height"), Integer("width")]), + } + +class Menu(Simple): + + """ + A menu of options, one of which being selectable. + Options: text, width (in characters), height (in characters), + list_height (in items), items (MenuItem objects) + Response: a value corresponding to the chosen item + """ + + name = "menu" + info = { + "kdialog" : (_readvalue(_readfrom), ["--menu", String("text"), MenuItemList("items")]), + "zenity" : (_readvalue(_readfrom), ["--list", StringKeyword("--text", "text"), StringKeywords("--column", "titles"), + MenuItemList("items")] + ), + "Xdialog" : (_readvalue(_readfrom), ["--stdout", "--menubox", + String("text"), Integer("height"), Integer("width"), Integer("list_height"), MenuItemList("items")] + ), + } + item = MenuItem + number_of_titles = 2 + + def __init__(self, text, titles, items=None, width=None, height=None, list_height=None): + + """ + Initialise a menu with the given heading 'text', column 'titles', and + optional 'items' (which may be added later), 'width' (in characters), + 'height' (in characters) and 'list_height' (in items). + """ + + Simple.__init__(self, text, width, height) + self.titles = ([""] * self.number_of_titles + titles)[-self.number_of_titles:] + self.items = items or [] + self.list_height = list_height + + def add(self, *args, **kw): + + """ + Add an item, passing the given arguments to the appropriate item class. + """ + + self.items.append(self.item(*args, **kw)) + +class RadioList(Menu): + + """ + A list of radio buttons, one of which being selectable. + Options: text, width (in characters), height (in characters), + list_height (in items), items (MenuItem objects), titles + Response: a list of values corresponding to chosen items (since some + programs, eg. zenity, appear to support multiple default + selections) + """ + + name = "radiolist" + info = { + "kdialog" : (_readvalues_kdialog(_readfrom), ["--radiolist", String("text"), ListItemList("items")]), + "zenity" : (_readvalues_zenity(_readfrom), + ["--list", "--radiolist", StringKeyword("--text", "text"), StringKeywords("--column", "titles"), + ListItemList("items", 1)] + ), + "Xdialog" : (_readvalues_Xdialog(_readfrom), ["--stdout", "--radiolist", + String("text"), Integer("height"), Integer("width"), Integer("list_height"), ListItemList("items")] + ), + } + number_of_titles = 3 + +class CheckList(Menu): + + """ + A list of checkboxes, many being selectable. + Options: text, width (in characters), height (in characters), + list_height (in items), items (MenuItem objects), titles + Response: a list of values corresponding to chosen items + """ + + name = "checklist" + info = { + "kdialog" : (_readvalues_kdialog(_readfrom), ["--checklist", String("text"), ListItemList("items")]), + "zenity" : (_readvalues_zenity(_readfrom), + ["--list", "--checklist", StringKeyword("--text", "text"), StringKeywords("--column", "titles"), + ListItemList("items", 1)] + ), + "Xdialog" : (_readvalues_Xdialog(_readfrom), ["--stdout", "--checklist", + String("text"), Integer("height"), Integer("width"), Integer("list_height"), ListItemList("items")] + ), + } + number_of_titles = 3 + +class Pulldown(Menu): + + """ + A pull-down menu of options, one of which being selectable. + Options: text, width (in characters), height (in characters), + items (list of values) + Response: a value corresponding to the chosen item + """ + + name = "pulldown" + info = { + "kdialog" : (_readvalue(_readfrom), ["--combobox", String("text"), Strings("items")]), + "zenity" : (_readvalue(_readfrom), + ["--list", "--radiolist", StringKeyword("--text", "text"), StringKeywords("--column", "titles"), + StringPairs("items")] + ), + "Xdialog" : (_readvalue(_readfrom), + ["--stdout", "--combobox", String("text"), Integer("height"), Integer("width"), Strings("items")]), + } + item = unicode + number_of_titles = 2 + +class Input(Simple): + + """ + An input dialogue, consisting of an input field. + Options: text, input, width (in characters), height (in characters) + Response: the text entered into the dialogue by the user + """ + + name = "input" + info = { + "kdialog" : (_readinput(_readfrom), + ["--inputbox", String("text"), String("data")]), + "zenity" : (_readinput(_readfrom), + ["--entry", StringKeyword("--text", "text"), StringKeyword("--entry-text", "data")]), + "Xdialog" : (_readinput(_readfrom), + ["--stdout", "--inputbox", String("text"), Integer("height"), Integer("width"), String("data")]), + } + + def __init__(self, text, data="", width=None, height=None): + Simple.__init__(self, text, width, height) + self.data = data + +class Password(Input): + + """ + A password dialogue, consisting of a password entry field. + Options: text, width (in characters), height (in characters) + Response: the text entered into the dialogue by the user + """ + + name = "password" + info = { + "kdialog" : (_readinput(_readfrom), + ["--password", String("text")]), + "zenity" : (_readinput(_readfrom), + ["--entry", StringKeyword("--text", "text"), "--hide-text"]), + "Xdialog" : (_readinput(_readfrom), + ["--stdout", "--password", "--inputbox", String("text"), Integer("height"), Integer("width")]), + } + +class TextFile(Simple): + + """ + A text file input box. + Options: filename, text, width (in characters), height (in characters) + Response: any text returned by the dialogue program (typically an empty + string) + """ + + name = "textfile" + info = { + "kdialog" : (_readfrom, ["--textbox", String("filename"), Integer("width", pixels=1), Integer("height", pixels=1)]), + "zenity" : (_readfrom, ["--text-info", StringKeyword("--filename", "filename"), IntegerKeyword("--width", "width", pixels=1), + IntegerKeyword("--height", "height", pixels=1)] + ), + "Xdialog" : (_readfrom, ["--stdout", "--textbox", String("filename"), Integer("height"), Integer("width")]), + } + + def __init__(self, filename, text="", width=None, height=None): + Simple.__init__(self, text, width, height) + self.filename = filename + +# Available dialogues. + +available = [Question, Warning, Message, Error, Menu, CheckList, RadioList, Input, Password, Pulldown, TextFile] + +# Supported desktop environments. + +supported = Dialogue.commands.keys() + +# vim: tabstop=4 expandtab shiftwidth=4 diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/sidebar/desktop/windows.py b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/sidebar/desktop/windows.py new file mode 100644 index 0000000..2b19e85 --- /dev/null +++ b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/SideBarEnhancements/sidebar/desktop/windows.py @@ -0,0 +1,273 @@ +#!/usr/bin/env python + +""" +Simple desktop window enumeration for Python. + +Copyright (C) 2007, 2008, 2009 Paul Boddie + +This program is free software; you can redistribute it and/or modify it under +the terms of the GNU Lesser General Public License as published by the Free +Software Foundation; either version 3 of the License, or (at your option) any +later version. + +This program is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more +details. + +You should have received a copy of the GNU Lesser General Public License along +with this program. If not, see . + +-------- + +Finding Open Windows on the Desktop +----------------------------------- + +To obtain a list of windows, use the desktop.windows.list function as follows: + +windows = desktop.windows.list() + +To obtain the root window, typically the desktop background, use the +desktop.windows.root function as follows: + +root = desktop.windows.root() + +Each window object can be inspected through a number of methods. For example: + +name = window.name() +width, height = window.size() +x, y = window.position() +child_windows = window.children() + +See the desktop.windows.Window class for more information. +""" + +from desktop import _is_x11, _get_x11_vars, _readfrom, use_desktop +import re + +# System functions. + +def _xwininfo(identifier, action): + if identifier is None: + args = "-root" + else: + args = "-id " + identifier + + s = _readfrom(_get_x11_vars() + "xwininfo %s -%s" % (args, action), shell=1) + + # Return a mapping of keys to values for the "stats" action. + + if action == "stats": + d = {} + for line in s.split("\n"): + fields = line.split(":") + if len(fields) < 2: + continue + key, value = fields[0].strip(), ":".join(fields[1:]).strip() + d[key] = value + + return d + + # Otherwise, return the raw output. + + else: + return s + +def _get_int_properties(d, properties): + results = [] + for property in properties: + results.append(int(d[property])) + return results + +# Finder functions. + +def find_all(name): + return 1 + +def find_named(name): + return name is not None + +def find_by_name(name): + return lambda n, t=name: n == t + +# Window classes. +# NOTE: X11 is the only supported desktop so far. + +class Window: + + "A window on the desktop." + + _name_pattern = re.compile(r':\s+\(.*?\)\s+[-0-9x+]+\s+[-0-9+]+$') + _absent_names = "(has no name)", "(the root window) (has no name)" + + def __init__(self, identifier): + + "Initialise the window with the given 'identifier'." + + self.identifier = identifier + + # Finder methods (from above). + + self.find_all = find_all + self.find_named = find_named + self.find_by_name = find_by_name + + def __repr__(self): + return "Window(%r)" % self.identifier + + # Methods which deal with the underlying commands. + + def _get_handle_and_name(self, text): + fields = text.strip().split(" ") + handle = fields[0] + + # Get the "" part, stripping off the quotes. + + name = " ".join(fields[1:]) + if len(name) > 1 and name[0] == '"' and name[-1] == '"': + name = name[1:-1] + + if name in self._absent_names: + return handle, None + else: + return handle, name + + def _get_this_handle_and_name(self, line): + fields = line.split(":") + return self._get_handle_and_name(":".join(fields[1:])) + + def _get_descendant_handle_and_name(self, line): + match = self._name_pattern.search(line) + if match: + return self._get_handle_and_name(line[:match.start()].strip()) + else: + raise OSError, "Window information from %r did not contain window details." % line + + def _descendants(self, s, fn): + handles = [] + adding = 0 + for line in s.split("\n"): + if line.endswith("child:") or line.endswith("children:"): + if not adding: + adding = 1 + elif adding and line: + handle, name = self._get_descendant_handle_and_name(line) + if fn(name): + handles.append(handle) + return [Window(handle) for handle in handles] + + # Public methods. + + def children(self, all=0): + + """ + Return a list of windows which are children of this window. If the + optional 'all' parameter is set to a true value, all such windows will + be returned regardless of whether they have any name information. + """ + + s = _xwininfo(self.identifier, "children") + return self._descendants(s, all and self.find_all or self.find_named) + + def descendants(self, all=0): + + """ + Return a list of windows which are descendants of this window. If the + optional 'all' parameter is set to a true value, all such windows will + be returned regardless of whether they have any name information. + """ + + s = _xwininfo(self.identifier, "tree") + return self._descendants(s, all and self.find_all or self.find_named) + + def find(self, callable): + + """ + Return windows using the given 'callable' (returning a true or a false + value when invoked with a window name) for descendants of this window. + """ + + s = _xwininfo(self.identifier, "tree") + return self._descendants(s, callable) + + def name(self): + + "Return the name of the window." + + d = _xwininfo(self.identifier, "stats") + + # Format is 'xwininfo: Window id: "" + + return self._get_this_handle_and_name(d["xwininfo"])[1] + + def size(self): + + "Return a tuple containing the width and height of this window." + + d = _xwininfo(self.identifier, "stats") + return _get_int_properties(d, ["Width", "Height"]) + + def position(self): + + "Return a tuple containing the upper left co-ordinates of this window." + + d = _xwininfo(self.identifier, "stats") + return _get_int_properties(d, ["Absolute upper-left X", "Absolute upper-left Y"]) + + def displayed(self): + + """ + Return whether the window is displayed in some way (but not necessarily + visible on the current screen). + """ + + d = _xwininfo(self.identifier, "stats") + return d["Map State"] != "IsUnviewable" + + def visible(self): + + "Return whether the window is displayed and visible." + + d = _xwininfo(self.identifier, "stats") + return d["Map State"] == "IsViewable" + +def list(desktop=None): + + """ + Return a list of windows for the current desktop. If the optional 'desktop' + parameter is specified then attempt to use that particular desktop + environment's mechanisms to look for windows. + """ + + root_window = root(desktop) + window_list = [window for window in root_window.descendants() if window.displayed()] + window_list.insert(0, root_window) + return window_list + +def root(desktop=None): + + """ + Return the root window for the current desktop. If the optional 'desktop' + parameter is specified then attempt to use that particular desktop + environment's mechanisms to look for windows. + """ + + # NOTE: The desktop parameter is currently ignored and X11 is tested for + # NOTE: directly. + + if _is_x11(): + return Window(None) + else: + raise OSError, "Desktop '%s' not supported" % use_desktop(desktop) + +def find(callable, desktop=None): + + """ + Find and return windows using the given 'callable' for the current desktop. + If the optional 'desktop' parameter is specified then attempt to use that + particular desktop environment's mechanisms to look for windows. + """ + + return root(desktop).find(callable) + +# vim: tabstop=4 expandtab shiftwidth=4 diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Sublime Files/Default (Linux).sublime-keymap b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Sublime Files/Default (Linux).sublime-keymap new file mode 100644 index 0000000..f5ba726 --- /dev/null +++ b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Sublime Files/Default (Linux).sublime-keymap @@ -0,0 +1,7 @@ +[ + { + "keys": ["ctrl+super+n"], + "command": "sublime_files", + "args": {"command":"navigate"} + } +] \ No newline at end of file diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Sublime Files/Default (OSX).sublime-keymap b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Sublime Files/Default (OSX).sublime-keymap new file mode 100644 index 0000000..f5ba726 --- /dev/null +++ b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Sublime Files/Default (OSX).sublime-keymap @@ -0,0 +1,7 @@ +[ + { + "keys": ["ctrl+super+n"], + "command": "sublime_files", + "args": {"command":"navigate"} + } +] \ No newline at end of file diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Sublime Files/Default (Windows).sublime-keymap b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Sublime Files/Default (Windows).sublime-keymap new file mode 100644 index 0000000..3e53fd3 --- /dev/null +++ b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Sublime Files/Default (Windows).sublime-keymap @@ -0,0 +1,7 @@ +[ + { + "keys": ["ctrl+alt+n"], + "command": "sublime_files", + "args": {"command":"navigate"} + } +] \ No newline at end of file diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Sublime Files/Default.sublime-commands b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Sublime Files/Default.sublime-commands new file mode 100644 index 0000000..3b2e67f --- /dev/null +++ b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Sublime Files/Default.sublime-commands @@ -0,0 +1,7 @@ +[ + { + "caption": "Sublime Files: Open Navigator", + "command": "sublime_files", + "args": {"command":"navigate"} + } +] diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Sublime Files/Main.sublime-menu b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Sublime Files/Main.sublime-menu new file mode 100644 index 0000000..d11fdf6 --- /dev/null +++ b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Sublime Files/Main.sublime-menu @@ -0,0 +1,83 @@ +[ + { + "caption": "Preferences", + "mnemonic": "n", + "id": "preferences", + "children": + [ + { + "caption": "Package Settings", + "mnemonic": "P", + "id": "package-settings", + "children": + [ + { + "caption": "SublimeFiles", + "children": + [ + { + "command": "open_file", + "args": {"file": "${packages}/Sublime Files/SublimeFiles.sublime-settings"}, + "caption": "Settings – Default" + }, + { + "command": "open_file", + "args": {"file": "${packages}/User/SublimeFiles.sublime-settings"}, + "caption": "Settings – User" + }, + { + "command": "open_file", + "args": { + "file": "${packages}/Sublime Files/Default (Windows).sublime-keymap", + "platform": "Windows" + }, + "caption": "Key Bindings – Default" + }, + { + "command": "open_file", + "args": { + "file": "${packages}/Sublime Files/Default (OSX).sublime-keymap", + "platform": "OSX" + }, + "caption": "Key Bindings – Default" + }, + { + "command": "open_file", + "args": { + "file": "${packages}/Sublime Files/Default (Linux).sublime-keymap", + "platform": "Linux" + }, + "caption": "Key Bindings – Default" + }, + { + "command": "open_file", + "args": { + "file": "${packages}/User/Default (Windows).sublime-keymap", + "platform": "Windows" + }, + "caption": "Key Bindings – User" + }, + { + "command": "open_file", + "args": { + "file": "${packages}/User/Default (OSX).sublime-keymap", + "platform": "OSX" + }, + "caption": "Key Bindings – User" + }, + { + "command": "open_file", + "args": { + "file": "${packages}/User/Default (Linux).sublime-keymap", + "platform": "Linux" + }, + "caption": "Key Bindings – User" + }, + { "caption": "-" } + ] + } + ] + } + ] + } +] diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Sublime Files/README.md b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Sublime Files/README.md new file mode 100644 index 0000000..bff337f --- /dev/null +++ b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Sublime Files/README.md @@ -0,0 +1,66 @@ +Sublime Files +------------- + +__A keyboard driven file navigation/opening plugin for Sublime Text 2__ + + +Sublime Files works entirely through the command palette. By running the +Sublime Files Navigator, you can "cd" around directories similar to how +you would on a command line in order to open up files. New files will open up in new tabs. + + +Because Sublime Files actually navigates the file system by changing directories, +the navigator remembers and starts from last visited directory on subsequent uses. +To open the navigator, you can either just invoke the command palette command or +use the keybinding ctrl+super+n + + +Built with Mac OS X, but all the calls have been designed to be platform agnostic and thus should work regardless of system. However, this is untested on Windows. + +---------- + +__Installation__ + +Sublime Files can be installed through Sublime Package Control. + +---------- + +__Usage__ + +Sublime files an be activated with the command palette command: "Sublime Files: Open Navigator", or with the key command ctrl+super+n (or ctrl+alt+n for windows). +The first option will always show the current directory. Selecting another directory will navigate to that directory and selecting a file will open that file. + + +There are a few notable options: + + +- Selecting "Directory actions" will pop up a small list of actions that can be applied onto the current directory. Mainly, a user can create new files, add the directory to the current project, and open a terminal at the directory. + +- Selecting "~/" navigates to the home directory. + +- Selecting "../" navigates to the parent directory. + +- Selecting "To current View" navigates to the directory of the current file being edited. + +---------- +__Ignore file types__ + + +SublimeFiles by default will ignore \*.pyc files and \*.class files. You can modify the list of ignored files by changing the ignore\_list in SublimeFiles.sublime-settings. + + +---------- + +__Open Terminal__ + + +For OS X/Linux systems, Sublime Files can open up a terminal at the current directory navigated to. +In order for this feature to work properly, you will have to modify the term\_command field in the +SublimeFiles.sublime-settings text file +located in the SublimeFiles plugin directory. As a default, it is set to open up Terminal.app for OS X systems. + +For example, Gnome Terminal and iTerm2 users respectively will want to change term\_command in SublimeFiles.sublime-settings to: + + - "term_command": "gnome-terminal --working-directory=" + - "term_command" : "open -a iTerm\ 2 " + diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Sublime Files/SublimeFiles.sublime-settings b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Sublime Files/SublimeFiles.sublime-settings new file mode 100644 index 0000000..4184c09 --- /dev/null +++ b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Sublime Files/SublimeFiles.sublime-settings @@ -0,0 +1,10 @@ +{ + //The command to execute to open a terminal. + //Program will append the directory to open to the end of term_command. + "term_command": "open -a Terminal ", + + //list of Unix shell-style wildcard matches for file types to + //ignore when listing files in the navigator. + //By default, ignores *.pyc and *.class files. + "ignore_list": ["*.pyc", "*.class"] +} diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Sublime Files/messages.json b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Sublime Files/messages.json new file mode 100644 index 0000000..d7c7b05 --- /dev/null +++ b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Sublime Files/messages.json @@ -0,0 +1,3 @@ +{ + "install": "README.md" +} diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Sublime Files/package-metadata.json b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Sublime Files/package-metadata.json new file mode 100644 index 0000000..2edf95f --- /dev/null +++ b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Sublime Files/package-metadata.json @@ -0,0 +1 @@ +{"url": "https://github.com/al63/SublimeFiles", "version": "2013.03.29.16.32.31", "description": "Sublime Text 2 plugin for keyboard driven file navigation"} \ No newline at end of file diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Sublime Files/sublime_files.py b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Sublime Files/sublime_files.py new file mode 100644 index 0000000..3136215 --- /dev/null +++ b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Sublime Files/sublime_files.py @@ -0,0 +1,176 @@ +import sublime, sublime_plugin +import os, sys, glob +import shlex +from fnmatch import fnmatch +from subprocess import Popen + + +bullet = u'\u2022' +class SublimeFilesCommand(sublime_plugin.WindowCommand): + def run(self, command): + try: + self.home + except: + # first time starting up. ugly, but works + settings = sublime.load_settings('SublimeFiles.sublime-settings') + if os.name == 'nt': + self.home = 'USERPROFILE' + else: + self.home = 'HOME' + try: + os.chdir(os.path.dirname(sublime.active_window().active_view().file_name())) + except: + os.chdir(os.getenv(self.home)) + self.bookmark = None + self.term_command = settings.get('term_command') + self.ignore_list = settings.get('ignore_list') + self.drives = [] # for windows machines + + if command == 'navigate': + self.open_navigator() + + # function for showing panel for changing directories / opening files + def open_navigator(self): + self.dir_files = ['[' + os.getcwdu() + ']', + bullet + ' Directory actions', '..' + os.sep, '~' + os.sep] + + # annoying way to deal with windows + if sublime.platform() == 'windows': + if len(self.drives) == 0: + for i in range(ord('A'), ord('Z') + 1): + drive = chr(i) + if (os.path.exists(drive + ':\\')): + self.drives.append(drive + ':\\') + self.dir_files += self.drives + + for element in os.listdir(os.getcwdu()): + ignore_element = False + for ignore_pattern in self.ignore_list: + if fnmatch(element, ignore_pattern): + ignore_element = True + break + if not ignore_element: + fullpath = os.path.join(os.getcwdu(), element) + if os.path.isdir(fullpath): + self.dir_files.append(element + os.sep) + else: + self.dir_files.append(element) + + self.dir_files = self.dir_files[:4] + sorted(self.dir_files[4:], key=sort_files) + if self.bookmark: + self.dir_files.insert(2, bullet + ' To bookmark (' + self.bookmark + ')') + if self.window.active_view() and self.window.active_view().file_name(): + self.dir_files.insert(2, bullet + ' To current view') + self.window.show_quick_panel(self.dir_files, self.handle_navigator_option, sublime.MONOSPACE_FONT) + + # handles user's selection from open_navigator + def handle_navigator_option(self, call_value): + if call_value != -1: + option = self.dir_files[call_value] + if call_value == 0: + self.open_navigator() + elif call_value == 1: + self.open_directory_options() + elif option == '~' + os.sep: + os.chdir(os.getenv(self.home)) + elif option == '..' + os.sep: + os.chdir(os.path.pardir) + elif sublime.platform() == 'windows' and option in self.drives: + os.chdir(option) + elif option == bullet + ' To current view': + os.chdir(os.path.dirname(self.window.active_view().file_name())) + elif option.startswith(bullet + ' To bookmark'): + os.chdir(self.bookmark) + else: + fullpath = os.path.join(os.getcwdu(), self.dir_files[call_value]) + if os.path.isdir(fullpath): # navigate to directory + os.chdir(self.dir_files[call_value]) + else: # open file + self.window.open_file(os.path.join(os.getcwdu(), fullpath)) + return + self.open_navigator() + + # options for when a user selects current directory + def open_directory_options(self): + self.directory_options = [bullet + ' Add folder to project', bullet + ' Create new file', + bullet + ' Create new directory', bullet + ' Set bookmark here', bullet + ' Navigate to specific directory', bullet + ' Back'] + # terminal opening. only for osx/linux right now + if os.name == 'posix' and self.term_command: + self.directory_options.insert(0, bullet + ' Open terminal here') + self.window.show_quick_panel(self.directory_options, self.handle_directory_option, sublime.MONOSPACE_FONT) + + # handle choice for when user selects option from current directory + def handle_directory_option(self, call_value): + if call_value != -1: + selection = self.directory_options[call_value] + if selection == bullet + ' Create new file': + self.window.show_input_panel('File name: ', '', self.handle_new_file, None, None) + elif selection == bullet + ' Back': + self.open_navigator() + elif selection == bullet + ' Set bookmark here': + self.bookmark = os.getcwdu() + self.open_navigator() + elif selection == bullet + ' Open terminal here': + command = shlex.split(str(self.term_command)) + command.append(os.getcwdu()) + try: + Popen(command) + except: + sublime.error_message('Unable to open terminal') + elif selection == bullet + ' Add folder to project': + sublime_command_line(['-a', os.getcwdu()]) + elif selection == bullet + ' Create new directory': + self.window.show_input_panel('Directory name: ', '', self.handle_new_directory, None, None) + elif selection == bullet + ' Navigate to specific directory': + self.window.show_input_panel("Navigate to: ", os.getcwdu(), self.handle_cwd, None, None); + + + def handle_new_file(self, file_name): + if os.path.isfile(os.getcwdu() + os.sep + file_name): + sublime.error_message(file_name + ' already exists') + return + if os.path.isdir(os.getcwdu() + os.sep + file_name): + sublime.error_message(file_name + ' is already a directory') + return + FILE = open(os.getcwdu() + os.sep + file_name, 'a') + FILE.close() + self.window.open_file(os.getcwdu() + os.sep + file_name) + + def handle_new_directory(self, dir_name): + if os.path.isfile(os.getcwdu() + os.sep + dir_name): + sublime.error_message(dir_name + ' is already a file') + return + if os.path.isdir(os.getcwdu() + os.sep + dir_name): + sublime.error_message(dir_name + ' already exists') + return + os.makedirs(os.getcwdu() + os.sep + dir_name) + + def handle_cwd(self, new_dir): + try: + if new_dir[0] == "~": + new_dir = os.getenv(self.home) + new_dir[1:] + os.chdir(new_dir) + except: + sublime.error_message(new_dir + " does not exist") + + +def sort_files(filename): + total_weight = 0 + if filename[0] == '.': + total_weight += 2 + if filename[-1] == os.sep: + total_weight += 1 + return total_weight + +# hack to add folders to sidebar (stolen from wbond) +def get_sublime_path(): + if sublime.platform() == 'osx': + return '/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl' + elif sublime.platform() == 'linux': + return open('/proc/self/cmdline').read().split(chr(0))[0] + else: + return sys.executable + +def sublime_command_line(args): + args.insert(0, get_sublime_path()) + return Popen(args) diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/README.md b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/README.md new file mode 100644 index 0000000..14f3ae4 --- /dev/null +++ b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/README.md @@ -0,0 +1,102 @@ +# Soda Theme + +Dark and light custom UI themes for Sublime Text 2. + +Project site: [http://buymeasoda.github.com/soda-theme/](http://buymeasoda.github.com/soda-theme/) + +## Design + +![Soda Light Theme](http://buymeasoda.github.com/soda-theme/images/screenshots/soda-2-light-theme.png?v=4) + +![Soda Dark Theme](http://buymeasoda.github.com/soda-theme/images/screenshots/soda-2-dark-theme.png?v=2) + +## Installation + +Soda theme is designed to work with the latest [development build](http://www.sublimetext.com/dev) of Sublime Text 2. + +### Using Sublime Package Control + +If you are using Will Bond's excellent [Sublime Package Control](http://wbond.net/sublime_packages/package_control), you can easily install Soda Theme via the `Package Control: Install Package` menu item. The Soda Theme package is listed as `Theme - Soda` in the packages list. + +### Using Git + +Alternatively, if you are a git user, you can install the theme and keep up to date by cloning the repo directly into your `Packages` directory in the Sublime Text 2 application settings area. + +You can locate your Sublime Text 2 `Packages` directory by using the menu item `Preferences -> Browse Packages...`. + +While inside the `Packages` directory, clone the theme repository using the command below: + + git clone https://github.com/buymeasoda/soda-theme/ "Theme - Soda" + +### Download Manually + +* Download the files using the GitHub .zip download option +* Unzip the files and rename the folder to `Theme - Soda` +* Copy the folder to your Sublime Text 2 `Packages` directory + +## Activating the theme + +To configure Sublime Text 2 to use the theme: + +* Open your User Settings Preferences file `Sublime Text 2 -> Preferences -> Settings - User` +* Add (or update) your theme entry to be `"theme": "Soda Light.sublime-theme"` or `"theme": "Soda Dark.sublime-theme"` + +### Example User Settings + + { + "theme": "Soda Light.sublime-theme" + } + +## Additional Features + +### Alternate Tab Styles + +Soda Theme ships with two alternate UI tab styles. + +By default, a square tab style is used. If you'd prefer to use the original curved tab style, add the following custom setting to your `Settings - User` file: + + "soda_classic_tabs": true + +![Soda Tab Styles](http://buymeasoda.github.com/soda-theme/images/features/multiple-tab-styles.png) + +### Retina Resolution UI + +Soda Theme has been designed to take advantage of retina resolution (high-dpi) displays. Both Soda Light and Soda Dark support retina displays. + +![Soda Retina](http://buymeasoda.github.com/soda-theme/images/features/soda-retina.png) + +### Theme Customisation + +Sublime Text 2 provides an elegant way to tweak existing themes without having to duplicate or maintain a separate copy of the original theme. If there are aspects of Soda Theme that you would like to adjust, take a look at the [theme customisation](https://github.com/buymeasoda/soda-theme/wiki/Theme-customisation) wiki page. + +## Bonus Options + +### Syntax Highlighting Colour Schemes + +The Soda Light screenshot uses a modified version of Espresso Tutti Colori and the Soda Dark screenshot uses a modified version of Monokai. + +If you'd like to use the syntax highlighting schemes shown in the screenshots: + +* Download [colour-schemes.zip](http://buymeasoda.github.com/soda-theme/extras/colour-schemes.zip) +* Unzip and place the extracted `tmtheme` files in the Sublime Text 2 `Packages/User` folder +* Enable the colour scheme via `Preferences -> Color Scheme -> User` + +### Code Font + +The code font shown in the screenshot is Menlo. + +## Development + +Please note, Sublime Text dev builds move quickly and changes can occur with the theme API between releases, so there may be occasions where the theme doesn't quite work with a brand new dev release. + +While developing the theme, I have documented some [theme challenges and ideas](https://github.com/buymeasoda/soda-theme/wiki/Theme-challenges-and-ideas) encountered along the way. + +## License + +Soda Theme is licensed under the [Creative Commons Attribution-ShareAlike 3.0 License](http://creativecommons.org/licenses/by-sa/3.0/). You are free to share and remix the theme, however please abide by the license terms when doing so. + +The following details apply to the Creative Commons license "author specified" components: + +* Attribution example: Based on Soda Theme by Ian Hill (http://buymeasoda.com/) + +* Naming guidelines: If you create and distribute a derivative theme, please give your theme a unique and original name that does not directly include "Soda Theme" (or a close variant) in the main project title, repo name or Package Control name. \ No newline at end of file diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark.sublime-theme b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark.sublime-theme new file mode 100644 index 0000000..6c4a634 --- /dev/null +++ b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark.sublime-theme @@ -0,0 +1,969 @@ +[ + +// +// TABS (REGULAR) +// + + // Tab set + { + "class": "tabset_control", + "layer0.texture": "Theme - Soda/Soda Dark/tabset-background.png", + "layer0.inner_margin": [1, 7], + "layer0.opacity": 1.0, + "content_margin": [-4, 0, -4, 3], + "tab_overlap": 5, + "tab_width": 180, + "tab_min_width": 45, + "tab_height": 25, + "mouse_wheel_switch": false + }, + { + "class": "tabset_control", + "settings": ["mouse_wheel_switches_tabs"], + "mouse_wheel_switch": true + }, + // Tab element + { + "class": "tab_control", + "content_margin": [12, 3, 12, 3], + "max_margin_trim": 0, + "hit_test_level": 0.0, + "layer0.texture": "Theme - Soda/Soda Dark/tab-inactive.png", + "layer0.inner_margin": [5, 5], + "layer0.opacity": 1.0 + }, + // Tab close state + { + "class": "tab_control", + "settings": ["show_tab_close_buttons"], + "content_margin": [12, 3, 7, 3] + }, + // Tab hover state + { + "class": "tab_control", + "attributes": ["hover"], + "layer0.texture": "Theme - Soda/Soda Dark/tab-hover.png" + }, + // Tab active state + { + "class": "tab_control", + "attributes": ["selected"], + "layer0.texture": "Theme - Soda/Soda Dark/tab-active.png" + }, + // Tab dirty state (close button hidden) + { + "class": "tab_control", + "settings": ["!show_tab_close_buttons"], + "attributes": ["dirty"], + "content_margin": [12, 3, 7, 3] + }, + +// +// TABS (CLASSIC) +// + + // Tab set + { + "class": "tabset_control", + "settings": ["soda_classic_tabs"], + "content_margin": [3, 4, 3, 3], + "tab_overlap": 24, + "tab_height": 28 + }, + // Tab element + { + "class": "tab_control", + "settings": ["soda_classic_tabs"], + "content_margin": [22, 6, 22, 4], + "hit_test_level": 0.5, + "layer0.texture": "Theme - Soda/Soda Dark/classic/tab-inactive.png", + "layer0.inner_margin": [18, 4] + }, + // Tab close state + { + "class": "tab_control", + "settings": ["soda_classic_tabs", "show_tab_close_buttons"], + "content_margin": [22, 6, 15, 4] + }, + // Tab hover state + { + "class": "tab_control", + "settings": ["soda_classic_tabs"], + "attributes": ["hover"], + "layer0.texture": "Theme - Soda/Soda Dark/classic/tab-hover.png" + }, + // Tab active state + { + "class": "tab_control", + "settings": ["soda_classic_tabs"], + "attributes": ["selected"], + "layer0.texture": "Theme - Soda/Soda Dark/classic/tab-active.png" + }, + // Tab dirty state (close button hidden) + { + "class": "tab_control", + "settings": ["soda_classic_tabs", "!show_tab_close_buttons"], + "attributes": ["dirty"], + "content_margin": [22, 6, 15, 4] + }, + +// +// TAB BUTTONS +// + + // Tab close button + { + "class": "tab_close_button", + "content_margin": [0, 0], + "layer0.texture": "Theme - Soda/Soda Dark/tab-close-inactive.png", + "layer0.opacity": 1.0, + "layer0.inner_margin": 0 + }, + { + "class": "tab_close_button", + "settings": ["show_tab_close_buttons"], + "content_margin": [8, 8] + }, + { + "class": "tab_close_button", + "parents": [{"class": "tab_control", "attributes": ["hover"]}], + "layer0.texture": "Theme - Soda/Soda Dark/tab-close.png", + "layer0.opacity": 1.0 + }, + { + "class": "tab_close_button", + "parents": [{"class": "tab_control", "attributes": ["selected"]}], + "layer0.texture": "Theme - Soda/Soda Dark/tab-close.png", + "layer0.opacity": 1.0 + }, + // Tab dirty button + { + "class": "tab_close_button", + "parents": [{"class": "tab_control", "attributes": ["dirty"]}], + "layer0.texture": "Theme - Soda/Soda Dark/tab-dirty-inactive.png" + }, + { + "class": "tab_close_button", + "settings": ["!show_tab_close_buttons"], + "parents": [{"class": "tab_control", "attributes": ["dirty"]}], + "content_margin": [8, 8] + }, + { + "class": "tab_close_button", + "parents": [{"class": "tab_control", "attributes": ["dirty", "hover"]}], + "layer0.opacity": 1.0 + }, + { + "class": "tab_close_button", + "parents": [{"class": "tab_control", "attributes": ["dirty", "selected"]}], + "layer0.texture": "Theme - Soda/Soda Dark/tab-dirty.png" + }, + // Tab highlight button + { + "class": "tab_close_button", + "settings": ["highlight_modified_tabs"], + "parents": [{"class": "tab_control", "attributes": ["dirty"]}], + "layer0.texture": "Theme - Soda/Soda Dark/tab-highlight-inactive.png" + }, + { + "class": "tab_close_button", + "settings": ["highlight_modified_tabs"], + "parents": [{"class": "tab_control", "attributes": ["dirty", "selected"]}], + "layer0.texture": "Theme - Soda/Soda Dark/tab-highlight.png" + }, + // Tab close button hover + { + "class": "tab_close_button", + "settings": ["show_tab_close_buttons"], + "attributes": ["hover"], + "layer0.texture": "Theme - Soda/Soda Dark/tab-close-hover.png" + }, + // Tab close button pressed + { + "class": "tab_close_button", + "settings": ["show_tab_close_buttons"], + "attributes": ["pressed"], + "layer0.texture": "Theme - Soda/Soda Dark/tab-close-pressed.png" + }, + +// +// TAB LABELS +// + + { + "class": "tab_label", + "fade": true, + "fg": [170, 170, 170], + "shadow_color": [25, 25, 25], + "shadow_offset": [0, -1] + }, + { + "class": "tab_label", + "parents": [{"class": "tab_control", "attributes": ["hover"]}], + "fg": [200, 200, 200], + "shadow_color": [30, 30, 30] + }, + { + "class": "tab_label", + "parents": [{"class": "tab_control", "attributes": ["selected"]}], + "fg": [230, 230, 230], + "shadow_color": [35, 35, 35] + }, + +// +// FOLD BUTTONS +// + + { + "class": "fold_button_control", + "layer0.texture": "Theme - Soda/Soda Dark/fold-closed.png", + "layer0.opacity": 1.0, + "layer0.inner_margin": 0, + "content_margin": [8, 8] + }, + { + "class": "fold_button_control", + "attributes": ["hover"], + "layer0.texture": "Theme - Soda/Soda Dark/fold-closed-hover.png" + }, + { + "class": "fold_button_control", + "attributes": ["expanded"], + "layer0.texture": "Theme - Soda/Soda Dark/fold-open.png" + }, + { + "class": "fold_button_control", + "attributes": ["expanded", "hover"], + "layer0.texture": "Theme - Soda/Soda Dark/fold-open-hover.png" + }, + +// +// STANDARD SCROLLBARS +// + + // Standard vertical scroll bar + { + "class": "scroll_bar_control", + "layer0.texture": "Theme - Soda/Soda Dark/standard-scrollbar-vertical.png", + "layer0.opacity": 1.0, + "layer0.inner_margin": [2, 6], + "blur": false + }, + // Standard horizontal scroll bar + { + "class": "scroll_bar_control", + "attributes": ["horizontal"], + "layer0.texture": "Theme - Soda/Soda Dark/standard-scrollbar-horizontal.png", + "layer0.inner_margin": [6, 2], + "blur": false + }, + // Standard scroll bar corner + { + "class": "scroll_corner_control", + "layer0.texture": "Theme - Soda/Soda Dark/standard-scrollbar-corner.png", + "layer0.inner_margin": [2, 2], + "layer0.opacity": 1.0 + }, + // Standard vertical scroll puck + { + "class": "puck_control", + "layer0.texture": "Theme - Soda/Soda Dark/standard-puck-vertical.png", + "layer0.opacity": 1.0, + "layer0.inner_margin": [0, 10], + "content_margin": [8, 12], + "blur": false + }, + // Standard horizontal scroll puck + { + "class": "puck_control", + "attributes": ["horizontal"], + "layer0.texture": "Theme - Soda/Soda Dark/standard-puck-horizontal.png", + "layer0.inner_margin": [10, 0], + "content_margin": [12, 8], + "blur": false + }, + +// +// OVERLAY SCROLLBARS +// + + // Overlay toggle scroll bar + { + "class": "scroll_area_control", + "settings": ["overlay_scroll_bars"], + "overlay": true + }, + { + "class": "scroll_area_control", + "settings": ["!overlay_scroll_bars"], + "overlay": false + }, + // Overlay vertical scroll bar + { + "class": "scroll_bar_control", + "settings": ["overlay_scroll_bars"], + "layer0.texture": "Theme - Soda/Soda Dark/overlay-scrollbar-vertical.png", + "layer0.inner_margin": [0, 5], + "blur": true + }, + // Overlay horizontal scroll bar + { + "class": "scroll_bar_control", + "settings": ["overlay_scroll_bars"], + "attributes": ["horizontal"], + "layer0.texture": "Theme - Soda/Soda Dark/overlay-scrollbar-horizontal.png", + "layer0.inner_margin": [5, 0], + "blur": true + }, + // Overlay vertical puck + { + "class": "puck_control", + "settings": ["overlay_scroll_bars"], + "layer0.texture": "Theme - Soda/Soda Dark/overlay-puck-vertical.png", + "layer0.inner_margin": [0, 5], + "content_margin": [5, 20], + "blur": true + }, + // Overlay horizontal puck + { + "class": "puck_control", + "settings": ["overlay_scroll_bars"], + "attributes": ["horizontal"], + "layer0.texture": "Theme - Soda/Soda Dark/overlay-puck-horizontal.png", + "layer0.inner_margin": [5, 0], + "content_margin": [20, 5], + "blur": true + }, + // Overlay light puck (for dark content) + { + "class": "puck_control", + "settings": ["overlay_scroll_bars"], + "attributes": ["dark"], + "layer0.texture": "Theme - Soda/Soda Dark/overlay-dark-puck-vertical.png" + }, + // Overlay light horizontal puck (for dark content) + { + "class": "puck_control", + "settings": ["overlay_scroll_bars"], + "attributes": ["horizontal", "dark"], + "layer0.texture": "Theme - Soda/Soda Dark/overlay-dark-puck-horizontal.png" + }, + +// +// EMPTY WINDOW BACKGROUND +// + + { + "class": "sheet_container_control", + "layer0.tint": [25, 25, 25], + "layer0.opacity": 1.0 + }, + +// +// GRID LAYOUT +// + + { + "class": "grid_layout_control", + "border_size": 1, + "border_color": [70, 70, 70] + }, + +// +// MINI MAP +// + + { + "class": "minimap_control", + "viewport_color": [255, 255, 255, 35] + }, + +// +// LABELS +// + + // General labels + { + "class": "label_control", + "color": [204, 204, 204] + }, + // Text field labels + { + "class": "label_control", + "parents": [{"class": "panel_control"}], + "shadow_color": [50, 50, 50], + "shadow_offset": [0, -1] + }, + // Button labels + { + "class": "label_control", + "parents": [{"class": "button_control"}], + "shadow_color": [55, 55, 55], + "shadow_offset": [0, -1] + }, + +// +// TOOLTIP +// + + // Tooltip container + { + "class": "tool_tip_control", + "layer0.texture": "Theme - Soda/Soda Dark/tooltip.png", + "layer0.inner_margin": [1, 1], + "layer0.opacity": 0.95, + "content_margin": [3, 3] + }, + // Tooltip content + { + "class": "tool_tip_label_control", + "color": [0, 0, 0] + }, + +// +// STATUS BAR +// + + // Status bar container + { + "class": "status_bar", + "layer0.texture": "Theme - Soda/Soda Dark/status-bar-background.png", + "layer0.opacity": 1.0, + "layer0.inner_margin": [2, 2], + "content_margin": [8, 4, 8, 4] + }, + // Status bar button + { + "class": "status_button", + "min_size": [100, 0] + }, + // Status bar label + { + "class": "label_control", + "parents": [{"class": "status_bar"}], + "color": [150, 150, 150], + "shadow_color": [25, 25, 25], + "shadow_offset": [0, -1] + }, + +// +// SIDEBAR +// + + // Sidebar container + { + "class": "sidebar_container", + "layer0.texture": "Theme - Soda/Soda Dark/sidebar-bg.png", + "layer0.opacity": 1.0, + "layer0.inner_margin": [1, 1, 2, 1], + "content_margin": [0, 0, 1, 0] + }, + // Sidebar tree + { + "class": "sidebar_tree", + "row_padding": [8, 3], + "indent": 15, + "indent_offset": 15, + "indent_top_level": false, + "dark_content": true + }, + // Sidebar rows + { + "class": "tree_row", + "layer0.texture": "Theme - Soda/Soda Dark/sidebar-row-selected.png", + "layer0.opacity": 0.0, + "layer0.inner_margin": [1, 1] + }, + // Sidebar row selected + { + "class": "tree_row", + "attributes": ["selected"], + "layer0.opacity": 1.0 + }, + // Sidebar heading + { + "class": "sidebar_heading", + "color": [210, 210, 210], + "font.bold": true, + "shadow_color": [0, 0, 0], + "shadow_offset": [0, -1] + }, + // Sidebar entry + { + "class": "sidebar_label", + "color": [125, 125, 125], + "shadow_color": [0, 0, 0], + "shadow_offset": [0, -1] + }, + // Sidebar folder entry + { + "class": "sidebar_label", + "parents": [{"class": "tree_row", "attributes": ["expandable"]}], + "color": [190, 190, 190] + }, + { + "class": "sidebar_label", + "parents": [{"class": "tree_row", "attributes": ["expandable", "hover"]}], + "color": [235, 235, 235] + }, + { + "class": "sidebar_label", + "parents": [{"class": "tree_row", "attributes": ["expandable"]}], + "settings": ["bold_folder_labels"], + "font.bold": true + }, + // Sidebar entry selected + { + "class": "sidebar_label", + "parents": [{"class": "tree_row", "attributes": ["selected"]}], + "color": [210, 210, 210], + "shadow_color": [0, 0, 0], + "shadow_offset": [0, 1] + }, + +// +// SIDEBAR - OPEN FILE ICONS +// + + // Sidebar file close + { + "class": "close_button", + "layer0.texture": "Theme - Soda/Soda Dark/file-close.png", + "layer0.opacity": 0.0, + "layer0.inner_margin": 0, + "content_margin": [8, 8] + }, + { + "class": "close_button", + "parents": [{"class": "tree_row", "attributes": ["hover"]}], + "layer0.opacity": 1.0 + }, + // Sidebar file dirty + { + "class": "close_button", + "attributes": ["dirty"], + "layer0.texture": "Theme - Soda/Soda Dark/file-dirty.png", + "layer0.opacity": 1.0 + }, + { + "class": "close_button", + "attributes": ["dirty"], + "parents": [{"class": "tree_row", "attributes": ["selected"]}], + "layer0.texture": "Theme - Soda/Soda Dark/file-dirty-selected.png" + }, + { + "class": "close_button", + "attributes": ["dirty"], + "parents": [{"class": "tree_row", "attributes": ["hover"]}], + "layer0.texture": "Theme - Soda/Soda Dark/file-close.png" + }, + // Sidebar file close hover + { + "class": "close_button", + "attributes": ["hover"], + "layer0.texture": "Theme - Soda/Soda Dark/file-close-hover.png" + }, + { + "class": "close_button", + "parents": [{"class": "tree_row", "attributes": ["hover", "selected"]}], + "layer0.texture": "Theme - Soda/Soda Dark/file-close-selected.png" + }, + +// +// SIDEBAR - GENERAL FILE ICONS +// + + // Sidebar group closed + { + "class": "disclosure_button_control", + "content_margin": [8, 8], + "layer0.texture": "Theme - Soda/Soda Dark/group-closed.png", + "layer0.opacity": 1.0, + "layer0.inner_margin": 0 + }, + { + "class": "disclosure_button_control", + "parents": [{"class": "tree_row", "attributes": ["hover"]}], + "layer0.texture": "Theme - Soda/Soda Dark/group-closed-hover.png" + }, + { + "class": "disclosure_button_control", + "parents": [{"class": "tree_row", "attributes": ["selected"]}], + "layer0.texture": "Theme - Soda/Soda Dark/group-closed-selected.png" + }, + // Sidebar group open + { + "class": "disclosure_button_control", + "attributes": ["expanded"], + "layer0.texture": "Theme - Soda/Soda Dark/group-open.png" + }, + { + "class": "disclosure_button_control", + "attributes": ["expanded"], + "parents": [{"class": "tree_row", "attributes": ["hover"]}], + "layer0.texture": "Theme - Soda/Soda Dark/group-open-hover.png" + }, + { + "class": "disclosure_button_control", + "attributes": ["expanded"], + "parents": [{"class": "tree_row", "attributes": ["selected"]}], + "layer0.texture": "Theme - Soda/Soda Dark/group-open-selected.png" + }, + +// +// STANDARD TEXT BUTTONS +// + + // Default button state + { + "class": "button_control", + "content_margin": [6, 5, 6, 6], + "min_size": [75, 0], + "layer0.texture": "Theme - Soda/Soda Dark/btn-large.png", + "layer0.opacity": 1.0, + "layer0.inner_margin": [6, 6] + }, + // Pressed button state + { + "class": "button_control", + "attributes": ["pressed"], + "layer0.texture": "Theme - Soda/Soda Dark/btn-large-on.png" + }, + +// +// TEXT INPUT FIELD +// + + // Text input field item + { + "class": "text_line_control", + "layer0.texture": "Theme - Soda/Soda Dark/text-field.png", + "layer0.opacity": 1.0, + "layer0.inner_margin": [4, 5, 4, 3], + "content_margin": [3, 3] + }, + +// +// PANEL BACKGROUNDS +// + + // Bottom panel background + { + "class": "panel_control", + "layer0.texture": "Theme - Soda/Soda Dark/panel-background.png", + "layer0.inner_margin": [2, 2, 2, 2], + "layer0.opacity": 1.0, + "content_margin": [2, 3, 2, 1] + }, + // Quick panel background + { + "class": "overlay_control", + "settings": ["!soda_retina_fix"], + "layer0.texture": "Theme - Soda/Soda Dark/quick-panel-background.png", + "layer0.inner_margin": [12, 6, 12, 15], + "layer0.opacity": 1.0, + "layer1.texture": "Theme - Soda/Soda Dark/quick-panel-sections.png", + "layer1.inner_margin": [12, 40, 12, 19], + "layer1.opacity": 1.0, + "content_margin": [11, 8, 11, 17] + }, + // Quick panel background (Retina fix) + { + "class": "overlay_control", + "settings": ["soda_retina_fix"], + "layer0.tint": [67, 67, 67], + "layer0.opacity": 1.0, + "content_margin": [6, 8, 6, 6] + }, + +// +// QUICK PANEL +// + + { + "class": "quick_panel", + "row_padding": [5, 2], + "layer0.tint": [33, 33, 33], + "layer0.opacity": 1.0, + "dark_content": true + }, + { + "class": "quick_panel_row", + "layer0.texture": "Theme - Soda/Soda Dark/quick-panel-row.png", + "layer0.inner_margin": [2, 2, 2, 2], + "layer0.opacity": 1.0 + }, + { + "class": "quick_panel_row", + "attributes": ["selected"], + "layer0.texture": "Theme - Soda/Soda Dark/quick-panel-row-selected.png" + }, + { + "class": "quick_panel_label", + "fg": [210, 210, 210, 255], + "match_fg": [126, 199, 239, 255], + "selected_fg": [255, 255, 255, 255], + "selected_match_fg": [166, 229, 255, 255] + }, + { + "class": "quick_panel_path_label", + "fg": [130, 130, 130, 255], + "match_fg": [220, 220, 220, 255], + "selected_fg": [175, 175, 175, 255], + "selected_match_fg": [220, 220, 220, 255] + }, + { + "class": "quick_panel_score_label", + "fg": [126, 199, 239, 255], + "selected_fg": [166, 229, 255, 255] + }, + +// +// MINI QUICK PANEL +// + + { + "class": "mini_quick_panel_row", + "layer0.texture": "Theme - Soda/Soda Dark/quick-panel-row.png", + "layer0.inner_margin": [2, 2, 2, 2], + "layer0.opacity": 1.0 + }, + { + "class": "mini_quick_panel_row", + "attributes": ["selected"], + "layer0.texture": "Theme - Soda/Soda Dark/quick-panel-row-selected.png" + }, + +// +// CODE COMPLETION DROPDOWN +// + + { + "class": "popup_control", + "content_margin": [2, 2], + "layer0.tint": [30, 30, 30], + "layer0.opacity": 1.0 + }, + { + "class": "auto_complete", + "row_padding": [4, 2] + }, + { + "class": "auto_complete_label", + "fg": [140, 140, 140], + "match_fg": [220, 220, 220], + "selected_fg": [180, 180, 180], + "selected_match_fg": [245, 245, 245] + }, + { + "class": "table_row", + "layer0.texture": "Theme - Soda/Soda Dark/autocomplete-row-selected.png", + "layer0.opacity": 0.0, + "layer0.inner_margin": [3, 1] + }, + { + "class": "table_row", + "attributes": ["selected"], + "layer0.opacity": 1.0 + }, + +// +// BOTTOM PANEL BUTTONS +// + + // Button group middle + { + "class": "icon_button_control", + "layer0.texture": "Theme - Soda/Soda Dark/btn-group-middle.png", + "layer0.inner_margin": [6, 6], + "layer0.opacity": 1.0, + "content_margin": [3, 3] + }, + { + "class": "icon_button_control", + "attributes": ["selected"], + "layer0.texture": "Theme - Soda/Soda Dark/btn-group-middle-on.png" + }, + // Button group left + { + "class": "icon_button_control", + "attributes": ["left"], + "layer0.texture": "Theme - Soda/Soda Dark/btn-group-left.png", + "content_margin": [4, 3, 3, 3] + }, + { + "class": "icon_button_control", + "attributes": ["left", "selected"], + "layer0.texture": "Theme - Soda/Soda Dark/btn-group-left-on.png" + }, + // Button group right + { + "class": "icon_button_control", + "attributes": ["right"], + "layer0.texture": "Theme - Soda/Soda Dark/btn-group-right.png", + "content_margin": [3, 3, 4, 3] + }, + { + "class": "icon_button_control", + "attributes": ["right", "selected"], + "layer0.texture": "Theme - Soda/Soda Dark/btn-group-right-on.png" + }, + // Button single + { + "class": "icon_button_control", + "attributes": ["left", "right"], + "layer0.texture": "Theme - Soda/Soda Dark/btn-small.png", + "content_margin": [4, 3] + }, + { + "class": "icon_button_control", + "attributes": ["left", "right", "selected"], + "layer0.texture": "Theme - Soda/Soda Dark/btn-small-on.png" + }, + +// +// BOTTOM PANEL ICONS - GROUP 1 +// + + // Regex search button + { + "class": "icon_regex", + "layer0.texture": "Theme - Soda/Soda Dark/icon-regex-off.png", + "layer0.opacity": 1.0, + "content_margin": [9, 9] + }, + { + "class": "icon_regex", + "parents": [{"class": "icon_button_control", "attributes": ["selected"]}], + "layer0.texture": "Theme - Soda/Soda Dark/icon-regex-on.png" + }, + // Case sensitive search button + { + "class": "icon_case", + "layer0.texture": "Theme - Soda/Soda Dark/icon-case-off.png", + "layer0.opacity": 1.0, + "content_margin": [9, 9] + }, + { + "class": "icon_case", + "parents": [{"class": "icon_button_control", "attributes": ["selected"]}], + "layer0.texture": "Theme - Soda/Soda Dark/icon-case-on.png" + }, + // Match whole word search button + { + "class": "icon_whole_word", + "layer0.texture": "Theme - Soda/Soda Dark/icon-word-off.png", + "layer0.opacity": 1.0, + "content_margin": [9, 9] + }, + { + "class": "icon_whole_word", + "parents": [{"class": "icon_button_control", "attributes": ["selected"]}], + "layer0.texture": "Theme - Soda/Soda Dark/icon-word-on.png" + }, + +// +// BOTTOM PANEL ICONS - GROUP 1 (EXTENDED: FIND IN FILES) +// + + // Show search context button + { + "class": "icon_context", + "layer0.texture": "Theme - Soda/Soda Dark/icon-context-off.png", + "layer0.opacity": 1.0, + "content_margin": [9, 9] + }, + { + "class": "icon_context", + "parents": [{"class": "icon_button_control", "attributes": ["selected"]}], + "layer0.texture": "Theme - Soda/Soda Dark/icon-context-on.png" + }, + // Use search buffer + { + "class": "icon_use_buffer", + "layer0.texture": "Theme - Soda/Soda Dark/icon-buffer-off.png", + "layer0.opacity": 1.0, + "content_margin": [9, 9] + }, + { + "class": "icon_use_buffer", + "parents": [{"class": "icon_button_control", "attributes": ["selected"]}], + "layer0.texture": "Theme - Soda/Soda Dark/icon-buffer-on.png" + }, + +// +// BOTTOM PANEL ICONS - GROUP 2 +// + + // Reverse search direction button + { + "class": "icon_reverse", + "layer0.texture": "Theme - Soda/Soda Dark/icon-reverse-off.png", + "layer0.opacity": 1.0, + "content_margin": [9, 9] + }, + { + "class": "icon_reverse", + "parents": [{"class": "icon_button_control", "attributes": ["selected"]}], + "layer0.texture": "Theme - Soda/Soda Dark/icon-reverse-on.png" + }, + // Search wrap button + { + "class": "icon_wrap", + "layer0.texture": "Theme - Soda/Soda Dark/icon-wrap-off.png", + "layer0.opacity": 1.0, + "content_margin": [9, 9] + }, + { + "class": "icon_wrap", + "parents": [{"class": "icon_button_control", "attributes": ["selected"]}], + "layer0.texture": "Theme - Soda/Soda Dark/icon-wrap-on.png" + }, + // Search in selection button + { + "class": "icon_in_selection", + "layer0.texture": "Theme - Soda/Soda Dark/icon-selection-off.png", + "layer0.opacity": 1.0, + "content_margin": [9, 9] + }, + { + "class": "icon_in_selection", + "parents": [{"class": "icon_button_control", "attributes": ["selected"]}], + "layer0.texture": "Theme - Soda/Soda Dark/icon-selection-on.png" + }, + +// +// BOTTOM PANEL ICONS - GROUP 3 +// + + // Preserve case button + { + "class": "icon_preserve_case", + "layer0.texture": "Theme - Soda/Soda Dark/icon-preserve-off.png", + "layer0.opacity": 1.0, + "content_margin": [9, 9] + }, + { + "class": "icon_preserve_case", + "parents": [{"class": "icon_button_control", "attributes": ["selected"]}], + "layer0.texture": "Theme - Soda/Soda Dark/icon-preserve-on.png" + }, + +// +// BOTTOM PANEL ICONS - GROUP 4 +// + + // Highlight results button + { + "class": "icon_highlight", + "layer0.texture": "Theme - Soda/Soda Dark/icon-highlight-off.png", + "layer0.opacity": 1.0, + "content_margin": [9, 9] + }, + { + "class": "icon_highlight", + "parents": [{"class": "icon_button_control", "attributes": ["selected"]}], + "layer0.texture": "Theme - Soda/Soda Dark/icon-highlight-on.png" + } + +] diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/.gitignore b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/.gitignore new file mode 100644 index 0000000..f05fcdc --- /dev/null +++ b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/.gitignore @@ -0,0 +1 @@ +*.cache \ No newline at end of file diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/Widget - Soda Dark.stTheme b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/Widget - Soda Dark.stTheme new file mode 100644 index 0000000..42cbb94 --- /dev/null +++ b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/Widget - Soda Dark.stTheme @@ -0,0 +1,30 @@ + + + + + author + Ian Hill + comment + A widget theme for the UI components of the Soda Dark theme. + name + Soda Dark - Widget Theme + settings + + + settings + + background + #383838 + caret + #F8F8F8 + foreground + #F8F8F8 + invisibles + #3B3B3B + selection + #222222 + + + + + diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/Widget - Soda Dark.sublime-settings b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/Widget - Soda Dark.sublime-settings new file mode 100644 index 0000000..d5787af --- /dev/null +++ b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/Widget - Soda Dark.sublime-settings @@ -0,0 +1,4 @@ +{ + "color_scheme": "Packages/Theme - Soda/Soda Dark/Widget - Soda Dark.stTheme", + "draw_shadows": false +} diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/autocomplete-row-selected.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/autocomplete-row-selected.png new file mode 100644 index 0000000..336555c Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/autocomplete-row-selected.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/autocomplete-row-selected@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/autocomplete-row-selected@2x.png new file mode 100644 index 0000000..2a3d7b4 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/autocomplete-row-selected@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/bookmark.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/bookmark.png new file mode 100644 index 0000000..8d15c63 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/bookmark.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/btn-group-left-on.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/btn-group-left-on.png new file mode 100644 index 0000000..3a25d0c Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/btn-group-left-on.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/btn-group-left-on@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/btn-group-left-on@2x.png new file mode 100644 index 0000000..d9ed060 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/btn-group-left-on@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/btn-group-left.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/btn-group-left.png new file mode 100644 index 0000000..17bd507 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/btn-group-left.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/btn-group-left@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/btn-group-left@2x.png new file mode 100644 index 0000000..34efcdf Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/btn-group-left@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/btn-group-middle-on.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/btn-group-middle-on.png new file mode 100644 index 0000000..9b1126f Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/btn-group-middle-on.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/btn-group-middle-on@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/btn-group-middle-on@2x.png new file mode 100644 index 0000000..268e9f5 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/btn-group-middle-on@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/btn-group-middle.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/btn-group-middle.png new file mode 100644 index 0000000..046049c Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/btn-group-middle.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/btn-group-middle@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/btn-group-middle@2x.png new file mode 100644 index 0000000..2bd8146 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/btn-group-middle@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/btn-group-right-on.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/btn-group-right-on.png new file mode 100644 index 0000000..968db9b Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/btn-group-right-on.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/btn-group-right-on@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/btn-group-right-on@2x.png new file mode 100644 index 0000000..7c56ad0 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/btn-group-right-on@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/btn-group-right.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/btn-group-right.png new file mode 100644 index 0000000..60a7aa0 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/btn-group-right.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/btn-group-right@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/btn-group-right@2x.png new file mode 100644 index 0000000..8ad4f40 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/btn-group-right@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/btn-large-on.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/btn-large-on.png new file mode 100644 index 0000000..b97be2d Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/btn-large-on.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/btn-large-on@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/btn-large-on@2x.png new file mode 100644 index 0000000..f4bddc9 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/btn-large-on@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/btn-large.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/btn-large.png new file mode 100644 index 0000000..d4042c9 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/btn-large.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/btn-large@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/btn-large@2x.png new file mode 100644 index 0000000..046438a Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/btn-large@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/btn-small-on.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/btn-small-on.png new file mode 100644 index 0000000..92881b7 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/btn-small-on.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/btn-small-on@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/btn-small-on@2x.png new file mode 100644 index 0000000..978b140 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/btn-small-on@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/btn-small.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/btn-small.png new file mode 100644 index 0000000..d4042c9 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/btn-small.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/btn-small@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/btn-small@2x.png new file mode 100644 index 0000000..046438a Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/btn-small@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/circle.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/circle.png new file mode 100644 index 0000000..a007d54 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/circle.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/classic/tab-active.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/classic/tab-active.png new file mode 100644 index 0000000..ef782f9 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/classic/tab-active.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/classic/tab-active@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/classic/tab-active@2x.png new file mode 100644 index 0000000..17d475f Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/classic/tab-active@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/classic/tab-hover.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/classic/tab-hover.png new file mode 100644 index 0000000..c21168c Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/classic/tab-hover.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/classic/tab-hover@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/classic/tab-hover@2x.png new file mode 100644 index 0000000..85d9832 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/classic/tab-hover@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/classic/tab-inactive.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/classic/tab-inactive.png new file mode 100644 index 0000000..e078572 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/classic/tab-inactive.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/classic/tab-inactive@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/classic/tab-inactive@2x.png new file mode 100644 index 0000000..b7ceb0c Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/classic/tab-inactive@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/dot.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/dot.png new file mode 100644 index 0000000..0216b46 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/dot.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/file-close-hover.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/file-close-hover.png new file mode 100644 index 0000000..2905761 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/file-close-hover.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/file-close-hover@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/file-close-hover@2x.png new file mode 100644 index 0000000..6dd2b02 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/file-close-hover@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/file-close-selected.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/file-close-selected.png new file mode 100644 index 0000000..989c036 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/file-close-selected.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/file-close-selected@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/file-close-selected@2x.png new file mode 100644 index 0000000..90e2578 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/file-close-selected@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/file-close.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/file-close.png new file mode 100644 index 0000000..f5b0ed6 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/file-close.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/file-close@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/file-close@2x.png new file mode 100644 index 0000000..5181e70 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/file-close@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/file-dirty-selected.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/file-dirty-selected.png new file mode 100644 index 0000000..7513aef Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/file-dirty-selected.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/file-dirty-selected@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/file-dirty-selected@2x.png new file mode 100644 index 0000000..5914886 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/file-dirty-selected@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/file-dirty.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/file-dirty.png new file mode 100644 index 0000000..8edd2e1 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/file-dirty.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/file-dirty@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/file-dirty@2x.png new file mode 100644 index 0000000..3fa444c Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/file-dirty@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/fold-closed-hover.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/fold-closed-hover.png new file mode 100644 index 0000000..c2b1772 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/fold-closed-hover.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/fold-closed-hover@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/fold-closed-hover@2x.png new file mode 100644 index 0000000..ffc28bf Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/fold-closed-hover@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/fold-closed.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/fold-closed.png new file mode 100644 index 0000000..4b15636 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/fold-closed.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/fold-closed@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/fold-closed@2x.png new file mode 100644 index 0000000..f9092e7 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/fold-closed@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/fold-open-hover.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/fold-open-hover.png new file mode 100644 index 0000000..cfcb481 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/fold-open-hover.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/fold-open-hover@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/fold-open-hover@2x.png new file mode 100644 index 0000000..b3da623 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/fold-open-hover@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/fold-open.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/fold-open.png new file mode 100644 index 0000000..55c3a34 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/fold-open.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/fold-open@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/fold-open@2x.png new file mode 100644 index 0000000..f7d4c89 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/fold-open@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/fold.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/fold.png new file mode 100644 index 0000000..8008475 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/fold.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/group-closed-hover.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/group-closed-hover.png new file mode 100644 index 0000000..acc7e62 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/group-closed-hover.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/group-closed-hover@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/group-closed-hover@2x.png new file mode 100644 index 0000000..0a20c3f Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/group-closed-hover@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/group-closed-selected.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/group-closed-selected.png new file mode 100644 index 0000000..fbe4d30 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/group-closed-selected.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/group-closed-selected@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/group-closed-selected@2x.png new file mode 100644 index 0000000..5e96a03 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/group-closed-selected@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/group-closed.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/group-closed.png new file mode 100644 index 0000000..a9b08c7 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/group-closed.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/group-closed@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/group-closed@2x.png new file mode 100644 index 0000000..6fc2485 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/group-closed@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/group-open-hover.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/group-open-hover.png new file mode 100644 index 0000000..996ece4 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/group-open-hover.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/group-open-hover@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/group-open-hover@2x.png new file mode 100644 index 0000000..07234e5 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/group-open-hover@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/group-open-selected.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/group-open-selected.png new file mode 100644 index 0000000..71446e4 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/group-open-selected.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/group-open-selected@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/group-open-selected@2x.png new file mode 100644 index 0000000..0be0189 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/group-open-selected@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/group-open.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/group-open.png new file mode 100644 index 0000000..60e8735 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/group-open.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/group-open@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/group-open@2x.png new file mode 100644 index 0000000..0bdf757 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/group-open@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-buffer-off.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-buffer-off.png new file mode 100644 index 0000000..c766f0b Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-buffer-off.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-buffer-off@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-buffer-off@2x.png new file mode 100644 index 0000000..3f08ebc Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-buffer-off@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-buffer-on.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-buffer-on.png new file mode 100644 index 0000000..0ea1d87 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-buffer-on.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-buffer-on@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-buffer-on@2x.png new file mode 100644 index 0000000..8fb36fb Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-buffer-on@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-case-off.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-case-off.png new file mode 100644 index 0000000..98cfe0b Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-case-off.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-case-off@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-case-off@2x.png new file mode 100644 index 0000000..1c27119 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-case-off@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-case-on.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-case-on.png new file mode 100644 index 0000000..84813cd Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-case-on.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-case-on@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-case-on@2x.png new file mode 100644 index 0000000..05770df Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-case-on@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-context-off.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-context-off.png new file mode 100644 index 0000000..7db1bc4 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-context-off.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-context-off@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-context-off@2x.png new file mode 100644 index 0000000..2a0557c Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-context-off@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-context-on.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-context-on.png new file mode 100644 index 0000000..7447f94 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-context-on.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-context-on@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-context-on@2x.png new file mode 100644 index 0000000..f04193b Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-context-on@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-highlight-off.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-highlight-off.png new file mode 100644 index 0000000..a6e5498 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-highlight-off.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-highlight-off@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-highlight-off@2x.png new file mode 100644 index 0000000..e8d1a84 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-highlight-off@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-highlight-on.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-highlight-on.png new file mode 100644 index 0000000..42cd598 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-highlight-on.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-highlight-on@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-highlight-on@2x.png new file mode 100644 index 0000000..28fde6b Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-highlight-on@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-preserve-off.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-preserve-off.png new file mode 100644 index 0000000..1b94814 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-preserve-off.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-preserve-off@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-preserve-off@2x.png new file mode 100644 index 0000000..e7e60ba Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-preserve-off@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-preserve-on.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-preserve-on.png new file mode 100644 index 0000000..1202888 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-preserve-on.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-preserve-on@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-preserve-on@2x.png new file mode 100644 index 0000000..419010c Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-preserve-on@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-regex-off.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-regex-off.png new file mode 100644 index 0000000..1669cfc Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-regex-off.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-regex-off@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-regex-off@2x.png new file mode 100644 index 0000000..ccac8ab Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-regex-off@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-regex-on.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-regex-on.png new file mode 100644 index 0000000..15a72cf Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-regex-on.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-regex-on@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-regex-on@2x.png new file mode 100644 index 0000000..4a500a3 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-regex-on@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-reverse-off.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-reverse-off.png new file mode 100644 index 0000000..91a13b6 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-reverse-off.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-reverse-off@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-reverse-off@2x.png new file mode 100644 index 0000000..c0f0af4 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-reverse-off@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-reverse-on.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-reverse-on.png new file mode 100644 index 0000000..cadfdf7 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-reverse-on.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-reverse-on@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-reverse-on@2x.png new file mode 100644 index 0000000..b039826 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-reverse-on@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-selection-off.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-selection-off.png new file mode 100644 index 0000000..efc00dc Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-selection-off.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-selection-off@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-selection-off@2x.png new file mode 100644 index 0000000..ec6f0fa Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-selection-off@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-selection-on.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-selection-on.png new file mode 100644 index 0000000..c71ae65 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-selection-on.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-selection-on@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-selection-on@2x.png new file mode 100644 index 0000000..303a33b Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-selection-on@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-word-off.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-word-off.png new file mode 100644 index 0000000..bdf69c0 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-word-off.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-word-off@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-word-off@2x.png new file mode 100644 index 0000000..160f44a Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-word-off@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-word-on.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-word-on.png new file mode 100644 index 0000000..3c880fd Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-word-on.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-word-on@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-word-on@2x.png new file mode 100644 index 0000000..52f8b3b Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-word-on@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-wrap-off.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-wrap-off.png new file mode 100644 index 0000000..b9facd8 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-wrap-off.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-wrap-off@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-wrap-off@2x.png new file mode 100644 index 0000000..d8d02dc Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-wrap-off@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-wrap-on.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-wrap-on.png new file mode 100644 index 0000000..5df3e46 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-wrap-on.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-wrap-on@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-wrap-on@2x.png new file mode 100644 index 0000000..447dccf Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/icon-wrap-on@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/overlay-dark-puck-horizontal.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/overlay-dark-puck-horizontal.png new file mode 100644 index 0000000..762e5a7 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/overlay-dark-puck-horizontal.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/overlay-dark-puck-horizontal@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/overlay-dark-puck-horizontal@2x.png new file mode 100644 index 0000000..166aba8 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/overlay-dark-puck-horizontal@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/overlay-dark-puck-vertical.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/overlay-dark-puck-vertical.png new file mode 100644 index 0000000..f2c4047 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/overlay-dark-puck-vertical.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/overlay-dark-puck-vertical@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/overlay-dark-puck-vertical@2x.png new file mode 100644 index 0000000..7f22be6 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/overlay-dark-puck-vertical@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/overlay-puck-horizontal.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/overlay-puck-horizontal.png new file mode 100644 index 0000000..4b677dc Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/overlay-puck-horizontal.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/overlay-puck-horizontal@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/overlay-puck-horizontal@2x.png new file mode 100644 index 0000000..3ee8fee Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/overlay-puck-horizontal@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/overlay-puck-vertical.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/overlay-puck-vertical.png new file mode 100644 index 0000000..1603bad Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/overlay-puck-vertical.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/overlay-puck-vertical@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/overlay-puck-vertical@2x.png new file mode 100644 index 0000000..7aebfa6 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/overlay-puck-vertical@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/overlay-scrollbar-horizontal.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/overlay-scrollbar-horizontal.png new file mode 100644 index 0000000..ff2ca6e Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/overlay-scrollbar-horizontal.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/overlay-scrollbar-horizontal@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/overlay-scrollbar-horizontal@2x.png new file mode 100644 index 0000000..2b5bb07 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/overlay-scrollbar-horizontal@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/overlay-scrollbar-vertical.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/overlay-scrollbar-vertical.png new file mode 100644 index 0000000..5e981c3 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/overlay-scrollbar-vertical.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/overlay-scrollbar-vertical@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/overlay-scrollbar-vertical@2x.png new file mode 100644 index 0000000..3d3ff15 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/overlay-scrollbar-vertical@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/panel-background.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/panel-background.png new file mode 100644 index 0000000..b92b2b9 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/panel-background.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/panel-background@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/panel-background@2x.png new file mode 100644 index 0000000..e7b5f99 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/panel-background@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/quick-panel-background-fix.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/quick-panel-background-fix.png new file mode 100644 index 0000000..816fe8e Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/quick-panel-background-fix.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/quick-panel-background-fix@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/quick-panel-background-fix@2x.png new file mode 100644 index 0000000..d7b5ec0 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/quick-panel-background-fix@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/quick-panel-background.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/quick-panel-background.png new file mode 100644 index 0000000..eb38a68 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/quick-panel-background.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/quick-panel-background@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/quick-panel-background@2x.png new file mode 100644 index 0000000..e6cd417 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/quick-panel-background@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/quick-panel-row-selected.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/quick-panel-row-selected.png new file mode 100644 index 0000000..c7ba57b Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/quick-panel-row-selected.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/quick-panel-row-selected@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/quick-panel-row-selected@2x.png new file mode 100644 index 0000000..753e68f Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/quick-panel-row-selected@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/quick-panel-row.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/quick-panel-row.png new file mode 100644 index 0000000..6caef9d Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/quick-panel-row.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/quick-panel-row@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/quick-panel-row@2x.png new file mode 100644 index 0000000..4d1faff Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/quick-panel-row@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/quick-panel-sections-fix.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/quick-panel-sections-fix.png new file mode 100644 index 0000000..5f10806 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/quick-panel-sections-fix.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/quick-panel-sections-fix@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/quick-panel-sections-fix@2x.png new file mode 100644 index 0000000..3632e34 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/quick-panel-sections-fix@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/quick-panel-sections.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/quick-panel-sections.png new file mode 100644 index 0000000..70c7838 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/quick-panel-sections.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/quick-panel-sections@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/quick-panel-sections@2x.png new file mode 100644 index 0000000..184c512 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/quick-panel-sections@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/sidebar-bg.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/sidebar-bg.png new file mode 100644 index 0000000..70abafa Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/sidebar-bg.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/sidebar-bg@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/sidebar-bg@2x.png new file mode 100644 index 0000000..68c1315 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/sidebar-bg@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/sidebar-row-selected.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/sidebar-row-selected.png new file mode 100644 index 0000000..53a5a67 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/sidebar-row-selected.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/sidebar-row-selected@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/sidebar-row-selected@2x.png new file mode 100644 index 0000000..4be24fd Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/sidebar-row-selected@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/standard-puck-horizontal.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/standard-puck-horizontal.png new file mode 100644 index 0000000..2bf392d Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/standard-puck-horizontal.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/standard-puck-horizontal@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/standard-puck-horizontal@2x.png new file mode 100644 index 0000000..3f4de61 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/standard-puck-horizontal@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/standard-puck-vertical.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/standard-puck-vertical.png new file mode 100644 index 0000000..ee5401e Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/standard-puck-vertical.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/standard-puck-vertical@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/standard-puck-vertical@2x.png new file mode 100644 index 0000000..ede9da9 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/standard-puck-vertical@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/standard-scrollbar-corner.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/standard-scrollbar-corner.png new file mode 100644 index 0000000..9fdedde Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/standard-scrollbar-corner.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/standard-scrollbar-corner@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/standard-scrollbar-corner@2x.png new file mode 100644 index 0000000..919474b Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/standard-scrollbar-corner@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/standard-scrollbar-horizontal.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/standard-scrollbar-horizontal.png new file mode 100644 index 0000000..a57c13f Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/standard-scrollbar-horizontal.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/standard-scrollbar-horizontal@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/standard-scrollbar-horizontal@2x.png new file mode 100644 index 0000000..fc9f044 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/standard-scrollbar-horizontal@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/standard-scrollbar-vertical.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/standard-scrollbar-vertical.png new file mode 100644 index 0000000..1c958be Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/standard-scrollbar-vertical.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/standard-scrollbar-vertical@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/standard-scrollbar-vertical@2x.png new file mode 100644 index 0000000..f560c3f Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/standard-scrollbar-vertical@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/status-bar-background.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/status-bar-background.png new file mode 100644 index 0000000..4eab5f3 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/status-bar-background.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/status-bar-background@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/status-bar-background@2x.png new file mode 100644 index 0000000..d8126c8 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/status-bar-background@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-active.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-active.png new file mode 100644 index 0000000..72fd2e9 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-active.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-active@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-active@2x.png new file mode 100644 index 0000000..0f78299 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-active@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-close-hover.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-close-hover.png new file mode 100644 index 0000000..0d37ca3 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-close-hover.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-close-hover@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-close-hover@2x.png new file mode 100644 index 0000000..66791d8 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-close-hover@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-close-inactive.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-close-inactive.png new file mode 100644 index 0000000..865956a Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-close-inactive.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-close-inactive@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-close-inactive@2x.png new file mode 100644 index 0000000..0e71145 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-close-inactive@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-close-pressed.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-close-pressed.png new file mode 100644 index 0000000..2cf0633 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-close-pressed.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-close-pressed@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-close-pressed@2x.png new file mode 100644 index 0000000..dad7a93 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-close-pressed@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-close.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-close.png new file mode 100644 index 0000000..865956a Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-close.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-close@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-close@2x.png new file mode 100644 index 0000000..0e71145 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-close@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-dirty-inactive.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-dirty-inactive.png new file mode 100644 index 0000000..95003f0 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-dirty-inactive.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-dirty-inactive@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-dirty-inactive@2x.png new file mode 100644 index 0000000..aed1da1 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-dirty-inactive@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-dirty.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-dirty.png new file mode 100644 index 0000000..9eb7ea1 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-dirty.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-dirty@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-dirty@2x.png new file mode 100644 index 0000000..f388264 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-dirty@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-highlight-inactive.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-highlight-inactive.png new file mode 100644 index 0000000..9c715ca Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-highlight-inactive.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-highlight-inactive@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-highlight-inactive@2x.png new file mode 100644 index 0000000..028b26f Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-highlight-inactive@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-highlight.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-highlight.png new file mode 100644 index 0000000..c9a28b8 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-highlight.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-highlight@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-highlight@2x.png new file mode 100644 index 0000000..2d53da8 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-highlight@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-hover.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-hover.png new file mode 100644 index 0000000..b5c4c7c Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-hover.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-hover@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-hover@2x.png new file mode 100644 index 0000000..d7d17f0 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-hover@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-inactive.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-inactive.png new file mode 100644 index 0000000..3ff4773 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-inactive.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-inactive@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-inactive@2x.png new file mode 100644 index 0000000..92ba53e Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tab-inactive@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tabset-background.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tabset-background.png new file mode 100644 index 0000000..eaa87b5 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tabset-background.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tabset-background@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tabset-background@2x.png new file mode 100644 index 0000000..cc6999d Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tabset-background@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/text-field.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/text-field.png new file mode 100644 index 0000000..f2f3ea3 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/text-field.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/text-field@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/text-field@2x.png new file mode 100644 index 0000000..7dbb058 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/text-field@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tooltip.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tooltip.png new file mode 100644 index 0000000..63faab6 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tooltip.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tooltip@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tooltip@2x.png new file mode 100644 index 0000000..1cccaa6 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Dark/tooltip@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light.sublime-theme b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light.sublime-theme new file mode 100644 index 0000000..5c1e2ee --- /dev/null +++ b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light.sublime-theme @@ -0,0 +1,974 @@ +[ + +// +// TABS (REGULAR) +// + + // Tab set + { + "class": "tabset_control", + "layer0.texture": "Theme - Soda/Soda Light/tabset-background.png", + "layer0.inner_margin": [1, 7], + "layer0.opacity": 1.0, + "content_margin": [-4, 0, -4, 3], + "tab_overlap": 5, + "tab_width": 180, + "tab_min_width": 45, + "tab_height": 25, + "mouse_wheel_switch": false + }, + { + "class": "tabset_control", + "settings": ["mouse_wheel_switches_tabs"], + "mouse_wheel_switch": true + }, + // Tab element + { + "class": "tab_control", + "content_margin": [12, 3, 12, 3], + "max_margin_trim": 0, + "hit_test_level": 0.0, + "layer0.texture": "Theme - Soda/Soda Light/tab-inactive.png", + "layer0.inner_margin": [5, 5], + "layer0.opacity": 1.0 + }, + // Tab close state + { + "class": "tab_control", + "settings": ["show_tab_close_buttons"], + "content_margin": [12, 3, 7, 3] + }, + // Tab hover state + { + "class": "tab_control", + "attributes": ["hover"], + "layer0.texture": "Theme - Soda/Soda Light/tab-hover.png" + }, + // Tab active state + { + "class": "tab_control", + "attributes": ["selected"], + "layer0.texture": "Theme - Soda/Soda Light/tab-active.png" + }, + // Tab dirty state (close button hidden) + { + "class": "tab_control", + "settings": ["!show_tab_close_buttons"], + "attributes": ["dirty"], + "content_margin": [12, 3, 7, 3] + }, + +// +// TABS (CLASSIC) +// + + // Tab set + { + "class": "tabset_control", + "settings": ["soda_classic_tabs"], + "content_margin": [3, 4, 3, 3], + "tab_overlap": 24, + "tab_height": 28 + }, + // Tab element + { + "class": "tab_control", + "settings": ["soda_classic_tabs"], + "content_margin": [22, 6, 22, 4], + "hit_test_level": 0.5, + "layer0.texture": "Theme - Soda/Soda Light/classic/tab-inactive.png", + "layer0.inner_margin": [18, 4] + }, + // Tab close state + { + "class": "tab_control", + "settings": ["soda_classic_tabs", "show_tab_close_buttons"], + "content_margin": [22, 6, 15, 4] + }, + // Tab hover state + { + "class": "tab_control", + "settings": ["soda_classic_tabs"], + "attributes": ["hover"], + "layer0.texture": "Theme - Soda/Soda Light/classic/tab-hover.png" + }, + // Tab active state + { + "class": "tab_control", + "settings": ["soda_classic_tabs"], + "attributes": ["selected"], + "layer0.texture": "Theme - Soda/Soda Light/classic/tab-active.png" + }, + // Tab dirty state (close button hidden) + { + "class": "tab_control", + "settings": ["soda_classic_tabs", "!show_tab_close_buttons"], + "attributes": ["dirty"], + "content_margin": [22, 6, 15, 4] + }, + +// +// TAB BUTTONS +// + + // Tab close button + { + "class": "tab_close_button", + "content_margin": [0, 0], + "layer0.texture": "Theme - Soda/Soda Light/tab-close-inactive.png", + "layer0.opacity": 1.0, + "layer0.inner_margin": 0 + }, + { + "class": "tab_close_button", + "settings": ["show_tab_close_buttons"], + "content_margin": [8, 8] + }, + { + "class": "tab_close_button", + "parents": [{"class": "tab_control", "attributes": ["hover"]}], + "layer0.texture": "Theme - Soda/Soda Light/tab-close.png", + "layer0.opacity": 0.85 + }, + { + "class": "tab_close_button", + "parents": [{"class": "tab_control", "attributes": ["selected"]}], + "layer0.texture": "Theme - Soda/Soda Light/tab-close.png", + "layer0.opacity": 1.0 + }, + // Tab dirty button + { + "class": "tab_close_button", + "parents": [{"class": "tab_control", "attributes": ["dirty"]}], + "layer0.texture": "Theme - Soda/Soda Light/tab-dirty-inactive.png" + }, + { + "class": "tab_close_button", + "settings": ["!show_tab_close_buttons"], + "parents": [{"class": "tab_control", "attributes": ["dirty"]}], + "content_margin": [8, 8] + }, + { + "class": "tab_close_button", + "parents": [{"class": "tab_control", "attributes": ["dirty", "hover"]}], + "layer0.opacity": 1.0 + }, + { + "class": "tab_close_button", + "parents": [{"class": "tab_control", "attributes": ["dirty", "selected"]}], + "layer0.texture": "Theme - Soda/Soda Light/tab-dirty.png" + }, + // Tab highlight button + { + "class": "tab_close_button", + "settings": ["highlight_modified_tabs"], + "parents": [{"class": "tab_control", "attributes": ["dirty"]}], + "layer0.texture": "Theme - Soda/Soda Light/tab-highlight-inactive.png" + }, + { + "class": "tab_close_button", + "settings": ["highlight_modified_tabs"], + "parents": [{"class": "tab_control", "attributes": ["dirty", "selected"]}], + "layer0.texture": "Theme - Soda/Soda Light/tab-highlight.png" + }, + // Tab close button hover + { + "class": "tab_close_button", + "settings": ["show_tab_close_buttons"], + "attributes": ["hover"], + "layer0.texture": "Theme - Soda/Soda Light/tab-close-hover.png" + }, + // Tab close button pressed + { + "class": "tab_close_button", + "settings": ["show_tab_close_buttons"], + "attributes": ["pressed"], + "layer0.texture": "Theme - Soda/Soda Light/tab-close-pressed.png" + }, + +// +// TAB LABELS +// + + { + "class": "tab_label", + "fade": true, + "fg": [50, 50, 50], + "shadow_color": [235, 235, 235], + "shadow_offset": [0, 1] + }, + { + "class": "tab_label", + "parents": [{"class": "tab_control", "attributes": ["hover"]}], + "fg": [25, 25, 25], + "shadow_color": [245, 245, 245] + }, + { + "class": "tab_label", + "parents": [{"class": "tab_control", "attributes": ["selected"]}], + "fg": [0, 0, 0], + "shadow_color": [255, 255, 255] + }, + +// +// FOLD BUTTONS +// + + { + "class": "fold_button_control", + "layer0.texture": "Theme - Soda/Soda Light/fold-closed.png", + "layer0.opacity": 1.0, + "layer0.inner_margin": 0, + "content_margin": [8, 8] + }, + { + "class": "fold_button_control", + "attributes": ["hover"], + "layer0.texture": "Theme - Soda/Soda Light/fold-closed-hover.png" + }, + { + "class": "fold_button_control", + "attributes": ["expanded"], + "layer0.texture": "Theme - Soda/Soda Light/fold-open.png" + }, + { + "class": "fold_button_control", + "attributes": ["expanded", "hover"], + "layer0.texture": "Theme - Soda/Soda Light/fold-open-hover.png" + }, + +// +// STANDARD SCROLLBARS +// + + // Standard vertical scroll bar + { + "class": "scroll_bar_control", + "layer0.texture": "Theme - Soda/Soda Light/standard-scrollbar-vertical.png", + "layer0.opacity": 1.0, + "layer0.inner_margin": [2, 6], + "blur": false + }, + // Standard horizontal scroll bar + { + "class": "scroll_bar_control", + "attributes": ["horizontal"], + "layer0.texture": "Theme - Soda/Soda Light/standard-scrollbar-horizontal.png", + "layer0.inner_margin": [6, 2], + "blur": false + }, + // Standard scroll bar corner + { + "class": "scroll_corner_control", + "layer0.texture": "Theme - Soda/Soda Light/standard-scrollbar-corner.png", + "layer0.inner_margin": [2, 2], + "layer0.opacity": 1.0 + }, + // Standard vertical scroll puck + { + "class": "puck_control", + "layer0.texture": "Theme - Soda/Soda Light/standard-puck-vertical.png", + "layer0.opacity": 1.0, + "layer0.inner_margin": [0, 10], + "content_margin": [8, 12], + "blur": false + }, + // Standard horizontal scroll puck + { + "class": "puck_control", + "attributes": ["horizontal"], + "layer0.texture": "Theme - Soda/Soda Light/standard-puck-horizontal.png", + "layer0.inner_margin": [10, 0], + "content_margin": [12, 8], + "blur": false + }, + +// +// OVERLAY SCROLLBARS +// + + // Overlay toggle scroll bar + { + "class": "scroll_area_control", + "settings": ["overlay_scroll_bars"], + "overlay": true + }, + { + "class": "scroll_area_control", + "settings": ["!overlay_scroll_bars"], + "overlay": false + }, + // Overlay vertical scroll bar + { + "class": "scroll_bar_control", + "settings": ["overlay_scroll_bars"], + "layer0.texture": "Theme - Soda/Soda Light/overlay-scrollbar-vertical.png", + "layer0.inner_margin": [0, 5], + "blur": true + }, + // Overlay horizontal scroll bar + { + "class": "scroll_bar_control", + "settings": ["overlay_scroll_bars"], + "attributes": ["horizontal"], + "layer0.texture": "Theme - Soda/Soda Light/overlay-scrollbar-horizontal.png", + "layer0.inner_margin": [5, 0], + "blur": true + }, + // Overlay vertical puck + { + "class": "puck_control", + "settings": ["overlay_scroll_bars"], + "layer0.texture": "Theme - Soda/Soda Light/overlay-puck-vertical.png", + "layer0.inner_margin": [0, 5], + "content_margin": [5, 20], + "blur": true + }, + // Overlay horizontal puck + { + "class": "puck_control", + "settings": ["overlay_scroll_bars"], + "attributes": ["horizontal"], + "layer0.texture": "Theme - Soda/Soda Light/overlay-puck-horizontal.png", + "layer0.inner_margin": [5, 0], + "content_margin": [20, 5], + "blur": true + }, + // Overlay light puck (for dark content) + { + "class": "puck_control", + "settings": ["overlay_scroll_bars"], + "attributes": ["dark"], + "layer0.texture": "Theme - Soda/Soda Light/overlay-dark-puck-vertical.png" + }, + // Overlay light horizontal puck (for dark content) + { + "class": "puck_control", + "settings": ["overlay_scroll_bars"], + "attributes": ["horizontal", "dark"], + "layer0.texture": "Theme - Soda/Soda Light/overlay-dark-puck-horizontal.png" + }, + +// +// EMPTY WINDOW BACKGROUND +// + + { + "class": "sheet_container_control", + "layer0.tint": [255, 255, 255], + "layer0.opacity": 1.0 + }, + +// +// GRID LAYOUT +// + + { + "class": "grid_layout_control", + "border_size": 1, + "border_color": [189, 189, 189] + }, + +// +// MINI MAP +// + + { + "class": "minimap_control", + "viewport_color": [0, 0, 0, 35] + }, + +// +// LABELS +// + + // General labels + { + "class": "label_control", + "color": [0, 0, 0] + }, + // Text field labels + { + "class": "label_control", + "parents": [{"class": "panel_control"}], + "shadow_color": [250, 250, 250], + "shadow_offset": [0, 1] + }, + // Button labels + { + "class": "label_control", + "parents": [{"class": "button_control"}], + "shadow_color": [245, 245, 245], + "shadow_offset": [0, 1] + }, + +// +// TOOLTIP +// + + // Tooltip container + { + "class": "tool_tip_control", + "layer0.texture": "Theme - Soda/Soda Light/tooltip.png", + "layer0.inner_margin": [1, 1], + "layer0.opacity": 0.95, + "content_margin": [3, 3] + }, + // Tooltip content + { + "class": "tool_tip_label_control", + "color": [0, 0, 0] + }, + +// +// STATUS BAR +// + + // Status bar container + { + "class": "status_bar", + "layer0.texture": "Theme - Soda/Soda Light/status-bar-background.png", + "layer0.opacity": 1.0, + "layer0.inner_margin": [2, 2], + "content_margin": [8, 4, 8, 4] + }, + // Status bar button + { + "class": "status_button", + "min_size": [100, 0] + }, + // Status bar label + { + "class": "label_control", + "parents": [{"class": "status_bar"}], + "color": [47, 47, 47], + "shadow_color": [220, 220, 220], + "shadow_offset": [0, 1] + }, + +// +// SIDEBAR +// + + // Sidebar container + { + "class": "sidebar_container", + "layer0.texture": "Theme - Soda/Soda Light/sidebar-bg.png", + "layer0.opacity": 1.0, + "layer0.inner_margin": [1, 1, 2, 1], + "content_margin": [0, 0, 1, 0] + }, + // Sidebar tree + { + "class": "sidebar_tree", + "row_padding": [8, 3], + "indent": 15, + "indent_offset": 15, + "indent_top_level": false + }, + // Sidebar rows + { + "class": "tree_row", + "layer0.texture": "Theme - Soda/Soda Light/sidebar-row-selected.png", + "layer0.opacity": 0.0, + "layer0.inner_margin": [1, 1] + }, + // Sidebar row selected + { + "class": "tree_row", + "attributes": ["selected"], + "layer0.opacity": 1.0 + }, + // Sidebar heading + { + "class": "sidebar_heading", + "color": [110, 126, 141], + "font.bold": true, + "shadow_color": [249, 250, 252], + "shadow_offset": [0, 1] + }, + // Sidebar entry + { + "class": "sidebar_label", + "color": [0, 0, 0], + "shadow_color": [241, 244, 247], + "shadow_offset": [0, 1] + }, + // Sidebar folder entry + { + "class": "sidebar_label", + "parents": [{"class": "tree_row", "attributes": ["expandable"]}], + "color": [70, 86, 102] + }, + { + "class": "sidebar_label", + "parents": [{"class": "tree_row", "attributes": ["expandable", "hover"]}], + "color": [45, 56, 68] + }, + { + "class": "sidebar_label", + "parents": [{"class": "tree_row", "attributes": ["expandable"]}], + "settings": ["bold_folder_labels"], + "color": [110, 126, 141], + "font.bold": true + }, + { + "class": "sidebar_label", + "parents": [{"class": "tree_row", "attributes": ["expandable", "hover"]}], + "settings": ["bold_folder_labels"], + "color": [81, 92, 103] + }, + // Sidebar entry selected + { + "class": "sidebar_label", + "parents": [{"class": "tree_row", "attributes": ["selected"]}], + "color": [255, 255, 255], + "shadow_color": [34, 94, 145], + "shadow_offset": [0, 1] + }, + +// +// SIDEBAR - OPEN FILE ICONS +// + + // Sidebar file close + { + "class": "close_button", + "layer0.texture": "Theme - Soda/Soda Light/file-close.png", + "layer0.opacity": 0.0, + "layer0.inner_margin": 0, + "content_margin": [8, 8] + }, + { + "class": "close_button", + "parents": [{"class": "tree_row", "attributes": ["hover"]}], + "layer0.opacity": 1.0 + }, + // Sidebar file dirty + { + "class": "close_button", + "attributes": ["dirty"], + "layer0.texture": "Theme - Soda/Soda Light/file-dirty.png", + "layer0.opacity": 1.0 + }, + { + "class": "close_button", + "attributes": ["dirty"], + "parents": [{"class": "tree_row", "attributes": ["selected"]}], + "layer0.texture": "Theme - Soda/Soda Light/file-dirty-selected.png" + }, + { + "class": "close_button", + "attributes": ["dirty"], + "parents": [{"class": "tree_row", "attributes": ["hover"]}], + "layer0.texture": "Theme - Soda/Soda Light/file-close.png" + }, + // Sidebar file close hover + { + "class": "close_button", + "attributes": ["hover"], + "layer0.texture": "Theme - Soda/Soda Light/file-close-hover.png" + }, + { + "class": "close_button", + "parents": [{"class": "tree_row", "attributes": ["hover", "selected"]}], + "layer0.texture": "Theme - Soda/Soda Light/file-close-selected.png" + }, + +// +// SIDEBAR - GENERAL FILE ICONS +// + + // Sidebar group closed + { + "class": "disclosure_button_control", + "content_margin": [8, 8], + "layer0.texture": "Theme - Soda/Soda Light/group-closed.png", + "layer0.opacity": 1.0, + "layer0.inner_margin": 0 + }, + { + "class": "disclosure_button_control", + "parents": [{"class": "tree_row", "attributes": ["hover"]}], + "layer0.texture": "Theme - Soda/Soda Light/group-closed-hover.png" + }, + { + "class": "disclosure_button_control", + "parents": [{"class": "tree_row", "attributes": ["selected"]}], + "layer0.texture": "Theme - Soda/Soda Light/group-closed-selected.png" + }, + // Sidebar group open + { + "class": "disclosure_button_control", + "attributes": ["expanded"], + "layer0.texture": "Theme - Soda/Soda Light/group-open.png" + }, + { + "class": "disclosure_button_control", + "attributes": ["expanded"], + "parents": [{"class": "tree_row", "attributes": ["hover"]}], + "layer0.texture": "Theme - Soda/Soda Light/group-open-hover.png" + }, + { + "class": "disclosure_button_control", + "attributes": ["expanded"], + "parents": [{"class": "tree_row", "attributes": ["selected"]}], + "layer0.texture": "Theme - Soda/Soda Light/group-open-selected.png" + }, + +// +// STANDARD TEXT BUTTONS +// + + // Default button state + { + "class": "button_control", + "content_margin": [6, 5, 6, 6], + "min_size": [75, 0], + "layer0.texture": "Theme - Soda/Soda Light/btn-large.png", + "layer0.opacity": 1.0, + "layer0.inner_margin": [6, 6] + }, + // Pressed button state + { + "class": "button_control", + "attributes": ["pressed"], + "layer0.texture": "Theme - Soda/Soda Light/btn-large-on.png" + }, + +// +// TEXT INPUT FIELD +// + + // Text input field item + { + "class": "text_line_control", + "layer0.texture": "Theme - Soda/Soda Light/text-field.png", + "layer0.opacity": 1.0, + "layer0.inner_margin": [4, 5, 4, 3], + "content_margin": [3, 3] + }, + +// +// PANEL BACKGROUNDS +// + + // Bottom panel background + { + "class": "panel_control", + "layer0.texture": "Theme - Soda/Soda Light/panel-background.png", + "layer0.inner_margin": [2, 2, 2, 2], + "layer0.opacity": 1.0, + "content_margin": [2, 3, 2, 1] + }, + // Quick panel background + { + "class": "overlay_control", + "settings": ["!soda_retina_fix"], + "layer0.texture": "Theme - Soda/Soda Light/quick-panel-background.png", + "layer0.inner_margin": [12, 6, 12, 15], + "layer0.opacity": 1.0, + "layer1.texture": "Theme - Soda/Soda Light/quick-panel-sections.png", + "layer1.inner_margin": [12, 40, 12, 19], + "layer1.opacity": 1.0, + "content_margin": [11, 8, 11, 17] + }, + // Quick panel background (Retina fix) + { + "class": "overlay_control", + "settings": ["soda_retina_fix"], + "layer0.tint": [238, 238, 238], + "layer0.opacity": 1.0, + "content_margin": [6, 8, 6, 6] + }, + +// +// QUICK PANEL +// + + { + "class": "quick_panel", + "row_padding": [5, 2], + "layer0.tint": [252, 252, 252], + "layer0.opacity": 1.0 + }, + { + "class": "quick_panel_row", + "layer0.texture": "Theme - Soda/Soda Light/quick-panel-row.png", + "layer0.inner_margin": [2, 2, 2, 2], + "layer0.opacity": 1.0 + }, + { + "class": "quick_panel_row", + "attributes": ["selected"], + "layer0.texture": "Theme - Soda/Soda Light/quick-panel-row-selected.png" + }, + { + "class": "quick_panel_label", + "fg": [50, 50, 50, 255], + "match_fg": [0, 0, 0, 255], + "selected_fg": [25, 25, 25, 255], + "selected_match_fg": [0, 0, 0, 255] + }, + { + "class": "quick_panel_path_label", + "fg": [150, 150, 150, 255], + "match_fg": [90, 90, 90, 255], + "selected_fg": [120, 120, 120, 255], + "selected_match_fg": [90, 90, 90, 255] + }, + { + "class": "quick_panel_score_label", + "fg": [72, 139, 211, 255], + "selected_fg": [72, 139, 211, 255] + }, + +// +// MINI QUICK PANEL +// + + { + "class": "mini_quick_panel_row", + "layer0.texture": "Theme - Soda/Soda Light/quick-panel-row.png", + "layer0.inner_margin": [2, 2, 2, 2], + "layer0.opacity": 1.0 + }, + { + "class": "mini_quick_panel_row", + "attributes": ["selected"], + "layer0.texture": "Theme - Soda/Soda Light/quick-panel-row-selected.png" + }, + +// +// CODE COMPLETION DROPDOWN +// + + { + "class": "popup_control", + "content_margin": [2, 2], + "layer0.tint": [255, 255, 255], + "layer0.opacity": 1.0 + }, + { + "class": "auto_complete", + "row_padding": [4, 2] + }, + { + "class": "auto_complete_label", + "fg": [51, 51, 51], + "match_fg": [0, 0, 0], + "selected_fg": [205, 226, 243], + "selected_match_fg": [255, 255, 255] + }, + { + "class": "table_row", + "layer0.texture": "Theme - Soda/Soda Light/autocomplete-row-selected.png", + "layer0.opacity": 0.0, + "layer0.inner_margin": [3, 1] + }, + { + "class": "table_row", + "attributes": ["selected"], + "layer0.opacity": 1.0 + }, + +// +// BOTTOM PANEL BUTTONS +// + + // Button group middle + { + "class": "icon_button_control", + "layer0.texture": "Theme - Soda/Soda Light/btn-group-middle.png", + "layer0.inner_margin": [6, 6], + "layer0.opacity": 1.0, + "content_margin": [3, 3] + }, + { + "class": "icon_button_control", + "attributes": ["selected"], + "layer0.texture": "Theme - Soda/Soda Light/btn-group-middle-on.png" + }, + // Button group left + { + "class": "icon_button_control", + "attributes": ["left"], + "layer0.texture": "Theme - Soda/Soda Light/btn-group-left.png", + "content_margin": [4, 3, 3, 3] + }, + { + "class": "icon_button_control", + "attributes": ["left", "selected"], + "layer0.texture": "Theme - Soda/Soda Light/btn-group-left-on.png" + }, + // Button group right + { + "class": "icon_button_control", + "attributes": ["right"], + "layer0.texture": "Theme - Soda/Soda Light/btn-group-right.png", + "content_margin": [3, 3, 4, 3] + }, + { + "class": "icon_button_control", + "attributes": ["right", "selected"], + "layer0.texture": "Theme - Soda/Soda Light/btn-group-right-on.png" + }, + // Button single + { + "class": "icon_button_control", + "attributes": ["left", "right"], + "layer0.texture": "Theme - Soda/Soda Light/btn-small.png", + "content_margin": [4, 3] + }, + { + "class": "icon_button_control", + "attributes": ["left", "right", "selected"], + "layer0.texture": "Theme - Soda/Soda Light/btn-small-on.png" + }, + +// +// BOTTOM PANEL ICONS - GROUP 1 +// + + // Regex search button + { + "class": "icon_regex", + "layer0.texture": "Theme - Soda/Soda Light/icon-regex-off.png", + "layer0.opacity": 1.0, + "content_margin": [9, 9] + }, + { + "class": "icon_regex", + "parents": [{"class": "icon_button_control", "attributes": ["selected"]}], + "layer0.texture": "Theme - Soda/Soda Light/icon-regex-on.png" + }, + // Case sensitive search button + { + "class": "icon_case", + "layer0.texture": "Theme - Soda/Soda Light/icon-case-off.png", + "layer0.opacity": 1.0, + "content_margin": [9, 9] + }, + { + "class": "icon_case", + "parents": [{"class": "icon_button_control", "attributes": ["selected"]}], + "layer0.texture": "Theme - Soda/Soda Light/icon-case-on.png" + }, + // Match whole word search button + { + "class": "icon_whole_word", + "layer0.texture": "Theme - Soda/Soda Light/icon-word-off.png", + "layer0.opacity": 1.0, + "content_margin": [9, 9] + }, + { + "class": "icon_whole_word", + "parents": [{"class": "icon_button_control", "attributes": ["selected"]}], + "layer0.texture": "Theme - Soda/Soda Light/icon-word-on.png" + }, + +// +// BOTTOM PANEL ICONS - GROUP 1 (EXTENDED: FIND IN FILES) +// + + // Show search context button + { + "class": "icon_context", + "layer0.texture": "Theme - Soda/Soda Light/icon-context-off.png", + "layer0.opacity": 1.0, + "content_margin": [9, 9] + }, + { + "class": "icon_context", + "parents": [{"class": "icon_button_control", "attributes": ["selected"]}], + "layer0.texture": "Theme - Soda/Soda Light/icon-context-on.png" + }, + // Use search buffer + { + "class": "icon_use_buffer", + "layer0.texture": "Theme - Soda/Soda Light/icon-buffer-off.png", + "layer0.opacity": 1.0, + "content_margin": [9, 9] + }, + { + "class": "icon_use_buffer", + "parents": [{"class": "icon_button_control", "attributes": ["selected"]}], + "layer0.texture": "Theme - Soda/Soda Light/icon-buffer-on.png" + }, + +// +// BOTTOM PANEL ICONS - GROUP 2 +// + + // Reverse search direction button + { + "class": "icon_reverse", + "layer0.texture": "Theme - Soda/Soda Light/icon-reverse-off.png", + "layer0.opacity": 1.0, + "content_margin": [9, 9] + }, + { + "class": "icon_reverse", + "parents": [{"class": "icon_button_control", "attributes": ["selected"]}], + "layer0.texture": "Theme - Soda/Soda Light/icon-reverse-on.png" + }, + // Search wrap button + { + "class": "icon_wrap", + "layer0.texture": "Theme - Soda/Soda Light/icon-wrap-off.png", + "layer0.opacity": 1.0, + "content_margin": [9, 9] + }, + { + "class": "icon_wrap", + "parents": [{"class": "icon_button_control", "attributes": ["selected"]}], + "layer0.texture": "Theme - Soda/Soda Light/icon-wrap-on.png" + }, + // Search in selection button + { + "class": "icon_in_selection", + "layer0.texture": "Theme - Soda/Soda Light/icon-selection-off.png", + "layer0.opacity": 1.0, + "content_margin": [9, 9] + }, + { + "class": "icon_in_selection", + "parents": [{"class": "icon_button_control", "attributes": ["selected"]}], + "layer0.texture": "Theme - Soda/Soda Light/icon-selection-on.png" + }, + +// +// BOTTOM PANEL ICONS - GROUP 3 +// + + // Preserve case button + { + "class": "icon_preserve_case", + "layer0.texture": "Theme - Soda/Soda Light/icon-preserve-off.png", + "layer0.opacity": 1.0, + "content_margin": [9, 9] + }, + { + "class": "icon_preserve_case", + "parents": [{"class": "icon_button_control", "attributes": ["selected"]}], + "layer0.texture": "Theme - Soda/Soda Light/icon-preserve-on.png" + }, + +// +// BOTTOM PANEL ICONS - GROUP 4 +// + + // Highlight results button + { + "class": "icon_highlight", + "layer0.texture": "Theme - Soda/Soda Light/icon-highlight-off.png", + "layer0.opacity": 1.0, + "content_margin": [9, 9] + }, + { + "class": "icon_highlight", + "parents": [{"class": "icon_button_control", "attributes": ["selected"]}], + "layer0.texture": "Theme - Soda/Soda Light/icon-highlight-on.png" + } + +] diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/.gitignore b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/.gitignore new file mode 100644 index 0000000..c3ed10e --- /dev/null +++ b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/.gitignore @@ -0,0 +1 @@ +*.cache diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/Widget - Soda Light.stTheme b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/Widget - Soda Light.stTheme new file mode 100644 index 0000000..3c84a2f --- /dev/null +++ b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/Widget - Soda Light.stTheme @@ -0,0 +1,30 @@ + + + + + author + Ian Hill + comment + A widget theme for the UI components of the Soda Light theme. + name + Soda Light - Widget Theme + settings + + + settings + + background + #FFFFFF + caret + #000000 + foreground + #000000 + invisibles + #E0E0E0 + selection + #b5d5ff + + + + + diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/Widget - Soda Light.sublime-settings b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/Widget - Soda Light.sublime-settings new file mode 100644 index 0000000..5cf1379 --- /dev/null +++ b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/Widget - Soda Light.sublime-settings @@ -0,0 +1,4 @@ +{ + "color_scheme": "Packages/Theme - Soda/Soda Light/Widget - Soda Light.stTheme", + "draw_shadows": false +} diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/autocomplete-row-selected.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/autocomplete-row-selected.png new file mode 100644 index 0000000..f34dcea Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/autocomplete-row-selected.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/autocomplete-row-selected@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/autocomplete-row-selected@2x.png new file mode 100644 index 0000000..65d88cc Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/autocomplete-row-selected@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/bookmark.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/bookmark.png new file mode 100644 index 0000000..8d15c63 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/bookmark.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/btn-group-left-on.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/btn-group-left-on.png new file mode 100644 index 0000000..9b09ad7 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/btn-group-left-on.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/btn-group-left-on@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/btn-group-left-on@2x.png new file mode 100644 index 0000000..942fb8c Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/btn-group-left-on@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/btn-group-left.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/btn-group-left.png new file mode 100644 index 0000000..62eab2f Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/btn-group-left.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/btn-group-left@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/btn-group-left@2x.png new file mode 100644 index 0000000..ec5f09a Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/btn-group-left@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/btn-group-middle-on.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/btn-group-middle-on.png new file mode 100644 index 0000000..aa6311c Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/btn-group-middle-on.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/btn-group-middle-on@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/btn-group-middle-on@2x.png new file mode 100644 index 0000000..9fc633c Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/btn-group-middle-on@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/btn-group-middle.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/btn-group-middle.png new file mode 100644 index 0000000..016d334 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/btn-group-middle.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/btn-group-middle@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/btn-group-middle@2x.png new file mode 100644 index 0000000..fa640c4 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/btn-group-middle@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/btn-group-right-on.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/btn-group-right-on.png new file mode 100644 index 0000000..0c6cdc5 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/btn-group-right-on.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/btn-group-right-on@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/btn-group-right-on@2x.png new file mode 100644 index 0000000..4a20169 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/btn-group-right-on@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/btn-group-right.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/btn-group-right.png new file mode 100644 index 0000000..6662bb5 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/btn-group-right.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/btn-group-right@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/btn-group-right@2x.png new file mode 100644 index 0000000..5bdbc40 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/btn-group-right@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/btn-large-on.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/btn-large-on.png new file mode 100644 index 0000000..1bc3770 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/btn-large-on.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/btn-large-on@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/btn-large-on@2x.png new file mode 100644 index 0000000..921950f Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/btn-large-on@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/btn-large.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/btn-large.png new file mode 100644 index 0000000..acef524 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/btn-large.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/btn-large@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/btn-large@2x.png new file mode 100644 index 0000000..a3ff24b Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/btn-large@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/btn-small-on.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/btn-small-on.png new file mode 100644 index 0000000..395332e Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/btn-small-on.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/btn-small-on@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/btn-small-on@2x.png new file mode 100644 index 0000000..0896a6c Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/btn-small-on@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/btn-small.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/btn-small.png new file mode 100644 index 0000000..acef524 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/btn-small.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/btn-small@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/btn-small@2x.png new file mode 100644 index 0000000..a3ff24b Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/btn-small@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/circle.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/circle.png new file mode 100644 index 0000000..a007d54 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/circle.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/classic/tab-active.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/classic/tab-active.png new file mode 100644 index 0000000..dfa1238 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/classic/tab-active.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/classic/tab-active@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/classic/tab-active@2x.png new file mode 100644 index 0000000..7f01778 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/classic/tab-active@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/classic/tab-hover.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/classic/tab-hover.png new file mode 100644 index 0000000..9c80775 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/classic/tab-hover.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/classic/tab-hover@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/classic/tab-hover@2x.png new file mode 100644 index 0000000..82e931f Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/classic/tab-hover@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/classic/tab-inactive.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/classic/tab-inactive.png new file mode 100644 index 0000000..c24ff88 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/classic/tab-inactive.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/classic/tab-inactive@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/classic/tab-inactive@2x.png new file mode 100644 index 0000000..5e57ee8 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/classic/tab-inactive@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/dot.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/dot.png new file mode 100644 index 0000000..0216b46 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/dot.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/file-close-hover.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/file-close-hover.png new file mode 100644 index 0000000..2e0c183 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/file-close-hover.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/file-close-hover@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/file-close-hover@2x.png new file mode 100644 index 0000000..e8badf2 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/file-close-hover@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/file-close-selected.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/file-close-selected.png new file mode 100644 index 0000000..12032b2 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/file-close-selected.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/file-close-selected@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/file-close-selected@2x.png new file mode 100644 index 0000000..672ed1f Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/file-close-selected@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/file-close.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/file-close.png new file mode 100644 index 0000000..2ad7f5f Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/file-close.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/file-close@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/file-close@2x.png new file mode 100644 index 0000000..357679c Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/file-close@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/file-dirty-selected.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/file-dirty-selected.png new file mode 100644 index 0000000..d882c1d Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/file-dirty-selected.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/file-dirty-selected@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/file-dirty-selected@2x.png new file mode 100644 index 0000000..39dc46b Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/file-dirty-selected@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/file-dirty.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/file-dirty.png new file mode 100644 index 0000000..4d0cc80 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/file-dirty.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/file-dirty@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/file-dirty@2x.png new file mode 100644 index 0000000..d486279 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/file-dirty@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/fold-closed-hover.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/fold-closed-hover.png new file mode 100644 index 0000000..6c6cecf Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/fold-closed-hover.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/fold-closed-hover@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/fold-closed-hover@2x.png new file mode 100644 index 0000000..e49848e Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/fold-closed-hover@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/fold-closed.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/fold-closed.png new file mode 100644 index 0000000..4a69442 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/fold-closed.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/fold-closed@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/fold-closed@2x.png new file mode 100644 index 0000000..4ec7114 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/fold-closed@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/fold-open-hover.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/fold-open-hover.png new file mode 100644 index 0000000..75d9596 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/fold-open-hover.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/fold-open-hover@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/fold-open-hover@2x.png new file mode 100644 index 0000000..38b2973 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/fold-open-hover@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/fold-open.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/fold-open.png new file mode 100644 index 0000000..d96748d Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/fold-open.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/fold-open@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/fold-open@2x.png new file mode 100644 index 0000000..778b395 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/fold-open@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/fold.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/fold.png new file mode 100644 index 0000000..8008475 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/fold.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/group-closed-hover.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/group-closed-hover.png new file mode 100644 index 0000000..83fc42b Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/group-closed-hover.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/group-closed-hover@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/group-closed-hover@2x.png new file mode 100644 index 0000000..c0d5cc5 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/group-closed-hover@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/group-closed-selected.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/group-closed-selected.png new file mode 100644 index 0000000..7a5a877 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/group-closed-selected.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/group-closed-selected@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/group-closed-selected@2x.png new file mode 100644 index 0000000..20e918d Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/group-closed-selected@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/group-closed.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/group-closed.png new file mode 100644 index 0000000..819803d Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/group-closed.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/group-closed@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/group-closed@2x.png new file mode 100644 index 0000000..8a0918e Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/group-closed@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/group-open-hover.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/group-open-hover.png new file mode 100644 index 0000000..1730a23 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/group-open-hover.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/group-open-hover@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/group-open-hover@2x.png new file mode 100644 index 0000000..8734f58 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/group-open-hover@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/group-open-selected.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/group-open-selected.png new file mode 100644 index 0000000..f0a0bf4 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/group-open-selected.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/group-open-selected@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/group-open-selected@2x.png new file mode 100644 index 0000000..f9650f6 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/group-open-selected@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/group-open.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/group-open.png new file mode 100644 index 0000000..d0f5cd4 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/group-open.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/group-open@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/group-open@2x.png new file mode 100644 index 0000000..211ff8b Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/group-open@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-buffer-off.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-buffer-off.png new file mode 100644 index 0000000..20cc171 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-buffer-off.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-buffer-off@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-buffer-off@2x.png new file mode 100644 index 0000000..1644a77 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-buffer-off@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-buffer-on.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-buffer-on.png new file mode 100644 index 0000000..ff80fc9 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-buffer-on.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-buffer-on@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-buffer-on@2x.png new file mode 100644 index 0000000..c71ee4e Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-buffer-on@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-case-off.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-case-off.png new file mode 100644 index 0000000..281ae05 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-case-off.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-case-off@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-case-off@2x.png new file mode 100644 index 0000000..9a2f176 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-case-off@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-case-on.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-case-on.png new file mode 100644 index 0000000..e768693 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-case-on.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-case-on@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-case-on@2x.png new file mode 100644 index 0000000..335ac21 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-case-on@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-context-off.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-context-off.png new file mode 100644 index 0000000..19d04e2 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-context-off.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-context-off@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-context-off@2x.png new file mode 100644 index 0000000..b7c5ceb Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-context-off@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-context-on.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-context-on.png new file mode 100644 index 0000000..6330e23 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-context-on.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-context-on@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-context-on@2x.png new file mode 100644 index 0000000..c6163e9 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-context-on@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-highlight-off.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-highlight-off.png new file mode 100644 index 0000000..2cedd0a Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-highlight-off.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-highlight-off@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-highlight-off@2x.png new file mode 100644 index 0000000..243784e Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-highlight-off@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-highlight-on.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-highlight-on.png new file mode 100644 index 0000000..3472404 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-highlight-on.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-highlight-on@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-highlight-on@2x.png new file mode 100644 index 0000000..f5610d1 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-highlight-on@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-preserve-off.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-preserve-off.png new file mode 100644 index 0000000..f0b7616 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-preserve-off.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-preserve-off@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-preserve-off@2x.png new file mode 100644 index 0000000..9816b42 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-preserve-off@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-preserve-on.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-preserve-on.png new file mode 100644 index 0000000..3c58245 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-preserve-on.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-preserve-on@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-preserve-on@2x.png new file mode 100644 index 0000000..b515dcb Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-preserve-on@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-regex-off.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-regex-off.png new file mode 100644 index 0000000..61ff932 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-regex-off.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-regex-off@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-regex-off@2x.png new file mode 100644 index 0000000..cf88632 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-regex-off@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-regex-on.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-regex-on.png new file mode 100644 index 0000000..658b0c8 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-regex-on.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-regex-on@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-regex-on@2x.png new file mode 100644 index 0000000..3b6b7f2 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-regex-on@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-reverse-off.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-reverse-off.png new file mode 100644 index 0000000..d6ec595 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-reverse-off.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-reverse-off@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-reverse-off@2x.png new file mode 100644 index 0000000..503e6bb Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-reverse-off@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-reverse-on.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-reverse-on.png new file mode 100644 index 0000000..a4ebbb4 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-reverse-on.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-reverse-on@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-reverse-on@2x.png new file mode 100644 index 0000000..a3cc249 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-reverse-on@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-selection-off.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-selection-off.png new file mode 100644 index 0000000..91378b1 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-selection-off.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-selection-off@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-selection-off@2x.png new file mode 100644 index 0000000..a0a59e7 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-selection-off@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-selection-on.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-selection-on.png new file mode 100644 index 0000000..d303c5c Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-selection-on.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-selection-on@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-selection-on@2x.png new file mode 100644 index 0000000..473d626 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-selection-on@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-word-off.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-word-off.png new file mode 100644 index 0000000..b0af0ca Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-word-off.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-word-off@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-word-off@2x.png new file mode 100644 index 0000000..d0328da Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-word-off@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-word-on.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-word-on.png new file mode 100644 index 0000000..f3050c8 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-word-on.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-word-on@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-word-on@2x.png new file mode 100644 index 0000000..deea770 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-word-on@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-wrap-off.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-wrap-off.png new file mode 100644 index 0000000..f9de6d3 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-wrap-off.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-wrap-off@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-wrap-off@2x.png new file mode 100644 index 0000000..c05e445 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-wrap-off@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-wrap-on.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-wrap-on.png new file mode 100644 index 0000000..09161a2 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-wrap-on.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-wrap-on@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-wrap-on@2x.png new file mode 100644 index 0000000..81aa1d4 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/icon-wrap-on@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/overlay-dark-puck-horizontal.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/overlay-dark-puck-horizontal.png new file mode 100644 index 0000000..762e5a7 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/overlay-dark-puck-horizontal.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/overlay-dark-puck-horizontal@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/overlay-dark-puck-horizontal@2x.png new file mode 100644 index 0000000..166aba8 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/overlay-dark-puck-horizontal@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/overlay-dark-puck-vertical.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/overlay-dark-puck-vertical.png new file mode 100644 index 0000000..f2c4047 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/overlay-dark-puck-vertical.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/overlay-dark-puck-vertical@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/overlay-dark-puck-vertical@2x.png new file mode 100644 index 0000000..7f22be6 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/overlay-dark-puck-vertical@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/overlay-puck-horizontal.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/overlay-puck-horizontal.png new file mode 100644 index 0000000..4b677dc Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/overlay-puck-horizontal.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/overlay-puck-horizontal@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/overlay-puck-horizontal@2x.png new file mode 100644 index 0000000..3ee8fee Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/overlay-puck-horizontal@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/overlay-puck-vertical.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/overlay-puck-vertical.png new file mode 100644 index 0000000..1603bad Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/overlay-puck-vertical.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/overlay-puck-vertical@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/overlay-puck-vertical@2x.png new file mode 100644 index 0000000..7aebfa6 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/overlay-puck-vertical@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/overlay-scrollbar-horizontal.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/overlay-scrollbar-horizontal.png new file mode 100644 index 0000000..ff2ca6e Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/overlay-scrollbar-horizontal.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/overlay-scrollbar-horizontal@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/overlay-scrollbar-horizontal@2x.png new file mode 100644 index 0000000..2b5bb07 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/overlay-scrollbar-horizontal@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/overlay-scrollbar-vertical.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/overlay-scrollbar-vertical.png new file mode 100644 index 0000000..5e981c3 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/overlay-scrollbar-vertical.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/overlay-scrollbar-vertical@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/overlay-scrollbar-vertical@2x.png new file mode 100644 index 0000000..3d3ff15 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/overlay-scrollbar-vertical@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/panel-background.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/panel-background.png new file mode 100644 index 0000000..33b8009 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/panel-background.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/panel-background@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/panel-background@2x.png new file mode 100644 index 0000000..c2d47ea Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/panel-background@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/quick-panel-background-fix.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/quick-panel-background-fix.png new file mode 100644 index 0000000..f874034 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/quick-panel-background-fix.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/quick-panel-background-fix@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/quick-panel-background-fix@2x.png new file mode 100644 index 0000000..1bdd5fb Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/quick-panel-background-fix@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/quick-panel-background.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/quick-panel-background.png new file mode 100644 index 0000000..68b8eb5 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/quick-panel-background.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/quick-panel-background@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/quick-panel-background@2x.png new file mode 100644 index 0000000..57ba0ec Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/quick-panel-background@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/quick-panel-row-selected.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/quick-panel-row-selected.png new file mode 100644 index 0000000..777a621 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/quick-panel-row-selected.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/quick-panel-row-selected@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/quick-panel-row-selected@2x.png new file mode 100644 index 0000000..36aa746 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/quick-panel-row-selected@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/quick-panel-row.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/quick-panel-row.png new file mode 100644 index 0000000..2e0a4a9 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/quick-panel-row.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/quick-panel-row@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/quick-panel-row@2x.png new file mode 100644 index 0000000..ff1ecf5 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/quick-panel-row@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/quick-panel-sections-fix.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/quick-panel-sections-fix.png new file mode 100644 index 0000000..9c911db Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/quick-panel-sections-fix.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/quick-panel-sections-fix@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/quick-panel-sections-fix@2x.png new file mode 100644 index 0000000..7475d28 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/quick-panel-sections-fix@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/quick-panel-sections.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/quick-panel-sections.png new file mode 100644 index 0000000..8ba8584 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/quick-panel-sections.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/quick-panel-sections@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/quick-panel-sections@2x.png new file mode 100644 index 0000000..4fb59d2 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/quick-panel-sections@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/sidebar-bg.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/sidebar-bg.png new file mode 100644 index 0000000..7906a82 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/sidebar-bg.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/sidebar-bg@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/sidebar-bg@2x.png new file mode 100644 index 0000000..80ff9e3 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/sidebar-bg@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/sidebar-row-selected.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/sidebar-row-selected.png new file mode 100644 index 0000000..02d7e68 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/sidebar-row-selected.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/sidebar-row-selected@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/sidebar-row-selected@2x.png new file mode 100644 index 0000000..3abf3e7 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/sidebar-row-selected@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/standard-puck-horizontal.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/standard-puck-horizontal.png new file mode 100644 index 0000000..826080e Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/standard-puck-horizontal.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/standard-puck-horizontal@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/standard-puck-horizontal@2x.png new file mode 100644 index 0000000..41204cb Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/standard-puck-horizontal@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/standard-puck-vertical.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/standard-puck-vertical.png new file mode 100644 index 0000000..e86fe14 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/standard-puck-vertical.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/standard-puck-vertical@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/standard-puck-vertical@2x.png new file mode 100644 index 0000000..f995b67 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/standard-puck-vertical@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/standard-scrollbar-corner.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/standard-scrollbar-corner.png new file mode 100644 index 0000000..6369c9f Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/standard-scrollbar-corner.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/standard-scrollbar-corner@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/standard-scrollbar-corner@2x.png new file mode 100644 index 0000000..75ea721 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/standard-scrollbar-corner@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/standard-scrollbar-horizontal.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/standard-scrollbar-horizontal.png new file mode 100644 index 0000000..8486fcb Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/standard-scrollbar-horizontal.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/standard-scrollbar-horizontal@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/standard-scrollbar-horizontal@2x.png new file mode 100644 index 0000000..b074beb Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/standard-scrollbar-horizontal@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/standard-scrollbar-vertical.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/standard-scrollbar-vertical.png new file mode 100644 index 0000000..1321ccc Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/standard-scrollbar-vertical.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/standard-scrollbar-vertical@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/standard-scrollbar-vertical@2x.png new file mode 100644 index 0000000..cbf5138 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/standard-scrollbar-vertical@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/status-bar-background.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/status-bar-background.png new file mode 100644 index 0000000..d7421ca Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/status-bar-background.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/status-bar-background@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/status-bar-background@2x.png new file mode 100644 index 0000000..ff8d0ff Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/status-bar-background@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-active.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-active.png new file mode 100644 index 0000000..f9dd09d Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-active.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-active@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-active@2x.png new file mode 100644 index 0000000..b359129 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-active@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-close-hover.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-close-hover.png new file mode 100644 index 0000000..5c0bce1 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-close-hover.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-close-hover@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-close-hover@2x.png new file mode 100644 index 0000000..3d9063c Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-close-hover@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-close-inactive.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-close-inactive.png new file mode 100644 index 0000000..17d53d2 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-close-inactive.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-close-inactive@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-close-inactive@2x.png new file mode 100644 index 0000000..89a063f Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-close-inactive@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-close-pressed.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-close-pressed.png new file mode 100644 index 0000000..1d49426 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-close-pressed.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-close-pressed@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-close-pressed@2x.png new file mode 100644 index 0000000..aa00e3a Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-close-pressed@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-close.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-close.png new file mode 100644 index 0000000..0e44300 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-close.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-close@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-close@2x.png new file mode 100644 index 0000000..6af55f6 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-close@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-dirty-inactive.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-dirty-inactive.png new file mode 100644 index 0000000..c633b56 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-dirty-inactive.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-dirty-inactive@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-dirty-inactive@2x.png new file mode 100644 index 0000000..06eaf17 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-dirty-inactive@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-dirty.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-dirty.png new file mode 100644 index 0000000..0cfac0d Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-dirty.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-dirty@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-dirty@2x.png new file mode 100644 index 0000000..4d2a744 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-dirty@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-highlight-inactive.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-highlight-inactive.png new file mode 100644 index 0000000..4ca3607 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-highlight-inactive.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-highlight-inactive@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-highlight-inactive@2x.png new file mode 100644 index 0000000..1e35e06 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-highlight-inactive@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-highlight.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-highlight.png new file mode 100644 index 0000000..3425d31 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-highlight.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-highlight@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-highlight@2x.png new file mode 100644 index 0000000..1896d71 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-highlight@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-hover.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-hover.png new file mode 100644 index 0000000..ce9f8ec Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-hover.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-hover@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-hover@2x.png new file mode 100644 index 0000000..1aa6b28 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-hover@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-inactive.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-inactive.png new file mode 100644 index 0000000..091dee5 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-inactive.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-inactive@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-inactive@2x.png new file mode 100644 index 0000000..df248b1 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tab-inactive@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tabset-background.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tabset-background.png new file mode 100644 index 0000000..54d9a50 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tabset-background.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tabset-background@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tabset-background@2x.png new file mode 100644 index 0000000..ea8ae03 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tabset-background@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/text-field.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/text-field.png new file mode 100644 index 0000000..d4e67d3 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/text-field.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/text-field@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/text-field@2x.png new file mode 100644 index 0000000..3b55fda Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/text-field@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tooltip.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tooltip.png new file mode 100644 index 0000000..63faab6 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tooltip.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tooltip@2x.png b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tooltip@2x.png new file mode 100644 index 0000000..1cccaa6 Binary files /dev/null and b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/Soda Light/tooltip@2x.png differ diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/package-metadata.json b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/package-metadata.json new file mode 100644 index 0000000..171865a --- /dev/null +++ b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Theme - Soda/package-metadata.json @@ -0,0 +1 @@ +{"url": "http://buymeasoda.github.com/soda-theme/", "version": "2012.12.12.08.37.38", "description": "Dark and light custom UI themes for Sublime Text 2"} \ No newline at end of file diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/ZZZ.EthanBrown.SublimeKeyMap.Util/Default (Windows).sublime-keymap b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/ZZZ.EthanBrown.SublimeKeyMap.Util/Default (Windows).sublime-keymap new file mode 100644 index 0000000..9e76828 --- /dev/null +++ b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/ZZZ.EthanBrown.SublimeKeyMap.Util/Default (Windows).sublime-keymap @@ -0,0 +1,56 @@ +[ + //AdvancedNewFile - https://github.com/xobb1t/Sublime-AdvancedNewFile + { "keys": ["ctrl+alt+n"], "command": "advanced_new_file"}, + //{ "keys": ["shift+ctrl+alt+n"], "command": "advanced_new_file", "args": {"is_python": true}}, + { + "keys": ["tab"], + "command": "insert_best_completion", + "args": {"default": "", "exact": false}, + "context": [ + { "key": "advanced_new_file_completion"}, + { "key": "setting.tab_completion", "operator": "equal", "operand": true }, + { "key": "last_command", "operator": "not_equal", "operand": "insert_best_completion" }, + { "key": "auto_complete_visible" , "operator": "equal", "operand": false} + ] + }, + + //Navigation History - https://github.com/timjrobinson/SublimeNavigationHistory + { "keys": ["alt+left"], "command": "navigation_history_back"}, + { "keys": ["alt+right"], "command": "navigation_history_forward"}, + + //Recent Active Files - https://github.com/jugyo/SublimeRecentActiveFiles + { "keys": ["ctrl+alt+shift+t"], "command": "recent_active_files" }, + + //Keymap Manager - https://github.com/welefen/KeymapManager + { "keys": ["ctrl+alt+k"],"command": "keymap_manager" }, + + //MoveTab - https://github.com/SublimeText/MoveTab + { "keys": ["ctrl+shift+end"], "command": "move_tab", "args": { "position": "999" }}, + { "keys": ["ctrl+shift+home"],"command": "move_tab","args": { "position": "0" }}, + { "keys": ["ctrl+shift+pageup"],"command": "move_tab","args": { "position": "-1" }}, + { "keys": ["ctrl+shift+pagedown"],"command": "move_tab","args": { "position": "+1" }}, + + //OpenRecentFiles - https://github.com/spadgos/sublime-OpenRecentFiles + { "keys": ["ctrl+shift+t"], "command": "open_recent_files" }, + + //OpenSearchResult - https://github.com/abrookins/OpenSearchResult + { "keys": ["ctrl+enter"], "command": "open_search_result", "context": + [ + { "key": "selector", "operator": "equal", "operand": "text.find-in-files" } + ] + }, + + //SideBarEnhancements - https://github.com/titoBouzout/SideBarEnhancements/ + { "keys": ["ctrl+t"], "command": "side_bar_new_file" }, + { "keys": ["f12"], "command": "side_bar_open_in_browser" , "args":{"paths":[], "type":"testing" }}, + { "keys": ["alt+f12"], "command": "side_bar_open_in_browser", "args":{"paths":[], "type":"production" }}, + { "keys": ["f2"], "command": "side_bar_rename" }, + { "keys": ["ctrl+alt+f"], "command": "side_bar_find_files_path_containing" }, + { "keys": ["ctrl+shift+r"], "command": "side_bar_move" }, + + //SublimeFiles - https://github.com/al63/SublimeFiles + { "keys": ["shift+ctrl+alt+n"], "command": "sublime_files", "args": {"command":"navigate"}}, + + //Build system keybindings + { "keys": ["f5"], "command": "build" } +] diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/ZZZ.EthanBrown.SublimeKeyMap.Util/README.md b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/ZZZ.EthanBrown.SublimeKeyMap.Util/README.md new file mode 100644 index 0000000..946ad8e --- /dev/null +++ b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/ZZZ.EthanBrown.SublimeKeyMap.Util/README.md @@ -0,0 +1,36 @@ +SublimeKeyMap.Util +================== + +A simple repository used to host / share my customized Sublime Text 2 key bindings for Sublime utility plugins and themes + +Designed to be incorporated into `Package Control.sublime-settings` like: + +```json +{ + "installed_packages": + [ + "AdvancedNewFile", + "ConsoleExec", + "EncodingHelper", + "KeymapManager", + "MoveTab", + "Navigation History", + "Open Recent Files", + "OpenSearchResult", + "Package Control", + "RecentActiveFiles", + "Search Anywhere", + "SideBarEnhancements", + "Sublime Files", + "Theme - Soda" + ], + "package_name_map": { + "SublimeKeyMap.Util": "ZZZ.EthanBrown.SublimeKeyMap.Util" + }, + "repositories": + [ + "https://github.com/abrookins/OpenSearchResult", + "https://github.com/Iristyle/SublimeKeyMap.Util" + ] +} +``` diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/ZZZ.EthanBrown.SublimeKeyMap.Util/package-metadata.json b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/ZZZ.EthanBrown.SublimeKeyMap.Util/package-metadata.json new file mode 100644 index 0000000..9054c07 --- /dev/null +++ b/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/ZZZ.EthanBrown.SublimeKeyMap.Util/package-metadata.json @@ -0,0 +1 @@ +{"url": "https://github.com/Iristyle/SublimeKeyMap.Util", "version": "2013.03.11.16.06.11", "description": "A simple repository used to host / share my customized Sublime Text 2 key bindings for Sublime utility plugins"} \ No newline at end of file diff --git a/EthanBrown.SublimeText2.UtilPackages/tools/chocolateyInstall.ps1 b/EthanBrown.SublimeText2.UtilPackages/tools/chocolateyInstall.ps1 index 6219ee4..e1c07f1 100644 --- a/EthanBrown.SublimeText2.UtilPackages/tools/chocolateyInstall.ps1 +++ b/EthanBrown.SublimeText2.UtilPackages/tools/chocolateyInstall.ps1 @@ -30,6 +30,9 @@ try { ([IO.File]::ReadAllText($sublimeFiles)) -replace '{{term_command}}', $escapedPs | Out-File -FilePath (Join-Path $sublimeUserDataPath $sublimeFilesFileName) -Force -Encoding ASCII + $packageCache = Join-Path (Get-CurrentDirectory) 'PackageCache' + Install-SublimePackagesFromCache -Directory $packageCache + Install-SublimePackageControl $packageControl = (Join-Path (Get-CurrentDirectory) 'Package Control.sublime-settings') Merge-PackageControlSettings -FilePath $packageControl diff --git a/EthanBrown.SublimeText2.WebPackages/EthanBrown.SublimeText2.WebPackages.nuspec b/EthanBrown.SublimeText2.WebPackages/EthanBrown.SublimeText2.WebPackages.nuspec index 12309fe..09a4036 100644 --- a/EthanBrown.SublimeText2.WebPackages/EthanBrown.SublimeText2.WebPackages.nuspec +++ b/EthanBrown.SublimeText2.WebPackages/EthanBrown.SublimeText2.WebPackages.nuspec @@ -3,7 +3,7 @@ EthanBrown.SublimeText2.WebPackages Sublime Text 2 - Web Development Packages - 0.0.5 + 0.1.0 Various Ethan Brown A number of packages helpful for auto-completion, snippets and syntax recognition of common web frameowrks and tools to increase editor productivity. @@ -101,10 +101,11 @@ --> false https://raw.github.com/Iristyle/ChocolateyPackages/master/SublimeText2.app/Sublime_Text.png - + * Use a local package cache to prevent first-time package restore / load errors + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Example.sublime-keymap b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Example.sublime-keymap new file mode 100644 index 0000000..5a373d3 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Example.sublime-keymap @@ -0,0 +1,4 @@ +[ + { "keys": ["shift+f3"], "command": "show_overlay", + "args": {"overlay": "command_palette", "text": "Angular"} } +] diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/README.md b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/README.md new file mode 100644 index 0000000..9acf2b5 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/README.md @@ -0,0 +1,820 @@ +![Logo](http://angularjs.org/img/AngularJS-small.png) +# AngularJs Sublime Text 2 Bundle + +This package provides snippets for *all* the available AngularJS api calls. +The snippets are activated both in HTML and CoffeeScript. + +Is this a major perversion of the snippet system? In a way, yes. + +Think of it more as a poor mans Intellisense, rather than a series of snippets. +The snippets intentionally overlap with one another, so that only a few simple +mnemonics require memorization, rather than hundreds. + +Using this approach, instead of providing a `xyz`,`TAB` style snippet expansion, +`xyz`,`TAB` will load a context-sensitive Sublime completion overlay where the +appropriate snippet can be picked with the arrow keys and an additional TAB. For +example, `ng`,`TAB` in an HTML tag will show all the available ng-* attributes. +This is a little slower approach than the one typically taken with snippets, but +decreases the learning curve over the API surface. Note that Sublime appears to +have different conditions for showing the completion overlay. Simply typing +`ng` in a CoffeeScript document will show the completion menu, while the `TAB` is +required in HTML. (This is potentially related to other installed packages) + +## Installation + +### Automatic + +Ensure that you have installed Sublime Package Control following [these instructions][SublimePackage] + +Open the Sublime command palette with `Ctrl + Shift + P`, type / select `Package Control: Install Package`, +then from the package control list, type / select `AngularJS (CoffeeScript)` + +Note that packages are auto-updating, so as new modifications are made they will automatically be installed. + +[Sublime]: http://www.sublimetext.com/dev +[SublimePackage]: http://wbond.net/sublime_packages/package_control/installation + + +### Manual tweaking of Package Control + +This is not recommended, but Package control can be pointed directly at this +GitHub repository rather than using the registry. +Add to `Packages\User\Package Control.sublime-settings`, under the appropriate +keys in the JSON config file. + +This file can be opened via the Sublime menu: +`Preferences -> Package Settings -> Package Control -> Settings -- User` + +```javascript +{ + "installed_packages": + [ + "AngularJS (CoffeeScript)" + ], + "package_name_map": + { + "Sublime-AngularJS-Coffee-Completions": "AngularJS (CoffeeScript)" + }, + "repositories": + [ + "https://github.com/EastPoint/Sublime-AngularJS-Coffee-Completions" + ] +} +``` + +### Keybindings + +Snippet triggers in Sublime are effectively implicit key bindings, that are +always mapped to a series of characters + TAB. Alternatively, they can be found +on the `Ctrl + Shift + P` menu by typing `Ang` to filter the list. + +It is further recommended that a keybinding similar to the following is added +to provide single key combo access to all the currently available snippets. + +```javascript +[ + { "keys": ["shift+f3"], "command": "show_overlay", + "args": {"overlay": "command_palette", "text": "Angular"} } +] +``` + +To allow for the `$` character to trigger the menu automatically, the following +must be added to the `Preferences.sublime-settings` file. This file can be opened +by the `Preferences` -> `Settings -- User` menu item. + +```javascript +{ + "auto_complete_triggers": + [ + { + "characters": "$", + "selector": "source.coffee, source.js, source.js.embedded.html" + } + ] +} +``` + +If you want to disable duplicate `$`s from showing up in the editor when completing, +then you must change the default `word_separators` to the following, in the same user +`Preferences.sublime-settings` + +```javascript +{ + "word_separators": "./\\()\"'-:,.;<>~!@#%^&*|+=[]{}`~?" +} +``` + +__NOTE:__ `auto_complete_triggers` and `word_separators` are siblings in the same JSON +config object. + + +#### CoffeeScript + +The bindings have been selected so that they don't interfere with the standard +CoffeeScript bindings, namely `=`, `-`, `cla`, `log`, `elif`, `el`, `if`, `ifel`, +`#`, `forof`, `forx`, `fori`, `forin`, `req`, `swi`, `ter`, `try` or `unl` + +### Sublime Bugs + +Unfortunately there are a couple of issues with Sublime at the moment preventing +it from doing a couple of things that would help us out: + +* Filtering within the completions overlay doesn't work right when the `$` +character is involved. + +* There is no way to add names to a completion like you can for a snippet, so +the `Ctrl + Space` overlay only shows identifiers. + +* The tab trigger system in Sublime does not support regular expressions. So +when dealing with a member function such as `scope.$watch`, there is no way to +reduce the noise in the list when pressing `.$`. We see *all* completions +starting with `$` rather than only those starting with `.$`, lengthening the list. + +* There is no way that I can find to limit the scope of the `ng-*` attributes to +only the HTML tags that they are valid for (i.e. `ng-csp` only belong on `html`) +The best we can do here is to segregate snippets that are attributes vs tags. + +* Sublime doesn't have a convention for optional parameters / blocks in snippets. +This is faked by highlighting the block on the first `TAB` so that it may be +deleted, and allowing subsequent `TAB`s to change specific values in the block +if the block is kept. However, Sublime still honors the tabs inside the block +after it's been deleted. In practical terms, this means it may require extra +`TAB` presses to send the cursor to the next replacement point after an +`optional` block has been deleted. + +__Please vote up issues [124225][124225] and [124217][124217] if you want to see +these issues resolved!__ + +[124225]: http://sublimetext.userecho.com/topic/124225-/ +[124217]: http://sublimetext.userecho.com/topic/124217-/ + +Hopefully a future version of Sublime will address these issues, but for now +there are some work-arounds. + +The solution at the moment is to provide placeholder snippets for top-level +services such as `$filter`. + +A workflow for this would be the following: + +```plaintext +`$`, `TAB` + -> select Angular filter from the menu with `TAB` + -> `$filter` is inserted into document + -> `TAB` brings up completions against `$filter` + -> select specific filter from the menu with `TAB` (such as currency) + -> `$filter('currency') currency, 'symbol-eg-USD$'` is inserted into document + and supports `TAB` completion (or chunk deletion) +``` + +[completions]: http://docs.sublimetext.info/en/latest/extensibility/completions.html + +## Tab Triggers + +The number of tab triggers is intentionally limited to increase discoverability. +As a convention, most parameters have been stubbed with a value that indicates +the value that should be replaced. Where functions take multiple possible +parameters, the `|` has been used by convention - i.e. `true|false` + +#### tl;dr Version + +These are the only triggers used - `$`, `.$`, `ng`, `for`, `is`, `mod`, `dir`, +`fil`, `mock`, `$cookieStore`, `$filter.`, `$http.`, `$httpBackend.`, +`$injector.`, `$interpolate.`, `$location.`, `$log.`, `$provide.`, `$q.`, +`$route.`, `$routeProvider.`, `.error`, `.expect`, `.other`, `.success` and +`.when` ... PHEW + + +### Directive + +All HTML based directives are keyed off the `ng`,`TAB` binding. + +| Directive | Binding | Context | +| :------------------------------------- | ---------------: | --------------:| +| [form][form] | `ng`,`TAB` | HTML Element | +| [input][input] | `ng`,`TAB` | HTML Element | +| [input \[checkbox\]][input-check] | `ng`,`TAB` | HTML Element | +| [input \[email\]][input-email] | `ng`,`TAB` | HTML Element | +| [input \[number\]][input-number] | `ng`,`TAB` | HTML Element | +| [input \[radio\]][input-radio] | `ng`,`TAB` | HTML Element | +| [input \[text\]][input-text] | `ng`,`TAB` | HTML Element | +| [input \[url\]][input-url] | `ng`,`TAB` | HTML Element | +| [input \[email\]][input-email] | `ng`,`TAB` | HTML Element | +| [ngApp][ngApp] | `ng`,`TAB` | HTML Attribute | +| [ngBind][ngBind] | `ng`,`TAB` | HTML Attribute | +| [ngBindHtml][ngBindHtml] | `ng`,`TAB` | HTML Attribute | +| [ngBindHtmlUnsafe][ngBindHtmlUnsafe] | `ng`,`TAB` | HTML Attribute | +| [ngBindTemplate][ngBindTemplate] | `ng`,`TAB` | HTML Attribute | +| [ngChange][ngChange] | `ng`,`TAB` | HTML Attribute | +| [ngChecked][ngChecked] | `ng`,`TAB` | HTML Attribute | +| [ngClass][ngClass] | `ng`,`TAB` | HTML Attribute | +| [ngClassEven][ngClassEven] | `ng`,`TAB` | HTML Attribute | +| [ngClassOdd][ngClassOdd] | `ng`,`TAB` | HTML Attribute | +| [ngClick][ngClick] | `ng`,`TAB` | HTML Attribute | +| [ngCloak][ngCloak] | `ng`,`TAB` | HTML Attribute | +| [ngController][ngController] | `ng`,`TAB` | HTML Attribute | +| [ngCsp][ngCsp] | `ng`,`TAB` | HTML Attribute | +| [ngDblClick][ngDblClick] | `ng`,`TAB` | HTML Attribute | +| [ngDisabled][ngDisabled] | `ng`,`TAB` | HTML Attribute | +| [ngForm][ngForm] | `ng`,`TAB` | HTML Element | +| [ngHide][ngHide] | `ng`,`TAB` | HTML Attribute | +| [ngHref][ngHref] | `ng`,`TAB` | HTML Attribute | +| [ngInclude][ngInclude] | `ng`,`TAB` | HTML Attribute | +| [ngInclude][ngInclude] | `ng`,`TAB` | HTML Element | +| [ngInit][ngInit] | `ng`,`TAB` | HTML Attribute | +| [ngList][ngList] | `ng`,`TAB` | HTML Attribute | +| [ngModel][ngModel] | `ng`,`TAB` | HTML Attribute | +| [ngMousedown][ngMousedown] | `ng`,`TAB` | HTML Attribute | +| [ngMouseenter][ngMouseenter] | `ng`,`TAB` | HTML Attribute | +| [ngMouseleave][ngMouseleave] | `ng`,`TAB` | HTML Attribute | +| [ngMousemove][ngMousemove] | `ng`,`TAB` | HTML Attribute | +| [ngMouseover][ngMouseover] | `ng`,`TAB` | HTML Attribute | +| [ngMouseup][ngMouseup] | `ng`,`TAB` | HTML Attribute | +| [ngMultiple][ngMultiple] | `ng`,`TAB` | HTML Attribute | +| [ngNonBindable][ngNonBindable] | `ng`,`TAB` | HTML Attribute | +| [ngPluralize][ngPluralize] | `ng`,`TAB` | HTML Attribute | +| [ngPluralize][ngPluralize] | `ng`,`TAB` | HTML Element | +| [ngReadonly][ngReadonly] | `ng`,`TAB` | HTML Attribute | +| [ngRepeat][ngRepeat] | `ng`,`TAB` | HTML Attribute | +| [ngSelected][ngSelected] | `ng`,`TAB` | HTML Attribute | +| [ngShow][ngShow] | `ng`,`TAB` | HTML Attribute | +| [ngSrc][ngSrc] | `ng`,`TAB` | HTML Attribute | +| [ngStyle][ngStyle] | `ng`,`TAB` | HTML Attribute | +| [ngSubmit][ngSubmit] | `ng`,`TAB` | HTML Attribute | +| [ngSwitch][ngSwitch] | `ng`,`TAB` | HTML Attribute | +| [ngSwitch][ngSwitch] | `ng`,`TAB` | HTML Element | +| [ngSwitch-default][ngSwitch] | `ng`,`TAB` | HTML Attribute | +| [ngSwitch-when][ngSwitch] | `ng`,`TAB` | HTML Attribute | +| [ngTransclude][ngTransclude] | `ng`,`TAB` | HTML Attribute | +| [ngView][ngView] | `ng`,`TAB` | HTML Attribute | +| [ngView][ngView] | `ng`,`TAB` | HTML Element | +| [script][script] | `ng`,`TAB` | HTML Element | +| [select][select] | `ng`,`TAB` | HTML Element | +| [textarea][textarea] | `ng`,`TAB` | HTML Element | + +[form]: http://docs.angularjs.org/api/ng.directive:form +[input]: http://docs.angularjs.org/api/ng.directive:input +[input-check]: http://docs.angularjs.org/api/ng.directive:input.checkbox +[input-email]: http://docs.angularjs.org/api/ng.directive:input.email +[input-number]: http://docs.angularjs.org/api/ng.directive:input.number +[input-radio]: http://docs.angularjs.org/api/ng.directive:input.radio +[input-text]: http://docs.angularjs.org/api/ng.directive:input.text +[input-url]: http://docs.angularjs.org/api/ng.directive:input.url +[ngApp]: http://docs.angularjs.org/api/ng.directive:ngApp +[ngBind]: http://docs.angularjs.org/api/ng.directive:ngBind +[ngBindHtml]: http://docs.angularjs.org/api/ngSanitize.directive:ngBindHtml +[ngBindHtmlUnsafe]: http://docs.angularjs.org/api/ng.directive:ngBindHtmlUnsafe +[ngBindTemplate]: http://docs.angularjs.org/api/ng.directive:ngBindTemplate +[ngChange]: http://docs.angularjs.org/api/ng.directive:ngChange +[ngChecked]: http://docs.angularjs.org/api/ng.directive:ngChecked +[ngClass]: http://docs.angularjs.org/api/ng.directive:ngClass +[ngClassEven]: http://docs.angularjs.org/api/ng.directive:ngClassEven +[ngClassOdd]: http://docs.angularjs.org/api/ng.directive:ngClassOdd +[ngClick]: http://docs.angularjs.org/api/ng.directive:ngClick +[ngCloak]: http://docs.angularjs.org/api/ng.directive:ngCloak +[ngController]: http://docs.angularjs.org/api/ng.directive:ngController +[ngCsp]: http://docs.angularjs.org/api/ng.directive:ngCsp +[ngDblClick]: http://docs.angularjs.org/api/ng.directive:ngDblClick +[ngDisabled]: http://docs.angularjs.org/api/ng.directive:ngDisabled +[ngForm]: http://docs.angularjs.org/api/ng.directive:ngForm +[ngHide]: http://docs.angularjs.org/api/ng.directive:ngHide +[ngHref]: http://docs.angularjs.org/api/ng.directive:ngHref +[ngInclude]: http://docs.angularjs.org/api/ng.directive:ngInclude +[ngInit]: http://docs.angularjs.org/api/ng.directive:ngInit +[ngList]: http://docs.angularjs.org/api/ng.directive:ngList +[ngModel]: http://docs.angularjs.org/api/ng.directive:ngModel +[ngMousedown]: http://docs.angularjs.org/api/ng.directive:ngMousedown +[ngMouseenter]: http://docs.angularjs.org/api/ng.directive:ngMouseenter +[ngMouseleave]: http://docs.angularjs.org/api/ng.directive:ngMouseleave +[ngMousemove]: http://docs.angularjs.org/api/ng.directive:ngMousemove +[ngMouseover]: http://docs.angularjs.org/api/ng.directive:ngMouseover +[ngMouseup]: http://docs.angularjs.org/api/ng.directive:ngMouseup +[ngMultiple]: http://docs.angularjs.org/api/ng.directive:ngMultiple +[ngNonBindable]: http://docs.angularjs.org/api/ng.directive:ngNonBindable +[ngPluralize]: http://docs.angularjs.org/api/ng.directive:ngPluralize +[ngReadonly]: http://docs.angularjs.org/api/ng.directive:ngReadonly +[ngRepeat]: http://docs.angularjs.org/api/ng.directive:ngRepeat +[ngSelected]: http://docs.angularjs.org/api/ng.directive:ngSelected +[ngShow]: http://docs.angularjs.org/api/ng.directive:ngShow +[ngSrc]: http://docs.angularjs.org/api/ng.directive:ngSrc +[ngStyle]: http://docs.angularjs.org/api/ng.directive:ngStyle +[ngSubmit]: http://docs.angularjs.org/api/ng.directive:ngSubmit +[ngSwitch]: http://docs.angularjs.org/api/ng.directive:ngSwitch +[ngTransclude]: http://docs.angularjs.org/api/ng.directive:ngTransclude +[ngView]: http://docs.angularjs.org/api/ng.directive:ngView +[script]: http://docs.angularjs.org/api/ng.directive:script +[select]: http://docs.angularjs.org/api/ng.directive:select +[textarea]: http://docs.angularjs.org/api/ng.directive:textarea + +### Module + +| [Module][module] Method | Binding | Context | +| :----------------------------------- | -----------------: | ------------:| +| [config][m.config] | `mod`,`TAB` | CoffeeScript | +| [constant][m.constant] | `mod`,`TAB` | CoffeeScript | +| [controller][m.controller] | `mod`,`TAB` | CoffeeScript | +| [directive][m.directive] (to chain) | `dir`,`TAB` | CoffeeScript | +| [directive][dir-complete] (complete) | `dir`,`TAB` | CoffeeScript | +| [factory][m.factory] | `mod`,`TAB` | CoffeeScript | +| [filter][m.filter] | `mod`,`TAB` | CoffeeScript | +| [provider][m.provider] | `mod`,`TAB` | CoffeeScript | +| [run][m.run] | `mod`,`TAB` | CoffeeScript | +| [service][m.service] | `mod`,`TAB` | CoffeeScript | +| [value][m.value] | `mod`,`TAB` | CoffeeScript | + +[module]: http://docs.angularjs.org/api/angular.Module +[m.config]: http://docs.angularjs.org/api/angular.Module#config +[m.constant]: http://docs.angularjs.org/api/angular.Module#constant +[m.controller]: http://docs.angularjs.org/api/angular.Module#controller +[m.directive]: http://docs.angularjs.org/api/angular.Module#directive +[dir-complete]: http://docs.angularjs.org/guide/directive +[m.factory]: http://docs.angularjs.org/api/angular.Module#factory +[m.filter]: http://docs.angularjs.org/api/angular.Module#filter +[m.provider]: http://docs.angularjs.org/api/angular.Module#provider +[m.run]: http://docs.angularjs.org/api/angular.Module#run +[m.service]: http://docs.angularjs.org/api/angular.Module#service +[m.value]: http://docs.angularjs.org/api/angular.Module#value + +### Scope + +| Scope Method | Binding | Context | +| :----------------------------------- | --------------------: | ------------:| +| [$rootScope][Scope] | `$`,`TAB` | CoffeeScript | +| [$apply][$s.$apply] | `.$`,`TAB` | CoffeeScript | +| [$broadcast][$s.$broadcast] | `.$`,`TAB` | CoffeeScript | +| [$destroy][$s.$destroy] | `.$`,`TAB` | CoffeeScript | +| [$digest][$s.$digest] | `.$`,`TAB` | CoffeeScript | +| [$emit][$s.$emit] | `.$`,`TAB` | CoffeeScript | +| [$eval][$s.$eval] | `.$`,`TAB` | CoffeeScript | +| [$evalAsync][$s.$evalAsync] | `.$`,`TAB` | CoffeeScript | +| [$id][$s.$id] | `.$`,`TAB` | CoffeeScript | +| [$new][$s.$new] | `.$`,`TAB` | CoffeeScript | +| [$on][$s.$on] | `.$`,`TAB` | CoffeeScript | +| [$watch][$s.$watch] | `.$`,`TAB` | CoffeeScript | + +[$rootScope]: http://docs.angularjs.org/api/ng.$rootScope +[Scope]: http://docs.angularjs.org/api/ng.$rootScope.Scope +[$s.$apply]: http://docs.angularjs.org/api/ng.$rootScope.Scope#$apply +[$s.$broadcast]: http://docs.angularjs.org/api/ng.$rootScope.Scope#$broadcast +[$s.$destroy]: http://docs.angularjs.org/api/ng.$rootScope.Scope#$destroy +[$s.$digest]: http://docs.angularjs.org/api/ng.$rootScope.Scope#$digest +[$s.$emit]: http://docs.angularjs.org/api/ng.$rootScope.Scope#$emit +[$s.$eval]: http://docs.angularjs.org/api/ng.$rootScope.Scope#$eval +[$s.$evalAsync]: http://docs.angularjs.org/api/ng.$rootScope.Scope#$evalAsync +[$s.$id]: http://docs.angularjs.org/api/ng.$rootScope.Scope#$id +[$s.$new]: http://docs.angularjs.org/api/ng.$rootScope.Scope#$new +[$s.$on]: http://docs.angularjs.org/api/ng.$rootScope.Scope#$on +[$s.$watch]: http://docs.angularjs.org/api/ng.$rootScope.Scope#$watch + +### Controller + +Covers both [FormController][FormController] and [NgModelController][NgModelController] + +| Controller Method | Binding | Context | +| :------------------------------------- | ------------------: | ------------:| +| [$render][c.$render] | `.$`,`TAB` | CoffeeScript | +| [$setValidity][c.$setValidity] | `.$`,`TAB` | CoffeeScript | +| [$setViewValue][c.$setViewValue] | `.$`,`TAB` | CoffeeScript | +| [$viewValue][c.$viewValue] | `.$`,`TAB` | CoffeeScript | +| [$modelValue][c.$modelValue] | `.$`,`TAB` | CoffeeScript | +| [$parsers][c.$parsers] | `.$`,`TAB` | CoffeeScript | +| [$formatters][c.$formatters] | `.$`,`TAB` | CoffeeScript | +| [$error][c.$error] | `.$`,`TAB` | CoffeeScript | +| [$pristine][c.$pristine] | `.$`,`TAB` | CoffeeScript | +| [$dirty][c.$dirty] | `.$`,`TAB` | CoffeeScript | +| [$valid][c.$valid] | `.$`,`TAB` | CoffeeScript | +| [$invalid][c.$invalid] | `.$`,`TAB` | CoffeeScript | + +[FormController]: http://docs.angularjs.org/api/ng.directive:form.FormController +[NgModelController]: http://docs.angularjs.org/api/ng.directive:ngModel.NgModelController +[c.$render]: http://docs.angularjs.org/api/ng.directive:ngModel.NgModelController#$render +[c.$setValidity]: http://docs.angularjs.org/api/ng.directive:ngModel.NgModelController#$setValidity +[c.$setViewValue]: http://docs.angularjs.org/api/ng.directive:ngModel.NgModelController#$setViewValue +[c.$viewValue]: http://docs.angularjs.org/api/ng.directive:ngModel.NgModelController#$viewValue +[c.$modelValue]: http://docs.angularjs.org/api/ng.directive:ngModel.NgModelController#$modelValue +[c.$parsers]: http://docs.angularjs.org/api/ng.directive:ngModel.NgModelController#$parsers +[c.$formatters]: http://docs.angularjs.org/api/ng.directive:ngModel.NgModelController#$formatters +[c.$error]: http://docs.angularjs.org/api/ng.directive:ngModel.NgModelController#$error +[c.$pristine]: http://docs.angularjs.org/api/ng.directive:ngModel.NgModelController#$pristine +[c.$dirty]: http://docs.angularjs.org/api/ng.directive:ngModel.NgModelController#$dirty +[c.$valid]: http://docs.angularjs.org/api/ng.directive:ngModel.NgModelController#$valid +[c.$invalid]: http://docs.angularjs.org/api/ng.directive:ngModel.NgModelController#$invalid + +### Resource + +| Resource Methods | Binding | Context | +| :----------------------------------------- | --------------: | ------------:| +| [$resource][$resource] | `$`,`TAB` | CoffeeScript | +| [$delete][$r.$methods] | `.$`,`TAB` | CoffeeScript | +| [$get][$r.$methods] | `.$`,`TAB` | CoffeeScript | +| [$query][$r.$methods] | `.$`,`TAB` | CoffeeScript | +| [$remove][$r.$methods] | `.$`,`TAB` | CoffeeScript | +| [$save][$r.$methods] | `.$`,`TAB` | CoffeeScript | + +[$resource]: http://docs.angularjs.org/api/ngResource.$resource +[$r.$methods]: http://docs.angularjs.org/api/ngResource.$resource#Returns + +### Filter + +| Filter Method | Binding | Context | +| :------------------------------------- | ------------------: | ------------:| +| [$filter][$filter] | `$`,`TAB` | CoffeeScript | +| [currency][currency] | `$filter`,`TAB` | CoffeeScript | +| [currency][currency] | `fil`,`TAB` | HTML | +| [date][date] | `$filter`,`TAB` | CoffeeScript | +| [date][date] | `fil`,`TAB` | HTML | +| [filter][filter] | `$filter`,`TAB` | CoffeeScript | +| [filter][filter] | `fil`,`TAB` | HTML | +| [json][json] | `$filter`,`TAB` | CoffeeScript | +| [json][json] | `fil`,`TAB` | HTML | +| [limitTo][limitTo] | `$filter`,`TAB` | CoffeeScript | +| [limitTo][limitTo] | `fil`,`TAB` | HTML | +| [linky][linky] | `$filter`,`TAB` | CoffeeScript | +| [linky][linky] | `fil`,`TAB` | HTML | +| [lowercase][lowercase] | `$filter`,`TAB` | CoffeeScript | +| [lowercase][lowercase] | `fil`,`TAB` | HTML | +| [number][number] | `$filter`,`TAB` | CoffeeScript | +| [number][number] | `fil`,`TAB` | HTML | +| [orderBy][orderBy] | `$filter`,`TAB` | CoffeeScript | +| [orderBy][orderBy] | `fil`,`TAB` | HTML | +| [uppercase][uppercase] | `$filter`,`TAB` | CoffeeScript | +| [uppercase][uppercase] | `fil`,`TAB` | HTML | + +[$filter]: http://docs.angularjs.org/api/ng.$filter +[currency]: http://docs.angularjs.org/api/ng.filter:currency +[date]: http://docs.angularjs.org/api/ng.filter:date +[filter]: http://docs.angularjs.org/api/ng.filter:filter +[json]: http://docs.angularjs.org/api/ng.filter:json +[limitTo]: http://docs.angularjs.org/api/ng.filter:limitTo +[linky]: http://docs.angularjs.org/api/ngSanitize.filter:linky +[lowercase]: http://docs.angularjs.org/api/ng.filter:lowercase +[number]: http://docs.angularjs.org/api/ng.filter:number +[orderBy]: http://docs.angularjs.org/api/ng.filter:orderBy +[uppercase]: http://docs.angularjs.org/api/ng.filter:uppercase + +### Global API + +| Global API | Binding | Context | +| :----------------------------------------- | --------------: | ------------:| +| [angular.bind][angular.bind] | `ng`,`TAB` | CoffeeScript | +| [angular.bootstrap][angular.bootstrap] | `ng`,`TAB` | CoffeeScript | +| [angular.copy][angular.copy] | `ng`,`TAB` | CoffeeScript | +| [angular.element][angular.element] | `ng`,`TAB` | CoffeeScript | +| [angular.equals][angular.equals] | `ng`,`TAB` | CoffeeScript | +| [angular.extend][angular.extend] | `ng`,`TAB` | CoffeeScript | +| [angular.foreach][angular.foreach] | `for`,`TAB` | CoffeeScript | +| [angular.fromJson][angular.fromJson] | `ng`,`TAB` | CoffeeScript | +| [angular.identity][angular.identity] | `ng`,`TAB` | CoffeeScript | +| [angular.injector][angular.injector] | `ng`,`TAB` | CoffeeScript | +| [angular.isArray][angular.isArray] | `is`,`TAB` | CoffeeScript | +| [angular.isDate][angular.isDate] | `is`,`TAB` | CoffeeScript | +| [angular.isDefined][angular.isDefined] | `is`,`TAB` | CoffeeScript | +| [angular.isElement][angular.isElement] | `is`,`TAB` | CoffeeScript | +| [angular.isFunction][angular.isFunction] | `is`,`TAB` | CoffeeScript | +| [angular.isNumber][angular.isNumber] | `is`,`TAB` | CoffeeScript | +| [angular.isObject][angular.isObject] | `is`,`TAB` | CoffeeScript | +| [angular.isString][angular.isString] | `is`,`TAB` | CoffeeScript | +| [angular.isUndefined][angular.isUndefined] | `is`,`TAB` | CoffeeScript | +| [angular.lowercase][angular.lowercase] | `ng`,`TAB` | CoffeeScript | +| [angular.module][angular.module] | `mod`,`TAB` | CoffeeScript | +| [angular.noop][angular.noop] | `ng`,`TAB` | CoffeeScript | +| [angular.toJson][angular.toJson] | `ng`,`TAB` | CoffeeScript | +| [angular.uppercase][angular.uppercase] | `ng`,`TAB` | CoffeeScript | +| [angular.version][angular.version] | `ng`,`TAB` | CoffeeScript | + +[angular.bind]: http://docs.angularjs.org/api/angular.bind +[angular.bootstrap]: http://docs.angularjs.org/api/angular.bootstrap +[angular.copy]: http://docs.angularjs.org/api/angular.copy +[angular.element]: http://docs.angularjs.org/api/angular.element +[angular.equals]: http://docs.angularjs.org/api/angular.equals +[angular.extend]: http://docs.angularjs.org/api/angular.extend +[angular.forEach]: http://docs.angularjs.org/api/angular.forEach +[angular.fromJson]: http://docs.angularjs.org/api/angular.fromJson +[angular.identity]: http://docs.angularjs.org/api/angular.identity +[angular.injector]: http://docs.angularjs.org/api/angular.injector +[angular.isArray]: http://docs.angularjs.org/api/angular.isArray +[angular.isDate]: http://docs.angularjs.org/api/angular.isDate +[angular.isDefined]: http://docs.angularjs.org/api/angular.isDefined +[angular.isElement]: http://docs.angularjs.org/api/angular.isElement +[angular.isFunction]: http://docs.angularjs.org/api/angular.isFunction +[angular.isNumber]: http://docs.angularjs.org/api/angular.isNumber +[angular.isObject]: http://docs.angularjs.org/api/angular.isObject +[angular.isString]: http://docs.angularjs.org/api/angular.isString +[angular.isUndefined]: http://docs.angularjs.org/api/angular.isUndefined +[angular.lowercase]: http://docs.angularjs.org/api/angular.lowercase +[angular.module]: http://docs.angularjs.org/api/angular.module +[angular.noop]: http://docs.angularjs.org/api/angular.noop +[angular.toJson]: http://docs.angularjs.org/api/angular.toJson +[angular.uppercase]: http://docs.angularjs.org/api/angular.uppercase +[angular.version]: http://docs.angularjs.org/api/angular.version + +### Http + +| Http Methods | Binding | Context | +| :--------------------------------------- | ----------------: | ------------:| +| [$http][$http] | `$`,`TAB` | CoffeeScript | +| [$http (configured)][$http.usage] | `$`,`TAB` | CoffeeScript | +| [delete][$http.delete] | `$http.`,`TAB` | CoffeeScript | +| [get][$http.get] | `$http.`,`TAB` | CoffeeScript | +| [head][$http.head] | `$http.`,`TAB` | CoffeeScript | +| [jsonp][$http.jsonp] | `$http.`,`TAB` | CoffeeScript | +| [post][$http.post] | `$http.`,`TAB` | CoffeeScript | +| [put][$http.put] | `$http.`,`TAB` | CoffeeScript | +| [defaults][$http.defaults] | `$http.`,`TAB` | CoffeeScript | +| [pendingRequests][$http.pendingRequests] | `$http.`,`TAB` | CoffeeScript | +| [.error][$http.Returns] | `.error`,`TAB` | CoffeeScript | +| [.success][$http.Returns] | `.success`,`TAB` | CoffeeScript | + +[$http]: http://docs.angularjs.org/api/ng.$http +[$http.usage]: http://docs.angularjs.org/api/ng.$http#Usage +[$http.delete]: http://docs.angularjs.org/api/ng.$http#delete +[$http.get]: http://docs.angularjs.org/api/ng.$http#get +[$http.head]: http://docs.angularjs.org/api/ng.$http#head +[$http.jsonp]: http://docs.angularjs.org/api/ng.$http#jsonp +[$http.post]: http://docs.angularjs.org/api/ng.$http#post +[$http.put]: http://docs.angularjs.org/api/ng.$http#put +[$http.defaults]: http://docs.angularjs.org/api/ng.$http#defaults +[$http.pendingRequests]: http://docs.angularjs.org/api/ng.$http#defaults +[$http.Returns]: http://docs.angularjs.org/api/ng.$http#Returns + +### HttpBackend + +Note that `.expect` and `.when` are designed to chain, so we don't bind to +`$httpBackend` + +| HttpBackend Methods | Binding | Context | +| :------------------------------------------- | --------------------: | ------------:| +| [$httpBackend][$httpBackend] | `$`,`TAB` | CoffeeScript | +| [expect][$h.expect] | `.expect`,`TAB` | CoffeeScript | +| [expectDELETE][$h.expectDELETE] | `.expect`,`TAB` | CoffeeScript | +| [expectGET][$h.expectGET] | `.expect`,`TAB` | CoffeeScript | +| [expectHEAD][$h.expectHEAD] | `.expect`,`TAB` | CoffeeScript | +| [expectJSONP][$h.expectJSONP] | `.expect`,`TAB` | CoffeeScript | +| [expectPATCH][$h.expectPATCH] | `.expect`,`TAB` | CoffeeScript | +| [expectPOST][$h.expectPOST] | `.expect`,`TAB` | CoffeeScript | +| [expectPUT][$h.expectPUT] | `.expect`,`TAB` | CoffeeScript | +| [flush][$h.flush] | `$httpBackend.`,`TAB` | CoffeeScript | +| [resetExpectations][$h.reset] | `$httpBackend.`,`TAB` | CoffeeScript | +| [verifyNoOutstandingExceptions][$h.verifyEx] | `$httpBackend.`,`TAB` | CoffeeScript | +| [verifyNoOutstandingRequests][$h.verifyReqs] | `$httpBackend.`,`TAB` | CoffeeScript | +| [when][$h.when] | `.when`,`TAB` | CoffeeScript | +| [whenDELETE][$h.whenDELETE] | `.when`,`TAB` | CoffeeScript | +| [whenGET][$h.whenGET] | `.when`,`TAB` | CoffeeScript | +| [whenHEAD][$h.whenHEAD] | `.when`,`TAB` | CoffeeScript | +| [whenJSONP][$h.whenJSONP] | `.when`,`TAB` | CoffeeScript | +| [whenPATCH][$h.whenPATCH] | `.when`,`TAB` | CoffeeScript | +| [whenPOST][$h.whenPOST] | `.when`,`TAB` | CoffeeScript | +| [whenPUT][$h.whenPUT] | `.when`,`TAB` | CoffeeScript | + +[$httpBackend]: http://docs.angularjs.org/api/ngMock.$httpBackend +[$h.expect]: http://docs.angularjs.org/api/ngMock.$httpBackend#expect +[$h.expectDELETE]: http://docs.angularjs.org/api/ngMock.$httpBackend#expectDELETE +[$h.expectGET]: http://docs.angularjs.org/api/ngMock.$httpBackend#expectGET +[$h.expectHEAD]: http://docs.angularjs.org/api/ngMock.$httpBackend#expectHEAD +[$h.expectJSONP]: http://docs.angularjs.org/api/ngMock.$httpBackend#expectJSONP +[$h.expectPATCH]: http://docs.angularjs.org/api/ngMock.$httpBackend#expectPATCH +[$h.expectPOST]: http://docs.angularjs.org/api/ngMock.$httpBackend#expectPOST +[$h.expectPUT]: http://docs.angularjs.org/api/ngMock.$httpBackend#expectPUT +[$h.flush]: http://docs.angularjs.org/api/ngMock.$httpBackend#flush +[$h.reset]: http://docs.angularjs.org/api/ngMock.$httpBackend#resetExpectations +[$h.verifyEx]: http://docs.angularjs.org/api/ngMock.$httpBackend#verifyNoOutstandingExceptions +[$h.verifyReqs]: http://docs.angularjs.org/api/ngMock.$httpBackend#verifyNoOutstandingRequests +[$h.when]: http://docs.angularjs.org/api/ngMock.$httpBackend#when +[$h.whenDELETE]: http://docs.angularjs.org/api/ngMock.$httpBackend#whenDELETE +[$h.whenGET]: http://docs.angularjs.org/api/ngMock.$httpBackend#whenGET +[$h.whenHEAD]: http://docs.angularjs.org/api/ngMock.$httpBackend#whenHEAD +[$h.whenJSONP]: http://docs.angularjs.org/api/ngMock.$httpBackend#whenJSONP +[$h.whenPATCH]: http://docs.angularjs.org/api/ngMock.$httpBackend#whenPATCH +[$h.whenPOST]: http://docs.angularjs.org/api/ngMock.$httpBackend#whenPOST +[$h.whenPUT]: http://docs.angularjs.org/api/ngMock.$httpBackend#whenPUT + +### Q + +| Provider Method | Binding | Context | +| :------------------------------------- | ------------------: | ------------:| +| [$q][$q] | `$`,`TAB` | CoffeeScript | +| [all][$q.all] | `$q.`,`TAB` | CoffeeScript | +| [defer][$q.defer] | `$q.`,`TAB` | CoffeeScript | +| [reject][$q.reject] | `$q.`,`TAB` | CoffeeScript | +| [when][$q.when] | `$q.`,`TAB` | CoffeeScript | + +[$q]: http://docs.angularjs.org/api/ng.$q +[$q.all]: http://docs.angularjs.org/api/ng.$q#all +[$q.defer]: http://docs.angularjs.org/api/ng.$q#defer +[$q.reject]: http://docs.angularjs.org/api/ng.$q#reject +[$q.when]: http://docs.angularjs.org/api/ng.$q#when + +### Route + +| Route Method | Binding | Context | +| :----------------------------------| ----------------------: | ------------:| +| [$route][$route] | `$`,`TAB` | CoffeeScript | +| [current][$route.current] | `$route.`,`TAB` | CoffeeScript | +| [reload][$route.reload] | `$route.`,`TAB` | CoffeeScript | +| [routes][$route.routes] | `$route.`,`TAB` | CoffeeScript | +| [$routeChangeError][$route.$rce] | `.$`,`TAB` | CoffeeScript | +| [$routeChangeStart][$route.$rcst] | `.$`,`TAB` | CoffeeScript | +| [$routeChangeSuccess][$route.$rcs] | `.$`,`TAB` | CoffeeScript | +| [$routeUpdate][$route.$ru] | `.$`,`TAB` | CoffeeScript | +| [$routeParams][$routeParams] | `$`,`TAB` | CoffeeScript | +| [$routeProvider][$routeProvider] | `$`,`TAB` | CoffeeScript | +| [when][$rp.when] | `$routeprovider.`,`TAB` | CoffeeScript | +| [otherwise][$rp.other] | `.other`,`TAB` | CoffeeScript | + +[$route]: http://docs.angularjs.org/api/ng.$route +[$route.current]: http://docs.angularjs.org/api/ng.$route#current +[$route.reload]: http://docs.angularjs.org/api/ng.$route#reload +[$route.routes]: http://docs.angularjs.org/api/ng.$route#routes +[$route.$rce]: http://docs.angularjs.org/api/ng.$route#$routeChangeError +[$route.$rcst]: http://docs.angularjs.org/api/ng.$route#$routeChangeStart +[$route.$rcs]: http://docs.angularjs.org/api/ng.$route#$routeChangeSuccess +[$route.$ru]: http://docs.angularjs.org/api/ng.$route#$routeUpdate +[$routeParams]: http://docs.angularjs.org/api/ng.$routeParams +[$routeProvider]: http://docs.angularjs.org/api/ng.$routeProvider +[$rp.when]: http://docs.angularjs.org/api/ng.$routeProvider#when +[$rp.other]: http://docs.angularjs.org/api/ng.$routeProvider#otherwise + +### Cookie + +| Cookie Method | Binding | Context | +| :----------------------------------- | --------------------: | ------------:| +| [$cookies][$cookies] | `$`,`TAB` | CoffeeScript | +| [$cookieStore][$cookieStore] | `$`,`TAB` | CoffeeScript | +| [get][$c.get] | `$cookiestore.`,`TAB` | CoffeeScript | +| [put][$c.put] | `$cookiestore.`,`TAB` | CoffeeScript | +| [remove][$c.remove] | `$cookiestore.`,`TAB` | CoffeeScript | + +[$cookies]: http://docs.angularjs.org/api/ngCookies.$cookies +[$cookieStore]: http://docs.angularjs.org/api/ngCookies.$cookieStore +[$c.get]: http://docs.angularjs.org/api/ngCookies.$cookieStore#get +[$c.put]: http://docs.angularjs.org/api/ngCookies.$cookieStore#put +[$c.remove]: http://docs.angularjs.org/api/ngCookies.$cookieStore#remove + +### Location + +| Location Method | Binding | Context | +| :----------------------------------- | -----------------: | ------------:| +| [$injector][$injector] | `$`,`TAB` | CoffeeScript | +| [absUrl][$l.absUrl] | `$location.`,`TAB` | CoffeeScript | +| [hash][$l.hash] (get & set) | `$location.`,`TAB` | CoffeeScript | +| [host][$l.host] | `$location.`,`TAB` | CoffeeScript | +| [path][$l.path] (get & set) | `$location.`,`TAB` | CoffeeScript | +| [port][$l.port] | `$location.`,`TAB` | CoffeeScript | +| [protocol][$l.protocol] | `$location.`,`TAB` | CoffeeScript | +| [replace][$l.replace] | `$location.`,`TAB` | CoffeeScript | +| [search][$l.search] (get & set) | `$location.`,`TAB` | CoffeeScript | +| [url][$l.url] (get & set) | `$location.`,`TAB` | CoffeeScript | + +[$location]: http://docs.angularjs.org/api/ng.$location +[$l.absUrl]: http://docs.angularjs.org/api/ng.$location#absUrl +[$l.hash]: http://docs.angularjs.org/api/ng.$location#hash +[$l.host]: http://docs.angularjs.org/api/ng.$location#host +[$l.path]: http://docs.angularjs.org/api/ng.$location#path +[$l.port]: http://docs.angularjs.org/api/ng.$location#port +[$l.protocol]: http://docs.angularjs.org/api/ng.$location#protocol +[$l.replace]: http://docs.angularjs.org/api/ng.$location#replace +[$l.search]: http://docs.angularjs.org/api/ng.$location#search +[$l.url]: http://docs.angularjs.org/api/ng.$location#url + +### Log + +| Log Method | Binding | Context | +| :----------------------------------- | --------------: | ------------:| +| [$log][$log] | `$`,`TAB` | CoffeeScript | +| [error][$log.error] | `$log.`,`TAB` | CoffeeScript | +| [info][$log.info] | `$log.`,`TAB` | CoffeeScript | +| [log][$log.log] | `$log.`,`TAB` | CoffeeScript | +| [warn][$log.warn] | `$log.`,`TAB` | CoffeeScript | + +[$log]: http://docs.angularjs.org/api/ng.$log +[$log.error]: http://docs.angularjs.org/api/ng.$log#error +[$log.info]: http://docs.angularjs.org/api/ng.$log#info +[$log.log]: http://docs.angularjs.org/api/ng.$log#log +[$log.warn]: http://docs.angularjs.org/api/ng.$log#warn + +### Mock + +| Mock Method | Binding | Context | +| :------------------------------------- | ------------------: | ------------:| +| [angular.mock.debug][mock.debug] | `mock`,`TAB` | CoffeeScript | +| [angular.mock.inject][mock.inject] | `mock`,`TAB` | CoffeeScript | +| [angular.mock.module][mock.module] | `mock`,`TAB` | CoffeeScript | +| [angular.mock.TzDate][mock.TzDate] | `mock`,`TAB` | CoffeeScript | +| [$log.assertEmpty][$log.assertEmpty] | `$log.`,`TAB` | CoffeeScript | +| [$log.reset][$log.reset] | `$log.`,`TAB` | CoffeeScript | +| [$log.logs][$log.logs] | `$log.`,`TAB` | CoffeeScript | +| [$timeout.flush][$timeout.flush] | `$timeout.`,`TAB` | CoffeeScript | + +[mock.debug]: http://docs.angularjs.org/api/angular.mock.debug +[mock.inject]: http://docs.angularjs.org/api/angular.mock.inject +[mock.module]: http://docs.angularjs.org/api/angular.mock.module +[mock.TzDate]: http://docs.angularjs.org/api/angular.mock.debug +[$log.assertEmpty]: http://docs.angularjs.org/api/ngMock.$log#assertEmpty +[$log.reset]: http://docs.angularjs.org/api/ngMock.$log#reset +[$log.logs]: http://docs.angularjs.org/api/ngMock.$log#logs +[$timeout.flush]: http://docs.angularjs.org/api/ngMock.$timeout#flush + +### Injector + +| Injector Method | Binding | Context | +| :----------------------------------- | -----------------: | ------------:| +| [$injector][$injector] | `$`,`TAB` | CoffeeScript | +| [annotate][$i.annotate] | `$injector.`,`TAB` | CoffeeScript | +| [get][$i.get] | `$injector.`,`TAB` | CoffeeScript | +| [instantiate][$i.instantiate] | `$injector.`,`TAB` | CoffeeScript | +| [invoke][$i.invoke] | `$injector.`,`TAB` | CoffeeScript | + +[$injector]: http://docs.angularjs.org/api/AUTO.$injector +[$i.annotate]: http://docs.angularjs.org/api/AUTO.$injector#annotate +[$i.get]: http://docs.angularjs.org/api/AUTO.$injector#get +[$i.instantiate]: http://docs.angularjs.org/api/AUTO.$injector#instantiate +[$i.invoke]: http://docs.angularjs.org/api/AUTO.$injector#invoke + +### Interpolate + +| Injector Method | Binding | Context | +| :----------------------------------- | --------------------: | ------------:| +| [$interpolate][$interpolate] | `$`,`TAB` | CoffeeScript | +| [endSymbol][$in.endSymbol] | `$interpolate.`,`TAB` | CoffeeScript | +| [startsymbol][$in.startsymbol] | `$interpolate.`,`TAB` | CoffeeScript | + +[$interpolate]: http://docs.angularjs.org/api/ng.$interpolate +[$in.endSymbol]: http://docs.angularjs.org/api/ng.$interpolate#endSymbol +[$in.startSymbol]: http://docs.angularjs.org/api/ng.$interpolate#startSymbol + +### Provide + +| Provider Method | Binding | Context | +| :------------------------------------- | ------------------: | ------------:| +| [$provide][$provide] | `$`,`TAB` | CoffeeScript | +| [constant][$p.constant] | `$provide.`,`TAB` | CoffeeScript | +| [decorator][$p.decorator] | `$provide.`,`TAB` | CoffeeScript | +| [factory][$p.factory] | `$provide.`,`TAB` | CoffeeScript | +| [provider][$p.provider] | `$provide.`,`TAB` | CoffeeScript | +| [service][$p.service] | `$provide.`,`TAB` | CoffeeScript | +| [value][$p.value] | `$provide.`,`TAB` | CoffeeScript | + +[$provide]: http://docs.angularjs.org/api/AUTO.$provide +[$p.constant]: http://docs.angularjs.org/api/AUTO.$provide#constant +[$p.decorator]: http://docs.angularjs.org/api/AUTO.$provide#decorator +[$p.factory]: http://docs.angularjs.org/api/AUTO.$provide#factory +[$p.provider]: http://docs.angularjs.org/api/AUTO.$provide#provider +[$p.service]: http://docs.angularjs.org/api/AUTO.$provide#service +[$p.value]: http://docs.angularjs.org/api/AUTO.$provide#value + +### Other Services + +| Service | Binding | Context | +| :------------------------------------- | ----------: |-------------:| +| [$anchorScroll][$anchorScroll] | `$`,`TAB` | CoffeeScript | +| [$cacheFactory][$cacheFactory] | `$`,`TAB` | CoffeeScript | +| [$compile][$compile] | `$`,`TAB` | CoffeeScript | +| [$controller][$controller] | `$`,`TAB` | CoffeeScript | +| [$document][$document] | `$`,`TAB` | CoffeeScript | +| [$exceptionHandler][$exceptionHandler] | `$`,`TAB` | CoffeeScript | +| [$locale][$locale] | `$`,`TAB` | CoffeeScript | +| [$parse][$parse] | `$`,`TAB` | CoffeeScript | +| [$rootElement][$rootElement] | `$`,`TAB` | CoffeeScript | +| [$templateCache][$templateCache] | `$`,`TAB` | CoffeeScript | +| [$timeout][$timeout] | `$`,`TAB` | CoffeeScript | +| [$window][$window] | `$`,`TAB` | CoffeeScript | + +[$anchorScroll]: http://docs.angularjs.org/api/ng.$anchorScroll +[$cacheFactory]: http://docs.angularjs.org/api/ng.$cacheFactory +[$compile]: http://docs.angularjs.org/api/ng.$compile +[$controller]: http://docs.angularjs.org/api/ng.$controller +[$document]: http://docs.angularjs.org/api/ng.$document +[$exceptionHandler]: http://docs.angularjs.org/api/ng.$exceptionHandler +[$locale]: http://docs.angularjs.org/api/ng.$locale +[$parse]: http://docs.angularjs.org/api/ng.$parse +[$rootElement]: http://docs.angularjs.org/api/ng.$rootElement +[$templateCache]: http://docs.angularjs.org/api/ng.$templateCache +[$timeout]: http://docs.angularjs.org/api/ng.$timeout +[$window]: http://docs.angularjs.org/api/ng.$window + +## Future Improvements + +* It would be nice to provide inline docs through SublimeCodeIntel in a vein +similar to the [ones provided for jQuery][jQuery]. + +* [SublimeErl][SublimeErl] also provides some pretty fancy features which would +be nice to integrate + +[jQuery]: https://github.com/Kronuz/SublimeCodeIntel/blob/master/libs/codeintel2/catalogs/jquery.cix +[SublimeErl]: https://github.com/ostinelli/SublimErl + +## Making Contributions + +* When editing `.sublime-snippets` files, __always__ use real tab characters for +indentation on a newline following a crlf/lf. Sublime will automatically insert +spaces if your user settings specify spacing for indentation. + +* Write CoffeeScript that will pass coffeelint + + +## Thanks + +Original inspiration was from the [AngularJS tmbundle][tmbundle], which was +targeted at JavaScript and a small set of mnemonics for common operations. This +is designed to be more comprehensive. + +[tmbundle]: github.com/ProLoser/AngularJs.tmbundle.git diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Controller/dirty.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Controller/dirty.sublime-snippet new file mode 100644 index 0000000..4f7dab0 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Controller/dirty.sublime-snippet @@ -0,0 +1,6 @@ + + + .$ + source.coffee + Angular Controller $dirty + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Controller/error.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Controller/error.sublime-snippet new file mode 100644 index 0000000..1d312f3 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Controller/error.sublime-snippet @@ -0,0 +1,6 @@ + + + .$ + source.coffee + Angular Controller $error + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Controller/formatters.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Controller/formatters.sublime-snippet new file mode 100644 index 0000000..bc202e7 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Controller/formatters.sublime-snippet @@ -0,0 +1,6 @@ + + + .$ + source.coffee + Angular Controller $formatters + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Controller/invalid.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Controller/invalid.sublime-snippet new file mode 100644 index 0000000..25f447c --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Controller/invalid.sublime-snippet @@ -0,0 +1,6 @@ + + + .$ + source.coffee + Angular Controller $invalid + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Controller/modelValue.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Controller/modelValue.sublime-snippet new file mode 100644 index 0000000..d7cb0c8 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Controller/modelValue.sublime-snippet @@ -0,0 +1,6 @@ + + + .$ + source.coffee + Angular Controller $modelValue + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Controller/parsers.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Controller/parsers.sublime-snippet new file mode 100644 index 0000000..fc92c0a --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Controller/parsers.sublime-snippet @@ -0,0 +1,6 @@ + + + .$ + source.coffee + Angular Controller $parsers + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Controller/pristine.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Controller/pristine.sublime-snippet new file mode 100644 index 0000000..0429fce --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Controller/pristine.sublime-snippet @@ -0,0 +1,6 @@ + + + .$ + source.coffee + Angular Controller $pristine + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Controller/render.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Controller/render.sublime-snippet new file mode 100644 index 0000000..3d2bde8 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Controller/render.sublime-snippet @@ -0,0 +1,6 @@ + + + .$ + source.coffee + Angular Controller $render + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Controller/setValidity.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Controller/setValidity.sublime-snippet new file mode 100644 index 0000000..82c0297 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Controller/setValidity.sublime-snippet @@ -0,0 +1,6 @@ + + + .$ + source.coffee + Angular Controller $setValidity + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Controller/setViewValue.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Controller/setViewValue.sublime-snippet new file mode 100644 index 0000000..2090347 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Controller/setViewValue.sublime-snippet @@ -0,0 +1,6 @@ + + + .$ + source.coffee + Angular Controller $setViewValue + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Controller/valid.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Controller/valid.sublime-snippet new file mode 100644 index 0000000..c5422ff --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Controller/valid.sublime-snippet @@ -0,0 +1,6 @@ + + + .$ + source.coffee + Angular Controller $valid + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Controller/viewValue.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Controller/viewValue.sublime-snippet new file mode 100644 index 0000000..e5248f2 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Controller/viewValue.sublime-snippet @@ -0,0 +1,6 @@ + + + .$ + source.coffee + Angular Controller $viewValue + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Cookies/$cookieStore.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Cookies/$cookieStore.sublime-snippet new file mode 100644 index 0000000..15c4e40 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Cookies/$cookieStore.sublime-snippet @@ -0,0 +1,6 @@ + + + $ + source.coffee + Angular $cookieStore + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Cookies/$cookies.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Cookies/$cookies.sublime-snippet new file mode 100644 index 0000000..a1d3216 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Cookies/$cookies.sublime-snippet @@ -0,0 +1,6 @@ + + + $ + source.coffee + Angular $cookies + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Cookies/get.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Cookies/get.sublime-snippet new file mode 100644 index 0000000..cb0228e --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Cookies/get.sublime-snippet @@ -0,0 +1,6 @@ + + + $cookieStore. + source.coffee + Angular $cookieStore get + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Cookies/put.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Cookies/put.sublime-snippet new file mode 100644 index 0000000..dd5e512 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Cookies/put.sublime-snippet @@ -0,0 +1,6 @@ + + + $cookieStore. + source.coffee + Angular $cookieStore put + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Cookies/remove.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Cookies/remove.sublime-snippet new file mode 100644 index 0000000..2f711f5 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Cookies/remove.sublime-snippet @@ -0,0 +1,6 @@ + + + $cookieStore. + source.coffee + Angular $cookieStore remove + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/input.checkbox.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/input.checkbox.sublime-snippet new file mode 100644 index 0000000..f636141 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/input.checkbox.sublime-snippet @@ -0,0 +1,11 @@ + + ]]> + ng + text.html -source -meta.tag, punctuation.definition.tag.begin + Angular input [checkbox] + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/input.number.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/input.number.sublime-snippet new file mode 100644 index 0000000..9bf3934 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/input.number.sublime-snippet @@ -0,0 +1,13 @@ + + ]]> + ng + text.html -source -meta.tag, punctuation.definition.tag.begin + Angular input [number] + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/input.radio.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/input.radio.sublime-snippet new file mode 100644 index 0000000..2dfb121 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/input.radio.sublime-snippet @@ -0,0 +1,10 @@ + + ]]> + ng + text.html -source -meta.tag, punctuation.definition.tag.begin + Angular input [radio] + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/input.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/input.sublime-snippet new file mode 100644 index 0000000..00b5f5a --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/input.sublime-snippet @@ -0,0 +1,13 @@ + + ]]> + ng + text.html -source -meta.tag, punctuation.definition.tag.begin + Angular input [text|email|url] + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngApp.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngApp.sublime-snippet new file mode 100644 index 0000000..714cbe0 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngApp.sublime-snippet @@ -0,0 +1,6 @@ + + + ng + text.html meta.tag + Angular ngApp + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngBind.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngBind.sublime-snippet new file mode 100644 index 0000000..ee3bdfc --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngBind.sublime-snippet @@ -0,0 +1,6 @@ + + + ng + text.html meta.tag + Angular ngBind + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngBindHtml.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngBindHtml.sublime-snippet new file mode 100644 index 0000000..39828d5 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngBindHtml.sublime-snippet @@ -0,0 +1,6 @@ + + + ng + text.html meta.tag + Angular ngBindHtmlUnsafe + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngBindHtmlUnsafe.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngBindHtmlUnsafe.sublime-snippet new file mode 100644 index 0000000..0f4e5ff --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngBindHtmlUnsafe.sublime-snippet @@ -0,0 +1,6 @@ + + + ng + text.html meta.tag + Angular ngBindHtmlUnsafe + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngBindTemplate.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngBindTemplate.sublime-snippet new file mode 100644 index 0000000..248fdcd --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngBindTemplate.sublime-snippet @@ -0,0 +1,6 @@ + + + ng + text.html meta.tag + Angular ngBindTemplate + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngChange.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngChange.sublime-snippet new file mode 100644 index 0000000..9f2c442 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngChange.sublime-snippet @@ -0,0 +1,6 @@ + + + ng + text.html meta.tag + Angular ngChange + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngChecked.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngChecked.sublime-snippet new file mode 100644 index 0000000..e48333a --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngChecked.sublime-snippet @@ -0,0 +1,6 @@ + + + ng + text.html meta.tag + Angular ngChecked + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngClass.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngClass.sublime-snippet new file mode 100644 index 0000000..ab21150 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngClass.sublime-snippet @@ -0,0 +1,6 @@ + + + ng + text.html meta.tag + Angular ngClass + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngClassEven.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngClassEven.sublime-snippet new file mode 100644 index 0000000..1a4a49a --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngClassEven.sublime-snippet @@ -0,0 +1,6 @@ + + + ng + text.html meta.tag + Angular ngClassEven + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngClassOdd.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngClassOdd.sublime-snippet new file mode 100644 index 0000000..6df7643 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngClassOdd.sublime-snippet @@ -0,0 +1,6 @@ + + + ng + text.html meta.tag + Angular ngClassOdd + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngClick.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngClick.sublime-snippet new file mode 100644 index 0000000..7d42b95 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngClick.sublime-snippet @@ -0,0 +1,6 @@ + + + ng + text.html meta.tag + Angular ngClick + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngCloak.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngCloak.sublime-snippet new file mode 100644 index 0000000..c270bb5 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngCloak.sublime-snippet @@ -0,0 +1,6 @@ + + + ng + text.html meta.tag + Angular ngCloak + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngController.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngController.sublime-snippet new file mode 100644 index 0000000..6a918c4 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngController.sublime-snippet @@ -0,0 +1,6 @@ + + + ng + text.html meta.tag + Angular ngController + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngCsp.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngCsp.sublime-snippet new file mode 100644 index 0000000..bb47202 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngCsp.sublime-snippet @@ -0,0 +1,6 @@ + + + ng + text.html meta.tag + Angular ngCsp (Content Security Policy) + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngDblClick.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngDblClick.sublime-snippet new file mode 100644 index 0000000..eac3d1f --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngDblClick.sublime-snippet @@ -0,0 +1,6 @@ + + + ng + text.html meta.tag + Angular ngDblclick + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngDisabled.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngDisabled.sublime-snippet new file mode 100644 index 0000000..bb1bfdd --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngDisabled.sublime-snippet @@ -0,0 +1,6 @@ + + + ng + text.html meta.tag + Angular ngDisabled + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngForm.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngForm.sublime-snippet new file mode 100644 index 0000000..e101b27 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngForm.sublime-snippet @@ -0,0 +1,8 @@ + + + $0 +]]> + ng + text.html -source -meta.tag, punctuation.definition.tag.begin + Angular form + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngHide.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngHide.sublime-snippet new file mode 100644 index 0000000..ef40b27 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngHide.sublime-snippet @@ -0,0 +1,6 @@ + + + ng + text.html meta.tag + Angular ngHide + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngHref.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngHref.sublime-snippet new file mode 100644 index 0000000..fcf2de6 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngHref.sublime-snippet @@ -0,0 +1,6 @@ + + + ng + text.html meta.tag + Angular ngHref + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngInclude.attribute.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngInclude.attribute.sublime-snippet new file mode 100644 index 0000000..cc76d8c --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngInclude.attribute.sublime-snippet @@ -0,0 +1,6 @@ + + + ng + text.html meta.tag + Angular ngInclude (attribute) + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngInclude.element.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngInclude.element.sublime-snippet new file mode 100644 index 0000000..875a00d --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngInclude.element.sublime-snippet @@ -0,0 +1,8 @@ + + + $0 +]]> + ng + text.html -source -meta.tag, punctuation.definition.tag.begin + Angular ngInclude (element) + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngInit.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngInit.sublime-snippet new file mode 100644 index 0000000..16b5280 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngInit.sublime-snippet @@ -0,0 +1,6 @@ + + + ng + text.html meta.tag + Angular ngInit + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngList.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngList.sublime-snippet new file mode 100644 index 0000000..6eaa528 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngList.sublime-snippet @@ -0,0 +1,6 @@ + + + ng + text.html meta.tag + Angular ngList + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngMousedown.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngMousedown.sublime-snippet new file mode 100644 index 0000000..ea1e255 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngMousedown.sublime-snippet @@ -0,0 +1,6 @@ + + + ng + text.html meta.tag + Angular ngMousedown + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngMouseenter.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngMouseenter.sublime-snippet new file mode 100644 index 0000000..07c7921 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngMouseenter.sublime-snippet @@ -0,0 +1,6 @@ + + + ng + text.html meta.tag + Angular ngMouseenter + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngMouseleave.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngMouseleave.sublime-snippet new file mode 100644 index 0000000..9b761a3 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngMouseleave.sublime-snippet @@ -0,0 +1,6 @@ + + + ng + text.html meta.tag + Angular ngMouseleave + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngMousemove.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngMousemove.sublime-snippet new file mode 100644 index 0000000..4ad694d --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngMousemove.sublime-snippet @@ -0,0 +1,6 @@ + + + ng + text.html meta.tag + Angular ngMousemove + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngMouseover.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngMouseover.sublime-snippet new file mode 100644 index 0000000..39e894b --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngMouseover.sublime-snippet @@ -0,0 +1,6 @@ + + + ng + text.html meta.tag + Angular ngMouseover + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngMouseup.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngMouseup.sublime-snippet new file mode 100644 index 0000000..5fb454d --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngMouseup.sublime-snippet @@ -0,0 +1,6 @@ + + + ng + text.html meta.tag + Angular ngMouseup + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngMultiple.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngMultiple.sublime-snippet new file mode 100644 index 0000000..fa27c0a --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngMultiple.sublime-snippet @@ -0,0 +1,6 @@ + + + ng + text.html meta.tag + Angular ngMultiple + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngNonBindable.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngNonBindable.sublime-snippet new file mode 100644 index 0000000..0a6af7f --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngNonBindable.sublime-snippet @@ -0,0 +1,6 @@ + + + ng + text.html meta.tag + Angular ngNonBindable + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngPluralize.attribute.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngPluralize.attribute.sublime-snippet new file mode 100644 index 0000000..4ad5935 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngPluralize.attribute.sublime-snippet @@ -0,0 +1,11 @@ + + + ng + text.html meta.tag + Angular ngPluralize + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngPluralize.element.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngPluralize.element.sublime-snippet new file mode 100644 index 0000000..e115984 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngPluralize.element.sublime-snippet @@ -0,0 +1,11 @@ + + ]]> + ng + text.html -source -meta.tag, punctuation.definition.tag.begin + Angular ngPluralize + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngReadonly.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngReadonly.sublime-snippet new file mode 100644 index 0000000..b81d783 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngReadonly.sublime-snippet @@ -0,0 +1,6 @@ + + + ng + text.html meta.tag + Angular ngReadonly + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngRepeat.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngRepeat.sublime-snippet new file mode 100644 index 0000000..d89d36d --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngRepeat.sublime-snippet @@ -0,0 +1,6 @@ + + + ng + text.html meta.tag + Angular ngRepeat + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngSelected.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngSelected.sublime-snippet new file mode 100644 index 0000000..a076ce1 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngSelected.sublime-snippet @@ -0,0 +1,6 @@ + + + ng + text.html meta.tag + Angular ngSelected + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngShow.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngShow.sublime-snippet new file mode 100644 index 0000000..e1537f7 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngShow.sublime-snippet @@ -0,0 +1,6 @@ + + + ng + text.html meta.tag + Angular ngShow + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngSrc.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngSrc.sublime-snippet new file mode 100644 index 0000000..e8f1b76 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngSrc.sublime-snippet @@ -0,0 +1,6 @@ + + + ng + text.html meta.tag + Angular ngSrc + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngStyle.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngStyle.sublime-snippet new file mode 100644 index 0000000..7e05c30 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngStyle.sublime-snippet @@ -0,0 +1,6 @@ + + + ng + text.html meta.tag + Angular ngStyle + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngSubmit.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngSubmit.sublime-snippet new file mode 100644 index 0000000..460278e --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngSubmit.sublime-snippet @@ -0,0 +1,6 @@ + + + ng + text.html meta.tag + Angular ngSubmit + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngSwitch.attribute.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngSwitch.attribute.sublime-snippet new file mode 100644 index 0000000..cab23ba --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngSwitch.attribute.sublime-snippet @@ -0,0 +1,6 @@ + + + ng + text.html meta.tag + Angular ngSwitch + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngSwitch.element.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngSwitch.element.sublime-snippet new file mode 100644 index 0000000..15b5928 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngSwitch.element.sublime-snippet @@ -0,0 +1,13 @@ + + + + ${3: + + }${5: + + } +]]> + ng + text.html -source -meta.tag, punctuation.definition.tag.begin + Angular ngSwitch + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngSwitchDefault.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngSwitchDefault.sublime-snippet new file mode 100644 index 0000000..0392355 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngSwitchDefault.sublime-snippet @@ -0,0 +1,6 @@ + + + ng + text.html meta.tag + Angular ngSwitchDefault + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngSwitchWhen.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngSwitchWhen.sublime-snippet new file mode 100644 index 0000000..d2642aa --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngSwitchWhen.sublime-snippet @@ -0,0 +1,6 @@ + + + ng + text.html meta.tag + Angular ngSwitchWhen + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngTransclude.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngTransclude.sublime-snippet new file mode 100644 index 0000000..be995b5 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngTransclude.sublime-snippet @@ -0,0 +1,6 @@ + + + ng + text.html meta.tag + Angular ngTransclude + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngView.attribute.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngView.attribute.sublime-snippet new file mode 100644 index 0000000..641b6cb --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngView.attribute.sublime-snippet @@ -0,0 +1,6 @@ + + + ng + text.html meta.tag + Angular ngView + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngView.element.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngView.element.sublime-snippet new file mode 100644 index 0000000..6f4438f --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/ngView.element.sublime-snippet @@ -0,0 +1,8 @@ + + +$0 +]]> + ng + text.html -source -meta.tag, punctuation.definition.tag.begin + Angular ngView + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/script.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/script.sublime-snippet new file mode 100644 index 0000000..2d7f3b4 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/script.sublime-snippet @@ -0,0 +1,8 @@ + + +${1:inline-template} +]]> + ng + text.html -source -meta.tag, punctuation.definition.tag.begin + Angular Script (inline template) + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/select.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/select.sublime-snippet new file mode 100644 index 0000000..4ec1581 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/select.sublime-snippet @@ -0,0 +1,10 @@ + + + $0 +]]> + ng + text.html -source -meta.tag, punctuation.definition.tag.begin + Angular select + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/textarea.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/textarea.sublime-snippet new file mode 100644 index 0000000..ce4ab43 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Directive/textarea.sublime-snippet @@ -0,0 +1,13 @@ + + ]]> + ng + text.html -source -meta.tag, punctuation.definition.tag.begin + Angular textarea + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/$filter.generic.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/$filter.generic.sublime-snippet new file mode 100644 index 0000000..a76dd63 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/$filter.generic.sublime-snippet @@ -0,0 +1,6 @@ + + + $filter + source.coffee + Angular generic filter + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/$filter.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/$filter.sublime-snippet new file mode 100644 index 0000000..34e8f33 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/$filter.sublime-snippet @@ -0,0 +1,6 @@ + + + $ + source.coffee + Angular filter + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/currency.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/currency.sublime-snippet new file mode 100644 index 0000000..4576d87 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/currency.sublime-snippet @@ -0,0 +1,6 @@ + + + $filter + source.coffee + Angular currency filter + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/currency.template.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/currency.template.sublime-snippet new file mode 100644 index 0000000..06f2eb8 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/currency.template.sublime-snippet @@ -0,0 +1,6 @@ + + + fil + text.html + Angular currency filter + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/date.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/date.sublime-snippet new file mode 100644 index 0000000..952eeb3 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/date.sublime-snippet @@ -0,0 +1,6 @@ + + + $filter + source.coffee + Angular date filter + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/date.template.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/date.template.sublime-snippet new file mode 100644 index 0000000..8830624 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/date.template.sublime-snippet @@ -0,0 +1,6 @@ + + + fil + text.html + Angular date filter + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/filter.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/filter.sublime-snippet new file mode 100644 index 0000000..9dd4860 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/filter.sublime-snippet @@ -0,0 +1,6 @@ + + }}}]]> + $filter + source.coffee + Angular filter filter + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/filter.template.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/filter.template.sublime-snippet new file mode 100644 index 0000000..1a9ef8b --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/filter.template.sublime-snippet @@ -0,0 +1,6 @@ + + } }}]]> + fil + text.html + Angular filter filter + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/json.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/json.sublime-snippet new file mode 100644 index 0000000..9090b1b --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/json.sublime-snippet @@ -0,0 +1,6 @@ + + + $filter + source.coffee + Angular json filter + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/json.template.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/json.template.sublime-snippet new file mode 100644 index 0000000..6b47ecb --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/json.template.sublime-snippet @@ -0,0 +1,6 @@ + + + fil + text.html + Angular json filter + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/limitTo.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/limitTo.sublime-snippet new file mode 100644 index 0000000..ce8b113 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/limitTo.sublime-snippet @@ -0,0 +1,6 @@ + + + $filter + source.coffee + Angular limitTo filter + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/limitTo.template.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/limitTo.template.sublime-snippet new file mode 100644 index 0000000..6367092 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/limitTo.template.sublime-snippet @@ -0,0 +1,6 @@ + + + fil + text.html + Angular limitTo filter + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/linky.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/linky.sublime-snippet new file mode 100644 index 0000000..af387d0 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/linky.sublime-snippet @@ -0,0 +1,6 @@ + + + $filter + source.coffee + Angular linky filter + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/linky.template.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/linky.template.sublime-snippet new file mode 100644 index 0000000..a5d8515 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/linky.template.sublime-snippet @@ -0,0 +1,6 @@ + + + fil + text.html + Angular linky filter + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/lowercase.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/lowercase.sublime-snippet new file mode 100644 index 0000000..a246f79 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/lowercase.sublime-snippet @@ -0,0 +1,6 @@ + + + $filter + source.coffee + Angular lowercase filter + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/lowercase.template.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/lowercase.template.sublime-snippet new file mode 100644 index 0000000..8d7d351 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/lowercase.template.sublime-snippet @@ -0,0 +1,6 @@ + + + fil + text.html + Angular lowercase filter + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/number.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/number.sublime-snippet new file mode 100644 index 0000000..65fc953 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/number.sublime-snippet @@ -0,0 +1,6 @@ + + + $filter + source.coffee + Angular number filter + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/number.template.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/number.template.sublime-snippet new file mode 100644 index 0000000..c7bdbc9 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/number.template.sublime-snippet @@ -0,0 +1,6 @@ + + + fil + text.html + Angular number filter + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/orderBy.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/orderBy.sublime-snippet new file mode 100644 index 0000000..aeec603 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/orderBy.sublime-snippet @@ -0,0 +1,6 @@ + + + $filter + source.coffee + Angular orderBy filter + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/orderBy.template.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/orderBy.template.sublime-snippet new file mode 100644 index 0000000..ba3056b --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/orderBy.template.sublime-snippet @@ -0,0 +1,6 @@ + + + fil + text.html + Angular orderBy filter + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/uppercase.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/uppercase.sublime-snippet new file mode 100644 index 0000000..1429cf9 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/uppercase.sublime-snippet @@ -0,0 +1,6 @@ + + + $filter + source.coffee + Angular uppercase filter + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/uppercase.template.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/uppercase.template.sublime-snippet new file mode 100644 index 0000000..78fa238 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Filter/uppercase.template.sublime-snippet @@ -0,0 +1,6 @@ + + + fil + text.html + Angular uppercase filter + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/bind.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/bind.sublime-snippet new file mode 100644 index 0000000..bd05ecd --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/bind.sublime-snippet @@ -0,0 +1,9 @@ + + + # bind stuff + $0 +angular.bind ${3:self|context}, ${1}${4:, ${5:optional-args}}]]> + ng + source.coffee + Angular bind + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/bootstrap.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/bootstrap.sublime-snippet new file mode 100644 index 0000000..0df6606 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/bootstrap.sublime-snippet @@ -0,0 +1,6 @@ + + + ng + source.coffee + Angular bootstrap + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/copy.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/copy.sublime-snippet new file mode 100644 index 0000000..4da006f --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/copy.sublime-snippet @@ -0,0 +1,6 @@ + + + ng + source.coffee + Angular copy + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/element.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/element.sublime-snippet new file mode 100644 index 0000000..c312f73 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/element.sublime-snippet @@ -0,0 +1,6 @@ + + + ng + source.coffee + Angular element + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/equals.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/equals.sublime-snippet new file mode 100644 index 0000000..4be7dbc --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/equals.sublime-snippet @@ -0,0 +1,6 @@ + + + ng + source.coffee + Angular equal + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/extend.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/extend.sublime-snippet new file mode 100644 index 0000000..d658569 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/extend.sublime-snippet @@ -0,0 +1,6 @@ + + + ng + source.coffee + Angular extend + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/forEach.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/forEach.sublime-snippet new file mode 100644 index 0000000..1e6a773 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/forEach.sublime-snippet @@ -0,0 +1,7 @@ + + + ${4:# ...}]]> + for + source.coffee + Angular forEach + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/fromJson.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/fromJson.sublime-snippet new file mode 100644 index 0000000..f7b6cb0 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/fromJson.sublime-snippet @@ -0,0 +1,6 @@ + + + ng + source.coffee + Angular fromJson + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/identity.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/identity.sublime-snippet new file mode 100644 index 0000000..f1c0ba5 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/identity.sublime-snippet @@ -0,0 +1,6 @@ + + + ng + source.coffee + Angular identity + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/injector.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/injector.sublime-snippet new file mode 100644 index 0000000..0f72cac --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/injector.sublime-snippet @@ -0,0 +1,6 @@ + + + ng + source.coffee + Angular injector + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/isArray.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/isArray.sublime-snippet new file mode 100644 index 0000000..c16bb07 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/isArray.sublime-snippet @@ -0,0 +1,6 @@ + + + is + source.coffee + Angular isArray + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/isDate.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/isDate.sublime-snippet new file mode 100644 index 0000000..ac42381 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/isDate.sublime-snippet @@ -0,0 +1,6 @@ + + + is + source.coffee + Angular isDate + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/isDefined.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/isDefined.sublime-snippet new file mode 100644 index 0000000..09969bd --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/isDefined.sublime-snippet @@ -0,0 +1,6 @@ + + + is + source.coffee + Angular isDefined + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/isElement.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/isElement.sublime-snippet new file mode 100644 index 0000000..1d4a649 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/isElement.sublime-snippet @@ -0,0 +1,6 @@ + + + is + source.coffee + Angular isElement + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/isFunction.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/isFunction.sublime-snippet new file mode 100644 index 0000000..94d17b1 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/isFunction.sublime-snippet @@ -0,0 +1,6 @@ + + + is + source.coffee + Angular isFunction + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/isNumber.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/isNumber.sublime-snippet new file mode 100644 index 0000000..5db2421 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/isNumber.sublime-snippet @@ -0,0 +1,6 @@ + + + is + source.coffee + Angular isNumber + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/isObject.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/isObject.sublime-snippet new file mode 100644 index 0000000..3f40d94 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/isObject.sublime-snippet @@ -0,0 +1,6 @@ + + + is + source.coffee + Angular isObject + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/isString.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/isString.sublime-snippet new file mode 100644 index 0000000..c2a1aa7 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/isString.sublime-snippet @@ -0,0 +1,6 @@ + + + is + source.coffee + Angular isString + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/isUndefined.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/isUndefined.sublime-snippet new file mode 100644 index 0000000..536d3fa --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/isUndefined.sublime-snippet @@ -0,0 +1,6 @@ + + + is + source.coffee + Angular isUndefined + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/lowercase.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/lowercase.sublime-snippet new file mode 100644 index 0000000..c7be3bd --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/lowercase.sublime-snippet @@ -0,0 +1,6 @@ + + + ng + source.coffee + Angular lowercase + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/module.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/module.sublime-snippet new file mode 100644 index 0000000..c306085 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/module.sublime-snippet @@ -0,0 +1,11 @@ + + + ${7:# configuration handler}]]> + mod + source.coffee + Angular module + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/noop.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/noop.sublime-snippet new file mode 100644 index 0000000..e4d28c2 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/noop.sublime-snippet @@ -0,0 +1,6 @@ + + + ng + source.coffee + Angular noop + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/toJson.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/toJson.sublime-snippet new file mode 100644 index 0000000..734dbdd --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/toJson.sublime-snippet @@ -0,0 +1,6 @@ + + + ng + source.coffee + Angular toJson + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/uppercase.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/uppercase.sublime-snippet new file mode 100644 index 0000000..923eae9 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/uppercase.sublime-snippet @@ -0,0 +1,6 @@ + + + ng + source.coffee + Angular uppercase + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/version.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/version.sublime-snippet new file mode 100644 index 0000000..8d4e3d0 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Global/version.sublime-snippet @@ -0,0 +1,6 @@ + + + ng + source.coffee + Angular version + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Http/$http.simple.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Http/$http.simple.sublime-snippet new file mode 100644 index 0000000..faa94bf --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Http/$http.simple.sublime-snippet @@ -0,0 +1,11 @@ + + + ${5:success handler} +.Error (status, response) -> + ${6:error handler} +]]> + $ + source.coffee + Angular $http simple + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Http/$http.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Http/$http.sublime-snippet new file mode 100644 index 0000000..8854d07 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Http/$http.sublime-snippet @@ -0,0 +1,19 @@ + + + #return serialized version}${10: + transformResponse: (data, headersGetter) -> + #return serialized version}${11: + cache: ${12:true|false|Cache}}${13: + timeout: ${14:msTimeout}}${15: + withCredentials: ${16:true|false}} +\$http config]]> + $ + source.coffee + Angular $http (w/ config) + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Http/defaults.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Http/defaults.sublime-snippet new file mode 100644 index 0000000..ffaca01 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Http/defaults.sublime-snippet @@ -0,0 +1,6 @@ + + + $http. + source.coffee + Angular $http defaults + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Http/delete.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Http/delete.sublime-snippet new file mode 100644 index 0000000..79fa6e8 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Http/delete.sublime-snippet @@ -0,0 +1,6 @@ + + + $http. + source.coffee + Angular $http delete + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Http/error.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Http/error.sublime-snippet new file mode 100644 index 0000000..77edbfe --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Http/error.sublime-snippet @@ -0,0 +1,7 @@ + + + ${1:error function}]]> + .error + source.coffee + Angular $http error + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Http/get.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Http/get.sublime-snippet new file mode 100644 index 0000000..79fa6e8 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Http/get.sublime-snippet @@ -0,0 +1,6 @@ + + + $http. + source.coffee + Angular $http delete + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Http/head.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Http/head.sublime-snippet new file mode 100644 index 0000000..493808b --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Http/head.sublime-snippet @@ -0,0 +1,6 @@ + + + $http. + source.coffee + Angular $http head + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Http/jsonp.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Http/jsonp.sublime-snippet new file mode 100644 index 0000000..918f837 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Http/jsonp.sublime-snippet @@ -0,0 +1,6 @@ + + + $http. + source.coffee + Angular $http jsonp + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Http/pendingRequests.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Http/pendingRequests.sublime-snippet new file mode 100644 index 0000000..6133f00 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Http/pendingRequests.sublime-snippet @@ -0,0 +1,6 @@ + + + $http. + source.coffee + Angular $http pendingRequests + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Http/post.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Http/post.sublime-snippet new file mode 100644 index 0000000..a9d2ef7 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Http/post.sublime-snippet @@ -0,0 +1,6 @@ + + + $http. + source.coffee + Angular $http post + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Http/put.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Http/put.sublime-snippet new file mode 100644 index 0000000..2fc9095 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Http/put.sublime-snippet @@ -0,0 +1,6 @@ + + + $http. + source.coffee + Angular $http put + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Http/success.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Http/success.sublime-snippet new file mode 100644 index 0000000..36ed5fc --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Http/success.sublime-snippet @@ -0,0 +1,6 @@ + + + .success + source.coffee + Angular $http success + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/HttpBackend/expect.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/HttpBackend/expect.sublime-snippet new file mode 100644 index 0000000..5f7c30c --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/HttpBackend/expect.sublime-snippet @@ -0,0 +1,8 @@ + + }}]]> + .expect + source.coffee + Angular $httpBackend expect + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/HttpBackend/expectDELETE.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/HttpBackend/expectDELETE.sublime-snippet new file mode 100644 index 0000000..7539de8 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/HttpBackend/expectDELETE.sublime-snippet @@ -0,0 +1,6 @@ + + }}]]> + .expect + source.coffee + Angular $httpBackend expectDELETE + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/HttpBackend/expectGET.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/HttpBackend/expectGET.sublime-snippet new file mode 100644 index 0000000..a1d6096 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/HttpBackend/expectGET.sublime-snippet @@ -0,0 +1,6 @@ + + }}]]> + .expect + source.coffee + Angular $httpBackend expectGET + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/HttpBackend/expectHEAD.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/HttpBackend/expectHEAD.sublime-snippet new file mode 100644 index 0000000..e93c55e --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/HttpBackend/expectHEAD.sublime-snippet @@ -0,0 +1,6 @@ + + }}]]> + .expect + source.coffee + Angular $httpBackend expectHEAD + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/HttpBackend/expectJSONP.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/HttpBackend/expectJSONP.sublime-snippet new file mode 100644 index 0000000..d0fbdbe --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/HttpBackend/expectJSONP.sublime-snippet @@ -0,0 +1,6 @@ + + + .expect + source.coffee + Angular $httpBackend expectJSONP + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/HttpBackend/expectPATCH.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/HttpBackend/expectPATCH.sublime-snippet new file mode 100644 index 0000000..c864954 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/HttpBackend/expectPATCH.sublime-snippet @@ -0,0 +1,8 @@ + + }}]]> + .expect + source.coffee + Angular $httpBackend expectPATCH + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/HttpBackend/expectPOST.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/HttpBackend/expectPOST.sublime-snippet new file mode 100644 index 0000000..5f0c90f --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/HttpBackend/expectPOST.sublime-snippet @@ -0,0 +1,8 @@ + + }}]]> + .expect + source.coffee + Angular $httpBackend expectPOST + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/HttpBackend/expectPUT.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/HttpBackend/expectPUT.sublime-snippet new file mode 100644 index 0000000..ee17ba9 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/HttpBackend/expectPUT.sublime-snippet @@ -0,0 +1,8 @@ + + }}]]> + .expect + source.coffee + Angular $httpBackend expectPUT + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/HttpBackend/flush.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/HttpBackend/flush.sublime-snippet new file mode 100644 index 0000000..262753e --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/HttpBackend/flush.sublime-snippet @@ -0,0 +1,6 @@ + + + $httpBackend. + source.coffee + Angular $httpBackend flush + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/HttpBackend/httpBackend.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/HttpBackend/httpBackend.sublime-snippet new file mode 100644 index 0000000..52158f5 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/HttpBackend/httpBackend.sublime-snippet @@ -0,0 +1,6 @@ + + + $ + source.coffee + Angular $httpBackend + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/HttpBackend/resetExpectations.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/HttpBackend/resetExpectations.sublime-snippet new file mode 100644 index 0000000..fa25ac2 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/HttpBackend/resetExpectations.sublime-snippet @@ -0,0 +1,6 @@ + + + $httpBackend. + source.coffee + Angular $httpBackend resetExpectations + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/HttpBackend/verifyNoOutstandingExpectation.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/HttpBackend/verifyNoOutstandingExpectation.sublime-snippet new file mode 100644 index 0000000..5e0ca62 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/HttpBackend/verifyNoOutstandingExpectation.sublime-snippet @@ -0,0 +1,6 @@ + + + $httpBackend. + source.coffee + Angular $httpBackend verifyNoOutstandingExpectation + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/HttpBackend/verifyNoOutstandingRequest.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/HttpBackend/verifyNoOutstandingRequest.sublime-snippet new file mode 100644 index 0000000..59b7415 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/HttpBackend/verifyNoOutstandingRequest.sublime-snippet @@ -0,0 +1,6 @@ + + + $httpBackend. + source.coffee + Angular $httpBackend verifyNoOutstandingRequest + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/HttpBackend/when.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/HttpBackend/when.sublime-snippet new file mode 100644 index 0000000..343850e --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/HttpBackend/when.sublime-snippet @@ -0,0 +1,8 @@ + + }}]]> + .when + source.coffee + Angular $httpBackend when + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/HttpBackend/whenDELETE.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/HttpBackend/whenDELETE.sublime-snippet new file mode 100644 index 0000000..4fdc0ef --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/HttpBackend/whenDELETE.sublime-snippet @@ -0,0 +1,7 @@ + + }}]]> + .when + source.coffee + Angular $httpBackend whenDELETE + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/HttpBackend/whenGET.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/HttpBackend/whenGET.sublime-snippet new file mode 100644 index 0000000..e6c9d7b --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/HttpBackend/whenGET.sublime-snippet @@ -0,0 +1,7 @@ + + }}]]> + .when + source.coffee + Angular $httpBackend whenGET + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/HttpBackend/whenHEAD.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/HttpBackend/whenHEAD.sublime-snippet new file mode 100644 index 0000000..bff8373 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/HttpBackend/whenHEAD.sublime-snippet @@ -0,0 +1,7 @@ + + }}]]> + .when + source.coffee + Angular $httpBackend whenHEAD + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/HttpBackend/whenPATCH.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/HttpBackend/whenPATCH.sublime-snippet new file mode 100644 index 0000000..5f27f2d --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/HttpBackend/whenPATCH.sublime-snippet @@ -0,0 +1,8 @@ + + }}]]> + .when + source.coffee + Angular $httpBackend whenPATCH + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/HttpBackend/whenPOST.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/HttpBackend/whenPOST.sublime-snippet new file mode 100644 index 0000000..1c0eddc --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/HttpBackend/whenPOST.sublime-snippet @@ -0,0 +1,8 @@ + + }}]]> + .when + source.coffee + Angular $httpBackend whenPOST + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/HttpBackend/whenPUT.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/HttpBackend/whenPUT.sublime-snippet new file mode 100644 index 0000000..b92784b --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/HttpBackend/whenPUT.sublime-snippet @@ -0,0 +1,8 @@ + + }}]]> + .when + source.coffee + Angular $httpBackend whenPUT + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Injector/$injector.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Injector/$injector.sublime-snippet new file mode 100644 index 0000000..5e18d6d --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Injector/$injector.sublime-snippet @@ -0,0 +1,6 @@ + + + $ + source.coffee + Angular $injector + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Injector/annotate.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Injector/annotate.sublime-snippet new file mode 100644 index 0000000..f0a7dc3 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Injector/annotate.sublime-snippet @@ -0,0 +1,8 @@ + + + ${1:#a function to annotate} +]]> + $injector. + source.coffee + Angular $injector annotate + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Injector/get.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Injector/get.sublime-snippet new file mode 100644 index 0000000..785eded --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Injector/get.sublime-snippet @@ -0,0 +1,6 @@ + + + $injector. + source.coffee + Angular $injector get + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Injector/instantiate.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Injector/instantiate.sublime-snippet new file mode 100644 index 0000000..2dee8eb --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Injector/instantiate.sublime-snippet @@ -0,0 +1,6 @@ + + + $injector. + source.coffee + Angular $injector instantiate + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Injector/invoke.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Injector/invoke.sublime-snippet new file mode 100644 index 0000000..1469d2e --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Injector/invoke.sublime-snippet @@ -0,0 +1,6 @@ + + + $injector. + source.coffee + Angular $injector invoke + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Interpolate/$interpolate.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Interpolate/$interpolate.sublime-snippet new file mode 100644 index 0000000..e18b7f6 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Interpolate/$interpolate.sublime-snippet @@ -0,0 +1,6 @@ + + + $ + source.coffee + Angular $interpolate + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Interpolate/endSymbol.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Interpolate/endSymbol.sublime-snippet new file mode 100644 index 0000000..2343023 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Interpolate/endSymbol.sublime-snippet @@ -0,0 +1,6 @@ + + + $interpolate. + source.coffee + Angular $interpolate endSymbol + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Interpolate/startSymbol.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Interpolate/startSymbol.sublime-snippet new file mode 100644 index 0000000..c41d3d9 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Interpolate/startSymbol.sublime-snippet @@ -0,0 +1,6 @@ + + + $interpolate. + source.coffee + Angular $interpolate startSymbol + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Location/$location.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Location/$location.sublime-snippet new file mode 100644 index 0000000..c0e595c --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Location/$location.sublime-snippet @@ -0,0 +1,6 @@ + + + $ + source.coffee + Angular $location + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Location/absUrl.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Location/absUrl.sublime-snippet new file mode 100644 index 0000000..4bd6c73 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Location/absUrl.sublime-snippet @@ -0,0 +1,6 @@ + + + $location. + source.coffee + Angular $location absUrl + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Location/hash.get.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Location/hash.get.sublime-snippet new file mode 100644 index 0000000..237e512 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Location/hash.get.sublime-snippet @@ -0,0 +1,6 @@ + + + $location. + source.coffee + Angular $location hash get + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Location/hash.set.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Location/hash.set.sublime-snippet new file mode 100644 index 0000000..6678cb4 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Location/hash.set.sublime-snippet @@ -0,0 +1,6 @@ + + + $location. + source.coffee + Angular $location hash set + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Location/host.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Location/host.sublime-snippet new file mode 100644 index 0000000..214c3c4 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Location/host.sublime-snippet @@ -0,0 +1,6 @@ + + + $location. + source.coffee + Angular $location host + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Location/path.get.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Location/path.get.sublime-snippet new file mode 100644 index 0000000..0c7f4a3 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Location/path.get.sublime-snippet @@ -0,0 +1,6 @@ + + + $location. + source.coffee + Angular $location path get + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Location/path.set.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Location/path.set.sublime-snippet new file mode 100644 index 0000000..f6c0b93 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Location/path.set.sublime-snippet @@ -0,0 +1,6 @@ + + + $location. + source.coffee + Angular $location path set + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Location/port.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Location/port.sublime-snippet new file mode 100644 index 0000000..1e34440 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Location/port.sublime-snippet @@ -0,0 +1,6 @@ + + + $location. + source.coffee + Angular $location port + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Location/protocol.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Location/protocol.sublime-snippet new file mode 100644 index 0000000..7da27c3 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Location/protocol.sublime-snippet @@ -0,0 +1,6 @@ + + + $location. + source.coffee + Angular $location protocol + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Location/replace.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Location/replace.sublime-snippet new file mode 100644 index 0000000..2f5c888 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Location/replace.sublime-snippet @@ -0,0 +1,6 @@ + + + $location. + source.coffee + Angular $location replace + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Location/search.get.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Location/search.get.sublime-snippet new file mode 100644 index 0000000..2e283b2 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Location/search.get.sublime-snippet @@ -0,0 +1,6 @@ + + + $location. + source.coffee + Angular $location search get + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Location/search.set.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Location/search.set.sublime-snippet new file mode 100644 index 0000000..983d1ac --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Location/search.set.sublime-snippet @@ -0,0 +1,6 @@ + + + $location. + source.coffee + Angular $location search set + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Location/url.get.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Location/url.get.sublime-snippet new file mode 100644 index 0000000..d31fa11 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Location/url.get.sublime-snippet @@ -0,0 +1,6 @@ + + + $location. + source.coffee + Angular $location url get + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Location/url.set.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Location/url.set.sublime-snippet new file mode 100644 index 0000000..e602206 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Location/url.set.sublime-snippet @@ -0,0 +1,6 @@ + + + $location. + source.coffee + Angular $location url set + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Log/$log.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Log/$log.sublime-snippet new file mode 100644 index 0000000..200c76e --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Log/$log.sublime-snippet @@ -0,0 +1,6 @@ + + + $ + source.coffee + Angular $log + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Log/error.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Log/error.sublime-snippet new file mode 100644 index 0000000..eb13de9 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Log/error.sublime-snippet @@ -0,0 +1,6 @@ + + + $log. + source.coffee + Angular $log error + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Log/info.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Log/info.sublime-snippet new file mode 100644 index 0000000..4ede968 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Log/info.sublime-snippet @@ -0,0 +1,6 @@ + + + $log. + source.coffee + Angular $log info + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Log/log.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Log/log.sublime-snippet new file mode 100644 index 0000000..2898f37 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Log/log.sublime-snippet @@ -0,0 +1,6 @@ + + + $log. + source.coffee + Angular $log log + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Log/warn.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Log/warn.sublime-snippet new file mode 100644 index 0000000..0c796da --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Log/warn.sublime-snippet @@ -0,0 +1,6 @@ + + + $log. + source.coffee + Angular $log warn + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Mock/TzDate.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Mock/TzDate.sublime-snippet new file mode 100644 index 0000000..00a5279 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Mock/TzDate.sublime-snippet @@ -0,0 +1,6 @@ + + + mock + source.coffee + Angular mock TzDate + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Mock/debug.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Mock/debug.sublime-snippet new file mode 100644 index 0000000..9aa097c --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Mock/debug.sublime-snippet @@ -0,0 +1,6 @@ + + + mock + source.coffee + Angular mock debug + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Mock/inject.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Mock/inject.sublime-snippet new file mode 100644 index 0000000..9ca1bfe --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Mock/inject.sublime-snippet @@ -0,0 +1,9 @@ + + + $0 +${5:, (${6:fnparam1}${7:, ${8:fnparam2}}) -> + }]]> + mock + source.coffee + Angular mock inject (Jasmine only) + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Mock/log.assertEmpty b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Mock/log.assertEmpty new file mode 100644 index 0000000..e53b9da --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Mock/log.assertEmpty @@ -0,0 +1,6 @@ + + + $log. + source.coffee + AngularJS mock $log assertEmpty + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Mock/log.logs b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Mock/log.logs new file mode 100644 index 0000000..361ff76 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Mock/log.logs @@ -0,0 +1,6 @@ + + + $log. + source.coffee + AngularJS mock $log logs + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Mock/log.reset.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Mock/log.reset.sublime-snippet new file mode 100644 index 0000000..7ba509f --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Mock/log.reset.sublime-snippet @@ -0,0 +1,6 @@ + + + $log. + source.coffee + Angular mock $log reset + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Mock/module.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Mock/module.sublime-snippet new file mode 100644 index 0000000..0292c0b --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Mock/module.sublime-snippet @@ -0,0 +1,9 @@ + + + $0 +}${7:, (${8:fnparam1}${9:, ${10:fnparam2}}) -> + }]]> + mock + source.coffee + Angular mock module (Jasmine only) + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Module/config.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Module/config.sublime-snippet new file mode 100644 index 0000000..e234757 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Module/config.sublime-snippet @@ -0,0 +1,8 @@ + + + #exec on load + $0]]> + mod + source.coffee + Angular Module config + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Module/constant.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Module/constant.sublime-snippet new file mode 100644 index 0000000..98f6f12 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Module/constant.sublime-snippet @@ -0,0 +1,6 @@ + + + mod + source.coffee + Angular Module constant + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Module/controller.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Module/controller.sublime-snippet new file mode 100644 index 0000000..199da4b --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Module/controller.sublime-snippet @@ -0,0 +1,7 @@ + + + ${3:constructor function}]]> + mod + source.coffee + Angular Module controller + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Module/directive.complete.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Module/directive.complete.sublime-snippet new file mode 100644 index 0000000..64efeaf --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Module/directive.complete.sublime-snippet @@ -0,0 +1,38 @@ + + + directiveDefinitionObject = + priority: ${3:Number} + terminal: ${4:true|false} + scope: ${5:true|false|\{\} (object hash)}${6: + controller: () -> + ${7:#controller cn func, may access \$scope, \$element, \$attrs, \$transclude}} + ${8:require: '${9:controllerName|?controllerName|^controllerName}'} + restrict: '${11:E|A|C|M}'${12: + template: '${13:HTML}'}${14: + templateUrl: '${15:directive.html}'} + replace: ${16:true|false} + transclude: ${17:true|false|'element'}${18: + #only use to transform template DOM + compile: (tElement, tAttrs, transclude) -> + compiler = + pre: (scope, iElement, iAttrs, controller) -> + #not safe for DOM transformation + ${19:#} + post: (scope, iElement, iAttrs, controller) -> + #safe for DOM transformation + ${20:#} + return compiler + }${21: + #called IFF compile not defined + link: (scope, iElement, iAttrs) -> + #register DOM listeners or update DOM + ${22:#} + } + return directiveDefinitionObject +]]> + dir + source.coffee + Angular Module directive (complete) + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Module/directive.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Module/directive.sublime-snippet new file mode 100644 index 0000000..ba73920 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Module/directive.sublime-snippet @@ -0,0 +1,9 @@ + + + ${3:# Runs during compile} + return (scope, elm, attrs) -> + ${4:# Runs during render}]]> + dir + source.coffee + Angular Module directive (simple) + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Module/factory.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Module/factory.sublime-snippet new file mode 100644 index 0000000..2a968d5 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Module/factory.sublime-snippet @@ -0,0 +1,7 @@ + + + ${3:provider function}]]> + mod + source.coffee + Angular Module factory + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Module/filter.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Module/filter.sublime-snippet new file mode 100644 index 0000000..552f050 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Module/filter.sublime-snippet @@ -0,0 +1,7 @@ + + + ${3:filter function}]]> + mod + source.coffee + Angular Module filter + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Module/provider.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Module/provider.sublime-snippet new file mode 100644 index 0000000..fac6680 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Module/provider.sublime-snippet @@ -0,0 +1,7 @@ + + + ${5:provider function}}]]> + mod + source.coffee + Angular Module provider + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Module/run.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Module/run.sublime-snippet new file mode 100644 index 0000000..9a5ac3b --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Module/run.sublime-snippet @@ -0,0 +1,7 @@ + + + ${3:initialization function}}]]> + mod + source.coffee + Angular Module run + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Module/service.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Module/service.sublime-snippet new file mode 100644 index 0000000..4b434f6 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Module/service.sublime-snippet @@ -0,0 +1,7 @@ + + + ${4:service constructor}}]]> + mod + source.coffee + Angular Module service + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Module/value.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Module/value.sublime-snippet new file mode 100644 index 0000000..b4334c4 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Module/value.sublime-snippet @@ -0,0 +1,6 @@ + + + mod + source.coffee + Angular Module value + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Provide/$provide.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Provide/$provide.sublime-snippet new file mode 100644 index 0000000..cbf3262 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Provide/$provide.sublime-snippet @@ -0,0 +1,6 @@ + + + $ + source.coffee + Angular $provide + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Provide/constant.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Provide/constant.sublime-snippet new file mode 100644 index 0000000..586e24d --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Provide/constant.sublime-snippet @@ -0,0 +1,6 @@ + + + $provide. + source.coffee + Angular $provide constant + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Provide/decorator.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Provide/decorator.sublime-snippet new file mode 100644 index 0000000..9f0fbe7 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Provide/decorator.sublime-snippet @@ -0,0 +1,8 @@ + + + ${2:#function body to decorate} +]]> + $provide. + source.coffee + Angular $provide decorator + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Provide/factory.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Provide/factory.sublime-snippet new file mode 100644 index 0000000..e1890e4 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Provide/factory.sublime-snippet @@ -0,0 +1,8 @@ + + + ${2:#$getFn for instance creation} +]]> + $provide. + source.coffee + Angular $provide factory + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Provide/provider.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Provide/provider.sublime-snippet new file mode 100644 index 0000000..77a658c --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Provide/provider.sublime-snippet @@ -0,0 +1,8 @@ + + + ${2:#$constructor function passed to $injector.instantiate} +]]> + $provide. + source.coffee + Angular $provide provider + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Provide/service.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Provide/service.sublime-snippet new file mode 100644 index 0000000..34266f2 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Provide/service.sublime-snippet @@ -0,0 +1,8 @@ + + + ${2:#$constructor function} +]]> + $provide. + source.coffee + Angular $provide service + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Provide/value.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Provide/value.sublime-snippet new file mode 100644 index 0000000..fb3ca08 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Provide/value.sublime-snippet @@ -0,0 +1,6 @@ + + + $provide. + source.coffee + Angular $provide value + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Q/$q.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Q/$q.sublime-snippet new file mode 100644 index 0000000..63777ea --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Q/$q.sublime-snippet @@ -0,0 +1,6 @@ + + + $ + source.coffee + Angular $q + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Q/all.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Q/all.sublime-snippet new file mode 100644 index 0000000..2e95cff --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Q/all.sublime-snippet @@ -0,0 +1,6 @@ + + + $q. + source.coffee + Angular $q all + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Q/defer.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Q/defer.sublime-snippet new file mode 100644 index 0000000..b16293b --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Q/defer.sublime-snippet @@ -0,0 +1,6 @@ + + + $q. + source.coffee + Angular $q defer + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Q/reject.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Q/reject.sublime-snippet new file mode 100644 index 0000000..28ffd18 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Q/reject.sublime-snippet @@ -0,0 +1,6 @@ + + + $q. + source.coffee + Angular $q reject + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Q/when.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Q/when.sublime-snippet new file mode 100644 index 0000000..d87fc44 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Q/when.sublime-snippet @@ -0,0 +1,6 @@ + + + $q. + source.coffee + Angular $q when + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Resource/$resource.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Resource/$resource.sublime-snippet new file mode 100644 index 0000000..842746b --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Resource/$resource.sublime-snippet @@ -0,0 +1,19 @@ + + + $ + source.coffee + Angular $resource + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Resource/delete.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Resource/delete.sublime-snippet new file mode 100644 index 0000000..20c6a6a --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Resource/delete.sublime-snippet @@ -0,0 +1,11 @@ + + + ${5:#success function} +, +() -> + ${6:#error function}} +]]> + .$ + source.coffee + Angular $resource delete + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Resource/get.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Resource/get.sublime-snippet new file mode 100644 index 0000000..15df47b --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Resource/get.sublime-snippet @@ -0,0 +1,11 @@ + + + ${5:#success function} +, +() -> + ${6:#error function}} +]]> + .$ + source.coffee + Angular $resource get + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Resource/query.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Resource/query.sublime-snippet new file mode 100644 index 0000000..f8d460a --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Resource/query.sublime-snippet @@ -0,0 +1,11 @@ + + + ${5:#success function} +, +() -> + ${6:#error function}} +]]> + .$ + source.coffee + Angular $resource query + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Resource/remove.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Resource/remove.sublime-snippet new file mode 100644 index 0000000..b94fd8f --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Resource/remove.sublime-snippet @@ -0,0 +1,11 @@ + + + ${5:#success function} +, +() -> + ${6:#error function}} +]]> + .$ + source.coffee + Angular $resource remove + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Resource/save.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Resource/save.sublime-snippet new file mode 100644 index 0000000..dc713c7 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Resource/save.sublime-snippet @@ -0,0 +1,11 @@ + + + ${6:#success function} +, +() -> + ${7:#error function}} +]]> + .$ + source.coffee + Angular $resource save + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Route/$route.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Route/$route.sublime-snippet new file mode 100644 index 0000000..cc0cb0a --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Route/$route.sublime-snippet @@ -0,0 +1,6 @@ + + + $ + source.coffee + Angular $route + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Route/$routeChangeError.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Route/$routeChangeError.sublime-snippet new file mode 100644 index 0000000..5d2f3d4 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Route/$routeChangeError.sublime-snippet @@ -0,0 +1,6 @@ + + + .$ + source.coffee + Angular Route $routeChangeError + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Route/$routeChangeStart.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Route/$routeChangeStart.sublime-snippet new file mode 100644 index 0000000..d9ee300 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Route/$routeChangeStart.sublime-snippet @@ -0,0 +1,6 @@ + + + .$ + source.coffee + Angular Route $routeChangeStart + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Route/$routeChangeSuccess.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Route/$routeChangeSuccess.sublime-snippet new file mode 100644 index 0000000..4725808 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Route/$routeChangeSuccess.sublime-snippet @@ -0,0 +1,6 @@ + + + .$ + source.coffee + Angular Route $routeChangeSuccess + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Route/$routeParams.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Route/$routeParams.sublime-snippet new file mode 100644 index 0000000..510e5b9 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Route/$routeParams.sublime-snippet @@ -0,0 +1,6 @@ + + + $ + source.coffee + Angular $routeParams + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Route/$routeProvider.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Route/$routeProvider.sublime-snippet new file mode 100644 index 0000000..6753e2e --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Route/$routeProvider.sublime-snippet @@ -0,0 +1,6 @@ + + + $ + source.coffee + Angular $routeProvider + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Route/$routeUpdate.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Route/$routeUpdate.sublime-snippet new file mode 100644 index 0000000..4a0dc20 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Route/$routeUpdate.sublime-snippet @@ -0,0 +1,6 @@ + + + .$ + source.coffee + Angular Route $routeUpdate + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Route/current.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Route/current.sublime-snippet new file mode 100644 index 0000000..a420c6a --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Route/current.sublime-snippet @@ -0,0 +1,6 @@ + + + $route. + source.coffee + Angular Route current + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Route/otherwise.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Route/otherwise.sublime-snippet new file mode 100644 index 0000000..2531a67 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Route/otherwise.sublime-snippet @@ -0,0 +1,6 @@ + + + .other + source.coffee + Angular $routeProvider otherwise + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Route/reload.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Route/reload.sublime-snippet new file mode 100644 index 0000000..a421a06 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Route/reload.sublime-snippet @@ -0,0 +1,6 @@ + + + $route. + source.coffee + Angular $route reload + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Route/routes.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Route/routes.sublime-snippet new file mode 100644 index 0000000..99556a4 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Route/routes.sublime-snippet @@ -0,0 +1,6 @@ + + + $route. + source.coffee + Angular Route routes + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Route/when.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Route/when.sublime-snippet new file mode 100644 index 0000000..5da44b6 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Route/when.sublime-snippet @@ -0,0 +1,15 @@ + + + #controller function${1: + template: '${2:string}'}${3: + templateUrl: '${4:url}'}${5: + resolve: + '${6:dependencyName}' : ${7:serviceName|factory-function}}${8: + redirectTo: ${9:path|function}}${10: + reloadOnSearch: ${11:true|false}} +\$routeProvider.when '${12:path}', route]]> + $routeProvider. + source.coffee + Angular $routeProvider when + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Scope/$rootScope.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Scope/$rootScope.sublime-snippet new file mode 100644 index 0000000..4b6f7af --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Scope/$rootScope.sublime-snippet @@ -0,0 +1,6 @@ + + + $ + source.coffee + Angular $rootScope + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Scope/apply.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Scope/apply.sublime-snippet new file mode 100644 index 0000000..da72bbd --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Scope/apply.sublime-snippet @@ -0,0 +1,7 @@ + + + ${2:function body (or delete function and use expression)}}]]> + .$ + source.coffee + Angular Scope $apply + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Scope/broadcast.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Scope/broadcast.sublime-snippet new file mode 100644 index 0000000..135c632 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Scope/broadcast.sublime-snippet @@ -0,0 +1,6 @@ + + + .$ + source.coffee + Angular Scope $broadcast + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Scope/destroy.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Scope/destroy.sublime-snippet new file mode 100644 index 0000000..09b42cf --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Scope/destroy.sublime-snippet @@ -0,0 +1,6 @@ + + + .$ + source.coffee + Angular Scope $destroy + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Scope/digest.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Scope/digest.sublime-snippet new file mode 100644 index 0000000..404e6ac --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Scope/digest.sublime-snippet @@ -0,0 +1,6 @@ + + + .$ + source.coffee + Angular Scope $digest + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Scope/emit.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Scope/emit.sublime-snippet new file mode 100644 index 0000000..c30df8c --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Scope/emit.sublime-snippet @@ -0,0 +1,6 @@ + + + .$ + source.coffee + Angular Scope $emit + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Scope/eval.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Scope/eval.sublime-snippet new file mode 100644 index 0000000..3b79f73 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Scope/eval.sublime-snippet @@ -0,0 +1,7 @@ + + + ${2:function body (or delete function and use expression)}}]]> + .$ + source.coffee + Angular Scope $eval + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Scope/evalAsync.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Scope/evalAsync.sublime-snippet new file mode 100644 index 0000000..d450e92 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Scope/evalAsync.sublime-snippet @@ -0,0 +1,7 @@ + + + ${2:function body (or delete function and use expression)}}]]> + .$ + source.coffee + Angular Scope $evalAsync + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Scope/id.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Scope/id.sublime-snippet new file mode 100644 index 0000000..e09d8bb --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Scope/id.sublime-snippet @@ -0,0 +1,6 @@ + + + .$ + source.coffee + Angular Scope $id + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Scope/new.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Scope/new.sublime-snippet new file mode 100644 index 0000000..a975b6b --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Scope/new.sublime-snippet @@ -0,0 +1,6 @@ + + + .$ + source.coffee + Angular Scope $new + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Scope/on.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Scope/on.sublime-snippet new file mode 100644 index 0000000..cbbdc3e --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Scope/on.sublime-snippet @@ -0,0 +1,7 @@ + + + ${2:event listener function}]]> + .$ + source.coffee + Angular Scope $on + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Scope/watch.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Scope/watch.sublime-snippet new file mode 100644 index 0000000..c0c07f9 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Scope/watch.sublime-snippet @@ -0,0 +1,8 @@ + + + $0 +${3:, ${4:forEquality-true|forReference-false}}}]]> + .$ + source.coffee + Angular Scope $watch + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Service/$anchorScroll.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Service/$anchorScroll.sublime-snippet new file mode 100644 index 0000000..d214e19 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Service/$anchorScroll.sublime-snippet @@ -0,0 +1,6 @@ + + + $ + source.coffee + Angular $anchorScroll + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Service/$cacheFactory.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Service/$cacheFactory.sublime-snippet new file mode 100644 index 0000000..d0f8d3d --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Service/$cacheFactory.sublime-snippet @@ -0,0 +1,6 @@ + + + $ + source.coffee + Angular $cacheFactory + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Service/$compile.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Service/$compile.sublime-snippet new file mode 100644 index 0000000..070f1d4 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Service/$compile.sublime-snippet @@ -0,0 +1,8 @@ + + + ${2:#transclude function} +), ${3:maxPriorityNumber}]]> + $ + source.coffee + Angular $compile + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Service/$controller.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Service/$controller.sublime-snippet new file mode 100644 index 0000000..0b4b136 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Service/$controller.sublime-snippet @@ -0,0 +1,8 @@ + + + ${2:#constructor function - name also accepted} +)}, ${3:locals-to-inject}]]> + $ + source.coffee + Angular $controller + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Service/$document.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Service/$document.sublime-snippet new file mode 100644 index 0000000..b5af9ac --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Service/$document.sublime-snippet @@ -0,0 +1,6 @@ + + + $ + source.coffee + Angular $document + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Service/$exceptionHandler.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Service/$exceptionHandler.sublime-snippet new file mode 100644 index 0000000..d16bb97 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Service/$exceptionHandler.sublime-snippet @@ -0,0 +1,6 @@ + + + $ + source.coffee + Angular $exceptionHandler + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Service/$locale.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Service/$locale.sublime-snippet new file mode 100644 index 0000000..3236624 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Service/$locale.sublime-snippet @@ -0,0 +1,6 @@ + + + $ + source.coffee + Angular $locale id + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Service/$parse.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Service/$parse.sublime-snippet new file mode 100644 index 0000000..11aacf8 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Service/$parse.sublime-snippet @@ -0,0 +1,6 @@ + + + $ + source.coffee + Angular $parse + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Service/$rootElement.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Service/$rootElement.sublime-snippet new file mode 100644 index 0000000..9ef3a3a --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Service/$rootElement.sublime-snippet @@ -0,0 +1,6 @@ + + + $ + source.coffee + Angular $rootElement + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Service/$sanitize.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Service/$sanitize.sublime-snippet new file mode 100644 index 0000000..9c07f04 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Service/$sanitize.sublime-snippet @@ -0,0 +1,6 @@ + + + $ + source.coffee + Angular $sanitize + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Service/$templateCache.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Service/$templateCache.sublime-snippet new file mode 100644 index 0000000..28c193b --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Service/$templateCache.sublime-snippet @@ -0,0 +1,6 @@ + + + $ + source.coffee + Angular $templateCache + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Service/$timeout.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Service/$timeout.sublime-snippet new file mode 100644 index 0000000..5a39b06 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Service/$timeout.sublime-snippet @@ -0,0 +1,9 @@ + + + ${1:functionToExecute}${2: +, ${3:msDelay}}${4: +, ${5:invokeApply-true|false}}]]> + $ + source.coffee + Angular $timeout + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Service/$window.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Service/$window.sublime-snippet new file mode 100644 index 0000000..c138020 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/Snippets/Service/$window.sublime-snippet @@ -0,0 +1,6 @@ + + + $ + source.coffee + Angular $window + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/package-metadata.json b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/package-metadata.json new file mode 100644 index 0000000..7c9bb82 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/package-metadata.json @@ -0,0 +1 @@ +{"url": "https://github.com/EastPoint/Sublime-AngularJS-Coffee-Completions", "version": "2012.09.24.14.10.42", "description": "A Sublime Text Package for AngularJS when using CoffeeScript"} \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/services.sublime-completions b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/services.sublime-completions new file mode 100644 index 0000000..de6ae94 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AngularJS (CoffeeScript)/services.sublime-completions @@ -0,0 +1,63 @@ +{ + "scope": "source.coffee,source.js,source.js.embedded.html", + + "completions": + [ + "\\$anchorScroll", + "\\$cacheFactory", + "\\$compile", + "\\$controller", + "\\$document", + "\\$exceptionHandler", + "\\$filter", + "\\$http", + "\\$httpBackend", + "\\$interpolate", + "\\$locale", + "\\$location", + "\\$log", + "\\$parse", + "\\$q", + "\\$rootElement", + "\\$rootScope", + "\\$route", + "\\$routeParams", + "\\$templateCache", + "\\$timeout", + "\\$window", + + "\\$apply", + "\\$broadcast", + "\\$destroy", + "\\$digest", + "\\$emit", + "\\$eval", + "\\$evalAsync", + "\\$new", + "\\$on", + "\\$watch", + "\\$id", + + "\\$render", + "\\$setValidity", + "\\$setViewValue", + "\\$viewValue", + "\\$modelValue", + "\\$parsers", + "\\$formatters", + "\\$error", + "\\$pristine", + "\\$dirty", + "\\$valid", + "\\$invalid", + + "\\$injector", + "\\$provide", + + "\\$cookies", + "\\$cookieStore", + + "\\$resource", + "\\$sanitize" + ] +} diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AutoFileName/.gitignore b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AutoFileName/.gitignore new file mode 100644 index 0000000..a0d5d0d --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AutoFileName/.gitignore @@ -0,0 +1,5 @@ +*.pyc +*.html +*.css +*.png +.DS_STORE \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AutoFileName/Default.sublime-keymap b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AutoFileName/Default.sublime-keymap new file mode 100644 index 0000000..6098f74 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AutoFileName/Default.sublime-keymap @@ -0,0 +1,24 @@ +[ + { "keys": ["tab"], "command": "insert_dimensions", + "context": + [ + { "key": "setting.auto_complete_commit_on_tab" }, + { "key": "auto_complete_visible", "operator": "equal", "operand": true }, + { "key": "afn_insert_dimensions", "operator": "equal", "operand": true } + ] + }, + { "keys": ["enter"], "command": "insert_dimensions", + "context": + [ + { "key": "setting.auto_complete_commit_on_tab", "operator": "equal", "operand": false }, + { "key": "auto_complete_visible", "operator": "equal", "operand": true }, + { "key": "afn_insert_dimensions", "operator": "equal", "operand": true } + ] + }, + { "keys": ["backspace"], "command": "reload_auto_complete", + "context": + [ + { "key": "afn_deleting_slash", "operator": "equal", "operand": true } + ] + } +] \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AutoFileName/Main.sublime-menu b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AutoFileName/Main.sublime-menu new file mode 100644 index 0000000..0e92a8c --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AutoFileName/Main.sublime-menu @@ -0,0 +1,35 @@ +[ + { + "caption": "Preferences", + "mnemonic": "n", + "id": "preferences", + "children": + [ + { + "caption": "Package Settings", + "mnemonic": "P", + "id": "package-settings", + "children": + [ + { + "caption": "AutoFileName", + "children": + [ + { + "command": "open_file", + "args": {"file": "${packages}/AutoFileName/autofilename.sublime-settings"}, + "caption": "Settings – Default" + }, + { + "command": "open_file", + "args": {"file": "${packages}/User/Preferences.sublime-settings"}, + "caption": "Settings – User" + }, + { "caption": "-" } + ] + } + ] + } + ] + } +] \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AutoFileName/README.md b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AutoFileName/README.md new file mode 100644 index 0000000..138fe10 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AutoFileName/README.md @@ -0,0 +1,28 @@ +AutoFileName: Autocomplete Filenames in Sublime Text +===================================================== +Do you ever find yourself sifting through folders in the sidebar trying to remember what you named that file? Can't remember if it was a jpg or a png? Maybe you just wish you could type filenames faster. *No more.* + +Whether your making a `img` tag in html, setting a background image in css, or linking a `.js` file to your html (or whatever else people use filename paths for these days...), you can now autocomplete the filename. Plus, it uses the built-in autocomplete, so no need to learn another *pesky* shortcut. + +Usage +===== +If you are looking to autocomplete an image path in an HTML `` tag: + + +Pressing control+space, will activate AutoFileName. I list of available files where be ready to select. + +*Looking for an even more automatic and seemless completion?* Add the following to your User Settings file: + + "auto_complete_triggers": + [ + { + "characters": "<", + "selector": "text.html" + }, + { + "characters": "/", + "selector": "string.quoted.double.html,string.quoted.single.html, source.css" + } + ] + +With this, there's no need to worry about pressing control+space, autocompletion with appear upon pressing /. \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AutoFileName/autofilename.py b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AutoFileName/autofilename.py new file mode 100644 index 0000000..004b929 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AutoFileName/autofilename.py @@ -0,0 +1,157 @@ +import sublime +import sublime_plugin +import os +from getimageinfo import getImageInfo + +class InsertDimensionsCommand(sublime_plugin.TextCommand): + this_dir = '' + + def insert_dimension(self,edit,dim,name,tag_scope): + view = self.view + sel = view.sel()[0].a + if name in view.substr(tag_scope): + reg = view.find('(?<='+name+'\=)\s*\"\d{1,5}', tag_scope.a) + view.replace(edit, reg, '"'+str(dim)) + else: + dimension = str(dim) + view.insert(edit, sel+1, ' '+name+'="'+dimension+'"') + + def get_setting(self,string,view=None): + if view and view.settings().get(string): + return view.settings().get(string) + else: + return sublime.load_settings('autofilename.sublime-settings').get(string) + + def run(self, edit): + view = self.view + view.run_command("commit_completion") + sel = view.sel()[0].a + if not 'html' in view.scope_name(sel): return + scope = view.extract_scope(sel-1) + tag_scope = view.extract_scope(scope.a-1) + + path = view.substr(scope) + if path.startswith(("'","\"","(")): + path = path[1:-1] + + path = path[path.rfind('/'):] if '/' in path else '' + full_path = self.this_dir + path + + if '= 10) and data[:6] in ('GIF87a', 'GIF89a'): + # Check to see if content_type is correct + content_type = 'image/gif' + w, h = struct.unpack("= 24) and data.startswith('\211PNG\r\n\032\n') + and (data[12:16] == 'IHDR')): + content_type = 'image/png' + w, h = struct.unpack(">LL", data[16:24]) + width = int(w) + height = int(h) + + # Maybe this is for an older PNG version. + elif (size >= 16) and data.startswith('\211PNG\r\n\032\n'): + # Check to see if we have the right content type + content_type = 'image/png' + w, h = struct.unpack(">LL", data[8:16]) + width = int(w) + height = int(h) + + # handle JPEGs + elif (size >= 2) and data.startswith('\377\330'): + content_type = 'image/jpeg' + jpeg = StringIO.StringIO(data) + jpeg.read(2) + b = jpeg.read(1) + try: + while (b and ord(b) != 0xDA): + while (ord(b) != 0xFF): b = jpeg.read(1) + while (ord(b) == 0xFF): b = jpeg.read(1) + if (ord(b) >= 0xC0 and ord(b) <= 0xC3): + jpeg.read(3) + h, w = struct.unpack(">HH", jpeg.read(4)) + break + else: + jpeg.read(int(struct.unpack(">H", jpeg.read(2))[0])-2) + b = jpeg.read(1) + width = int(w) + height = int(h) + except struct.error: + pass + except ValueError: + pass + + return content_type, width, height \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AutoFileName/package-metadata.json b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AutoFileName/package-metadata.json new file mode 100644 index 0000000..c6a63de --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/AutoFileName/package-metadata.json @@ -0,0 +1 @@ +{"url": "https://github.com/BoundInCode/AutoFileName", "version": "2013.01.23.20.19.29", "description": "Sublime Text 2 plugin that autocompletes filenames"} \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Chai Completions/.gitignore b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Chai Completions/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Chai Completions/README.md b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Chai Completions/README.md new file mode 100644 index 0000000..306b125 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Chai Completions/README.md @@ -0,0 +1,29 @@ +## Full completions for the Chai Assertion Library + +This sublime package will install completions for *bdd* and *tdd*: +- [*should*](http://chaijs.com/api/bdd/) +- [*expect*](http://chaijs.com/api/bdd/) +- [*assert*](http://chaijs.com/api/assert/) + +You can read the [full API for chai syntax](http://chaijs.com/api/). + +The completions work in both Javascript and [CoffeeScript](http://coffeescript.org/). + +This package was merged with [pahen's](https://github.com/pahen/) package in Sublime Package Control. + +### Installation +Install with [Sublime Package Control](http://wbond.net/sublime_packages/package_control) if possible. +- Super + Shift + P +- Install Package +- Chai Completions + +or without Sublime Package Control: + +``` +cd ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/ +git clone git://github.com/pensive612/sublime-chai-full-completions.git +``` +restart Sublime Text and you're good to go. + + +Improvements and suggestions are welcome... \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Chai Completions/coffee/blocks/after.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Chai Completions/coffee/blocks/after.sublime-snippet new file mode 100644 index 0000000..1a88676 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Chai Completions/coffee/blocks/after.sublime-snippet @@ -0,0 +1,12 @@ + + + $1 +]]> + + after + + source.coffee + + After + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Chai Completions/coffee/blocks/aftereach.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Chai Completions/coffee/blocks/aftereach.sublime-snippet new file mode 100644 index 0000000..903717d --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Chai Completions/coffee/blocks/aftereach.sublime-snippet @@ -0,0 +1,12 @@ + + + $1 +]]> + + afte + + source.coffee + + After Each + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Chai Completions/coffee/blocks/before.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Chai Completions/coffee/blocks/before.sublime-snippet new file mode 100644 index 0000000..f8ee5e4 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Chai Completions/coffee/blocks/before.sublime-snippet @@ -0,0 +1,12 @@ + + + $1 +]]> + + bef + + source.coffee + + Before + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Chai Completions/coffee/blocks/beforeeach.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Chai Completions/coffee/blocks/beforeeach.sublime-snippet new file mode 100644 index 0000000..f77a2ba --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Chai Completions/coffee/blocks/beforeeach.sublime-snippet @@ -0,0 +1,12 @@ + + + $1 +]]> + + befe + + source.coffee + + Before Each + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Chai Completions/coffee/blocks/describe.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Chai Completions/coffee/blocks/describe.sublime-snippet new file mode 100644 index 0000000..b1ff03c --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Chai Completions/coffee/blocks/describe.sublime-snippet @@ -0,0 +1,12 @@ + + + $2 +]]> + + des + + source.coffee + + Describe + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Chai Completions/coffee/blocks/it.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Chai Completions/coffee/blocks/it.sublime-snippet new file mode 100644 index 0000000..963331c --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Chai Completions/coffee/blocks/it.sublime-snippet @@ -0,0 +1,12 @@ + + + $2 +]]> + + it + + source.coffee + + It + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Chai Completions/coffee/completions/assert-chai-coffee.sublime-completions b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Chai Completions/coffee/completions/assert-chai-coffee.sublime-completions new file mode 100644 index 0000000..d384a9a --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Chai Completions/coffee/completions/assert-chai-coffee.sublime-completions @@ -0,0 +1,54 @@ +{ + "scope": "source.coffee", + "version": "0.10", + "completions": + [ + { "trigger": "assert", "contents": "assert ${1:expression}${2:, \"${3:[message]}\"}$0"}, + { "trigger": "assert.fail", "contents": "assert.fail ${1:actual}, ${2:expected}${3:, \"${4:[message]}\", ${5:[operator]}}$0"}, + { "trigger": "assert.ok", "contents": "assert.ok ${1:object}${2:, \"${3:[message]}\"}$0"}, + { "trigger": "assert.equal", "contents": "assert.equal ${1:actual}, ${2:expected}${3:, \"${4:[message]}\"}$0"}, + { "trigger": "assert.notEqual", "contents": "assert.notEqual ${1:actual}, ${2:expected}${3:, \"${3:[message]}\"}$0"}, + { "trigger": "assert.strictEqual", "contents": "assert.strictEqual ${1:actual}, ${2:expected}${3:, \"${4:[message]}\"}$0"}, + { "trigger": "assert.notStrictEqual", "contents": "assert.notStrictEqual ${1:actual}, ${2:expected}${3:, \"${4:[message]}\"}$0"}, + { "trigger": "assert.deepEqual", "contents": "assert.deepEqual ${1:actual}, ${2:expected}${3:, \"${4:[message]}\"}$0"}, + { "trigger": "assert.notDeepEqual", "contents": "assert.notDeepEqual ${1:actual}, ${2:expected}${3:, \"${3:[message]}\"}$0"}, + { "trigger": "assert.isTrue", "contents": "assert.isTrue ${1:value}${2:, \"${3:[message]}\"}$0"}, + { "trigger": "assert.isFalse", "contents": "assert.isFalse ${1:value}${2:, \"${3:[message]}\"}$0"}, + { "trigger": "assert.isNull", "contents": "assert.isNull ${1:value}${2:, \"${3:[message]}\"}$0"}, + { "trigger": "assert.isNotNull", "contents": "assert.isNotNull ${1:value}${2:, \"${3:[message]}\"}$0"}, + { "trigger": "assert.isUndefined", "contents": "assert.isUndefined ${1:value}${2:, \"${3:[message]}\"}$0"}, + { "trigger": "assert.isDefined", "contents": "assert.isDefined ${1:value}${2:, \"${3:[message]}\"}$0"}, + { "trigger": "assert.isFunction", "contents": "assert.isFunction ${1:value}${2:, \"${3:[message]}\"}$0"}, + { "trigger": "assert.isNotFunction", "contents": "assert.isNotFunction ${1:value}${2:, \"${3:[message]}\"}$0"}, + { "trigger": "assert.isObject", "contents": "assert.isObject ${1:value}${2:, \"${3:[message]}\"}$0"}, + { "trigger": "assert.isNotObject", "contents": "assert.isNotObject ${1:value}${2:, \"${3:[message]}\"}$0"}, + { "trigger": "assert.isArray", "contents": "assert.isArray ${1:value}${2:, \"${3:[message]}\"}$0"}, + { "trigger": "assert.isNotArray", "contents": "assert.isNotArray ${1:value}${2:, \"${3:[message]}\"}$0"}, + { "trigger": "assert.isString", "contents": "assert.isString ${1:value}${2:, \"${3:[message]}\"}$0"}, + { "trigger": "assert.isNotString", "contents": "assert.isNotString ${1:value}${2:, \"${3:[message]}\"}$0"}, + { "trigger": "assert.isNumber", "contents": "assert.isNumber ${1:value}${2:, \"${3:[message]}\"}$0"}, + { "trigger": "assert.isNotNumber", "contents": "assert.isNotNumber ${1:value}${2:, \"${3:[message]}\"}$0"}, + { "trigger": "assert.isBoolean", "contents": "assert.isBoolean ${1:value}${2:, \"${3:[message]}\"}$0"}, + { "trigger": "assert.isNotBoolean", "contents": "assert.isNotBoolean ${1:value}${2:, \"${3:[message]}\"}$0"}, + { "trigger": "assert.typeOf", "contents": "assert.typeOf ${1:value}, ${2:name}${3:, \"${4:[message]}\"}$0"}, + { "trigger": "assert.notTypeOf", "contents": "assert.notTypeOf ${1:value}, ${2:name}${3:, \"${4:[message]}\"}$0"}, + { "trigger": "assert.instanceOf", "contents": "assert.instanceOf ${1:object}, ${2:constructor}${3:, \"${4:[message]}\"}$0"}, + { "trigger": "assert.notInstanceOf", "contents": "assert.notInstanceOf ${1:object}, ${2:constructor}${3:, \"${4:[message]}\"}$0"}, + { "trigger": "assert.include", "contents": "assert.include ${1:haystack}, ${2:needle}${3:, \"${4:[message]}\"}$0"}, + { "trigger": "assert.match", "contents": "assert.match ${1:value}, ${2:regexp}${3:, \"${4:[message]}\"}$0"}, + { "trigger": "assert.notMatch", "contents": "assert.notMatch ${1:value}, ${2:regexp}${3:, \"${4:[message]}\"}$0"}, + { "trigger": "assert.property", "contents": "assert.property ${1:object}, ${2:property}${3:, \"${4:[message]}\"}$0"}, + { "trigger": "assert.notProperty", "contents": "assert.notProperty ${1:object}, ${2:property}${3:, \"${4:[message]}\"}$0"}, + { "trigger": "assert.deepProperty", "contents": "assert.deepProperty ${1:object}, ${2:property}${3:, \"${4:[message]}\"}$0"}, + { "trigger": "assert.notDeepProperty", "contents": "assert.notDeepProperty ${1:object}, ${2:property}${3:, \"${4:[message]}\"}$0"}, + { "trigger": "assert.propertyVal", "contents": "assert.notDeepProperty ${1:object}, ${2:property}, ${3:value}${4:, \"${5:[message]}\"}$0"}, + { "trigger": "assert.propertyNotVal", "contents": "assert.propertyNotVal ${1:object}, ${2:property} ${3:value}${4:, \"${5:[message]}\"}$0"}, + { "trigger": "assert.deepPropertyVal", "contents": "assert.deepPropertyVal ${1:object}, ${2:property} ${3:value}${4:, \"${5:[message]}\"}$0"}, + { "trigger": "assert.deepPropertyNotVal", "contents": "assert.deepPropertyNotVal ${1:object}, ${2:property}, ${3:value}${4:, \"${5:[message]}\"}$0"}, + { "trigger": "assert.lengthOf", "contents": "assert.lengthOf ${1:object}, ${2:length}${3:, \"${4:[message]}\"}$0"}, + { "trigger": "assert.throws", "contents": "assert.throws ${1:function}, ${2:constructor/regexp}${3:, \"${4:[message]}\"}$0"}, + { "trigger": "assert.doesNotThrow", "contents": "assert.doesNotThrow ${1:function}, ${2:constructor/regexp}${3:, \"${4:[message]}\"}$0"}, + { "trigger": "assert.operator", "contents": "assert.operator ${1:val1}, ${2:operator}, ${3:val2}${4:, \"${5:[message]}\"}$0"}, + { "trigger": "assert.closeTo", "contents": "assert.closeTo ${1:actual}, ${2:expected}, ${3:delta}${4:, \"${5:[message]}\"}$0" } + ] +} \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Chai Completions/coffee/completions/expect-chai-coffee.sublime-completions b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Chai Completions/coffee/completions/expect-chai-coffee.sublime-completions new file mode 100644 index 0000000..b66fbac --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Chai Completions/coffee/completions/expect-chai-coffee.sublime-completions @@ -0,0 +1,56 @@ +{ + "scope": "source.coffee", + "version": "0.10", + "completions": + [ + { "trigger": "expect", "contents": "expect(${1:value}).to.$0" }, + { "trigger": "expect.to.be.a", "contents": "expect(${1:value}).to.be.a \"${2:type}\"$0" }, + { "trigger": "expect.to.be.an", "contents": "expect(${1:value}).to.be.an \"${2:type}\"$0" }, + { "trigger": "expect.to.be.an.instanceof", "contents": "expect(${1:value}).to.be.an.instanceof ${2:object}$0" }, + { "trigger": "expect.to.include", "contents": "expect(${1:value}).to.include ${2:value}$0" }, + { "trigger": "expect.to.contain", "contents": "expect(${1:value}).to.contain \"${2:string}\"$0" }, + { "trigger": "expect.to.include.keys", "contents": "expect(${1:value}).to.include.keys \"${2:string}\"$0" }, + { "trigger": "expect.to.be.ok", "contents": "expect(${1:value}).to.be.ok$0" }, + { "trigger": "expect.to.not.be.ok", "contents": "expect(${1:value}).to.not.be.ok$0" }, + { "trigger": "expect.to.be.true", "contents": "expect(${1:value}).to.be.true$0" }, + { "trigger": "expect.to.not.be.true", "contents": "expect(${1:value}).to.not.be.true$0" }, + { "trigger": "expect.to.be.false", "contents": "expect(${1:value}).to.be.false$0" }, + { "trigger": "expect.to.not.be.false", "contents": "expect(${1:value}).to.not.be.false$0" }, + { "trigger": "expect.to.be.null", "contents": "expect(${1:value}).to.be.null$0" }, + { "trigger": "expect.to.not.be.null", "contents": "expect(${1:value}).to.not.be.null$0" }, + { "trigger": "expect.to.be.undefined", "contents": "expect(${1:value}).to.be.undefined$0" }, + { "trigger": "expect.to.not.be.undefined", "contents": "expect(${1:value}).to.not.be.undefined$0" }, + { "trigger": "expect.to.exist", "contents": "expect(${1:value}).to.exist$0" }, + { "trigger": "expect.to.not.exist", "contents": "expect(${1:value}).to.not.exist$0" }, + { "trigger": "expect.to.be.empty", "contents": "expect(${1:value}).to.be.empty$0" }, + { "trigger": "expect.to.not.be.empty", "contents": "expect(${1:value}).to.not.be.empty$0" }, + { "trigger": "expect.to.be.arguments", "contents": "expect(${1:value}).to.be.arguments ${2:value}$0" }, + { "trigger": "expect.to.equal", "contents": "expect(${1:value}).to.equal ${2:value}$0" }, + { "trigger": "expect.to.not.equal", "contents": "expect(${1:value}).to.not.equal ${2:value}$0" }, + { "trigger": "expect.to.eql", "contents": "expect(${1:value}).to.eql ${2:value}$0" }, + { "trigger": "expect.to.not.eql", "contents": "expect(${1:value}).to.not.eql ${2:value}$0" }, + { "trigger": "expect.to.be.above", "contents": "expect(${1:value}).to.be.above ${2:value}$0" }, + { "trigger": "expect.to.have.length.above", "contents": "expect(${1:value}).to.have.length.above ${2:value}$0" }, + { "trigger": "expect.to.be.at.least", "contents": "expect(${1:value}).to.be.at.least ${2:value}$0" }, + { "trigger": "expect.to.be.below", "contents": "expect(${1:value}).to.be.below ${2:value}$0" }, + { "trigger": "expect.to.be.at.most", "contents": "expect(${1:value}).to.be.at.most ${2:value}$0" }, + { "trigger": "expect.to.have.length.of.at.most", "contents": "expect(${1:value}).to.have.length.of.at.most ${2:value}$0" }, + { "trigger": "expect.to.be.within", "contents": "expect(${1:value}).to.be.within ${2:start}, ${3:finish}$0" }, + { "trigger": "expect.to.have.length.within", "contents": "expect(${1:value}).to.have.length.within ${2:start}, ${3:finish}$0" }, + { "trigger": "expect.to.have.property", "contents": "expect(${1:value}).to.have.property \"${2:value}\"$0" }, + { "trigger": "expect.to.have.deep.property", "contents": "expect(${1:value}).to.have.deep.property \"${2:value}\"$0" }, + { "trigger": "expect.to.have.ownProperty", "contents": "expect(${1:value}).to.have.ownProperty \"${2:value}\"$0" }, + { "trigger": "expect.to.have.length", "contents": "expect(${1:value}).to.have.length ${2:value}$0" }, + { "trigger": "expect.to.have.length.above", "contents": "expect(${1:value}).to.have.length.above ${2:value}$0" }, + { "trigger": "expect.to.have.length.below", "contents": "expect(${1:value}).to.have.length.below ${2:value}$0" }, + { "trigger": "expect.to.have.length.within", "contents": "expect(${1:value}).to.have.length.within ${2:start}, ${3:finish}$0" }, + { "trigger": "expect.to.match", "contents": "expect(${1:value}).to.match /${2:regex}/$0" }, + { "trigger": "expect.to.have.string", "contents": "expect(${1:value}).to.have.string \"${2:string}\"$0" }, + { "trigger": "expect.to.have.keys", "contents": "expect(${1:value}).to.have.keys \"${2:string}\"$0" }, + { "trigger": "expect.to.throw", "contents": "expect(${1:value}).to.throw ${2:error}$0" }, + { "trigger": "expect.to.not.throw", "contents": "expect(${1:value}).to.not.throw ${2:error}$0" }, + { "trigger": "expect.to.respondTo", "contents": "expect(${1:value}).to.respondTo ${2:string}$0" }, + { "trigger": "expect.to.satisfy", "contents": "expect(${1:value}).to.satisfy ${2:function}$0" }, + { "trigger": "expect.to.be.closeTo", "contents": "expect(${1:value}).to.be.closeTo ${2:expected}, ${3:delta}$0" } + ] +} \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Chai Completions/coffee/completions/should-chai-coffee.sublime-completions b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Chai Completions/coffee/completions/should-chai-coffee.sublime-completions new file mode 100644 index 0000000..7d036b8 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Chai Completions/coffee/completions/should-chai-coffee.sublime-completions @@ -0,0 +1,56 @@ +{ + "scope": "source.coffee", + "version": "0.10", + "completions": + [ + { "trigger": "should", "contents": "should.$0" }, + { "trigger": "should.be.a", "contents": "should.be.a \"${1:type}\"$0" }, + { "trigger": "should.be.an", "contents": "should.be.an \"${1:type}\"$0" }, + { "trigger": "should.be.an.instanceof", "contents": "should.be.an.instanceof ${1:object}$0" }, + { "trigger": "should.include", "contents": "should.include ${1:value}$0" }, + { "trigger": "should.contain", "contents": "should.contain \"${1:string}\"$0" }, + { "trigger": "should.include.keys", "contents": "should.include.keys \"${1:string}\"$0" }, + { "trigger": "should.be.ok", "contents": "should.be.ok$0" }, + { "trigger": "should.not.be.ok", "contents": "should.not.be.ok$0" }, + { "trigger": "should.be.true", "contents": "should.be.true$0" }, + { "trigger": "should.not.be.true", "contents": "should.not.be.true$0" }, + { "trigger": "should.be.false", "contents": "should.be.false$0" }, + { "trigger": "should.not.be.false", "contents": "should.not.be.false$0" }, + { "trigger": "should.be.null", "contents": "should.be.null$0" }, + { "trigger": "should.not.be.null", "contents": "should.not.be.null$0" }, + { "trigger": "should.be.undefined", "contents": "should.be.undefined$0" }, + { "trigger": "should.not.be.undefined", "contents": "should.not.be.undefined$0" }, + { "trigger": "should.exist", "contents": "should.exist$0" }, + { "trigger": "should.not.exist", "contents": "should.not.exist$0" }, + { "trigger": "should.be.empty", "contents": "should.be.empty$0" }, + { "trigger": "should.not.be.empty", "contents": "should.not.be.empty$0" }, + { "trigger": "should.be.arguments", "contents": "should.be.arguments ${1:value}$0" }, + { "trigger": "should.equal", "contents": "should.equal ${1:value}$0" }, + { "trigger": "should.not.equal", "contents": "should.not.equal ${1:value}$0" }, + { "trigger": "should.eql", "contents": "should.eql ${1:value}$0" }, + { "trigger": "should.not.eql", "contents": "should.not.eql ${1:value}$0" }, + { "trigger": "should.be.above", "contents": "should.be.above ${1:value}$0" }, + { "trigger": "should.have.length.above", "contents": "should.have.length.above ${1:value}$0" }, + { "trigger": "should.be.at.least", "contents": "should.be.at.least ${1:value}$0" }, + { "trigger": "should.be.below", "contents": "should.be.below ${1:value}$0" }, + { "trigger": "should.be.at.most", "contents": "should.be.at.most ${1:value}$0" }, + { "trigger": "should.have.length.of.at.most", "contents": "should.have.length.of.at.most ${1:value}$0" }, + { "trigger": "should.be.within", "contents": "should.be.within ${1:start}, ${2:finish}$0" }, + { "trigger": "should.have.length.within", "contents": "should.have.length.within ${1:start}, ${2:finish}$0" }, + { "trigger": "should.have.property", "contents": "should.have.property \"${1:value}\"$0" }, + { "trigger": "should.have.deep.property", "contents": "should.have.deep.property \"${1:value}\"$0" }, + { "trigger": "should.have.ownProperty", "contents": "should.have.ownProperty \"${1:value}\"$0" }, + { "trigger": "should.have.length", "contents": "should.have.length ${1:value}$0" }, + { "trigger": "should.have.length.above", "contents": "should.have.length.above ${1:value}$0" }, + { "trigger": "should.have.length.below", "contents": "should.have.length.below ${1:value}$0" }, + { "trigger": "should.have.length.within", "contents": "should.have.length.within ${1:start}, ${2:finish}$0" }, + { "trigger": "should.match", "contents": "should.match /${1:regex}/$0" }, + { "trigger": "should.have.string", "contents": "should.have.string \"${1:string}\"$0" }, + { "trigger": "should.have.keys", "contents": "should.have.keys \"${1:string}\"$0" }, + { "trigger": "should.throw", "contents": "should.throw ${1:error}$0" }, + { "trigger": "should.not.throw", "contents": "should.not.throw ${1:error}$0" }, + { "trigger": "should.respondTo", "contents": "should.respondTo ${1:string}$0" }, + { "trigger": "should.satisfy", "contents": "should.satisfy ${1:function}$0" }, + { "trigger": "should.be.closeTo", "contents": "should.be.closeTo ${1:expected}, ${2:delta}$0" } + ] +} \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Chai Completions/js/blocks/after.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Chai Completions/js/blocks/after.sublime-snippet new file mode 100644 index 0000000..9de0c4c --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Chai Completions/js/blocks/after.sublime-snippet @@ -0,0 +1,13 @@ + + + + after + + source.js + + After + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Chai Completions/js/blocks/aftereach.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Chai Completions/js/blocks/aftereach.sublime-snippet new file mode 100644 index 0000000..eed95b5 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Chai Completions/js/blocks/aftereach.sublime-snippet @@ -0,0 +1,13 @@ + + + + aftereach + + source.js + + After Each + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Chai Completions/js/blocks/before.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Chai Completions/js/blocks/before.sublime-snippet new file mode 100644 index 0000000..341fb8b --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Chai Completions/js/blocks/before.sublime-snippet @@ -0,0 +1,13 @@ + + + + before + + source.js + + Before + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Chai Completions/js/blocks/beforeeach.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Chai Completions/js/blocks/beforeeach.sublime-snippet new file mode 100644 index 0000000..1d00262 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Chai Completions/js/blocks/beforeeach.sublime-snippet @@ -0,0 +1,13 @@ + + + + beforeeach + + source.js + + Before Each + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Chai Completions/js/blocks/describe.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Chai Completions/js/blocks/describe.sublime-snippet new file mode 100644 index 0000000..a514380 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Chai Completions/js/blocks/describe.sublime-snippet @@ -0,0 +1,13 @@ + + + + describe + + source.js + + Describe + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Chai Completions/js/blocks/it.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Chai Completions/js/blocks/it.sublime-snippet new file mode 100644 index 0000000..56468f7 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Chai Completions/js/blocks/it.sublime-snippet @@ -0,0 +1,13 @@ + + + + it + + source.js + + It + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Chai Completions/js/completions/assert-chai-coffee.sublime-completions b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Chai Completions/js/completions/assert-chai-coffee.sublime-completions new file mode 100644 index 0000000..a35a5f0 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Chai Completions/js/completions/assert-chai-coffee.sublime-completions @@ -0,0 +1,54 @@ +{ + "scope": "source.js", + "version": "0.10", + "completions": + [ + { "trigger": "assert", "contents": "assert(${1:expression}${2:, \"${3:[message]}\"});$0"}, + { "trigger": "assert.fail", "contents": "assert.fail(${1:actual}, ${2:expected}${3:, \"${4:[message]}\", ${5:[operator]}});$0"}, + { "trigger": "assert.ok", "contents": "assert.ok(${1:object}${2:, \"${3:[message]}\"});$0"}, + { "trigger": "assert.equal", "contents": "assert.equal(${1:actual}, ${2:expected}${3:, \"${4:[message]}\"});$0"}, + { "trigger": "assert.notEqual", "contents": "assert.notEqual(${1:actual}, ${2:expected}${3:, \"${3:[message]}\"});$0"}, + { "trigger": "assert.strictEqual", "contents": "assert.strictEqual(${1:actual}, ${2:expected}${3:, \"${4:[message]}\"});$0"}, + { "trigger": "assert.notStrictEqual", "contents": "assert.notStrictEqual(${1:actual}, ${2:expected}${3:, \"${4:[message]}\"});$0"}, + { "trigger": "assert.deepEqual", "contents": "assert.deepEqual(${1:actual}, ${2:expected}${3:, \"${4:[message]}\"});$0"}, + { "trigger": "assert.notDeepEqual", "contents": "assert.notDeepEqual(${1:actual}, ${2:expected}${3:, \"${3:[message]}\"});$0"}, + { "trigger": "assert.isTrue", "contents": "assert.isTrue(${1:value}${2:, \"${3:[message]}\"});$0"}, + { "trigger": "assert.isFalse", "contents": "assert.isFalse(${1:value}${2:, \"${3:[message]}\"});$0"}, + { "trigger": "assert.isNull", "contents": "assert.isNull(${1:value}${2:, \"${3:[message]}\"});$0"}, + { "trigger": "assert.isNotNull", "contents": "assert.isNotNull(${1:value}${2:, \"${3:[message]}\"});$0"}, + { "trigger": "assert.isUndefined", "contents": "assert.isUndefined(${1:value}${2:, \"${3:[message]}\"});$0"}, + { "trigger": "assert.isDefined", "contents": "assert.isDefined(${1:value}${2:, \"${3:[message]}\"});$0"}, + { "trigger": "assert.isFunction", "contents": "assert.isFunction(${1:value}${2:, \"${3:[message]}\"});$0"}, + { "trigger": "assert.isNotFunction", "contents": "assert.isNotFunction(${1:value}${2:, \"${3:[message]}\"});$0"}, + { "trigger": "assert.isObject", "contents": "assert.isObject(${1:value}${2:, \"${3:[message]}\"});$0"}, + { "trigger": "assert.isNotObject", "contents": "assert.isNotObject(${1:value}${2:, \"${3:[message]}\"});$0"}, + { "trigger": "assert.isArray", "contents": "assert.isArray(${1:value}${2:, \"${3:[message]}\"});$0"}, + { "trigger": "assert.isNotArray", "contents": "assert.isNotArray(${1:value}${2:, \"${3:[message]}\"});$0"}, + { "trigger": "assert.isString", "contents": "assert.isString(${1:value}${2:, \"${3:[message]}\"});$0"}, + { "trigger": "assert.isNotString", "contents": "assert.isNotString(${1:value}${2:, \"${3:[message]}\"});$0"}, + { "trigger": "assert.isNumber", "contents": "assert.isNumber(${1:value}${2:, \"${3:[message]}\"});$0"}, + { "trigger": "assert.isNotNumber", "contents": "assert.isNotNumber(${1:value}${2:, \"${3:[message]}\"});$0"}, + { "trigger": "assert.isBoolean", "contents": "assert.isBoolean(${1:value}${2:, \"${3:[message]}\"});$0"}, + { "trigger": "assert.isNotBoolean", "contents": "assert.isNotBoolean(${1:value}${2:, \"${3:[message]}\"});$0"}, + { "trigger": "assert.typeOf", "contents": "assert.typeOf(${1:value}, ${2:name}${3:, \"${4:[message]}\"});$0"}, + { "trigger": "assert.notTypeOf", "contents": "assert.notTypeOf(${1:value}, ${2:name}${3:, \"${4:[message]}\"});$0"}, + { "trigger": "assert.instanceOf", "contents": "assert.instanceOf(${1:object}, ${2:constructor}${3:, \"${4:[message]}\"});$0"}, + { "trigger": "assert.notInstanceOf", "contents": "assert.notInstanceOf(${1:object}, ${2:constructor}${3:, \"${4:[message]}\"});$0"}, + { "trigger": "assert.include", "contents": "assert.include(${1:haystack}, ${2:needle}${3:, \"${4:[message]}\"});$0"}, + { "trigger": "assert.match", "contents": "assert.match(${1:value}, ${2:regexp}${3:, \"${4:[message]}\"});$0"}, + { "trigger": "assert.notMatch", "contents": "assert.notMatch(${1:value}, ${2:regexp}${3:, \"${4:[message]}\"});$0"}, + { "trigger": "assert.property", "contents": "assert.property(${1:object}, ${2:property}${3:, \"${4:[message]}\"});$0"}, + { "trigger": "assert.notProperty", "contents": "assert.notProperty(${1:object}, ${2:property}${3:, \"${4:[message]}\"});$0"}, + { "trigger": "assert.deepProperty", "contents": "assert.deepProperty(${1:object}, ${2:property}${3:, \"${4:[message]}\"});$0"}, + { "trigger": "assert.notDeepProperty", "contents": "assert.notDeepProperty(${1:object}, ${2:property}${3:, \"${4:[message]}\"});$0"}, + { "trigger": "assert.propertyVal", "contents": "assert.notDeepProperty(${1:object}, ${2:property}, ${3:value}${4:, \"${5:[message]}\"});$0"}, + { "trigger": "assert.propertyNotVal", "contents": "assert.propertyNotVal(${1:object}, ${2:property} ${3:value}${4:, \"${5:[message]}\"});$0"}, + { "trigger": "assert.deepPropertyVal", "contents": "assert.deepPropertyVal(${1:object}, ${2:property} ${3:value}${4:, \"${5:[message]}\"});$0"}, + { "trigger": "assert.deepPropertyNotVal", "contents": "assert.deepPropertyNotVal(${1:object}, ${2:property}, ${3:value}${4:, \"${5:[message]}\"});$0"}, + { "trigger": "assert.lengthOf", "contents": "assert.lengthOf(${1:object}, ${2:length}${3:, \"${4:[message]}\"});$0"}, + { "trigger": "assert.throws", "contents": "assert.throws(${1:function}, ${2:constructor/regexp}${3:, \"${4:[message]}\"});$0"}, + { "trigger": "assert.doesNotThrow", "contents": "assert.doesNotThrow(${1:function}, ${2:constructor/regexp}${3:, \"${4:[message]}\"});$0"}, + { "trigger": "assert.operator", "contents": "assert.operator(${1:val1}, ${2:operator}, ${3:val2}${4:, \"${5:[message]}\"});$0"}, + { "trigger": "assert.closeTo", "contents": "assert.closeTo(${1:actual}, ${2:expected}, ${3:delta}${4:, \"${5:[message]}\"}$0" } + ] +} \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Chai Completions/js/completions/expect-chai-coffee.sublime-completions b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Chai Completions/js/completions/expect-chai-coffee.sublime-completions new file mode 100644 index 0000000..7020c48 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Chai Completions/js/completions/expect-chai-coffee.sublime-completions @@ -0,0 +1,56 @@ +{ + "scope": "source.js", + "version": "0.10", + "completions": + [ + { "trigger": "expect", "contents": "expect(${1:value}).to.;$0"}, + { "trigger": "expect.to.be.a", "contents": "expect(${1:value}).to.be.a(\"${2:type}\");$0"}, + { "trigger": "expect.to.be.an", "contents": "expect(${1:value}).to.be.an(\"${2:type}\");$0"}, + { "trigger": "expect.to.be.an.instanceof", "contents": "expect(${1:value}).to.be.an.instanceof(${2:object});$0"}, + { "trigger": "expect.to.include", "contents": "expect(${1:value}).to.include(${2:value});$0"}, + { "trigger": "expect.to.contain", "contents": "expect(${1:value}).to.contain(\"${2:string}\");$0"}, + { "trigger": "expect.to.include.keys", "contents": "expect(${1:value}).to.include.keys(\"${2:string}\");$0"}, + { "trigger": "expect.to.be.ok", "contents": "expect(${1:value}).to.be.ok;$0"}, + { "trigger": "expect.to.not.be.ok", "contents": "expect(${1:value}).to.not.be.ok;$0"}, + { "trigger": "expect.to.be.true", "contents": "expect(${1:value}).to.be.true;$0"}, + { "trigger": "expect.to.not.be.true", "contents": "expect(${1:value}).to.not.be.true;$0"}, + { "trigger": "expect.to.be.false", "contents": "expect(${1:value}).to.be.false;$0"}, + { "trigger": "expect.to.not.be.false", "contents": "expect(${1:value}).to.not.be.false;$0"}, + { "trigger": "expect.to.be.null", "contents": "expect(${1:value}).to.be.null;$0"}, + { "trigger": "expect.to.not.be.null", "contents": "expect(${1:value}).to.not.be.null;$0"}, + { "trigger": "expect.to.be.undefined", "contents": "expect(${1:value}).to.be.undefined;$0"}, + { "trigger": "expect.to.not.be.undefined", "contents": "expect(${1:value}).to.not.be.undefined;$0"}, + { "trigger": "expect.to.exist", "contents": "expect(${1:value}).to.exist;$0"}, + { "trigger": "expect.to.not.exist", "contents": "expect(${1:value}).to.not.exist;$0"}, + { "trigger": "expect.to.be.empty", "contents": "expect(${1:value}).to.be.empty;$0"}, + { "trigger": "expect.to.not.be.empty", "contents": "expect(${1:value}).to.not.be.empty;$0"}, + { "trigger": "expect.to.be.arguments", "contents": "expect(${1:value}).to.be.arguments(${2:value});$0"}, + { "trigger": "expect.to.equal", "contents": "expect(${1:value}).to.equal(${2:value});$0"}, + { "trigger": "expect.to.not.equal", "contents": "expect(${1:value}).to.not.equal(${2:value});$0"}, + { "trigger": "expect.to.eql", "contents": "expect(${1:value}).to.eql(${2:value});$0"}, + { "trigger": "expect.to.not.eql", "contents": "expect(${1:value}).to.not.eql(${2:value});$0"}, + { "trigger": "expect.to.be.above", "contents": "expect(${1:value}).to.be.above(${2:value});$0"}, + { "trigger": "expect.to.have.length.above", "contents": "expect(${1:value}).to.have.length.above(${2:value});$0"}, + { "trigger": "expect.to.be.at.least", "contents": "expect(${1:value}).to.be.at.least(${2:value});$0"}, + { "trigger": "expect.to.be.below", "contents": "expect(${1:value}).to.be.below(${2:value});$0"}, + { "trigger": "expect.to.be.at.most", "contents": "expect(${1:value}).to.be.at.most(${2:value});$0"}, + { "trigger": "expect.to.have.length.of.at.most", "contents": "expect(${1:value}).to.have.length.of.at.most(${2:value});$0"}, + { "trigger": "expect.to.be.within", "contents": "expect(${1:value}).to.be.within(${2:start}, ${3:finish});$0"}, + { "trigger": "expect.to.have.length.within", "contents": "expect(${1:value}).to.have.length.within(${2:start}, ${3:finish});$0"}, + { "trigger": "expect.to.have.property", "contents": "expect(${1:value}).to.have.property(\"${2:value}\");$0"}, + { "trigger": "expect.to.have.deep.property", "contents": "expect(${1:value}).to.have.deep.property(\"${2:value}\");$0"}, + { "trigger": "expect.to.have.ownProperty", "contents": "expect(${1:value}).to.have.ownProperty(\"${2:value}\");$0"}, + { "trigger": "expect.to.have.length", "contents": "expect(${1:value}).to.have.length(${2:value});$0"}, + { "trigger": "expect.to.have.length.above", "contents": "expect(${1:value}).to.have.length.above(${2:value});$0"}, + { "trigger": "expect.to.have.length.below", "contents": "expect(${1:value}).to.have.length.below(${2:value});$0"}, + { "trigger": "expect.to.have.length.within", "contents": "expect(${1:value}).to.have.length.within(${2:start}, ${3:finish});$0"}, + { "trigger": "expect.to.match", "contents": "expect(${1:value}).to.match(/${2:regex}/);$0"}, + { "trigger": "expect.to.have.string", "contents": "expect(${1:value}).to.have.string(\"${2:string}\");$0"}, + { "trigger": "expect.to.have.keys", "contents": "expect(${1:value}).to.have.keys(\"${2:string}\");$0"}, + { "trigger": "expect.to.throw", "contents": "expect(${1:value}).to.throw(${2:error});$0"}, + { "trigger": "expect.to.not.throw", "contents": "expect(${1:value}).to.not.throw(${2:error});$0"}, + { "trigger": "expect.to.respondTo", "contents": "expect(${1:value}).to.respondTo(${2:string});$0"}, + { "trigger": "expect.to.satisfy", "contents": "expect(${1:value}).to.satisfy(${2:function});$0"}, + { "trigger": "expect.to.be.closeTo", "contents": "expect(${1:value}).to.be.closeTo(${2:expected}, ${3:delta});$0"} + ] +} \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Chai Completions/js/completions/should-chai-coffee.sublime-completions b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Chai Completions/js/completions/should-chai-coffee.sublime-completions new file mode 100644 index 0000000..d08ccaa --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Chai Completions/js/completions/should-chai-coffee.sublime-completions @@ -0,0 +1,56 @@ +{ + "scope": "source.js", + "version": "0.10", + "completions": + [ + { "trigger": "should", "contents": "should.$0"}, + { "trigger": "should.be.a", "contents": "should.be.a(\"${1:type}\");$0"}, + { "trigger": "should.be.an", "contents": "should.be.an(\"${1:type}\");$0"}, + { "trigger": "should.be.an.instanceof", "contents": "should.be.an.instanceof(${1:object});$0"}, + { "trigger": "should.include", "contents": "should.include(${1:value});$0"}, + { "trigger": "should.contain", "contents": "should.contain(\"${1:string}\");$0"}, + { "trigger": "should.include.keys", "contents": "should.include.keys(\"${1:string}\");$0"}, + { "trigger": "should.be.ok", "contents": "should.be.ok;$0"}, + { "trigger": "should.not.be.ok", "contents": "should.not.be.ok;$0"}, + { "trigger": "should.be.true", "contents": "should.be.true;$0"}, + { "trigger": "should.not.be.true", "contents": "should.not.be.true;$0"}, + { "trigger": "should.be.false", "contents": "should.be.false;$0"}, + { "trigger": "should.not.be.false", "contents": "should.not.be.false;$0"}, + { "trigger": "should.be.null", "contents": "should.be.null;$0"}, + { "trigger": "should.not.be.null", "contents": "should.not.be.null;$0"}, + { "trigger": "should.be.undefined", "contents": "should.be.undefined;$0"}, + { "trigger": "should.not.be.undefined", "contents": "should.not.be.undefined;$0"}, + { "trigger": "should.exist", "contents": "should.exist;$0"}, + { "trigger": "should.not.exist", "contents": "should.not.exist;$0"}, + { "trigger": "should.be.empty", "contents": "should.be.empty;$0"}, + { "trigger": "should.not.be.empty", "contents": "should.not.be.empty;$0"}, + { "trigger": "should.be.arguments", "contents": "should.be.arguments(${1:value}$0"}, + { "trigger": "should.equal", "contents": "should.equal(${1:value});$0"}, + { "trigger": "should.not.equal", "contents": "should.not.equal(${1:value});$0"}, + { "trigger": "should.eql", "contents": "should.eql(${1:value});$0"}, + { "trigger": "should.not.eql", "contents": "should.not.eql(${1:value});$0"}, + { "trigger": "should.be.above", "contents": "should.be.above(${1:value});$0"}, + { "trigger": "should.have.length.above", "contents": "should.have.length.above(${1:value});$0"}, + { "trigger": "should.be.at.least", "contents": "should.be.at.least(${1:value});$0"}, + { "trigger": "should.be.below", "contents": "should.be.below(${1:value});$0"}, + { "trigger": "should.be.at.most", "contents": "should.be.at.most(${1:value});$0"}, + { "trigger": "should.have.length.of.at.most", "contents": "should.have.length.of.at.most(${1:value});$0"}, + { "trigger": "should.be.within", "contents": "should.be.within(${1:start}, ${2:finish});$0"}, + { "trigger": "should.have.length.within", "contents": "should.have.length.within(${1:start}, ${2:finish});$0"}, + { "trigger": "should.have.property", "contents": "should.have.property(\"${1:value}\");$0"}, + { "trigger": "should.have.deep.property", "contents": "should.have.deep.property(\"${1:value}\");$0"}, + { "trigger": "should.have.ownProperty", "contents": "should.have.ownProperty(\"${1:value}\");$0"}, + { "trigger": "should.have.length", "contents": "should.have.length(${1:value});$0"}, + { "trigger": "should.have.length.above", "contents": "should.have.length.above(${1:value});$0"}, + { "trigger": "should.have.length.below", "contents": "should.have.length.below(${1:value});$0"}, + { "trigger": "should.have.length.within", "contents": "should.have.length.within(${1:start}, ${2:finish});$0"}, + { "trigger": "should.match", "contents": "should.match(/${1:regex}/);$0"}, + { "trigger": "should.have.string", "contents": "should.have.string(\"${1:string}\");$0"}, + { "trigger": "should.have.keys", "contents": "should.have.keys(\"${1:string}\");$0"}, + { "trigger": "should.throw", "contents": "should.throw(${1:error});$0"}, + { "trigger": "should.not.throw", "contents": "should.not.throw(${1:error});$0"}, + { "trigger": "should.respondTo", "contents": "should.respondTo(${1:string});$0"}, + { "trigger": "should.satisfy", "contents": "should.satisfy(${1:function});$0"}, + { "trigger": "should.be.closeTo", "contents": "should.be.closeTo(${1:expected}, ${2:delta});$0"} + ] +} \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Chai Completions/package-metadata.json b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Chai Completions/package-metadata.json new file mode 100644 index 0000000..77fd6b1 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Chai Completions/package-metadata.json @@ -0,0 +1 @@ +{"url": "https://github.com/pensive612/sublime-chai-full-completions", "version": "2013.02.01.13.38.42", "description": "Full completions for Chai Library: should, expect and assert syntax. Works with Javascript and CoffeeScript."} \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/CoffeeComplete Plus (Autocompletion)/.gitignore b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/CoffeeComplete Plus (Autocompletion)/.gitignore new file mode 100644 index 0000000..0d20b64 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/CoffeeComplete Plus (Autocompletion)/.gitignore @@ -0,0 +1 @@ +*.pyc diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/CoffeeComplete Plus (Autocompletion)/CoffeeAutocomplete.py b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/CoffeeComplete Plus (Autocompletion)/CoffeeAutocomplete.py new file mode 100644 index 0000000..7b5ae97 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/CoffeeComplete Plus (Autocompletion)/CoffeeAutocomplete.py @@ -0,0 +1,236 @@ +import sublime, sublime_plugin +import re +import os +import threading +import coffee_utils +from coffee_utils import debug +from copy import copy + +COFFEESCRIPT_AUTOCOMPLETE_STATUS_KEY = "coffee_autocomplete" +COFFEESCRIPT_AUTOCOMPLETE_STATUS_MESSAGE = "Coffee: Autocompleting \"%s\"..." + +final_completions = [] +status = {"working": False} + +# TODO: +# - Type hinting using comments containing square brackets [Type] on same line or previous line +# - Codo docs searching for function parameter types +# - Better symbol parsing. Assignment lookups should consider the entire set of operands. +# X Consider all super classes (support extends) +# - Consider another feature: Override/implement methods +# - Full assignment traceback (that = this, a = b = c, knows what c is) +# - Check contents of currently open views +# - Built in types + +class CoffeeAutocomplete(sublime_plugin.EventListener): + + def on_query_completions(self, view, prefix, locations): + + completions = copy(final_completions) + working = status["working"] + + # If there is a word selection and we're looking at a coffee file... + if not completions and coffee_utils.is_coffee_syntax(view) and not working: + + status["working"] = True + + current_location = locations[0] + + # Get the window + self.window = sublime.active_window() + + # http://www.sublimetext.com/forum/viewtopic.php?f=6&t=9076 + settings = sublime.load_settings(coffee_utils.SETTINGS_FILE_NAME) + + built_in_types_settings = sublime.load_settings(coffee_utils.BUILT_IN_TYPES_SETTINGS_FILE_NAME) + built_in_types = built_in_types_settings.get(coffee_utils.BUILT_IN_TYPES_SETTINGS_KEY) + if not built_in_types: + built_in_types = [] + + custom_types_settings = sublime.load_settings(coffee_utils.CUSTOM_TYPES_SETTINGS_FILE_NAME) + custom_types = custom_types_settings.get(coffee_utils.CUSTOM_TYPES_SETTINGS_KEY) + if not custom_types: + custom_types = [] + + built_in_types.extend(custom_types) + + # Pull the excluded dirs from preferences + excluded_dirs = settings.get(coffee_utils.PREFERENCES_COFFEE_EXCLUDED_DIRS) + if not excluded_dirs: + excluded_dirs = [] + + restricted_to_dirs = settings.get(coffee_utils.PREFERENCES_COFFEE_RESTRICTED_TO_PATHS) + if not restricted_to_dirs: + restricted_to_dirs = [] + + # List of all project folders + project_folder_list = self.window.folders() + + if restricted_to_dirs: + specific_project_folders = [] + for next_restricted_dir in restricted_to_dirs: + for next_project_folder in project_folder_list: + next_specific_folder = os.path.normpath(os.path.join(next_project_folder, next_restricted_dir)) + specific_project_folders.append(next_specific_folder) + project_folder_list = specific_project_folders + + function_return_types = settings.get(coffee_utils.FUNCTION_RETURN_TYPES_SETTINGS_KEY) + if not function_return_types: + function_return_types = [] + + this_aliases = settings.get(coffee_utils.PREFERENCES_THIS_ALIASES) + if not this_aliases: + this_aliases = [] + + member_exclusion_regexes = settings.get(coffee_utils.PREFERENCES_MEMBER_EXCLUSION_REGEXES) + if not member_exclusion_regexes: + member_exclusion_regexes = [] + + # Lines for the current file in view + current_file_lines = coffee_utils.get_view_content_lines(view) + + # TODO: Smarter previous word selection + preceding_symbol = coffee_utils.get_preceding_symbol(view, prefix, locations) + immediately_preceding_symbol = coffee_utils.get_preceding_symbol(view, "", locations) + + preceding_function_call = coffee_utils.get_preceding_function_call(view).strip() + + # Determine preceding token, if any (if a period was typed). + token = coffee_utils.get_preceding_token(view).strip() + + # TODO: Smarter region location + symbol_region = sublime.Region(locations[0] - len(prefix), locations[0] - len(prefix)) + + if (preceding_function_call or token or coffee_utils.THIS_SUGAR_SYMBOL == preceding_symbol) and coffee_utils.is_autocomplete_trigger(immediately_preceding_symbol): + self.window.active_view().run_command('hide_auto_complete') + + thread = CoffeeAutocompleteThread(project_folder_list, excluded_dirs, this_aliases, current_file_lines, preceding_symbol, prefix, preceding_function_call, function_return_types, token, symbol_region, built_in_types, member_exclusion_regexes) + thread.start() + self.check_operation(thread, final_completions, current_location, token, status) + else: + status["working"] = False + + elif completions: + self.clear_completions(final_completions) + + return completions + + def check_operation(self, thread, final_completions, current_location, token, status, previous_progress_indicator_tuple=None): + + if not thread.is_alive(): + if thread.completions: + final_completions.extend(thread.completions) + # Hide the default auto-complete and show ours + self.window.active_view().run_command('hide_auto_complete') + sublime.set_timeout(lambda: self.window.active_view().run_command('auto_complete'), 1) + + self.window.active_view().erase_status(COFFEESCRIPT_AUTOCOMPLETE_STATUS_KEY) + status["working"] = False + else: + token = thread.token + # Create the command's goto definition text, including the selected word. For the status bar. + status_text = COFFEESCRIPT_AUTOCOMPLETE_STATUS_MESSAGE % token + # Get a tuple containing the progress text, progress position, and progress direction. + # This is used to animate a progress indicator in the status bar. + current_progress_indicator_tuple = coffee_utils.get_progress_indicator_tuple(previous_progress_indicator_tuple) + # Get the progress text + progress_indicator_status_text = current_progress_indicator_tuple[0] + # Set the status bar text so the user knows what's going on + self.window.active_view().set_status(COFFEESCRIPT_AUTOCOMPLETE_STATUS_KEY, status_text + " " + progress_indicator_status_text) + # Check again momentarily to see if the operation has completed. + sublime.set_timeout(lambda: self.check_operation(thread, final_completions, current_location, token, status, current_progress_indicator_tuple), 100) + + def clear_completions(self, final_completions): + debug("Clearing completions...") + while len(final_completions) > 0: + final_completions.pop() + +class CoffeeAutocompleteThread(threading.Thread): + + def __init__(self, project_folder_list, excluded_dirs, this_aliases, current_file_lines, preceding_symbol, prefix, preceding_function_call, function_return_types, token, symbol_region, built_in_types, member_exclusion_regexes): + + self.project_folder_list = project_folder_list + self.excluded_dirs = excluded_dirs + self.this_aliases = this_aliases + self.current_file_lines = current_file_lines + self.preceding_symbol = preceding_symbol + self.prefix = prefix + self.preceding_function_call = preceding_function_call + self.function_return_types = function_return_types + self.token = token + self.symbol_region = symbol_region + self.built_in_types = built_in_types + self.member_exclusion_regexes = member_exclusion_regexes + + # None if no completions found, or an array of the completion tuples + self.completions = None + threading.Thread.__init__(self) + + def run(self): + + project_folder_list = self.project_folder_list + excluded_dirs = self.excluded_dirs + this_aliases = self.this_aliases + current_file_lines = self.current_file_lines + preceding_symbol = self.preceding_symbol + prefix = self.prefix + preceding_function_call = self.preceding_function_call + function_return_types = self.function_return_types + token = self.token + symbol_region = self.symbol_region + built_in_types = self.built_in_types + member_exclusion_regexes = self.member_exclusion_regexes + + selected_word = token[token.rfind(".") + 1:] + + completions = [] + + # First see if it is a special function return definition, like $ for $("#selector") + if preceding_function_call: + for next_return_type in function_return_types: + function_names = next_return_type[coffee_utils.FUNCTION_RETURN_TYPE_FUNCTION_NAMES_KEY] + if preceding_function_call in function_names: + return_type = next_return_type[coffee_utils.FUNCTION_RETURN_TYPE_TYPE_NAME_KEY] + completions = coffee_utils.get_completions_for_class(return_type, False, None, prefix, None, built_in_types, member_exclusion_regexes, False) + + if not completions: + # Prepare to search globally if we need to... + # Coffeescript filename regex + coffeescript_filename_regex = coffee_utils.COFFEE_FILENAME_REGEX + # All coffeescript file paths + all_coffee_file_paths = coffee_utils.get_files_in(project_folder_list, coffeescript_filename_regex, excluded_dirs) + + # If @ typed, process as "this." + if preceding_symbol == coffee_utils.THIS_SUGAR_SYMBOL: + # Process as "this." + this_type = coffee_utils.get_this_type(current_file_lines, symbol_region) + if this_type: + completions = coffee_utils.get_completions_for_class(this_type, False, current_file_lines, prefix, all_coffee_file_paths, built_in_types, member_exclusion_regexes, True) + pass + elif preceding_symbol == coffee_utils.PERIOD_OPERATOR: + # If "this" or a substitute for it, process as "this." + if selected_word == coffee_utils.THIS_KEYWORD or selected_word in this_aliases: + # Process as "this." + this_type = coffee_utils.get_this_type(current_file_lines, symbol_region) + if this_type: + completions = coffee_utils.get_completions_for_class(this_type, False, current_file_lines, prefix, all_coffee_file_paths, built_in_types, member_exclusion_regexes, True) + else: + # If TitleCase, assume a class, and that we want static properties and functions. + if coffee_utils.is_capitalized(selected_word): + # Assume it is either in the current view or in a coffee file somewhere + completions = coffee_utils.get_completions_for_class(selected_word, True, current_file_lines, prefix, all_coffee_file_paths, built_in_types, member_exclusion_regexes, False) + if not completions: + # Now we search globally... + completions = coffee_utils.get_completions_for_class(selected_word, True, None, prefix, all_coffee_file_paths, built_in_types, member_exclusion_regexes, False) + + # If nothing yet, assume a variable. + if not completions: + variable_type = coffee_utils.get_variable_type(current_file_lines, token, symbol_region, all_coffee_file_paths, built_in_types, []) + if variable_type: + # Assume it is either in the current view or in a coffee file somewhere + completions = coffee_utils.get_completions_for_class(variable_type, False, current_file_lines, prefix, all_coffee_file_paths, built_in_types, member_exclusion_regexes, False) + if not completions: + # Now we search globally for a class... Maybe they're making a static call on something lowercase? Bad design, but check anyways. + completions = coffee_utils.get_completions_for_class(selected_word, True, None, prefix, all_coffee_file_paths, built_in_types, member_exclusion_regexes, False) + if completions: + self.completions = completions \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/CoffeeComplete Plus (Autocompletion)/CoffeeComplete Plus Built-In Types.sublime-settings b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/CoffeeComplete Plus (Autocompletion)/CoffeeComplete Plus Built-In Types.sublime-settings new file mode 100644 index 0000000..8e5e73f --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/CoffeeComplete Plus (Autocompletion)/CoffeeComplete Plus Built-In Types.sublime-settings @@ -0,0 +1,337 @@ +{ + "coffee_autocomplete_plus_built_in_types": + [ + { + "name": "Array", + "enabled": true, + "constructors": [], + "static_properties": [], + "static_methods": + [ + {"name":"isArray", "args": [{"name": "obj"}]} + ], + "instance_properties": + [ + {"name": "length"} + ], + "instance_methods": + [ + {"name":"concat", "args": [{"name": "vals…"}]}, + {"name":"every", "args": [{"name": "cb()", "insertion": "(val, index, arr) ->"}]}, + {"name":"every", "args": [{"name": "cb()", "insertion": "(val, index, arr) ->"}, {"name": "thisArg"}]}, + {"name":"filter", "args": [{"name": "cb()", "insertion": "(val, index, arr) ->"}]}, + {"name":"filter", "args": [{"name": "cb()", "insertion": "(val, index, arr) ->"}, {"name": "thisArg"}]}, + {"name":"forEach", "args": [{"name": "cb()", "insertion": "(val, index, arr) ->"}]}, + {"name":"forEach", "args": [{"name": "cb()", "insertion": "(val, index, arr) ->"}, {"name": "thisArg"}]}, + {"name":"indexOf", "args": [{"name": "val"}]}, + {"name":"indexOf", "args": [{"name": "val"}, {"name": "start"}]}, + {"name":"join", "args": []}, + {"name":"join", "args": [{"name": "separator"}]}, + {"name":"lastIndexOf", "args": [{"name": "val"}]}, + {"name":"lastIndexOf", "args": [{"name": "val"}, {"name": "start"}]}, + {"name":"map", "args": [{"name": "cb()", "insertion": "(val, index, arr) ->"}]}, + {"name":"map", "args": [{"name": "cb()", "insertion": "(val, index, arr) ->"}, {"name": "thisArg"}]}, + {"name":"pop", "args": []}, + {"name":"push", "args": [{"name": "vals…"}]}, + {"name":"reduce", "args": [{"name": "cb()", "insertion": "(prevVal, curVal, index, arr) ->"}]}, + {"name":"reduce", "args": [{"name": "cb()", "insertion": "(prevVal, curVal, index, arr) ->"}, {"name": "initVal"}]}, + {"name":"reduceRight", "args": [{"name": "cb()", "insertion": "(prevVal, curVal, index, arr) ->"}]}, + {"name":"reduceRight", "args": [{"name": "cb()", "insertion": "(prevVal, curVal, index, arr) ->"}, {"name": "initVal"}]}, + {"name":"reverse", "args": []}, + {"name":"shift", "args": []}, + {"name":"slice", "args": [{"name": "start"}]}, + {"name":"slice", "args": [{"name": "start"}, {"name": "end"}]}, + {"name":"some", "args": [{"name": "cb()", "insertion": "(val, index, arr) ->"}]}, + {"name":"some", "args": [{"name": "cb()", "insertion": "(val, index, arr) ->"}, {"name": "thisArg"}]}, + {"name":"sort", "args": []}, + {"name":"sort", "args": [{"name": "compare()", "insertion": "(a, b) ->"}]}, + {"name":"splice", "args": [{"name": "start"}, {"name": "del"}]}, + {"name":"splice", "args": [{"name": "start"}, {"name": "del"}, {"name": "vals…"}]}, + {"name":"unshift", "args": [{"name": "vals…"}]} + ] + }, + { + "name": "Boolean", + "enabled": true, + "constructors": [], + "static_properties": [], + "static_methods": [], + "instance_properties": [], + "instance_methods": [] + }, + { + "name": "Date", + "enabled": true, + "constructors": [], + "static_properties": [], + "static_methods": + [ + {"name":"now", "args": []}, + {"name":"parse", "args": [{"name": "dateStr"}]}, + {"name":"UTC", "args": [{"name": "year"}, {"name": "month"}]}, + {"name":"UTC", "args": [{"name": "year"}, {"name": "month"}, {"name": "day"}]}, + {"name":"UTC", "args": [{"name": "year"}, {"name": "month"}, {"name": "day"}, {"name": "hrs"}]}, + {"name":"UTC", "args": [{"name": "year"}, {"name": "month"}, {"name": "day"}, {"name": "hrs"}, {"name": "min"}]}, + {"name":"UTC", "args": [{"name": "year"}, {"name": "month"}, {"name": "day"}, {"name": "hrs"}, {"name": "min"}, {"name": "sec"}]}, + {"name":"UTC", "args": [{"name": "year"}, {"name": "month"}, {"name": "day"}, {"name": "hrs"}, {"name": "min"}, {"name": "sec"}, {"name": "ms"}]} + ], + "instance_properties": [], + "instance_methods": + [ + {"name":"getDate", "args": []}, + {"name":"getDay", "args": []}, + {"name":"getFullYear", "args": []}, + {"name":"getHours", "args": []}, + {"name":"getMilliseconds", "args": []}, + {"name":"getMinutes", "args": []}, + {"name":"getMonth", "args": []}, + {"name":"getSeconds", "args": []}, + {"name":"getTime", "args": []}, + {"name":"getTimezoneOffset", "args": []}, + {"name":"getUTCDate", "args": []}, + {"name":"getUTCDay", "args": []}, + {"name":"getUTCFullYear", "args": []}, + {"name":"getUTCHours", "args": []}, + {"name":"getUTCMilliseconds", "args": []}, + {"name":"getUTCMinutes", "args": []}, + {"name":"getUTCMonth", "args": []}, + {"name":"getUTCSeconds", "args": []}, + {"name":"setDate", "args": [{"name": "day"}]}, + {"name":"setFullYear", "args": [{"name": "year"}]}, + {"name":"setFullYear", "args": [{"name": "year"}, {"name": "month"}]}, + {"name":"setFullYear", "args": [{"name": "year"}, {"name": "month"}, {"name": "day"}]}, + {"name":"setHours", "args": [{"name": "hrs"}]}, + {"name":"setHours", "args": [{"name": "hrs"}, {"name": "min"}]}, + {"name":"setHours", "args": [{"name": "hrs"}, {"name": "min"}, {"name": "sec"}]}, + {"name":"setHours", "args": [{"name": "hrs"}, {"name": "min"}, {"name": "sec"}, {"name": "ms"}]}, + {"name":"setMilliseconds", "args": [{"name": "ms"}]}, + {"name":"setMinutes", "args": [{"name": "min"}]}, + {"name":"setMinutes", "args": [{"name": "min"}, {"name": "sec"}]}, + {"name":"setMinutes", "args": [{"name": "min"}, {"name": "sec"}, {"name": "ms"}]}, + {"name":"setMonth", "args": [{"name": "month"}]}, + {"name":"setMonth", "args": [{"name": "month"}, {"name": "day"}]}, + {"name":"setSeconds", "args": [{"name": "sec"}]}, + {"name":"setSeconds", "args": [{"name": "sec"}, {"name": "ms"}]}, + {"name":"setTime", "args": [{"name": "timeVal"}]}, + {"name":"setUTCDate", "args": [{"name": "day"}]}, + {"name":"setUTCFullYear", "args": [{"name": "year"}]}, + {"name":"setUTCFullYear", "args": [{"name": "year"}, {"name": "month"}]}, + {"name":"setUTCFullYear", "args": [{"name": "year"}, {"name": "month"}, {"name": "day"}]}, + {"name":"setUTCHours", "args": [{"name": "hrs"}]}, + {"name":"setUTCHours", "args": [{"name": "hrs"}, {"name": "min"}]}, + {"name":"setUTCHours", "args": [{"name": "hrs"}, {"name": "min"}, {"name": "sec"}]}, + {"name":"setUTCHours", "args": [{"name": "hrs"}, {"name": "min"}, {"name": "sec"}, {"name": "ms"}]}, + {"name":"setUTCMilliseconds", "args": [{"name": "ms"}]}, + {"name":"setUTCMinutes", "args": [{"name": "min"}]}, + {"name":"setUTCMinutes", "args": [{"name": "min"}, {"name": "sec"}]}, + {"name":"setUTCMinutes", "args": [{"name": "min"}, {"name": "sec"}, {"name": "ms"}]}, + {"name":"setUTCMonth", "args": [{"name": "month"}]}, + {"name":"setUTCMonth", "args": [{"name": "month"}, {"name": "day"}]}, + {"name":"setUTCSeconds", "args": [{"name": "sec"}]}, + {"name":"setUTCSeconds", "args": [{"name": "sec"}, {"name": "ms"}]}, + {"name":"toDateString", "args": []}, + {"name":"toISOString", "args": []}, + {"name":"toJSON", "args": []}, + {"name":"toLocaleDateString", "args": []}, + {"name":"toLocaleString", "args": []}, + {"name":"toLocaleTimeString", "args": []}, + {"name":"toTimeString", "args": []}, + {"name":"toUTCString", "args": []} + ] + }, + { + "name": "Function", + "enabled": true, + "constructors": [], + "static_properties": [], + "static_methods": [], + "instance_properties": + [ + {"name": "length"}, + {"name": "prototype"} + ], + "instance_methods": + [ + {"name":"apply", "args": [{"name": "thisArg"}]}, + {"name":"apply", "args": [{"name": "thisArg"}, {"name": "args…"}]}, + {"name":"bind", "args": [{"name": "obj"}]}, + {"name":"bind", "args": [{"name": "obj"}, {"name": "args…"}]}, + {"name":"call", "args": [{"name": "thisArg"}]}, + {"name":"call", "args": [{"name": "thisArg"}, {"name": "args…"}]} + ] + }, + { + "name": "Number", + "enabled": true, + "constructors": [], + "static_properties": + [ + {"name": "MAX_VALUE"}, + {"name": "MIN_VALUE"}, + {"name": "NaN"}, + {"name": "NEGATIVE_INFINITY"}, + {"name": "POSITIVE_INFINITY"} + ], + "static_methods": [], + "instance_properties": [], + "instance_methods": + [ + {"name":"toExponential", "args": []}, + {"name":"toExponential", "args": [{"name": "digits"}]}, + {"name":"toFixed", "args": []}, + {"name":"toFixed", "args": [{"name": "digits"}]}, + {"name":"toPrecision", "args": []}, + {"name":"toPrecision", "args": [{"name": "precision"}]}, + {"name":"toString", "args": []}, + {"name":"toString", "args": [{"name": "radix"}]} + ] + }, + { + "name": "Object", + "enabled": true, + "constructors": [], + "static_properties": [], + "static_methods": + [ + {"name":"create", "args": [{"name": "proto"}]}, + {"name":"create", "args": [{"name": "proto"}, {"name": "propsObj"}]}, + {"name":"defineProperties", "args": [{"name": "obj"}, {"name": "descs"}]}, + {"name":"defineProperty", "args": [{"name": "obj"}, {"name": "prop"}, {"name": "desc"}]}, + {"name":"freeze", "args": [{"name": "obj"}]}, + {"name":"getOwnPropertyDescriptor", "args": [{"name": "obj"}, {"name": "prop"}]}, + {"name":"getOwnPropertyNames", "args": [{"name": "obj"}]}, + {"name":"getPrototypeOf", "args": [{"name": "obj"}]}, + {"name":"isExtensible", "args": [{"name": "obj"}]}, + {"name":"isFrozen", "args": [{"name": "obj"}]}, + {"name":"isSealed", "args": [{"name": "obj"}]}, + {"name":"keys", "args": [{"name": "obj"}]}, + {"name":"preventExtensions", "args": [{"name": "obj"}]}, + {"name":"seal", "args": [{"name": "obj"}]} + ], + "instance_properties": [{"name": "constructor"}], + "instance_methods": + [ + {"name":"hasOwnProperty", "args": [{"name": "prop"}]}, + {"name":"isPrototypeOf", "args": [{"name": "obj"}]}, + {"name":"propertyIsEnumerable", "args": [{"name": "prop"}]}, + {"name":"toLocaleString", "args": []}, + {"name":"toString", "args": []}, + {"name":"valueOf", "args": []} + ] + }, + { + "name": "RegExp", + "enabled": true, + "constructors": [], + "static_properties": [], + "static_methods": [], + "instance_properties": [ + {"name": "global"}, + {"name": "ignoreCase"}, + {"name": "lastIndex"}, + {"name": "multiline"}, + {"name": "source"} + ], + "instance_methods": [ + {"name":"exec", "args": [{"name": "str"}]}, + {"name":"test", "args": [{"name": "str"}]} + ] + }, + { + "name": "String", + "enabled": true, + "constructors": [], + "static_properties": [], + "static_methods": + [ + {"name":"fromCharCode", "args": [{"name": "codes…"}]} + ], + "instance_properties": [{"name": "length"}], + "instance_methods": + [ + {"name":"charAt", "args": [{"name": "index"}]}, + {"name":"charCodeAt", "args": [{"name": "index"}]}, + {"name":"concat", "args": [{"name": "strs…"}]}, + {"name":"indexOf", "args": [{"name": "substr"}]}, + {"name":"indexOf", "args": [{"name": "substr"}, {"name": "start"}]}, + {"name":"lastIndexOf", "args": [{"name": "substr"}]}, + {"name":"lastIndexOf", "args": [{"name": "substr"}, {"name": "start"}]}, + {"name":"localeCompare", "args": [{"name": "target"}]}, + {"name":"match", "args": [{"name": "regexp"}]}, + {"name":"replace", "args": [{"name": "substr"}, {"name": "repl"}]}, + {"name":"replace", "args": [{"name": "substr"}, {"name": "repl()", "insertion": "(match, submatches…, pos, str) ->"}]}, + {"name":"replace", "args": [{"name": "regexp"}, {"name": "repl"}]}, + {"name":"replace", "args": [{"name": "regexp"}, {"name": "repl()", "insertion": "(match, submatches…, pos, str) ->"}]}, + {"name":"search", "args": [{"name": "regexp"}]}, + {"name":"slice", "args": [{"name": "start"}]}, + {"name":"slice", "args": [{"name": "start"}, {"name": "end"}]}, + {"name":"split", "args": []}, + {"name":"split", "args": [{"name": "separator"}]}, + {"name":"split", "args": [{"name": "separator"}, {"name": "limit"}]}, + {"name":"substring", "args": [{"name": "from"}]}, + {"name":"substring", "args": [{"name": "from"}, {"name": "to"}]}, + {"name":"toLocaleLowerCase", "args": []}, + {"name":"toLocaleUpperCase", "args": []}, + {"name":"toLowerCase", "args": []}, + {"name":"toUpperCase", "args": []}, + {"name":"trim", "args": []} + ] + }, + { + "name": "JSON", + "enabled": true, + "constructors": [], + "static_properties": [], + "static_methods": + [ + {"name":"parse", "args": [{"name": "str"}]}, + {"name":"parse", "args": [{"name": "str"}, {"name": "reviver()", "insertion": "(prop, val) ->"}]}, + {"name":"stringify", "args": [{"name": "val"}]}, + {"name":"stringify", "args": [{"name": "val"}, {"name": "filterArr"}]}, + {"name":"stringify", "args": [{"name": "val"}, {"name": "filterArr"}, {"name": "indent"}]}, + {"name":"stringify", "args": [{"name": "val"}, {"name": "filter()", "insertion": "(prop, val) ->"}]}, + {"name":"stringify", "args": [{"name": "val"}, {"name": "filter()", "insertion": "(prop, val) ->"}, {"name": "indent"}]} + ], + "instance_properties": [], + "instance_methods": [] + }, + { + "name": "Math", + "enabled": true, + "constructors": [], + "static_properties": [ + {"name": "E"}, + {"name": "LN10"}, + {"name": "LN2"}, + {"name": "LOG10E"}, + {"name": "LOG2E"}, + {"name": "PI"}, + {"name": "SQRT1_2"}, + {"name": "SQRT2"} + ], + "static_methods": + [ + {"name":"abs", "args": [{"name": "x"}]}, + {"name":"acos", "args": [{"name": "x"}]}, + {"name":"asin", "args": [{"name": "x"}]}, + {"name":"atan", "args": [{"name": "x"}]}, + {"name":"atan2", "args": [{"name": "y"}, {"name": "x"}]}, + {"name":"ceil", "args": [{"name": "x"}]}, + {"name":"cos", "args": [{"name": "x"}]}, + {"name":"exp", "args": [{"name": "x"}]}, + {"name":"floor", "args": [{"name": "x"}]}, + {"name":"log", "args": [{"name": "x"}]}, + {"name":"max", "args": [{"name": "vals…"}]}, + {"name":"min", "args": [{"name": "vals…"}]}, + {"name":"pow", "args": [{"name": "x"}, {"name": "y"}]}, + {"name":"random", "args": []}, + {"name":"round", "args": [{"name": "x"}]}, + {"name":"sin", "args": [{"name": "x"}]}, + {"name":"sqrt", "args": [{"name": "x"}]}, + {"name":"tan", "args": [{"name": "x"}]} + ], + "instance_properties": [], + "instance_methods": [] + } + ] +} \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/CoffeeComplete Plus (Autocompletion)/CoffeeComplete Plus Custom Types.sublime-settings b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/CoffeeComplete Plus (Autocompletion)/CoffeeComplete Plus Custom Types.sublime-settings new file mode 100644 index 0000000..d748ea9 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/CoffeeComplete Plus (Autocompletion)/CoffeeComplete Plus Custom Types.sublime-settings @@ -0,0 +1,428 @@ +{ + "coffee_autocomplete_plus_custom_types": + [ + // { + // "name": "MyType", + // "constructors": [{"args": []}], + // "static_properties": [{"name": "CONSTANT_ONE"}, {"name": "CONSTANT_TWO"}], + // "static_methods": + // [ + // {"name":"myStaticMethod", "args": [{"name": "arg1"}, {"name": "arg2"}]}, + // {"name":"myStaticMethodTwo", "args": []} + // ], + // "instance_properties": [{"name": "thingOne"}, {"name": "thingTwo"}, {"name": "thingThree"}], + // "instance_methods": + // [ + // {"name":"doStuff", "args": [{"name": "numTimes"}]}, + // {"name":"doMoreStuff", "args": [{"name": "numTimes"}, {"name": "extraAmount"}]} + // ] + // }, + { + "name": "$", + "enabled": true, + "constructors": [{"args": []}], + "static_properties": + [ + {"name":"boxModel"}, + {"name":"browser"}, + {"name":"cssHooks"}, + {"name":"fx.interval"}, + {"name":"fx.off"}, + {"name":"support"} + ], + "static_methods": + [ + {"name":"ajax", "args": [{"name": "url"}]}, + {"name":"ajax", "args": [{"name": "url"}, {"name": "settings"}]}, + {"name":"ajax", "args": []}, + {"name":"ajax", "args": [{"name": "settings"}]}, + {"name":"ajaxPrefilter", "args": [{"name": "handler(options, originalOptions, jqXHR)"}]}, + {"name":"ajaxPrefilter", "args": [{"name": "dataTypes"}, {"name": "handler(options, originalOptions, jqXHR)"}]}, + {"name":"ajaxSetup", "args": [{"name": "options"}]}, + {"name":"ajaxTransport", "args": [{"name": "handler(options, originalOptions, jqXHR)"}]}, + {"name":"ajaxTransport", "args": [{"name": "dataType"}, {"name": "handler(options, originalOptions, jqXHR)"}]}, + {"name":"Callbacks", "args": [{"name": "flags"}]}, + {"name":"contains", "args": [{"name": "container"}, {"name": "contained"}]}, + {"name":"data", "args": [{"name": "element"}]}, + {"name":"data", "args": [{"name": "element"}, {"name": "key"}]}, + {"name":"data", "args": [{"name": "element"}, {"name": "key"}, {"name": "value"}]}, + {"name":"Deferred", "args": []}, + {"name":"Deferred", "args": [{"name": "[beforeStart]"}]}, + {"name":"dequeue", "args": [{"name": "element"}]}, + {"name":"dequeue", "args": [{"name": "element"}, {"name": "queueName"}]}, + {"name":"each", "args": [{"name": "collection"}]}, + {"name":"each", "args": [{"name": "collection"}, {"name": "callback(indexInArray, valueOfElement)"}]}, + {"name":"error", "args": [{"name": "message"}]}, + {"name":"extend", "args": [{"name": "target"}, {"name": "object1"}]}, + {"name":"extend", "args": [{"name": "target"}, {"name": "object1"}, {"name": "obj2 .. objN"}]}, + {"name":"extend", "args": [{"name": "deep"}, {"name": "target"}, {"name": "obj1 .. objN"}]}, + {"name":"get", "args": [{"name": "url"}]}, + {"name":"get", "args": [{"name": "url"}, {"name": "data"}]}, + {"name":"get", "args": [{"name": "url"}, {"name": "data"}, {"name": "success(data, textStatus, jqXHR)"}]}, + {"name":"get", "args": [{"name": "url"}, {"name": "data"}, {"name": "success(data, textStatus, jqXHR)"}, {"name": "dataType"}]}, + {"name":"getJSON", "args": [{"name": "url"}]}, + {"name":"getJSON", "args": [{"name": "url"}, {"name": "data"}]}, + {"name":"getJSON", "args": [{"name": "url"}, {"name": "data"}, {"name": "success(data, textStatus, jqXHR)"}]}, + {"name":"getScript", "args": [{"name": "url"}]}, + {"name":"getScript", "args": [{"name": "url"}, {"name": "success(script, textStatus, jqXHR)"}]}, + {"name":"globalEval", "args": [{"name": "code"}]}, + {"name":"grep", "args": [{"name": "array"}, {"name": "function(elementOfArray, indexInArray)"}]}, + {"name":"grep", "args": [{"name": "array"}, {"name": "function(elementOfArray, indexInArray)"}, {"name": "invert"}]}, + {"name":"hasData", "args": [{"name": "element"}]}, + {"name":"holdReady", "args": [{"name": "hold"}]}, + {"name":"inArray", "args": [{"name": "valueE"}, {"name": "array"}]}, + {"name":"inArray", "args": [{"name": "valueE"}, {"name": "array"}, {"name": "fromIndex"}]}, + {"name":"isArray", "args": [{"name": "obj"}]}, + {"name":"isEmptyObject", "args": [{"name": "object"}]}, + {"name":"isFunction", "args": [{"name": "obj"}]}, + {"name":"isNumeric", "args": [{"name": "value"}]}, + {"name":"isPlainObject", "args": [{"name": "object"}]}, + {"name":"isWindow", "args": [{"name": "obj"}]}, + {"name":"isXMLDoc", "args": [{"name": "node"}]}, + {"name":"makeArray", "args": [{"name": "obj"}]}, + {"name":"map", "args": [{"name": "array"}, {"name": "callback(elementOfArray, indexInArray)"}]}, + {"name":"map", "args": [{"name": "arrayOrObject"}, {"name": "callback(value, indexOrKey)"}]}, + {"name":"merge", "args": [{"name": "first"}, {"name": "second"}]}, + {"name":"noConflict", "args": []}, + {"name":"noConflict", "args": [{"name": "removeAll"}]}, + {"name":"noop", "args": []}, + {"name":"now", "args": []}, + {"name":"param", "args": [{"name": "obj"}]}, + {"name":"param", "args": [{"name": "obj"}, {"name": "traditional"}]}, + {"name":"parseHTML", "args": [{"name": "data"}]}, + {"name":"parseHTML", "args": [{"name": "data"}, {"name": "context"}]}, + {"name":"parseHTML", "args": [{"name": "data"}, {"name": "context"}, {"name": "keepScripts"}]}, + {"name":"parseJSON", "args": [{"name": "json"}]}, + {"name":"parseXML", "args": [{"name": "data"}]}, + {"name":"post", "args": [{"name": "url"}]}, + {"name":"post", "args": [{"name": "url"}, {"name": "data"}]}, + {"name":"post", "args": [{"name": "url"}, {"name": "data"}, {"name": "success(data, textStatus, jqXHR)"}]}, + {"name":"post", "args": [{"name": "url"}, {"name": "data"}, {"name": "success(data, textStatus, jqXHR)"}, {"name": "dataType"}]}, + {"name":"proxy", "args": [{"name": "function"}, {"name": "context"}]}, + {"name":"proxy", "args": [{"name": "context"}, {"name": "name"}]}, + {"name":"proxy", "args": [{"name": "function"}, {"name": "context"}]}, + {"name":"proxy", "args": [{"name": "function"}, {"name": "context"}, {"name": "additionalArguments"}]}, + {"name":"proxy", "args": [{"name": "context"}, {"name": "name"}]}, + {"name":"proxy", "args": [{"name": "context"}, {"name": "name"}, {"name": "additionalArguments"}]}, + {"name":"queue", "args": [{"name": "element"}]}, + {"name":"queue", "args": [{"name": "element"}, {"name": "queueName"}]}, + {"name":"queue", "args": [{"name": "element"}, {"name": "queueName"}, {"name": "newQueue"}]}, + {"name":"queue", "args": [{"name": "element"}, {"name": "queueName"}, {"name": "callback()"}]}, + {"name":"removeData", "args": [{"name": "element"}]}, + {"name":"removeData", "args": [{"name": "element"}, {"name": "name"}]}, + {"name":"sub", "args": []}, + {"name":"trim", "args": [{"name": "str"}]}, + {"name":"type", "args": [{"name": "obj"}]}, + {"name":"unique", "args": [{"name": "array"}]}, + {"name":"when", "args": [{"name": "deferreds"}]} + ], + "instance_properties": + [ + {"name":"context"}, + {"name":"jquery"}, + {"name":"length"}, + {"name":"selector"} + ], + "instance_methods": + [ + {"name":"add", "args": [{"name": "selector"}]}, + {"name":"add", "args": [{"name": "elements"}]}, + {"name":"add", "args": [{"name": "html"}]}, + {"name":"add", "args": [{"name": "jQueryObject"}]}, + {"name":"add", "args": [{"name": "selector"}, {"name": "context"}]}, + {"name":"addBack", "args": []}, + {"name":"addBack", "args": [{"name": "selector"}]}, + {"name":"addClass", "args": [{"name": "className"}]}, + {"name":"addClass", "args": [{"name": "function(index, currentClass)"}]}, + {"name":"after", "args": [{"name": "content"}]}, + {"name":"after", "args": [{"name": "content"}, {"name": "additionalContent"}]}, + {"name":"after", "args": [{"name": "function(index)"}]}, + {"name":"ajaxComplete", "args": [{"name": "handler(event, XMLHttpRequest, ajaxOptions)"}]}, + {"name":"ajaxError", "args": [{"name": "handler(event, jqXHR, ajaxSettings, thrownError)"}]}, + {"name":"ajaxSend", "args": [{"name": "handler(event, jqXHR, ajaxOptions)"}]}, + {"name":"ajaxStart", "args": [{"name": "handler()"}]}, + {"name":"ajaxStop", "args": [{"name": "handler()", "insertion": "->"}]}, + {"name":"ajaxSuccess", "args": [{"name": "handler(event, XMLHttpRequest, ajaxOptions)"}]}, + {"name":"andSelf", "args": []}, + {"name":"animate", "args": [{"name": "properties"}, {"name": "[duration_default_400]"}, {"name": "[easing_default_swing]"}, {"name": "[complete()]"}]}, + {"name":"animate", "args": [{"name": "properties"}, {"name": "options"}]}, + {"name":"append", "args": [{"name": "content"}]}, + {"name":"append", "args": [{"name": "content"}, {"name": "additionalContent"}]}, + {"name":"append", "args": [{"name": "function(index, html)"}]}, + {"name":"appendTo", "args": [{"name": "target"}]}, + {"name":"attr", "args": [{"name": "attributeName"}]}, + {"name":"attr", "args": [{"name": "attributeName"}, {"name": "value"}]}, + {"name":"attr", "args": [{"name": "attributes"}]}, + {"name":"attr", "args": [{"name": "attributeName"}, {"name": "function(index, attr)"}]}, + {"name":"before", "args": [{"name": "content"}]}, + {"name":"before", "args": [{"name": "content"}, {"name": "additionalContent"}]}, + {"name":"bind", "args": [{"name": "eventType"}, {"name": "[eventData]"}, {"name": "[handler(eventObject)]"}]}, + {"name":"bind", "args": [{"name": "eventType"}, {"name": "[eventData]"}, {"name": "preventBubble"}]}, + {"name":"bind", "args": [{"name": "events"}]}, + {"name":"blur", "args": []}, + {"name":"blur", "args": [{"name": "handler(eventObject)"}]}, + {"name":"blur", "args": [{"name": "[eventData]"}, {"name": "handler(eventObject)"}]}, + {"name":"change", "args": [{"name": "handler(eventObject)"}]}, + {"name":"change", "args": [{"name": "[eventData]"}, {"name": "handler(eventObject)"}]}, + {"name":"change", "args": []}, + {"name":"children", "args": [{"name": "[selector]"}]}, + {"name":"clearQueue", "args": [{"name": "[queueName]"}]}, + {"name":"click", "args": [{"name": "handler(eventObject)"}]}, + {"name":"click", "args": [{"name": "[eventData]"}, {"name": "handler(eventObject)"}]}, + {"name":"click", "args": []}, + {"name":"clone", "args": [{"name": "withDataAndEvents"}]}, + {"name":"clone", "args": [{"name": "withDataAndEvents"}, {"name": "[deepWithDataAndEvents] "}]}, + {"name":"closest", "args": [{"name": "selector"}, {"name": "[context]"}]}, + {"name":"closest", "args": [{"name": "jQueryObject"}]}, + {"name":"closest", "args": [{"name": "element"}]}, + {"name":"contents", "args": []}, + {"name":"css", "args": [{"name": "propertyName"}]}, + {"name":"css", "args": [{"name": "propertyNames"}]}, + {"name":"css", "args": [{"name": "propertyName"}, {"name": "value"}]}, + {"name":"css", "args": [{"name": "propertyName"}, {"name": "function(index, value)"}]}, + {"name":"css", "args": [{"name": "properties"}]}, + {"name":"data", "args": [{"name": "key"}, {"name": "value"}]}, + {"name":"data", "args": [{"name": "obj"}]}, + {"name":"data", "args": [{"name": "key"}]}, + {"name":"data", "args": []}, + {"name":"dblclick", "args": [{"name": "handler(eventObject)"}]}, + {"name":"dblclick", "args": [{"name": "[eventData]"}, {"name": "handler(eventObject)"}]}, + {"name":"dblclick", "args": []}, + {"name":"delay", "args": [{"name": "duration"}, {"name": "[queueName]"}]}, + {"name":"delegate", "args": [{"name": "selector"}, {"name": "eventType"}, {"name": "handler(eventObject)"}]}, + {"name":"delegate", "args": [{"name": "selector"}, {"name": "eventType"}, {"name": "eventData"}, {"name": "handler(eventObject)"}]}, + {"name":"delegate", "args": [{"name": "selector"}, {"name": "events"}]}, + {"name":"dequeue", "args": [{"name": "[queueName]"}]}, + {"name":"detach", "args": [{"name": "[selector]"}]}, + {"name":"die", "args": []}, + {"name":"die", "args": [{"name": "eventType"}, {"name": "[handler]"}]}, + {"name":"die", "args": [{"name": "events"}]}, + {"name":"each", "args": [{"name": "function(index, Element)"}]}, + {"name":"empty", "args": []}, + {"name":"end", "args": []}, + {"name":"eq", "args": [{"name": "index"}]}, + {"name":"eq", "args": [{"name": "-index"}]}, + {"name":"error", "args": [{"name": "handler(eventObject)"}]}, + {"name":"error", "args": [{"name": "[eventData]"}, {"name": "handler(eventObject)"}]}, + {"name":"fadeIn", "args": [{"name": "[duration_default_400]"}, {"name": "[complete()]"}]}, + {"name":"fadeIn", "args": [{"name": "options"}]}, + {"name":"fadeIn", "args": [{"name": "[duration_default_400]"}, {"name": "[easing_default_swing]"}, {"name": "[complete()]"}]}, + {"name":"fadeOut", "args": [{"name": "[duration_default_400]"}, {"name": "[complete()]"}]}, + {"name":"fadeOut", "args": [{"name": "options"}]}, + {"name":"fadeOut", "args": [{"name": "[duration_default_400]"}, {"name": "[easing_default_swing]"}, {"name": "[complete()]"}]}, + {"name":"fadeTo", "args": [{"name": "duration"}, {"name": "opacity"}, {"name": "[complete]"}]}, + {"name":"fadeTo", "args": [{"name": "duration"}, {"name": "opacity"}, {"name": "[easing]"}, {"name": "[complete()]"}]}, + {"name":"fadeToggle", "args": [{"name": "[duration_default_400]"}, {"name": "[easing_default_swing]"}, {"name": "[complete()]"}]}, + {"name":"fadeToggle", "args": [{"name": "options"}]}, + {"name":"filter", "args": [{"name": "selector"}]}, + {"name":"filter", "args": [{"name": "function(index)"}]}, + {"name":"filter", "args": [{"name": "element"}]}, + {"name":"filter", "args": [{"name": "jQueryObject"}]}, + {"name":"find", "args": [{"name": "selector"}]}, + {"name":"find", "args": [{"name": "jQueryObject"}]}, + {"name":"find", "args": [{"name": "element"}]}, + {"name":"finish", "args": [{"name": "[queue]"}]}, + {"name":"first", "args": []}, + {"name":"focus", "args": [{"name": "handler(eventObject)"}]}, + {"name":"focus", "args": [{"name": "[eventData]"}, {"name": "handler(eventObject)"}]}, + {"name":"focus", "args": []}, + {"name":"focusin", "args": [{"name": "handler(eventObject)"}]}, + {"name":"focusin", "args": [{"name": "[eventData]"}, {"name": "handler(eventObject)"}]}, + {"name":"focusout", "args": [{"name": "handler(eventObject)"}]}, + {"name":"focusout", "args": [{"name": "[eventData]"}, {"name": "handler(eventObject)"}]}, + {"name":"get", "args": [{"name": "[index]"}]}, + {"name":"has", "args": [{"name": "selector"}]}, + {"name":"has", "args": [{"name": "contained"}]}, + {"name":"hasClass", "args": [{"name": "className"}]}, + {"name":"height", "args": []}, + {"name":"height", "args": [{"name": "value"}]}, + {"name":"height", "args": [{"name": "function(index, height)"}]}, + {"name":"hide", "args": []}, + {"name":"hide", "args": [{"name": "[duration_default_400]"}, {"name": "[complete]"}]}, + {"name":"hide", "args": [{"name": "options"}]}, + {"name":"hide", "args": [{"name": "[duration_default_400]"}, {"name": "[easing_default_swing]"}, {"name": "[complete()]"}]}, + {"name":"hover", "args": [{"name": "handlerIn(eventObject)"}, {"name": "handlerOut(eventObject)"}]}, + {"name":"html", "args": []}, + {"name":"html", "args": [{"name": "htmlString"}]}, + {"name":"html", "args": [{"name": "function(index, oldhtml)"}]}, + {"name":"index", "args": []}, + {"name":"index", "args": [{"name": "selector"}]}, + {"name":"index", "args": [{"name": "element"}]}, + {"name":"innerHeight", "args": []}, + {"name":"innerWidth", "args": []}, + {"name":"insertAfter", "args": [{"name": "target"}]}, + {"name":"insertBefore", "args": [{"name": "target"}]}, + {"name":"is", "args": [{"name": "selector"}]}, + {"name":"is", "args": [{"name": "function(index)"}]}, + {"name":"is", "args": [{"name": "jQueryObject"}]}, + {"name":"is", "args": [{"name": "element"}]}, + {"name":"keydown", "args": []}, + {"name":"keydown", "args": [{"name": "handler(eventObject)"}]}, + {"name":"keydown", "args": [{"name": "[eventData]"}, {"name": "handler(eventObject)"}]}, + {"name":"keypress", "args": []}, + {"name":"keypress", "args": [{"name": "handler(eventObject)"}]}, + {"name":"keypress", "args": [{"name": "[eventData]"}, {"name": "handler(eventObject)"}]}, + {"name":"keyup", "args": []}, + {"name":"keyup", "args": [{"name": "handler(eventObject)"}]}, + {"name":"keyup", "args": [{"name": "[eventData]"}, {"name": "handler(eventObject)"}]}, + {"name":"last", "args": []}, + {"name":"live", "args": [{"name": "events"}, {"name": "handler(eventObject)"}]}, + {"name":"live", "args": [{"name": "events"}, {"name": "data"}, {"name": "handler(eventObject)"}]}, + {"name":"live", "args": [{"name": "events"}]}, + {"name":"load", "args": [{"name": "url"}, {"name": "[data]"}, {"name": "[complete(responseText, textStatus, XMLHttpRequest)]"}]}, + {"name":"load", "args": [{"name": "handler(eventObject)"}]}, + {"name":"load", "args": [{"name": "[eventData]"}, {"name": "handler(eventObject)"}]}, + {"name":"map", "args": [{"name": "callback(index, domElement)"}]}, + {"name":"mousedown", "args": []}, + {"name":"mousedown", "args": [{"name": "handler(eventObject)"}]}, + {"name":"mousedown", "args": [{"name": "[eventData]"}, {"name": "handler(eventObject)"}]}, + {"name":"mouseenter", "args": []}, + {"name":"mouseenter", "args": [{"name": "handler(eventObject)"}]}, + {"name":"mouseenter", "args": [{"name": "[eventData]"}, {"name": "handler(eventObject)"}]}, + {"name":"mouseleave", "args": []}, + {"name":"mouseleave", "args": [{"name": "handler(eventObject)"}]}, + {"name":"mouseleave", "args": [{"name": "[eventData]"}, {"name": "handler(eventObject)"}]}, + {"name":"mousemove", "args": []}, + {"name":"mousemove", "args": [{"name": "handler(eventObject)"}]}, + {"name":"mousemove", "args": [{"name": "[eventData]"}, {"name": "handler(eventObject)"}]}, + {"name":"mouseout", "args": []}, + {"name":"mouseout", "args": [{"name": "handler(eventObject)"}]}, + {"name":"mouseout", "args": [{"name": "[eventData]"}, {"name": "handler(eventObject)"}]}, + {"name":"mouseover", "args": []}, + {"name":"mouseover", "args": [{"name": "handler(eventObject)"}]}, + {"name":"mouseover", "args": [{"name": "[eventData]"}, {"name": "handler(eventObject)"}]}, + {"name":"mouseup", "args": []}, + {"name":"mouseup", "args": [{"name": "handler(eventObject)"}]}, + {"name":"mouseup", "args": [{"name": "[eventData]"}, {"name": "handler(eventObject)"}]}, + {"name":"next", "args": [{"name": "[selector]"}]}, + {"name":"nextAll", "args": [{"name": "[selector]"}]}, + {"name":"nextUntil", "args": [{"name": "[selector]"}, {"name": "[filter]"}]}, + {"name":"nextUntil", "args": [{"name": "[element]"}, {"name": "[filter]"}]}, + {"name":"not", "args": [{"name": "selector"}]}, + {"name":"not", "args": [{"name": "elements"}]}, + {"name":"not", "args": [{"name": "function(index)"}]}, + {"name":"not", "args": [{"name": "jQueryObject"}]}, + {"name":"off", "args": [{"name": "events"}, {"name": "[selector]"}, {"name": "handler(eventObject)"}]}, + {"name":"off", "args": [{"name": "events"}, {"name": "[selector]"}]}, + {"name":"offset", "args": []}, + {"name":"offset", "args": [{"name": "coordinates"}]}, + {"name":"offset", "args": [{"name": "function(index, coords)"}]}, + {"name":"offsetParent", "args": []}, + {"name":"on", "args": [{"name": "events"}, {"name": "[selector]"}, {"name": "[data]"}, {"name": "handler(eventObject)"}]}, + {"name":"on", "args": [{"name": "events"}, {"name": "[selector]"}, {"name": "[data]"}]}, + {"name":"one", "args": [{"name": "events"}, {"name": "[data]"}, {"name": "handler(eventObject)"}]}, + {"name":"one", "args": [{"name": "events"}, {"name": "[selector]"}, {"name": "[data]"}, {"name": "handler(eventObject)"}]}, + {"name":"one", "args": [{"name": "events"}, {"name": "[selector]"}, {"name": "[data]"}]}, + {"name":"outerHeight", "args": [{"name": "[includeMargin]"}]}, + {"name":"outerWidth", "args": [{"name": "[includeMargin]"}]}, + {"name":"parent", "args": [{"name": "[selector]"}]}, + {"name":"parents", "args": [{"name": "[selector]"}]}, + {"name":"parentsUntil", "args": [{"name": "[selector]"}, {"name": "[filter]"}]}, + {"name":"parentsUntil", "args": [{"name": "[element]"}, {"name": "[filter]"}]}, + {"name":"position", "args": []}, + {"name":"prepend", "args": [{"name": "content"}, {"name": "[additionalContent]"}]}, + {"name":"prepend", "args": [{"name": "function(index, html)"}]}, + {"name":"prependTo", "args": [{"name": "target"}]}, + {"name":"prev", "args": [{"name": "[selector]"}]}, + {"name":"prevAll", "args": [{"name": "[selector]"}]}, + {"name":"prevUntil", "args": [{"name": "[selector]"}, {"name": "[filter]"}]}, + {"name":"prevUntil", "args": [{"name": "[element]"}, {"name": "[filter]"}]}, + {"name":"promise", "args": [{"name": "[type_default_fx]"}, {"name": "[target]"}]}, + {"name":"prop", "args": [{"name": "propertyName"}]}, + {"name":"prop", "args": [{"name": "propertyName"}, {"name": "value"}]}, + {"name":"prop", "args": [{"name": "properties"}]}, + {"name":"prop", "args": [{"name": "propertyName"}, {"name": "function(index, oldPropertyValue)"}]}, + {"name":"pushStack", "args": [{"name": "elements"}]}, + {"name":"pushStack", "args": [{"name": "elements"}, {"name": "name"}, {"name": "arguments"}]}, + {"name":"queue", "args": [{"name": "[queueName]"}]}, + {"name":"queue", "args": [{"name": "[queueName]"}, {"name": "newQueue"}]}, + {"name":"queue", "args": [{"name": "[queueName]"}, {"name": "callback(next)"}]}, + {"name":"ready", "args": [{"name": "handler"}]}, + {"name":"remove", "args": [{"name": "[selector]"}]}, + {"name":"removeAttr", "args": [{"name": "attributeName"}]}, + {"name":"removeClass", "args": [{"name": "[className]"}]}, + {"name":"removeClass", "args": [{"name": "function(index, class)"}]}, + {"name":"removeData", "args": [{"name": "[name]"}]}, + {"name":"removeData", "args": [{"name": "[list]"}]}, + {"name":"removeProp", "args": [{"name": "propertyName"}]}, + {"name":"replaceAll", "args": [{"name": "target"}]}, + {"name":"replaceWith", "args": [{"name": "newContent"}]}, + {"name":"replaceWith", "args": [{"name": "function"}]}, + {"name":"resize", "args": [{"name": "handler(eventObject)"}]}, + {"name":"resize", "args": [{"name": "[eventData]"}, {"name": "handler(eventObject)"}]}, + {"name":"resize", "args": []}, + {"name":"scroll", "args": [{"name": "handler(eventObject)"}]}, + {"name":"scroll", "args": [{"name": "[eventData]"}, {"name": "handler(eventObject)"}]}, + {"name":"scroll", "args": []}, + {"name":"scrollLeft", "args": [{"name": "value"}]}, + {"name":"scrollLeft", "args": []}, + {"name":"scrollTop", "args": [{"name": "value"}]}, + {"name":"scrollTop", "args": []}, + {"name":"select", "args": [{"name": "handler(eventObject)"}]}, + {"name":"select", "args": [{"name": "[eventData]"}, {"name": "handler(eventObject)"}]}, + {"name":"select", "args": []}, + {"name":"serialize", "args": []}, + {"name":"serializeArray", "args": []}, + {"name":"show", "args": []}, + {"name":"show", "args": [{"name": "[duration_default_400]"}, {"name": "[complete()]"}]}, + {"name":"show", "args": [{"name": "options"}]}, + {"name":"show", "args": [{"name": "[duration_default_400]"}, {"name": "[easing_default_swing]"}, {"name": "[complete()]"}]}, + {"name":"siblings", "args": [{"name": "[selector]"}]}, + {"name":"size", "args": []}, + {"name":"slice", "args": [{"name": "start"}, {"name": "[end]"}]}, + {"name":"slideDown", "args": [{"name": "[duration_default_400]"}, {"name": "[complete()]"}]}, + {"name":"slideDown", "args": [{"name": "options"}]}, + {"name":"slideDown", "args": [{"name": "[duration_default_400]"}, {"name": "[easing_default_swing]"}, {"name": "[complete()]"}]}, + {"name":"slideToggle", "args": [{"name": "[duration_default_400]"}, {"name": "[complete()]"}]}, + {"name":"slideToggle", "args": [{"name": "options"}]}, + {"name":"slideToggle", "args": [{"name": "[duration_default_400]"}, {"name": "[easing_default_swing]"}, {"name": "[complete()]"}]}, + {"name":"slideUp", "args": [{"name": "[duration_default_400]"}, {"name": "[complete()]"}]}, + {"name":"slideUp", "args": [{"name": "options"}]}, + {"name":"slideUp", "args": [{"name": "[duration_default_400]"}, {"name": "[easing_default_swing]"}, {"name": "[complete()]"}]}, + {"name":"stop", "args": [{"name": "[clearQueue]"}, {"name": "[jumpToEnd]"}]}, + {"name":"stop", "args": [{"name": "[queue]"}, {"name": "[clearQueue]"}, {"name": "[jumpToEnd]"}]}, + {"name":"submit", "args": [{"name": "handler(eventObject)"}]}, + {"name":"submit", "args": [{"name": "[eventData]"}, {"name": "handler(eventObject)"}]}, + {"name":"submit", "args": []}, + {"name":"text", "args": []}, + {"name":"text", "args": [{"name": "textString"}]}, + {"name":"text", "args": [{"name": "function(index, text)"}]}, + {"name":"toArray", "args": []}, + {"name":"toggle", "args": [{"name": "[duration_default_400]"}, {"name": "[complete()]"}]}, + {"name":"toggle", "args": [{"name": "options"}]}, + {"name":"toggle", "args": [{"name": "[duration_default_400]"}, {"name": "[easing_default_swing]"}, {"name": "[complete()]"}]}, + {"name":"toggle", "args": [{"name": "showOrHide"}]}, + {"name":"toggle", "args": [{"name": "evenHandler(eventObject)"}, {"name": "oddHandler(eventObject)"}, {"name": "handler(eventObject)"}]}, + {"name":"toggleClass", "args": [{"name": "className"}]}, + {"name":"toggleClass", "args": [{"name": "className"}, {"name": "switch"}]}, + {"name":"toggleClass", "args": [{"name": "[switch]"}]}, + {"name":"toggleClass", "args": [{"name": "function(index, class, switch)"}, {"name": "[switch]"}]}, + {"name":"trigger", "args": [{"name": "eventType"}, {"name": "[extraParameters]"}]}, + {"name":"trigger", "args": [{"name": "event"}]}, + {"name":"triggerHandler", "args": [{"name": "eventType"}, {"name": "[extraParameters]"}]}, + {"name":"unbind", "args": [{"name": "[eventType]"}, {"name": "[handler(eventObject)]"}]}, + {"name":"unbind", "args": [{"name": "eventType"}, {"name": "false"}]}, + {"name":"unbind", "args": [{"name": "event"}]}, + {"name":"undelegate", "args": []}, + {"name":"undelegate", "args": [{"name": "selector"}, {"name": "eventType"}]}, + {"name":"undelegate", "args": [{"name": "selector"}, {"name": "eventType"}, {"name": "handler(eventObject)"}]}, + {"name":"undelegate", "args": [{"name": "selector"}, {"name": "events"}]}, + {"name":"undelegate", "args": [{"name": "namespace"}]}, + {"name":"unload", "args": [{"name": "handler(eventObject)"}]}, + {"name":"unload", "args": [{"name": "[eventData]"}, {"name": "handler(eventObject)"}]}, + {"name":"unwrap", "args": []}, + {"name":"val", "args": []}, + {"name":"val", "args": [{"name": "value"}]}, + {"name":"val", "args": [{"name": "function(index, value)"}]}, + {"name":"width", "args": []}, + {"name":"width", "args": [{"name": "value"}]}, + {"name":"width", "args": [{"name": "function(index, width)"}]}, + {"name":"wrap", "args": [{"name": "wrappingElement"}]}, + {"name":"wrap", "args": [{"name": "function(index)"}]}, + {"name":"wrapAll", "args": [{"name": "wrappingElement"}]}, + {"name":"wrapInner", "args": [{"name": "wrappingElement"}]}, + {"name":"wrapInner", "args": [{"name": "function(index)"}]} + ] + } + ] +} \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/CoffeeComplete Plus (Autocompletion)/CoffeeComplete Plus Keywords.sublime-completions b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/CoffeeComplete Plus (Autocompletion)/CoffeeComplete Plus Keywords.sublime-completions new file mode 100644 index 0000000..64f4337 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/CoffeeComplete Plus (Autocompletion)/CoffeeComplete Plus Keywords.sublime-completions @@ -0,0 +1,107 @@ +{"scope": "source.coffee -comment", + "completions": [ + + // keywords + + {"trigger": "break"}, + {"trigger": "continue"}, + {"trigger": "delete"}, + {"trigger": "extends"}, + {"trigger": "finally"}, + {"trigger": "instanceof"}, + {"trigger": "return"}, + {"trigger": "super"}, + {"trigger": "throw"}, + {"trigger": "typeof"}, + {"trigger": "until"}, + {"trigger": "while"}, + + // classes + + {"trigger": "Array"}, + {"trigger": "Boolean"}, + {"trigger": "Date"}, + {"trigger": "Error"}, + {"trigger": "Function"}, + {"trigger": "JSON"}, + {"trigger": "Math"}, + {"trigger": "Number"}, + {"trigger": "Object"}, + {"trigger": "RegExp"}, + {"trigger": "String"}, + + // globals + + {"trigger": "Infinity"}, + {"trigger": "NaN"}, + {"trigger": "undefined"}, + + {"trigger": "● decodeURI(encURI)", "contents": "decodeURI(${1:encURI})"}, + {"trigger": "● decodeURIComponent(encURI)", "contents": "decodeURIComponent(${1:encURI})"}, + {"trigger": "● encodeURI(URI)", "contents": "encodeURI(${1:URI})"}, + {"trigger": "● encodeURIComponent(str)", "contents": "encodeURIComponent(${1:str})"}, + {"trigger": "● eval(str)", "contents": "eval(${1:str})"}, + {"trigger": "● isFinite(x)", "contents": "isFinite(${1:x})"}, + {"trigger": "● isNaN(val)", "contents": "isNaN(${1:val})"}, + {"trigger": "● parseFloat(str)", "contents": "parseFloat(${1:str})"}, + {"trigger": "● parseInt(str)", "contents": "parseInt(${1:str})"}, + {"trigger": "● parseInt(str, radix)", "contents": "parseInt(${1:str}, ${2:radix})"} + +/* + + // too short + + {"trigger": "and"}, + {"trigger": "by"}, + {"trigger": "do"}, + {"trigger": "else"}, + {"trigger": "false"}, + {"trigger": "for"}, + {"trigger": "if"}, + {"trigger": "in"}, + {"trigger": "is"}, + {"trigger": "isnt"}, + {"trigger": "loop"}, + {"trigger": "new"}, + {"trigger": "no"}, + {"trigger": "not"}, + {"trigger": "null"}, + {"trigger": "of"}, + {"trigger": "off"}, + {"trigger": "on"}, + {"trigger": "or"}, + {"trigger": "then"}, + {"trigger": "this"}, + {"trigger": "true"}, + {"trigger": "try"}, + {"trigger": "when"}, + {"trigger": "yes"}, + + // snippets + + {"trigger": "catch"}, + {"trigger": "class"}, + {"trigger": "switch"}, + {"trigger": "unless"}, + + // rare + + {"trigger": "debugger"}, + {"trigger": "EvalError"}, + {"trigger": "RangeError"}, + {"trigger": "ReferenceError"}, + {"trigger": "SyntaxError"}, + {"trigger": "TypeError"}, + {"trigger": "URIError"}, + + {"trigger": "configurable: "}, + {"trigger": "enumerable: "}, + {"trigger": "value: "}, + {"trigger": "writable: "}, + {"trigger": "get: ()", "contents": "get: ->"}, + {"trigger": "set: (val)", "contents": "set: (val) ->"} + +*/ + + ] +} \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/CoffeeComplete Plus (Autocompletion)/CoffeeComplete Plus.sublime-settings b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/CoffeeComplete Plus (Autocompletion)/CoffeeComplete Plus.sublime-settings new file mode 100644 index 0000000..da7c7a0 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/CoffeeComplete Plus (Autocompletion)/CoffeeComplete Plus.sublime-settings @@ -0,0 +1,50 @@ +{ + // These dirs will not be searched when looking for .coffee files. + // These should be dir names only. No relative paths. + "coffee_autocomplete_plus_excluded_dirs": + [ + ".svn", + ".git", + "CVS", + "lib", + "node_modules", + "pub", + "public", + "vendor", + "doc", + "docs", + "build", + "builds", + "bin" + ], + + // List of strings. These paths will be appended to your project's root and searched. + // Leave empty to search all directories in your project's root directory. + "coffee_autocomplete_plus_restricted_to_paths": [], + + // Map function names to types. + "coffee_autocomplete_plus_function_return_types": + [ + { + "function_names": ["$", "jQuery"], + "type_name": "$" + } + ], + // Regular expression of members to exclude from autocomplete. + // This is useful for properties/methods that are regarded "private" and start + // with an underscore. E.g. _privateVariable + "coffee_autocomplete_plus_member_exclusion_regexes": + [ + "^_" // Starts with underscore + ], + // OBSOLETE + // Aliases for "this", like "that" and "self". + // CA+ assignment detection is now able to detect that = this assignments. + "coffee_autocomplete_plus_this_aliases": ["that", "self"], + + // The triggers for autocompletion + "auto_complete_triggers": + [ + {"characters": ".@", "selector": "source.coffee, source.litcoffee, source.coffee.md"} + ] +} \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/CoffeeComplete Plus (Autocompletion)/CoffeeGotoDefinition.py b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/CoffeeComplete Plus (Autocompletion)/CoffeeGotoDefinition.py new file mode 100644 index 0000000..43fd0d6 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/CoffeeComplete Plus (Autocompletion)/CoffeeGotoDefinition.py @@ -0,0 +1,250 @@ +import sublime, sublime_plugin +import re +import os +import threading +import coffee_utils +from coffee_utils import debug + +COMMAND_NAME = 'coffee_goto_definition' +STATUS_MESSAGE_DEFINITION_FOUND = "Coffee: Definition for \"%s\" found." +STATUS_MESSAGE_NO_DEFINITION_FOUND = "Coffee: No definition for \"%s\" found." +STATUS_MESSAGE_COFFEE_GOTO_DEFINITION = "Coffee: Goto Definition of \"%s\"" + +# SEARCH ORDER: +# Current file class (TitleCaps only) +# Current file function +# Current file assignment +# Global TitleCaps.coffee class +# Global search for class (TitleCaps only) +# Global search for function + +# TODO: +# X Add config for "this" aliases (DONE) +# - Codo docs searching for function parameter types +# X Goto definition knows about function parameters and for loop variables +# - Smarter operand parsing. E.g. Given: this.test = "test", when goto "test", look for "this.test = ", not "test =" +# - Check contents of currently open views +# - Menu integration + +class CoffeeGotoDefinitionCommand(sublime_plugin.TextCommand): + def run(self, edit): + + # Get the window + self.window = sublime.active_window() + + # The current view + view = self.view + # Lines for currently viewed file + current_file_lines = coffee_utils.get_view_content_lines(view) + + # Get currently selected word + coffee_utils.select_current_word(view) + selected_word = coffee_utils.get_selected_word(view) + + selected_region = self.view.sel()[0] + + # http://www.sublimetext.com/forum/viewtopic.php?f=6&t=9076 + settings = sublime.load_settings(coffee_utils.SETTINGS_FILE_NAME) + + # Pull the excluded dirs from preferences + excluded_dirs = settings.get(coffee_utils.PREFERENCES_COFFEE_EXCLUDED_DIRS) + if not excluded_dirs: + excluded_dirs = [] + + restricted_to_dirs = settings.get(coffee_utils.PREFERENCES_COFFEE_RESTRICTED_TO_PATHS) + if not restricted_to_dirs: + restricted_to_dirs = [] + + # List of all project folders + project_folder_list = self.window.folders() + + if restricted_to_dirs: + specific_project_folders = [] + for next_restricted_dir in restricted_to_dirs: + for next_project_folder in project_folder_list: + next_specific_folder = os.path.normpath(os.path.join(next_project_folder, next_restricted_dir)) + specific_project_folders.append(next_specific_folder) + project_folder_list = specific_project_folders + + # If there is a word selection and we're looking at a coffee file... + if len(selected_word) > 0 and coffee_utils.is_coffee_syntax(view): + + thread = CoffeeGotoDefinitionThread(project_folder_list, current_file_lines, selected_word, excluded_dirs, selected_region) + thread.start() + self.check_operation(thread) + + def check_operation(self, thread, previous_progress_indicator_tuple=None): + selected_word = thread.selected_word + if not thread.is_alive(): + + # Flatten any selection ranges + if len(self.view.sel()) > 0: + region = self.view.sel()[0] + debug(region) + end_point = region.end() + region_to_select = sublime.Region(end_point, end_point) + coffee_utils.select_region_in_view(self.view, region_to_select) + + matched_location_tuple = thread.matched_location_tuple + if matched_location_tuple: + # debug("Match found!") + file_to_open = matched_location_tuple[0] + row = matched_location_tuple[1] + 1 + column = matched_location_tuple[2] + 1 + match = matched_location_tuple[3] + row_start_index = matched_location_tuple[4] + # If there is a file to open... + if file_to_open: + # Open the file in the editor + coffee_utils.open_file_at_position(self.window, file_to_open, row, column) + # Otherwise, assume we found the match in the current view + else: + match_end = row_start_index + match.start() + len(match.group()) + region_to_select = sublime.Region(match_end, match_end) + coffee_utils.select_region_in_view(self.view, region_to_select) + self.view.show(region_to_select) + + self.window.active_view().set_status(COMMAND_NAME, STATUS_MESSAGE_DEFINITION_FOUND % selected_word) + else: + self.window.active_view().set_status(COMMAND_NAME, STATUS_MESSAGE_NO_DEFINITION_FOUND % selected_word) + + else: + # Create the command's goto definition text, including the selected word. For the status bar. + goto_definition_status_text = STATUS_MESSAGE_COFFEE_GOTO_DEFINITION % selected_word + # Get a tuple containing the progress text, progress position, and progress direction. + # This is used to animate a progress indicator in the status bar. + current_progress_indicator_tuple = coffee_utils.get_progress_indicator_tuple(previous_progress_indicator_tuple) + # Get the progress text + progress_indicator_status_text = current_progress_indicator_tuple[0] + # Set the status bar text so the user knows what's going on + self.window.active_view().set_status(COMMAND_NAME, goto_definition_status_text + " " + progress_indicator_status_text) + # Check again momentarily to see if the operation has completed. + sublime.set_timeout(lambda: self.check_operation(thread, current_progress_indicator_tuple), 100) + +class CoffeeGotoDefinitionThread(threading.Thread): + + def __init__(self, project_folder_list, current_file_lines, selected_word, excluded_dirs, selected_region): + self.project_folder_list = project_folder_list + self.current_file_lines = current_file_lines + self.selected_word = selected_word + self.excluded_dirs = excluded_dirs + self.selected_region = selected_region + # None if no match was found, or a tuple containing the filename, row, column and match + self.matched_location_tuple = None + threading.Thread.__init__(self) + + def run(self): + + project_folder_list = self.project_folder_list + current_file_lines = self.current_file_lines + selected_word = self.selected_word + excluded_dirs = self.excluded_dirs + selected_region = self.selected_region + + # This will be assigned whem a match is made + matched_location_tuple = None + + # The regular expression used to search for the selected class + class_regex = coffee_utils.CLASS_REGEX % re.escape(selected_word) + # The regex used to search for the selected function + function_regex = coffee_utils.FUNCTION_REGEX % re.escape(selected_word) + # The regex used to search for the selected variable assignment + assignment_regex = coffee_utils.ASSIGNMENT_REGEX % re.escape(selected_word) + # The regex used to search for the selected variable as a parameter in a method + param_regex = coffee_utils.PARAM_REGEX.format(name=re.escape(selected_word)) + + # The regex used to search for the selected variable as a for loop var + for_loop_regex = coffee_utils.FOR_LOOP_REGEX % re.escape(selected_word) + + debug(("Selected: \"%s\"" % selected_word)) + + # ------ CURRENT FILE: CLASS (TitleCaps ONLY) ------------ + + if not matched_location_tuple: + + # If so, we assume it is a class. + debug("Checking for local class %s..." % selected_word) + class_location_search_tuple = coffee_utils.find_location_of_regex_in_files(class_regex, current_file_lines, []) + if class_location_search_tuple: + matched_location_tuple = class_location_search_tuple + + # ------ GLOBAL SEARCH: CLASS ---------------------------- + + if not matched_location_tuple: + + # Coffeescript filename regex + coffeescript_filename_regex = coffee_utils.COFFEE_FILENAME_REGEX + # All coffeescript file paths + all_coffee_file_paths = coffee_utils.get_files_in(project_folder_list, coffeescript_filename_regex, excluded_dirs) + + debug("Checking globally for class %s..." % selected_word) + # Assume it is a file called selected_word.coffee + exact_file_name_regex = "^" + re.escape(selected_word) + coffee_utils.COFFEE_EXTENSION_WITH_DOT + "$" + exact_name_file_paths = coffee_utils.get_files_in(project_folder_list, exact_file_name_regex, excluded_dirs) + exact_location_search_tuple = coffee_utils.find_location_of_regex_in_files(class_regex, None, exact_name_file_paths) + if exact_location_search_tuple: + matched_location_tuple = exact_location_search_tuple + else: + global_class_location_search_tuple = coffee_utils.find_location_of_regex_in_files(class_regex, None, all_coffee_file_paths) + if global_class_location_search_tuple: + matched_location_tuple = global_class_location_search_tuple + + # ------ CURRENT FILE: FUNCTION -------------------------- + if not matched_location_tuple: + debug("Checking for local function %s..." % selected_word) + local_function_location_search_tuple = coffee_utils.find_location_of_regex_in_files(function_regex, current_file_lines, []) + if local_function_location_search_tuple: + matched_location_tuple = local_function_location_search_tuple + + # ------ CURRENT FILE: ASSIGNMENT ------------------------ + + if not matched_location_tuple: + + debug("Checking for local assignment of %s..." % selected_word) + backwards_match_tuple = coffee_utils.search_backwards_for(current_file_lines, assignment_regex, selected_region) + if backwards_match_tuple: + filename_tuple = tuple([None]) + matched_location_tuple = filename_tuple + backwards_match_tuple + else: + # Nothing found. Now let's look backwards for a method parameter + param_match_tuple = coffee_utils.search_backwards_for(current_file_lines, param_regex, selected_region) + if param_match_tuple: + filename_tuple = tuple([None]) + matched_location_tuple = filename_tuple + param_match_tuple + else: + for_loop_match_tuple = coffee_utils.search_backwards_for(current_file_lines, for_loop_regex, selected_region) + if for_loop_match_tuple: + filename_tuple = tuple([None]) + matched_location_tuple = filename_tuple + for_loop_match_tuple + # Otherwise, forwards search for it. It could be defined in the constructor. + else: + forwards_match_tuple = coffee_utils.find_location_of_regex_in_files(assignment_regex, current_file_lines, []) + if forwards_match_tuple: + matched_location_tuple = forwards_match_tuple + + # ------ GLOBAL SEARCH: FUNCTION ------------------------- + + if not matched_location_tuple: + + # Coffeescript filename regex + coffeescript_filename_regex = coffee_utils.COFFEE_FILENAME_REGEX + # All coffeescript file paths + all_coffee_file_paths = coffee_utils.get_files_in(project_folder_list, coffeescript_filename_regex, excluded_dirs) + + debug("Checking globally for function %s..." % selected_word) + global_function_location_search_tuple = coffee_utils.find_location_of_regex_in_files(function_regex, None, all_coffee_file_paths) + if global_function_location_search_tuple: + matched_location_tuple = global_function_location_search_tuple + + # ------ DOT OPERATION LOOKUP (TBD) ---------------------- + # TODO: Pull out dot operator object, determine its assignment type, find class, goto method/property. + # Also, determine where to put this lookup. + + # ------ SUPER METHOD LOOKUP (TBD) ----------------------- + # TODO: If selected_word is "super", assume a function and then attempt to find + # extending class and open it to the function the cursor is within. + + # ------ STORE MATCH RESULTS ----------------------------- + # If not None, then we found something that matched the search! + if matched_location_tuple: + self.matched_location_tuple = matched_location_tuple \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/CoffeeComplete Plus (Autocompletion)/Default (Linux).sublime-keymap b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/CoffeeComplete Plus (Autocompletion)/Default (Linux).sublime-keymap new file mode 100644 index 0000000..3144828 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/CoffeeComplete Plus (Autocompletion)/Default (Linux).sublime-keymap @@ -0,0 +1,5 @@ +[ + { + "keys": ["ctrl+alt+d"], "command": "coffee_goto_definition" + } +] \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/CoffeeComplete Plus (Autocompletion)/Default (Linux).sublime-mousemap b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/CoffeeComplete Plus (Autocompletion)/Default (Linux).sublime-mousemap new file mode 100644 index 0000000..107d9e4 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/CoffeeComplete Plus (Autocompletion)/Default (Linux).sublime-mousemap @@ -0,0 +1,8 @@ +[ + { + "button": "button1", "count": 1, "modifiers": ["ctrl", "alt"], + "press_command": "drag_select", + "command": "coffee_goto_definition", + "press_args": {"by": "words"} + } +] \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/CoffeeComplete Plus (Autocompletion)/Default (OSX).sublime-keymap b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/CoffeeComplete Plus (Autocompletion)/Default (OSX).sublime-keymap new file mode 100644 index 0000000..3144828 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/CoffeeComplete Plus (Autocompletion)/Default (OSX).sublime-keymap @@ -0,0 +1,5 @@ +[ + { + "keys": ["ctrl+alt+d"], "command": "coffee_goto_definition" + } +] \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/CoffeeComplete Plus (Autocompletion)/Default (OSX).sublime-mousemap b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/CoffeeComplete Plus (Autocompletion)/Default (OSX).sublime-mousemap new file mode 100644 index 0000000..107d9e4 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/CoffeeComplete Plus (Autocompletion)/Default (OSX).sublime-mousemap @@ -0,0 +1,8 @@ +[ + { + "button": "button1", "count": 1, "modifiers": ["ctrl", "alt"], + "press_command": "drag_select", + "command": "coffee_goto_definition", + "press_args": {"by": "words"} + } +] \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/CoffeeComplete Plus (Autocompletion)/Default (Windows).sublime-keymap b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/CoffeeComplete Plus (Autocompletion)/Default (Windows).sublime-keymap new file mode 100644 index 0000000..3144828 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/CoffeeComplete Plus (Autocompletion)/Default (Windows).sublime-keymap @@ -0,0 +1,5 @@ +[ + { + "keys": ["ctrl+alt+d"], "command": "coffee_goto_definition" + } +] \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/CoffeeComplete Plus (Autocompletion)/Default (Windows).sublime-mousemap b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/CoffeeComplete Plus (Autocompletion)/Default (Windows).sublime-mousemap new file mode 100644 index 0000000..107d9e4 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/CoffeeComplete Plus (Autocompletion)/Default (Windows).sublime-mousemap @@ -0,0 +1,8 @@ +[ + { + "button": "button1", "count": 1, "modifiers": ["ctrl", "alt"], + "press_command": "drag_select", + "command": "coffee_goto_definition", + "press_args": {"by": "words"} + } +] \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/CoffeeComplete Plus (Autocompletion)/Default.sublime-commands b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/CoffeeComplete Plus (Autocompletion)/Default.sublime-commands new file mode 100644 index 0000000..3c1052a --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/CoffeeComplete Plus (Autocompletion)/Default.sublime-commands @@ -0,0 +1,3 @@ +[ + {"caption": "Coffee: Goto Definition", "command": "coffee_goto_definition"} +] \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/CoffeeComplete Plus (Autocompletion)/Main.sublime-menu b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/CoffeeComplete Plus (Autocompletion)/Main.sublime-menu new file mode 100644 index 0000000..2ec9272 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/CoffeeComplete Plus (Autocompletion)/Main.sublime-menu @@ -0,0 +1,160 @@ +[ + { + "caption": "Preferences", + "mnemonic": "n", + "id": "preferences", + "children": + [ + { + "caption": "Package Settings", + "mnemonic": "P", + "id": "package-settings", + "children": + [ + { + "caption": "CoffeeComplete Plus", + "children": + [ + { // README + "command": "open_file", + "args": {"file": "${packages}/CoffeeComplete Plus (Autocompletion)/README.md"}, + "caption": "README" + }, + { "caption": "-" }, + { // Settings - Default + "command": "open_file", + "args": {"file": "${packages}/CoffeeComplete Plus (Autocompletion)/CoffeeComplete Plus.sublime-settings"}, + "caption": "Settings – Default" + }, + { // Settings – User + "command": "open_file", + "args": {"file": "${packages}/User/CoffeeComplete Plus.sublime-settings"}, + "caption": "Settings – User" + }, + { "caption": "-" }, + { // Key Bindings – Default (OSX) + "command": "open_file", + "args": { + "file": "${packages}/CoffeeComplete Plus (Autocompletion)/Default (OSX).sublime-keymap", + "platform": "OSX" + }, + "caption": "Key Bindings – Default" + }, + { // Key Bindings – Default (Linux) + "command": "open_file", + "args": { + "file": "${packages}/CoffeeComplete Plus (Autocompletion)/Default (Linux).sublime-keymap", + "platform": "Linux" + }, + "caption": "Key Bindings – Default" + }, + { // Key Bindings – Default (Windows) + "command": "open_file", + "args": { + "file": "${packages}/CoffeeComplete Plus (Autocompletion)/Default (Windows).sublime-keymap", + "platform": "Windows" + }, + "caption": "Key Bindings – Default" + }, + { // Key Bindings – User (OSX) + "command": "open_file", + "args": { + "file": "${packages}/User/Default (OSX).sublime-keymap", + "platform": "OSX" + }, + "caption": "Key Bindings – User" + }, + { // Key Bindings – User (Linux) + "command": "open_file", + "args": { + "file": "${packages}/User/Default (Linux).sublime-keymap", + "platform": "Linux" + }, + "caption": "Key Bindings – User" + }, + { // Key Bindings – User (Windows) + "command": "open_file", + "args": { + "file": "${packages}/User/Default (Windows).sublime-keymap", + "platform": "Windows" + }, + "caption": "Key Bindings – User" + }, + { "caption": "-" }, + { // Mouse Bindings – Default (OSX) + "command": "open_file", + "args": { + "file": "${packages}/CoffeeComplete Plus (Autocompletion)/Default (OSX).sublime-mousemap", + "platform": "OSX" + }, + "caption": "Mouse Bindings – Default" + }, + { // Mouse Bindings – Default (Linux) + "command": "open_file", + "args": { + "file": "${packages}/CoffeeComplete Plus (Autocompletion)/Default (Linux).sublime-mousemap", + "platform": "Linux" + }, + "caption": "Mouse Bindings – Default" + }, + { // Mouse Bindings – Default (Windows) + "command": "open_file", + "args": { + "file": "${packages}/CoffeeComplete Plus (Autocompletion)/Default (Windows).sublime-mousemap", + "platform": "Windows" + }, + "caption": "Mouse Bindings – Default" + }, + { // Mouse Bindings – User (OSX) + "command": "open_file", + "args": { + "file": "${packages}/User/Default (OSX).sublime-mousemap", + "platform": "OSX" + }, + "caption": "Mouse Bindings – User" + }, + { // Mouse Bindings – User (Linux) + "command": "open_file", + "args": { + "file": "${packages}/User/Default (Linux).sublime-mousemap", + "platform": "Linux" + }, + "caption": "Mouse Bindings – User" + }, + { // Mouse Bindings – User (Windows) + "command": "open_file", + "args": { + "file": "${packages}/User/Default (Windows).sublime-mousemap", + "platform": "Windows" + }, + "caption": "Mouse Bindings – User" + }, + { "caption": "-" }, + { // Custom Types – Default + "command": "open_file", + "args": {"file": "${packages}/CoffeeComplete Plus (Autocompletion)/CoffeeComplete Plus Custom Types.sublime-settings"}, + "caption": "Custom Types – Default" + }, + { // Custom Types – User + "command": "open_file", + "args": {"file": "${packages}/User/CoffeeComplete Plus Custom Types.sublime-settings"}, + "caption": "Custom Types – User" + }, + { "caption": "-" }, + { // Built-In Types – Default + "command": "open_file", + "args": {"file": "${packages}/CoffeeComplete Plus (Autocompletion)/CoffeeComplete Plus Built-In Types.sublime-settings"}, + "caption": "Built-In Types – Default" + }, + { // Built-In Types – User + "command": "open_file", + "args": {"file": "${packages}/User/CoffeeComplete Plus Built-In Types.sublime-settings"}, + "caption": "Built-In Types – User" + } + ] + } + ] + } + ] + } +] diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/CoffeeComplete Plus (Autocompletion)/README.md b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/CoffeeComplete Plus (Autocompletion)/README.md new file mode 100644 index 0000000..0343c13 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/CoffeeComplete Plus (Autocompletion)/README.md @@ -0,0 +1,424 @@ +CoffeeComplete Plus +=================== + +CoffeeComplete Plus (CC+) is a [Sublime Text 2](http://www.sublimetext.com/2) plugin that scans your CoffeeScript files on demand and makes autocomplete suggestions for you. + +In addition, this plugin adds the "Coffee: Goto Definition" command, which will look up the class, function or variable definition of the selected token. + +Do you miss the old days? When, at the control-tap of a spacebar, your IDE joyfully came running to you, list in hand, asking, "what would you like, sir?" And that list actually made sense? And suggested items you were interested in? I missed those days, so I decided to do something about it. I learned about [Sublime Text 2](http://www.sublimetext.com/2). Best decision of my life. Then, I learned how to make plugins. My first order of business was to make this plugin—and now it's available for you to use. + +Autocompletions. Zooming to definitions. + +Let start coding again like the old days. With *style*. + +Installation +------------ + +### Package Control + +It is recommended that you use [Sublime Package Control](http://wbond.net/sublime_packages/package_control) to install CoffeeComplete Plus. If you have Package Control installed, use the Package Control: Install Package command and search for CoffeeComplete Plus. Ouila. Start coding easier. + +### Manual Installation + +In order to manually install CoffeeComplete Plus, clone the repository into your Sublime Text 2 `Packages` directory, which can be located by navigating to Preferences -> Browse Packages. Name the directory `CoffeeComplete Plus (Autocompletion)`. + +For your convenience: + +``` +git clone https://github.com/justinmahar/SublimeCSAutocompletePlus.git "CoffeeComplete Plus (Autocompletion)" +``` + +Usage +----- + +### Autocomplete + +Autocomplete can be triggered in coffee files by typing the dot `.` operator or the `@` symbol (which is shorthand for `this`). You can also press `ctrl+space` to trigger autocompletions manually. The plugin will then try to figure out what you're doing and propose a list of suggestions. + +Example usage: Inside a class, you type `this.`. A list of the available methods and properties is presented. + +### Goto Definition + +Looking for where a class, function or variable was defined? Look no further. + +Place your cursor on any word and press `ctrl+alt+d` in Windows/Linux, and `ctrl+alt+d` in OS X, to goto the definition of the selected class, function or variable. Life's good. + +Alternatively, use `ctrl+alt` + `left click` in Windows/Linux, and `ctrl+alt` + `left click` in OS X. + +Features +-------- + +### Autocomplete + +Autocomplete will make suggestions when you trigger autocomplete after a dot operator. It starts with the current view, then branches out to other coffee files. Because of this, most lookups are blazingly fast. You can configure CC+ to exclude certain directories and to only look in others. This will further increase speed as less searching will be needed. + +Autocomplete suggestions alphabetically show properties first, as indicated by a ○ symbol before each property name, followed by alphabetically sorted methods, as indicated by a ● symbol before each method name. Inherited properties and methods will be preceded by a Ⱶ symbol. This creates a nice visual breakdown of what you can do at any given time, and where things are coming from. Badass. + +For example: + + ○ property1 + ○ propertyTwo + ○ someOtherProperty + ● methodOne() + ● methodTwo(arg1, arg2) + ● theLastMethod(arg1, arg2, arg3) + Ⱶ○ inheritedProperty1 + Ⱶ○ inheritedPropertyTwo + Ⱶ● inheritedMethod1() + Ⱶ● inheritedMethod2(arg1, arg2) + +Here are the main features. In the examples, `[autocomplete]` represents the user action of triggering autocomplete, which is typically `ctrl+space`. + +* Suggests instance properties and methods when operating on an instance. + + myLamp = new LavaLamp() + # Suggests all instance properties and methods of LavaLamp. + myLamp.[autocomplete] + +* Suggests static properties and methods when operating on a class. + + # Suggests all static properties and methods of LavaLamp. + LavaLamp.[autocomplete] + +* Supports "this" keyword and any defined aliases. + + class LavaLamp + heatUp: -> + console.log "Heating up!" + coolDown: -> + console.log "Cooling down!" + moveBlobs: -> + # Suggests heatUp() and coolDown() methods + this.[autocomplete] + +* Any variable assigned to `this` in the constructor will be considered an instance property. + + class LavaLamp + constructor: (@color, size) -> + this.size = size + moveBlobs: -> + # Suggests color, size and moveBlobs() + this.[autocomplete] + +* Suggests super class properties and functions. This applies to both instance and static suggestions. + + # In the following example, we have a LavaLamp that extends Appliance. + # Each class has static and non-static properties and methods. + # Given the context, CC+ will suggest either static or non-static, + # and will walk up the class hierarchy. + + class Appliance + # Static + @WARRANTY_YEARS = 10 + @calculateWarrantyExpiration: (currentYear) -> + console.log "Expires: ", currentYear + Appliance.WARRANTY_YEARS + # Non-static + constructor: -> + this.isSwitchedOn = False + toggle: -> + this.isSwitchedOn = !this.isSwitchedOn + + class LavaLamp extends Appliance + # Static + @BEST_COLOR = "Red" + @isLampAwesome: (lamp) -> + if lamp.color == LavaLamp.BEST_COLOR + console.log "Definitely" + else + console.log "Probably" + # Non-static + constructor: (@color, size) -> + this.size = size + + moveBlobs: -> + # Suggests color, isSwitchedOn, size, moveBlobs(), toggle() + this.[autocomplete] + + # Suggests WARRANTY_YEARS and calculateWarrantyExpiration(), which are static. + Appliance.[autocomplete] + + # Suggests BEST_COLOR, WARRANTY_YEARS, calculateWarrantyExpiration(), and isLampAwesome() + # These are all static properties from the complete class heirarchy. + LavaLamp.[autocomplete] + +* After autocompleting a method, tab stops for parameters are provided (if applicable). +* Expects that you don't suck at naming things. Will assume a class is UpperCamelCase and everything else is lowerCamelCase. It still works either way; it will just be faster if things are named properly. +* For every 1 million autocompletions, a beautiful masseuse appears and gives you a massage. You must be tired after all that coding. + +### Support For Built-in Types + +CC+ now supports autocompletion for the following built-in types: + +* Array +* Boolean +* Date +* Function +* Number +* Object +* RegExp +* String +* JSON + +This makes life that much easier. + +In addition, autocomplete suggests inherited properties and methods from Object. + +### Custom Types + +If you find yourself using a third-party library often and would like to have autocompletions for that library, you can create custom type. This is essentially a collection of autocomplete suggestions. CC+ supports jQuery out of the box, but you can always add others. If you do add a custom type and would like to share it, please issue a pull request and I will add it to the plugin. If your library is used as function, like jQuery, you can map that function's return value to a type. See the configuration section for how to do this. + +### Type Hinting + +Document your code and you shall be rewarded in many ways. One of these way is autocompletion. Another of these ways is a warm, fuzzy feeling all over. + +CC+ can detect types using hints you provide it in comments. You can even add method headers with hints for parameters. + +* Variable assignment type hints + - When you assign a variable, you can add a type hint that CC+ will use to look up the class autocompletions for you. This type must be in square brackets, and in a single-line `#` comment on either the same line or the previous line, in the form `[TYPENAME]`. Other text can surround the type hint. + +``` + # The [String] to add type hinting for + myString = someObject.getSomething() + + # Now, CC+ knows that it's a String + myString.[autocomplete] + + # Alternate way to add type hinting + otherString = someObject.getSomethingElse() # It's a [String], son. +``` + +* Parameter type hints + - If you use [Codo](https://github.com/netzpirat/codo), or are in the habit of documenting your classes, you can add type hints for your method parameters as well. These hints must be in a single-line `#` comment above the method signature. The hint can either be in the form `[TYPENAME] parameterName` or `parameterName [TYPENAME]`. Other text can surround the type hint. + +``` + # [Animal] critter + # [Boolean] animalEscapes + feedAlligator: (critter, animalEscapes) -> + if animalEscapes + # CC+ knows that it's an Animal. Will he escape? Autocomplete and choose his destiny! + critter.[autocomplete] +``` + +* Method return type hints + - If a variable is assigned to the return value of a method, type hinting can collected from that method. The method must have a single-line `#` comment on a previous line with the hint `@return [TYPE]`. This is a bonus convenience. Remember, you can always use the regular assignment type hinting mentioned above when assigning variables! + +``` + class Alligator + + # @return [Animal] + getLastMeal: -> + this.lastMeal + + rememberGoodTimes: -> + critter = this.getLastMeal() + # CC+ will detect your return type hint and display suggestions for type Animal + console.log "I remember the time I ate a critter named " + critter.[autocomplete] + +``` + +### Data-Hiding With Private Member Exclusion + +CoffeeScript doesn't provide an explicit way to hide properties and methods of a class. [According to Jeremy Ashkenas](https://groups.google.com/forum/#!topic/coffeescript/jgG7DhvyzzM), creator of coffeescript: + +> The norm in JavaScript is that hiding stuff is not that big of a deal, and you prefix private properties of an object with an underscore, as a convention. + +So, it's left up to you. + +Using an underscore is all well and fine until your autocomplete list is all cluttered up with things you're not supposed to see. + +CC+ to the rescue. You can define regular expressions to exclude any members of your choosing. By default, members starting with an underscore are not shown when working outside of a class (i.e., not using `this.`). See the configuration section for how to add/remove exclusions. + +### Goto Definition + +Goto Definition is useful for finding where a class, function, or variable was defined or declared. Again, searching is performed from the current view and branches out to other files if nothing is found. With this, you can quickly jump between classes and zoom to functions—even ones defined in other files—with ease. + +* Supports classes, functions and variable assignment. +* Searches backwards from selected token for assignment, then forwards. +* Considers variables declared in for loops. +* Considers method parameters. +* Tries to find something rather than nothing. +* Includes both mouse and keyboard shortcuts for convenience. Code your way. + +### General + +* Asynchronous and fast lookups. That means no UI freezing while waiting for completions or Goto Definiton. Hate that. +* You can configure directories to be be excluded from global .coffee search. **(recommended)** +* You can configure the tool to only search in specific locations. **(recommended)** + +Default Key Bindings +-------------------- + +### Windows/Linux: + +Autocomplete: `ctrl+space` (after a dot operator) + +Goto Definition: `ctrl+alt+d` or `ctrl+alt`+`left click` + +### Mac OS X: + +Autocomplete: `ctrl+space` (after a dot operator) + +Goto Definition: `ctrl+alt+d` or `ctrl+alt`+`left click` + +Key bindings can be changed by navigating to Preferences -> Package Settings -> CoffeeComplete Plus -> Key Bindings. It is not recommended that you change the Default settings as they will be overwritten by plugin updates. Instead, make your changes in User settings, which will override the Default settings. + +Configuration +------------- + +CoffeeComplete Plus has the following configurable settings: + +### General Settings + +In `CoffeeComplete Plus.sublime-settings`: + +#### Excluded Directories + +* `coffee_autocomplete_plus_excluded_dirs` — Excluded directories. + - Directories to exclude from searching for CoffeeScript classes, functions and variables. All directories in your project are searched except for the ones that match the names listed in this setting. **This is recommended.** Some excluded directories have already been specified in settings. + - Expected value: Array of directory names. + - Example: + +``` + "coffee_autocomplete_plus_excluded_dirs" : [".git", "SVN", "pub", "docs"] +``` + +#### Path Restrictions + +* `coffee_autocomplete_plus_restricted_to_paths` — Restrict searching to these directories. + - Paths to restrict the search to. If one or more path is specified, searching will be restricted to `PATH_TO_PROJECT/your/defined/path`. For example, you specify `src/coffee`. Now, only `PROJECT_PATH/src/coffee` will be scanned. **This is recommended.** If `[]`, no restrictions are applied. + - Expected value: Array of paths relative to your project directory. + - Example: + +``` + "coffee_autocomplete_plus_restricted_to_paths" : ["src/coffee", "lib/src/coffee"] +``` + +#### Member Exclusion Patterns For Data Hiding + +* `coffee_autocomplete_plus_member_exclusion_regexes` — Regular expressions for members excluded from autocomplete suggestions. + - CoffeeScript doesn't provide a mechanism for making members `private` in the traditional sense. Conventionally, private members are prefixed with an underscore `_`. This configuration setting allows you to define regular expressions for members you would like to exclude. By default, members beginning with an underscore are excluded. + - Expected value: Array of Python regular expression strings. + - Example: + +``` + "coffee_autocomplete_plus_member_exclusion_regexes": ["^_"] // Excludes members prefixed with underscore +``` + +#### Customizing Autocomplete Trigger + +* `auto_complete_triggers` — Characters that trigger the autocomplete menu. + + - Sublime allows for context-specific triggers for the autocompletion menus. This allows the menu to show as soon as `.` or `@` are pressed, which are enabled by default. To customize these, use the following in settings and make the desired changes: + +``` + "auto_complete_triggers": + [ + {"characters": ".@", "selector": "source.coffee"} + ] +``` + +#### Aliases For `this` + +* `coffee_autocomplete_plus_this_aliases` — Aliases for `this` keyword + - Due to lexical scoping you sometimes need to assign an alias for `this`, such as `that` or `self`. Keep in mind, you can use a fat arrow `=>` to have CoffeeScript do this for you under the hood. Regardless, this config setting allows you to add or remove aliases that cause autocomplete to behave just like using `this` would. No futher searching—`this` will be assumed. + - Expected value: Array of alias strings. + - Example: + +``` + "coffee_autocomplete_plus_this_aliases" : ["that", "self"] +``` + +#### Mapped Function Return Types + +* `coffee_autocomplete_plus_function_return_types` — Mappings for the return types of special functions, like jQuery. + - You may want to make calls directly off of the returned values of special functions. For example, when using jQuery, you might type `$(selector).` and want some autocomplete suggestions. If you have a custom type defined, you can map the returns of function names, like `$` and `jQuery`, to that custom type. See the next config section for defining custom types. + - Expected value: Array of objects. Each object has a `function_names` property that maps to an array of string names, and a `type_name` property that maps to the string name of the type the functions return. + - Example: + +``` + "coffee_autocomplete_plus_function_return_types": + [ + { + "function_names": ["$", "jQuery"], + "type_name": "$" + } + ] +``` + +### Custom Types + +In `CoffeeComplete Plus Custom Types.sublime-settings`: + +* `coffee_autocomplete_plus_custom_types` -- Custom types, allowing libraries like jQuery. + - If you would like to define custom types, put them here. Autocomplete will then make the defined suggestions for you. By default, a type for jQuery is defined. + - Method arguments have a `name` property, and an option `insertion`, which will be the text that is actually inserted. For example, this is useful for inserting `->` syntax for callbacks. + - Use the `enabled` property to enable or disable a custom type. + - Use the following example as a starting point: + +``` + { + "name": "MyType", + "enabled": true, + "constructors": [{"args": []}], + "static_properties": [{"name": "CONSTANT_ONE"}, {"name": "CONSTANT_TWO"}], + "static_methods": + [ + {"name":"myStaticMethod", "args": [{"name": "arg1"}, {"name": "arg2"}]}, + {"name":"myStaticMethodTwo", "args": []} + ], + "instance_properties": [{"name": "thingOne"}, {"name": "thingTwo"}, {"name": "thingThree"}], + "instance_methods": + [ + {"name":"doStuffWithCallback", "args": [{"name": "numTimes"}, {"name": "callback()", "insertion": "->"}]}, + {"name":"doMoreStuff", "args": [{"name": "numTimes"}, {"name": "extraAmount"}]} + ] + } +``` + +### Built-In Types + +In `CoffeeComplete Plus Built-In Types.sublime-settings`: + +* `coffee_autocomplete_plus_built_in_types` -- Built-in types, like Object, Array, and String. + - These are JavaScript's build-in types. These specs were gleaned from the [Mozilla MDN](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects). + - Any of the built-in types can be disabled, if you'd like. Change the `enabled` property to `false`. + +To configure these settings, open Preferences -> Package Settings -> CoffeeComplete Plus. It is not recommended that you change the Default settings as they will be overwritten by plugin updates. Instead, make your changes in User settings, which will override the Default settings. + +Limitations and Plans +--------------------- + +> "Conceal a flaw, and the world will imagine the worst." — Marcus Aurelius, 16th Emperor of the Roman Empire + +Autocomplete is smart, but not Mensa smart. Under the hood, we're using regular expressions and lots of scanning. I coded this rather quickly, and it's my first plugin, so there may be (read: probably are) bugs. Please let me know if there are. As I build out functionality, I will try to fix its limitations. + +For now, here is the list of TBDs: + +* Clean up code. Make modular/reusable. First priority. +* Constructor support + - Add constructors to built-in types +* Additional built-in types (Error, etc) +* Optional parameter detection + - Square brackets indicate optional params. + - Example: `methodName(var1, optionalVar2="hey, I'm optional")` will autocomplete to `classInstance.methodName(var1, [optionalVar2])` +* Fix issues +* Goto Definition knows types of objects methods are called on. Right now, it makes a guess. +* Support for built-in types when getting the return type for a method. + +Far too many times I've installed a plugin only to be disappointed because it fell short of my expectations. If you feel this way, please let me know how I can make this plugin better for you and I will do my best. + +Happy coding! + +-Justin + +License +------- +CoffeeComplete Plus is licensed under the MIT license. + +Copyright (c) 2013 Justin Mahar + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/CoffeeComplete Plus (Autocompletion)/coffee_utils.py b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/CoffeeComplete Plus (Autocompletion)/coffee_utils.py new file mode 100644 index 0000000..9493f89 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/CoffeeComplete Plus (Autocompletion)/coffee_utils.py @@ -0,0 +1,1155 @@ +import sublime +import re +import os + +# TODO: +# - Document this file. +# - Split out functionality where possible. + +# This file is what happens when you code non-stop for several days. +# I tried to make the main files as easy to follow along as possible. +# This file, not so much. + +# Set to true to enable debug output +DEBUG = False + +SETTINGS_FILE_NAME = "CoffeeComplete Plus.sublime-settings" +PREFERENCES_COFFEE_EXCLUDED_DIRS = "coffee_autocomplete_plus_excluded_dirs" +PREFERENCES_COFFEE_RESTRICTED_TO_PATHS = "coffee_autocomplete_plus_restricted_to_paths" +PREFERENCES_THIS_ALIASES = "coffee_autocomplete_plus_this_aliases" +PREFERENCES_MEMBER_EXCLUSION_REGEXES = "coffee_autocomplete_plus_member_exclusion_regexes" +BUILT_IN_TYPES_SETTINGS_FILE_NAME = "CoffeeComplete Plus Built-In Types.sublime-settings" +BUILT_IN_TYPES_SETTINGS_KEY = "coffee_autocomplete_plus_built_in_types" +CUSTOM_TYPES_SETTINGS_FILE_NAME = "CoffeeComplete Plus Custom Types.sublime-settings" +CUSTOM_TYPES_SETTINGS_KEY = "coffee_autocomplete_plus_custom_types" +FUNCTION_RETURN_TYPES_SETTINGS_KEY = "coffee_autocomplete_plus_function_return_types" +FUNCTION_RETURN_TYPE_TYPE_NAME_KEY = "type_name" +FUNCTION_RETURN_TYPE_FUNCTION_NAMES_KEY = "function_names" + +COFFEESCRIPT_SYNTAX = r"CoffeeScript" +COFFEE_EXTENSION_WITH_DOT = "\.coffee|\.litcoffee|\.coffee\.md" +CONSTRUCTOR_KEYWORD = "constructor" +THIS_SUGAR_SYMBOL = "@" +THIS_KEYWORD = "this" +PERIOD_OPERATOR = "." +COFFEE_FILENAME_REGEX = r".+?" + re.escape(COFFEE_EXTENSION_WITH_DOT) +CLASS_REGEX = r"class\s+%s((\s*$)|[^a-zA-Z0-9_$])" +CLASS_REGEX_ANY = r"class\s+([a-zA-Z0-9_$]+)((\s*$)|[^a-zA-Z0-9_$])" +CLASS_REGEX_WITH_EXTENDS = r"class\s+%s\s*($|(\s+extends\s+([a-zA-Z0-9_$.]+)))" +SINGLE_LINE_COMMENT_REGEX = r"#.*?$" +TYPE_HINT_COMMENT_REGEX = r"#.*?\[([a-zA-Z0-9_$]+)\].*$" +TYPE_HINT_PARAMETER_COMMENT_REGEX = r"#.*?(\[([a-zA-Z0-9_$]+)\]\s*{var_name}((\s*$)|[^a-zA-Z0-9_$]))|({var_name}\s*\[([a-zA-Z0-9_$]+)\]((\s*$)|[^a-zA-Z0-9_$]))" +# Function regular expression. Matches: +# methodName = (aas,bsa, casd ) -> +FUNCTION_REGEX = r"(^|[^a-zA-Z0-9_$])(%s)\s*[:]\s*(\((.*?)\))?\s*[=\-]>" +FUNCTION_REGEX_ANY = r"(^|[^a-zA-Z0-9_$])(([a-zA-Z0-9_$]+))\s*[:]\s*(\((.*?)\))?\s*[=\-]>" +# Assignment regular expression. Matches: +# asdadasd = +ASSIGNMENT_REGEX = r"(^|[^a-zA-Z0-9_$])%s\s*=" +# Static assignment regex +STATIC_ASSIGNMENT_REGEX = r"^\s*([@]|(this\s*[.]))\s*([a-zA-Z0-9_$]+)\s*[:=]" +# Static function regex +STATIC_FUNCTION_REGEX = r"(^|[^a-zA-Z0-9_$])\s*([@]|(this\s*[.]))\s*([a-zA-Z0-9_$]+)\s*[:]\s*(\((.*?)\))?\s*[=\-]>" +# Regex for finding a function parameter. Call format on the string, with name=var_name +PARAM_REGEX = r"\(\s*(({name})|({name}\s*=?.*?[,].*?)|(.*?[,]\s*{name}\s*=?.*?[,].*?)|(.*?[,]\s*{name}))\s*=?.*?\)\s*[=\-]>" +# Regex for finding a variable declared in a for loop. +FOR_LOOP_REGEX = r"for\s*.*?[^a-zA-Z0-9_$]%s[^a-zA-Z0-9_$]" +# Regex for constructor @ params, used for type hinting. +CONSTRUCTOR_SELF_ASSIGNMENT_PARAM_REGEX = r"constructor\s*[:]\s*\(\s*((@{name})|(@{name}\s*[,].*?)|(.*?[,]\s*@{name}\s*[,].*?)|(.*?[,]\s*@{name}))\s*\)\s*[=\-]>\s*$" + +# Assignment with the value it's being assigned to. Matches: +# blah = new Dinosaur() +ASSIGNMENT_VALUE_WITH_DOT_REGEX = r"(^|[^a-zA-Z0-9_$])%s\s*=\s*(.*)" +ASSIGNMENT_VALUE_WITHOUT_DOT_REGEX = r"(^|[^a-zA-Z0-9_$.])%s\s*=\s*(.*)" + +# Used to determining what class is being created with the new keyword. Matches: +# new Macaroni +NEW_OPERATION_REGEX = r"new\s+([a-zA-Z0-9_$.]+)" + +PROPERTY_INDICATOR = u'\u25CB' +METHOD_INDICATOR = u'\u25CF' +INHERITED_INDICATOR = u'\u2C75' + +BUILT_IN_TYPES_TYPE_NAME_KEY = "name" +BUILT_IN_TYPES_TYPE_ENABLED_KEY = "enabled" +BUILT_IN_TYPES_CONSTRUCTOR_KEY = "constructor" +BUILT_IN_TYPES_STATIC_PROPERTIES_KEY = "static_properties" +BUILT_IN_TYPES_STATIC_PROPERTY_NAME_KEY = "name" +BUILT_IN_TYPES_STATIC_METHODS_KEY = "static_methods" +BUILT_IN_TYPES_STATIC_METHOD_NAME_KEY = "name" +BUILT_IN_TYPES_INSTANCE_PROPERTIES_KEY = "instance_properties" +BUILT_IN_TYPES_INSTANCE_PROPERTY_NAME_KEY = "name" +BUILT_IN_TYPES_INSTANCE_METHODS_KEY = "instance_methods" +BUILT_IN_TYPES_INSTANCE_METHOD_NAME_KEY = "name" +BUILT_IN_TYPES_METHOD_NAME_KEY = "name" +BUILT_IN_TYPES_METHOD_INSERTION_KEY = "insertion" +BUILT_IN_TYPES_METHOD_ARGS_KEY = "args" +BUILT_IN_TYPES_METHOD_ARG_NAME_KEY = "name" +BUILT_IN_TYPES_INHERITS_FROM_OBJECT_KEY = "inherits_from_object" + + +# Utility functions +def debug(message): + if DEBUG: + print message + + +def select_current_word(view): + if len(view.sel()) > 0: + selected_text = view.sel()[0] + word_region = view.word(selected_text) + view.sel().clear() + view.sel().add(word_region) + + +def get_selected_word(view): + word = "" + if len(view.sel()) > 0: + selected_text = view.sel()[0] + word_region = view.word(selected_text) + word = get_word_at(view, word_region) + return word + + +def get_word_at(view, region): + word = "" + word_region = view.word(region) + word = view.substr(word_region) + word = re.sub(r'[^a-zA-Z0-9_$]', '', word) + word = word.strip() + return word + + +def get_token_at(view, region): + token = "" + if len(view.sel()) > 0: + selected_line = view.line(region) + preceding_text = view.substr(sublime.Region(selected_line.begin(), region.begin())).strip() + token_regex = r"[^a-zA-Z0-9_$.@]*?([a-zA-Z0-9_$.@]+)$" + match = re.search(token_regex, preceding_text) + if match: + token = match.group(1) + token = token.strip() + return token + + +def get_preceding_symbol(view, prefix, locations): + index = locations[0] + symbol_region = sublime.Region(index - 1 - len(prefix), index - len(prefix)) + symbol = view.substr(symbol_region) + return symbol + + +def get_preceding_function_call(view): + function_call = "" + if len(view.sel()) > 0: + selected_text = view.sel()[0] + selected_line = view.line(sublime.Region(selected_text.begin() - 1, selected_text.begin() - 1)) + preceding_text = view.substr(sublime.Region(selected_line.begin(), selected_text.begin() - 1)).strip() + function_call_regex = r".*?([a-zA-Z0-9_$]+)\s*\(.*?\)" + match = re.search(function_call_regex, preceding_text) + if match: + function_call = match.group(1) + return function_call + + +def get_preceding_token(view): + token = "" + if len(view.sel()) > 0: + selected_text = view.sel()[0] + if selected_text.begin() > 2: + token_region = sublime.Region(selected_text.begin() - 1, selected_text.begin() - 1) + token = get_token_at(view, token_region) + return token + + +# Complete this. +def get_preceding_call_chain(view): + word = "" + if len(view.sel()) > 0: + selected_text = view.sel()[0] + selected_text = view.sel()[0] + selected_line = view.line(sublime.Region(selected_text.begin() - 1, selected_text.begin() - 1)) + preceding_text = view.substr(sublime.Region(selected_line.begin(), selected_text.begin() - 1)).strip() + function_call_regex = r".*?([a-zA-Z0-9_$]+)\s*\(.*?\)" + match = re.search(function_call_regex, preceding_text) + if match: + #function_call = match.group(1) + pass + return word + + +def is_capitalized(word): + capitalized = False + # Underscores are sometimes used to indicate an internal property, so we + # find the first occurrence of an a-zA-Z character. If not found, we assume lowercase. + az_word = re.sub("[^a-zA-Z]", "", word) + if len(az_word) > 0: + first_letter = az_word[0] + capitalized = first_letter.isupper() + + # Special case for $ + capitalized = capitalized | word.startswith("$") + + return capitalized + + +def get_files_in(directory_list, filename_regex, excluded_dirs): + files = [] + for next_directory in directory_list: + # http://docs.python.org/2/library/os.html?highlight=os.walk#os.walk + for path, dirs, filenames in os.walk(next_directory): + # print str(path) + for next_excluded_dir in excluded_dirs: + try: + dirs.remove(next_excluded_dir) + except: + pass + for next_file_name in filenames: + # http://docs.python.org/2/library/re.html + match = re.search(filename_regex, next_file_name) + if match: + # http://docs.python.org/2/library/os.path.html?highlight=os.path.join#os.path.join + next_full_path = os.path.join(path, next_file_name) + files.append(next_full_path) + return files + + +def get_lines_for_file(file_path): + lines = [] + try: + # http://docs.python.org/2/tutorial/inputoutput.html + opened_file = open(file_path, "r") # r = read only + lines = opened_file.readlines() + except: + pass + return lines + + +# Returns a tuple with (row, column, match, row_start_index), or None +def get_positions_of_regex_match_in_file(file_lines, regex): + found_a_match = False + matched_row = -1 + matched_column = -1 + match_found = None + line_start_index = -1 + + current_row = 0 + + current_line_start_index = 0 + for next_line in file_lines: + # Remove comments + modified_next_line = re.sub(SINGLE_LINE_COMMENT_REGEX, "", next_line) + match = re.search(regex, modified_next_line) + if match: + found_a_match = True + matched_row = current_row + matched_column = match.end() + match_found = match + line_start_index = current_line_start_index + break + current_row = current_row + 1 + current_line_start_index = current_line_start_index + len(next_line) + + positions_tuple = None + if found_a_match: + positions_tuple = (matched_row, matched_column, match_found, line_start_index) + + return positions_tuple + + +def open_file_at_position(window, file_path, row, column): + # Beef + # http://www.sublimetext.com/docs/2/api_reference.html#sublime.Window + path_with_position_encoding = file_path + ":" + str(row) + ":" + str(column) + window.open_file(path_with_position_encoding, sublime.ENCODED_POSITION) + return + + +# Returns a tuple with (file_path, row, column, match, row_start_index) +def find_location_of_regex_in_files(contents_regex, local_file_lines, global_file_path_list=[]): + # The match tuple containing the filename and positions. + # Will be returned as None if no matches are found. + file_match_tuple = None + + if local_file_lines: + # Search the file for the regex. + positions_tuple = get_positions_of_regex_match_in_file(local_file_lines, contents_regex) + if positions_tuple: + # We've found a match! Save the file path plus the positions and the match itself + file_match_tuple = tuple([None]) + positions_tuple + + # If we are to search globally... + if not file_match_tuple and global_file_path_list: + for next_file_path in global_file_path_list: + if next_file_path: + file_lines = get_lines_for_file(next_file_path) + # Search the file for the regex. + positions_tuple = get_positions_of_regex_match_in_file(file_lines, contents_regex) + if positions_tuple: + # We've found a match! Save the file path plus the positions and the match itself + file_match_tuple = tuple([next_file_path]) + positions_tuple + # Stop the for loop + break + return file_match_tuple + + +def select_region_in_view(view, region): + view.sel().clear() + view.sel().add(region) + # Refresh hack. + original_position = view.viewport_position() + view.set_viewport_position((original_position[0], original_position[1] + 1)) + view.set_viewport_position(original_position) + + +def get_progress_indicator_tuple(previous_indicator_tuple): + STATUS_MESSAGE_PROGRESS_INDICATOR = "[%s=%s]" + if not previous_indicator_tuple: + previous_indicator_tuple = ("", 0, 1) + progress_indicator_position = previous_indicator_tuple[1] + progress_indicator_direction = previous_indicator_tuple[2] + # This animates a little activity indicator in the status area. + # It animates an equals symbol bouncing back and fourth between square brackets. + # We calculate the padding around the equal based on the last known position. + num_spaces_before = progress_indicator_position % 8 + num_spaces_after = (7) - num_spaces_before + # When the equals hits the edge, we change directions. + # Direction is -1 for moving left and 1 for moving right. + if not num_spaces_after: + progress_indicator_direction = -1 + if not num_spaces_before: + progress_indicator_direction = 1 + progress_indicator_position += progress_indicator_direction + padding_before = ' ' * num_spaces_before + padding_after = ' ' * num_spaces_after + # Create the progress indication text + progress_indicator_text = STATUS_MESSAGE_PROGRESS_INDICATOR % (padding_before, padding_after) + # Return the progress indication tuple + return (progress_indicator_text, progress_indicator_position, progress_indicator_direction) + + +def get_syntax_name(view): + syntax = os.path.splitext(os.path.basename(view.settings().get('syntax')))[0] + return syntax + + +def is_coffee_syntax(view): + return bool(re.match(COFFEESCRIPT_SYNTAX, get_syntax_name(view))) + + +def get_this_type(file_lines, start_region): + + type_found = None + # Search backwards from current position for the type + # We're looking for a class definition + class_regex = CLASS_REGEX_ANY + + match_tuple = search_backwards_for(file_lines, class_regex, start_region) + if match_tuple: + # debug(str(match_tuple[0]) + ", " + str(match_tuple[1]) + ", " + match_tuple[2].group(1)) + type_found = match_tuple[2].group(1) + else: + debug("No match!") + + return type_found + + +def get_variable_type(file_lines, token, start_region, global_file_path_list, built_in_types, previous_variable_names=[]): + + type_found = None + + # Check for "this" + if token == "this": + type_found = get_this_type(file_lines, start_region) + elif token.startswith("@"): + token = "this." + token[1:] + + # We're looking for a variable assignent + assignment_regex = ASSIGNMENT_VALUE_WITH_DOT_REGEX % token + + # print "Assignment regex: " + assignment_regex + + # Search backwards from current position for the type + if not type_found: + match_tuple = search_backwards_for(file_lines, assignment_regex, start_region) + if match_tuple: + type_found = get_type_from_assignment_match_tuple(token, match_tuple, file_lines, previous_variable_names) + # Well, we found the assignment. But we don't know what it is. + # Let's try to find a variable name and get THAT variable type... + if not type_found: + type_found = get_type_from_assigned_variable_name(file_lines, token, match_tuple, global_file_path_list, built_in_types, previous_variable_names) + + # Let's try searching backwards for parameter hints in comments... + if not type_found: + # The regex used to search for the variable as a parameter in a method + param_regex = PARAM_REGEX.format(name=re.escape(token)) + match_tuple = search_backwards_for(file_lines, param_regex, start_region) + # We found the variable! it's a parameter. Let's find a comment with a type hint. + if match_tuple: + type_found = get_type_from_parameter_match_tuple(token, match_tuple, file_lines, previous_variable_names) + + # If backwards searching isn't working, at least try to find something... + if not type_found: + # Forward search from beginning for assignment: + match_tuple = get_positions_of_regex_match_in_file(file_lines, assignment_regex) + if match_tuple: + type_found = get_type_from_assignment_match_tuple(token, match_tuple, file_lines, previous_variable_names) + if not type_found: + type_found = get_type_from_assigned_variable_name(file_lines, token, match_tuple, global_file_path_list, built_in_types, previous_variable_names) + + # If still nothing, maybe it's an @ parameter in the constructor? + if not type_found: + + # Get the last word in the chain, if it's a chain. + # E.g. Get variableName from this.variableName.[autocomplete] + selected_word = token[token.rfind(".") + 1:] + + if token.startswith(THIS_KEYWORD + ".") or token.startswith(THIS_SUGAR_SYMBOL): + + # The regex used to search for the variable as a parameter in a method + param_regex = CONSTRUCTOR_SELF_ASSIGNMENT_PARAM_REGEX.format(name=re.escape(selected_word)) + + # Forward search from beginning for param: + match_tuple = get_positions_of_regex_match_in_file(file_lines, param_regex) + # We found the variable! it's a parameter. Let's find a comment with a type hint. + if match_tuple: + type_found = get_type_from_parameter_match_tuple(selected_word, match_tuple, file_lines) + + if not type_found: + # Find something. Anything! + word_assignment_regex = ASSIGNMENT_VALUE_WITHOUT_DOT_REGEX % selected_word + + # Forward search from beginning for assignment: + match_tuple = get_positions_of_regex_match_in_file(file_lines, word_assignment_regex) + if match_tuple: + type_found = get_type_from_assignment_match_tuple(token, match_tuple, file_lines, previous_variable_names) + if not type_found: + type_found = get_type_from_assigned_variable_name(file_lines, token, match_tuple, global_file_path_list, built_in_types, previous_variable_names) + + return type_found + + +def get_type_from_assigned_variable_name(file_lines, token, match_tuple, global_file_path_list, built_in_types, previous_variable_names=[]): + + type_found = None + + assignment_value_string = match_tuple[2].group(2).strip() + # row start index + column index + token_index = match_tuple[3] + match_tuple[1] + token_region = sublime.Region(token_index, token_index) + token_match = re.search(r"^([a-zA-Z0-9_$.]+)$", assignment_value_string) + if token_match: + next_token = token_match.group(1) + if next_token not in previous_variable_names: + previous_variable_names.append(token) + type_found = get_variable_type(file_lines, next_token, token_region, global_file_path_list, built_in_types, previous_variable_names) + + # Determine what type a method returns + if not type_found: + # print "assignment_value_string: " + assignment_value_string + method_call_regex = r"([a-zA-Z0-9_$.]+)\s*[.]\s*([a-zA-Z0-9_$]+)\s*\(" + method_call_match = re.search(method_call_regex, assignment_value_string) + if method_call_match: + object_name = method_call_match.group(1) + method_name = method_call_match.group(2) + object_type = get_variable_type(file_lines, object_name, token_region, global_file_path_list, built_in_types, previous_variable_names) + if object_type: + type_found = get_return_type_for_method(object_type, method_name, file_lines, global_file_path_list, built_in_types) + + return type_found + + +def get_return_type_for_method(object_type, method_name, file_lines, global_file_path_list, built_in_types): + + type_found = None + + next_class_to_scan = object_type + + # Search the class and all super classes + while next_class_to_scan and not type_found: + + class_regex = CLASS_REGEX % re.escape(next_class_to_scan) + # (file_path, row, column, match, row_start_index) + class_location_search_tuple = find_location_of_regex_in_files(class_regex, file_lines, global_file_path_list) + if class_location_search_tuple: + + file_found = class_location_search_tuple[0] + + # Consider if it was found locally, in the view + if not file_found: + class_file_lines = file_lines + else: + class_file_lines = get_lines_for_file(file_found) + + # If found, search for the method in question. + method_regex = FUNCTION_REGEX % re.escape(method_name) + positions_tuple = get_positions_of_regex_match_in_file(class_file_lines, method_regex) + # (row, column, match, row_start_index) + if positions_tuple: + # Check for comments, and hopefully the return hint, on previous rows. + matched_row = positions_tuple[0] + row_to_check_index = matched_row - 1 + + non_comment_code_reached = False + while not non_comment_code_reached and row_to_check_index >= 0 and not type_found: + current_row_text = class_file_lines[row_to_check_index] + + # Make sure this line only contains comments. + mod_line = re.sub(SINGLE_LINE_COMMENT_REGEX, "", current_row_text).strip() + # If it wasn't just a comment line... + if len(mod_line) > 0: + non_comment_code_reached = True + else: + # Search for hint: @return [TYPE] + return_type_hint_regex = r"@return\s*\[([a-zA-Z0-9_$]+)\]" + hint_match = re.search(return_type_hint_regex, current_row_text) + if hint_match: + # We found it! + type_found = hint_match.group(1) + row_to_check_index = row_to_check_index - 1 + + # If nothing was found, see if the class extends another one and is inheriting the method. + if not type_found: + extends_regex = CLASS_REGEX_WITH_EXTENDS % next_class_to_scan + # (row, column, match, row_start_index) + extends_match_positions = get_positions_of_regex_match_in_file(class_file_lines, extends_regex) + if extends_match_positions: + extends_match = extends_match_positions[2] + next_class_to_scan = extends_match.group(3) + else: + next_class_to_scan = None + return type_found + + +def get_type_from_assignment_match_tuple(variable_name, match_tuple, file_lines, previous_variable_names=[]): + + type_found = None + if match_tuple: + match = match_tuple[2] + assignment_value_string = match.group(2) + # Check for a type hint on current row or previous row. + # These will override anything else. + matched_row = match_tuple[0] + previous_row = matched_row - 1 + current_row_text = file_lines[matched_row] + hint_match = re.search(TYPE_HINT_COMMENT_REGEX, current_row_text) + if hint_match: + type_found = hint_match.group(1) + if not type_found and previous_row >= 0: + previous_row_text = file_lines[previous_row] + hint_match = re.search(TYPE_HINT_COMMENT_REGEX, previous_row_text) + if hint_match: + type_found = hint_match.group(1) + if not type_found: + assignment_value_string = re.sub(SINGLE_LINE_COMMENT_REGEX, "", assignment_value_string).strip() + type_found = get_type_from_assignment_value(assignment_value_string) + return type_found + + +def get_type_from_parameter_match_tuple(variable_name, match_tuple, file_lines, previous_variable_names=[]): + + type_found = None + if match_tuple: + # Check for comments, and hopefully type hints, on previous rows. + matched_row = match_tuple[0] + row_to_check_index = matched_row - 1 + + non_comment_code_reached = False + while not non_comment_code_reached and row_to_check_index >= 0 and not type_found: + current_row_text = file_lines[row_to_check_index] + + # Make sure this line only contains comments. + mod_line = re.sub(SINGLE_LINE_COMMENT_REGEX, "", current_row_text).strip() + # If it wasn't just a comment line... + if len(mod_line) > 0: + non_comment_code_reached = True + else: + # It's a comment. Let's look for a type hint in the form: + # variable_name [TYPE] ~OR~ [TYPE] variable_name + hint_regex = TYPE_HINT_PARAMETER_COMMENT_REGEX.format(var_name=re.escape(variable_name)) + hint_match = re.search(hint_regex, current_row_text) + if hint_match: + # One of these two groups contains the type... + if hint_match.group(2): + type_found = hint_match.group(2) + else: + type_found = hint_match.group(6) + row_to_check_index = row_to_check_index - 1 + return type_found + + +def get_type_from_assignment_value(assignment_value_string): + determined_type = None + + assignment_value_string = assignment_value_string.strip() + + # Check for built in types + object_regex = r"^\{.*\}$" + if not determined_type: + match = re.search(object_regex, assignment_value_string) + if match: + determined_type = "Object" + double_quote_string_regex = r"(^\".*\"$)|(^.*?\+\s*\".*?\"$)|(^\".*?\"\s*\+.*?$)|(^.*?\s*\+\s*\".*?\"\s*\+\s*.*?$)" + if not determined_type: + match = re.search(double_quote_string_regex, assignment_value_string) + if match: + determined_type = "String" + single_quote_string_regex = r"(^['].*[']$)|(^.*?\+\s*['].*?[']$)|(^['].*?[']\s*\+.*?$)|(^.*?\s*\+\s*['].*?[']\s*\+\s*.*?$)" + if not determined_type: + match = re.search(single_quote_string_regex, assignment_value_string) + if match: + determined_type = "String" + array_regex = r"^\[.*\]\s*$" + if not determined_type: + match = re.search(array_regex, assignment_value_string) + if match: + determined_type = "Array" + boolean_regex = r"^(true)|(false)$" + if not determined_type: + match = re.search(boolean_regex, assignment_value_string) + if match: + determined_type = "Boolean" + # http://stackoverflow.com/questions/4703390/how-to-extract-a-floating-number-from-a-string-in-python + number_regex = r"^[-+]?\d*\.\d+|\d+$" + if not determined_type: + match = re.search(number_regex, assignment_value_string) + if match: + determined_type = "Number" + regexp_regex = r"^/.*/[a-z]*$" + if not determined_type: + match = re.search(regexp_regex, assignment_value_string) + if match: + determined_type = "RegExp" + new_operation_regex = NEW_OPERATION_REGEX + if not determined_type: + match = re.search(new_operation_regex, assignment_value_string) + if match: + determined_type = get_class_from_end_of_chain(match.group(1)) + + return determined_type + + +# Tuple returned: (matched_row, matched_column, match, row_start_index) +def search_backwards_for(file_lines, regex, start_region): + + matched_row = -1 + matched_column = -1 + match_found = None + row_start_index = -1 + + start_index = start_region.begin() + # debug("start: " + str(start_index)) + characters_consumed = 0 + start_line = -1 + indentation_size = 0 + current_line_index = 0 + for next_line in file_lines: + # Find the line we're starting on... + offset = start_index - characters_consumed + if offset <= len(next_line) + 1: + # debug("Start line: " + next_line) + characters_consumed = characters_consumed + len(next_line) + indentation_size = get_indentation_size(next_line) + start_line = current_line_index + break + + characters_consumed = characters_consumed + len(next_line) + current_line_index = current_line_index + 1 + + row_start_index = characters_consumed + + if start_line >= 0: + # debug("start line: " + str(start_line)) + # Go backwards, searching for the class definition. + for i in reversed(range(start_line + 1)): + previous_line = file_lines[i] + # print "Next line: " + previous_line[:-1] + row_start_index = row_start_index - len(previous_line) + # debug("Line " + str(i) + ": " + re.sub("\n", "", previous_line)) + # Returns -1 for empty lines or lines with comments only. + next_line_indentation = get_indentation_size(previous_line) + #debug("Seeking <= indentation_size: " + str(indentation_size) + ", Current: " + str(next_line_indentation)) + # Ignore lines with larger indentation sizes and empty lines (or lines with comments only) + if next_line_indentation >= 0 and next_line_indentation <= indentation_size: + indentation_size = next_line_indentation + # Check for the class + match = re.search(regex, previous_line) + if match: + matched_row = i + matched_column = match.end() + match_found = match + break + match_tuple = None + if match_found: + match_tuple = (matched_row, matched_column, match_found, row_start_index) + return match_tuple + + +def get_indentation_size(line_of_text): + size = -1 + mod_line = re.sub("\n", "", line_of_text) + mod_line = re.sub(SINGLE_LINE_COMMENT_REGEX, "", mod_line) + # If it wasn't just a comment line... + if len(mod_line.strip()) > 0: + mod_line = re.sub(r"[^\t ].*", "", mod_line) + size = len(mod_line) + # debug("Indent size [" + str(size) + "]:\n" + re.sub("\n", "", line_of_text)) + return size + + +def get_completions_for_class(class_name, search_statically, local_file_lines, prefix, global_file_path_list, built_in_types, member_exclusion_regexes, show_private): + + # TODO: Use prefix to make suggestions. + + completions = [] + scanned_classes = [] + original_class_name_found = False + + function_completions = [] + object_completions = [] + + # First, determine if it is a built in type and return those completions... + # Built-in types include String, Number, etc, and are configurable in settings. + for next_built_in_type in built_in_types: + try: + if next_built_in_type[BUILT_IN_TYPES_TYPE_ENABLED_KEY]: + next_class_name = next_built_in_type[BUILT_IN_TYPES_TYPE_NAME_KEY] + if next_class_name == class_name: + # We are looking at a built-in type! Collect completions for it... + completions = get_completions_for_built_in_type(next_built_in_type, search_statically, False, member_exclusion_regexes) + original_class_name_found = True + elif next_class_name == "Function" and not function_completions: + function_completions = get_completions_for_built_in_type(next_built_in_type, False, True, member_exclusion_regexes) + elif next_class_name == "Object" and not object_completions: + object_completions = get_completions_for_built_in_type(next_built_in_type, False, True, member_exclusion_regexes) + except Exception, e: + print repr(e) + + # If we didn't find completions for a built-in type, look further... + if not completions: + current_class_name = class_name + is_inherited = False + while current_class_name and current_class_name not in scanned_classes: + # print "Scanning " + current_class_name + "..." + # (class_found, completions, next_class_to_scan) + completion_tuple = (False, [], None) + if local_file_lines: + # print "Searching locally..." + # Search in local file. + if search_statically: + completion_tuple = collect_static_completions_from_file(local_file_lines, current_class_name, is_inherited, member_exclusion_regexes, show_private) + else: + completion_tuple = collect_instance_completions_from_file(local_file_lines, current_class_name, is_inherited, member_exclusion_regexes, show_private) + + # Search globally if nothing found and not local only... + if global_file_path_list and (not completion_tuple or not completion_tuple[0]): + class_regex = CLASS_REGEX % re.escape(current_class_name) + global_class_location_search_tuple = find_location_of_regex_in_files(class_regex, None, global_file_path_list) + if global_class_location_search_tuple: + # If found, perform Class method collection. + file_to_open = global_class_location_search_tuple[0] + class_file_lines = get_lines_for_file(file_to_open) + if search_statically: + completion_tuple = collect_static_completions_from_file(class_file_lines, current_class_name, is_inherited, member_exclusion_regexes, show_private) + else: + completion_tuple = collect_instance_completions_from_file(class_file_lines, current_class_name, is_inherited, member_exclusion_regexes, show_private) + + if current_class_name == class_name and completion_tuple[0]: + original_class_name_found = True + + # print "Tuple: " + str(completion_tuple) + completions.extend(completion_tuple[1]) + scanned_classes.append(current_class_name) + current_class_name = completion_tuple[2] + is_inherited = True + + if original_class_name_found: + # Add Object completions (if available) -- Everything is an Object + completions.extend(object_completions) + if search_statically: + completions.extend(function_completions) + + # Remove all duplicates + completions = list(set(completions)) + # Sort + completions.sort() + return completions + + +def case_insensitive_startswith(original_string, prefix): + return original_string.lower().startswith(prefix.lower()) + + +def get_completions_for_built_in_type(built_in_type, is_static, is_inherited, member_exclusion_regexes): + completions = [] + if is_static: + static_properties = [] + static_property_objs = built_in_type[BUILT_IN_TYPES_STATIC_PROPERTIES_KEY] + for next_static_property_obj in static_property_objs: + next_static_property = next_static_property_obj[BUILT_IN_TYPES_STATIC_PROPERTY_NAME_KEY] + if not is_member_excluded(next_static_property, member_exclusion_regexes): + static_properties.append(next_static_property) + for next_static_property in static_properties: + next_completion = get_property_completion_tuple(next_static_property, is_inherited) + completions.append(next_completion) + + static_methods = built_in_type[BUILT_IN_TYPES_STATIC_METHODS_KEY] + for next_static_method in static_methods: + method_name = next_static_method[BUILT_IN_TYPES_METHOD_NAME_KEY] + if not is_member_excluded(method_name, member_exclusion_regexes): + method_args = [] + method_insertions = [] + method_args_objs = next_static_method[BUILT_IN_TYPES_METHOD_ARGS_KEY] + for next_method_arg_obj in method_args_objs: + method_arg = next_method_arg_obj[BUILT_IN_TYPES_METHOD_ARG_NAME_KEY] + method_args.append(method_arg) + method_insertion = method_arg + try: + method_insertion = next_method_arg_obj[BUILT_IN_TYPES_METHOD_INSERTION_KEY] + except: + pass + method_insertions.append(method_insertion) + next_completion = get_method_completion_tuple(method_name, method_args, method_insertions, is_inherited) + completions.append(next_completion) + else: + instance_properties = [] + instance_property_objs = built_in_type[BUILT_IN_TYPES_INSTANCE_PROPERTIES_KEY] + for next_instance_property_obj in instance_property_objs: + next_instance_property = next_instance_property_obj[BUILT_IN_TYPES_INSTANCE_PROPERTY_NAME_KEY] + if not is_member_excluded(next_instance_property, member_exclusion_regexes): + instance_properties.append(next_instance_property_obj[BUILT_IN_TYPES_INSTANCE_PROPERTY_NAME_KEY]) + for next_instance_property in instance_properties: + next_completion = get_property_completion_tuple(next_instance_property, is_inherited) + completions.append(next_completion) + + instance_methods = built_in_type[BUILT_IN_TYPES_INSTANCE_METHODS_KEY] + for next_instance_method in instance_methods: + method_name = next_instance_method[BUILT_IN_TYPES_METHOD_NAME_KEY] + if not is_member_excluded(method_name, member_exclusion_regexes): + method_args = [] + method_insertions = [] + method_args_objs = next_instance_method[BUILT_IN_TYPES_METHOD_ARGS_KEY] + for next_method_arg_obj in method_args_objs: + method_arg = next_method_arg_obj[BUILT_IN_TYPES_METHOD_ARG_NAME_KEY] + method_args.append(method_arg) + method_insertion = method_arg + try: + method_insertion = next_method_arg_obj[BUILT_IN_TYPES_METHOD_INSERTION_KEY] + except: + pass + method_insertions.append(method_insertion) + next_completion = get_method_completion_tuple(method_name, method_args, method_insertions, is_inherited) + completions.append(next_completion) + return completions + + +def collect_instance_completions_from_file(file_lines, class_name, is_inherited, member_exclusion_regexes, show_private): + + completions = [] + extended_class = None + class_found = False + + property_completions = [] + function_completions = [] + + class_and_extends_regex = CLASS_REGEX_WITH_EXTENDS % class_name + + # Find class in file lines + match_tuple = get_positions_of_regex_match_in_file(file_lines, class_and_extends_regex) + if match_tuple: + class_found = True + row = match_tuple[0] + match = match_tuple[2] + + extended_class = match.group(3) + if extended_class: + extended_class = get_class_from_end_of_chain(extended_class) + + # If anything is equal to this after the first line, stop looking. + # At that point, the class definition has ended. + indentation_size = get_indentation_size(file_lines[row]) + # print str(indentation_size) + ": " + file_lines[row] + # Let's dig for some info on this class! + if row + 1 < len(file_lines): + inside_constructor = False + constructor_indentation = -1 + for row_index in range(row + 1, len(file_lines)): + next_row = file_lines[row_index] + next_indentation = get_indentation_size(next_row) + # print str(next_indentation) + ": " + next_row + if next_indentation >= 0: + if next_indentation > indentation_size: + if inside_constructor and next_indentation <= constructor_indentation: + inside_constructor = False + if inside_constructor: + this_assignment_regex = "([@]|(this\s*[.]))\s*([a-zA-Z0-9_$]+)\s*=" + match = re.search(this_assignment_regex, next_row) + if match: + prop = match.group(3) + if show_private or not is_member_excluded(prop, member_exclusion_regexes): + prop_completion_alias = get_property_completion_alias(prop, is_inherited) + prop_completion_insertion = get_property_completion_insertion(prop) + prop_completion = (prop_completion_alias, prop_completion_insertion) + if prop_completion not in property_completions: + property_completions.append(prop_completion) + else: # Not in constructor + # Look for method definitions + function_regex = FUNCTION_REGEX_ANY + match = re.search(function_regex, next_row) + if match and not re.search(STATIC_FUNCTION_REGEX, next_row): + function_name = match.group(2) + function_args_string = match.group(5) + if show_private or not is_member_excluded(function_name, member_exclusion_regexes): + if function_name != CONSTRUCTOR_KEYWORD: + function_args_list = [] + if function_args_string: + function_args_list = function_args_string.split(",") + for i in range(len(function_args_list)): + # Fix each one up... + next_arg = function_args_list[i] + next_arg = next_arg.strip() + next_arg = re.sub("[^a-zA-Z0-9_$].*", "", next_arg) + function_args_list[i] = re.sub(THIS_SUGAR_SYMBOL, "", next_arg) + function_alias = get_method_completion_alias(function_name, function_args_list, is_inherited) + function_insertion = get_method_completion_insertion(function_name, function_args_list) + function_completion = (function_alias, function_insertion) + if function_completion not in function_completions: + function_completions.append(function_completion) + else: + function_args_list = [] + if function_args_string: + function_args_list = function_args_string.split(",") + for i in range(len(function_args_list)): + # Check if it starts with @ -- this indicates an auto-set class variable + next_arg = function_args_list[i] + next_arg = next_arg.strip() + if next_arg.startswith(THIS_SUGAR_SYMBOL): + # Clean it up... + next_arg = re.sub(THIS_SUGAR_SYMBOL, "", next_arg) + next_arg = re.sub("[^a-zA-Z0-9_$].*", "", next_arg) + if show_private or not is_member_excluded(next_arg, member_exclusion_regexes): + prop_completion_alias = get_property_completion_alias(next_arg, is_inherited) + prop_completion_insertion = get_property_completion_insertion(next_arg) + prop_completion = (prop_completion_alias, prop_completion_insertion) + if prop_completion not in property_completions: + property_completions.append(prop_completion) + inside_constructor = True + constructor_indentation = get_indentation_size(next_row) + else: + # Indentation limit hit. We're not in the class anymore. + break + + completions = property_completions + function_completions + completion_tuple = (class_found, completions, extended_class) + return completion_tuple + + +def get_class_from_end_of_chain(dot_operation_chain): + class_at_end = dot_operation_chain + next_period_index = class_at_end.find(PERIOD_OPERATOR) + while next_period_index >= 0: + class_at_end = class_at_end[(next_period_index + 1):] + class_at_end.strip() + next_period_index = class_at_end.find(PERIOD_OPERATOR) + if len(class_at_end) == 0: + class_at_end = None + return class_at_end + + +def collect_static_completions_from_file(file_lines, class_name, is_inherited, member_exclusion_regexes, show_private): + + completions = [] + extended_class = None + class_found = False + + property_completions = [] + function_completions = [] + + class_and_extends_regex = CLASS_REGEX_WITH_EXTENDS % class_name + + # Find class in file lines + match_tuple = get_positions_of_regex_match_in_file(file_lines, class_and_extends_regex) + if match_tuple: + class_found = True + row = match_tuple[0] + match = match_tuple[2] + + extended_class = match.group(3) + if extended_class: + # Clean it up. + next_period_index = extended_class.find(PERIOD_OPERATOR) + while next_period_index >= 0: + extended_class = extended_class[(next_period_index + 1):] + extended_class.strip() + next_period_index = extended_class.find(PERIOD_OPERATOR) + if len(extended_class) == 0: + extended_class = None + + # If anything is equal to this after the first line, stop looking. + # At that point, the class definition has ended. + indentation_size = get_indentation_size(file_lines[row]) + + # Let's dig for some info on this class! + if row + 1 < len(file_lines): + + previous_indentation = -1 + + for row_index in range(row + 1, len(file_lines)): + next_row = file_lines[row_index] + next_indentation = get_indentation_size(next_row) + # print str(next_indentation) + ": " + next_row + if next_indentation >= 0: + if next_indentation > indentation_size: + # print "Next: " + str(next_indentation) + ", Prev: " + str(previous_indentation) + # Haven't found anything yet... + # Look for class-level definitions... + # If current line indentation is greater than previous indentation, we're in a definition + if next_indentation > previous_indentation and previous_indentation >= 0: + pass + # Otherwise, save this indentation and examine the current line, as it's class-level + else: + previous_indentation = next_indentation + function_regex = STATIC_FUNCTION_REGEX + match = re.search(function_regex, next_row) + if match: + function_name = match.group(4) + if show_private or not is_member_excluded(function_name, member_exclusion_regexes): + function_args_string = match.group(6) + function_args_list = [] + if function_args_string: + function_args_list = function_args_string.split(",") + for i in range(len(function_args_list)): + # Fix each one up... + next_arg = function_args_list[i] + next_arg = next_arg.strip() + next_arg = re.sub("[^a-zA-Z0-9_$].*", "", next_arg) + function_args_list[i] = next_arg + function_alias = get_method_completion_alias(function_name, function_args_list, is_inherited) + function_insertion = get_method_completion_insertion(function_name, function_args_list) + function_completion = (function_alias, function_insertion) + if function_completion not in function_completions: + function_completions.append(function_completion) + else: + # Look for static assignment + assignment_regex = STATIC_ASSIGNMENT_REGEX + match = re.search(assignment_regex, next_row) + if match: + prop = match.group(3) + if show_private or not is_member_excluded(prop, member_exclusion_regexes): + prop_completion_alias = get_property_completion_alias(prop, is_inherited) + prop_completion_insertion = get_property_completion_insertion(prop) + prop_completion = (prop_completion_alias, prop_completion_insertion) + if prop_completion not in property_completions: + property_completions.append(prop_completion) + else: + # Indentation limit hit. We're not in the class anymore. + break + + completions = property_completions + function_completions + completion_tuple = (class_found, completions, extended_class) + return completion_tuple + + +def get_property_completion_alias(property_name, is_inherited=False): + indicator = PROPERTY_INDICATOR + if is_inherited: + indicator = INHERITED_INDICATOR + indicator + completion_string = indicator + " " + property_name + return completion_string + + +def get_property_completion_insertion(property_name): + completion_string = property_name + completion_string = re.sub("[$]", "\$", completion_string) + return completion_string + + +def get_property_completion_tuple(property_name, is_inherited=False): + completion_tuple = (get_property_completion_alias(property_name, is_inherited), get_property_completion_insertion(property_name)) + return completion_tuple + + +def get_method_completion_alias(method_name, args, is_inherited=False): + indicator = METHOD_INDICATOR + if is_inherited: + indicator = INHERITED_INDICATOR + indicator + completion_string = indicator + " " + method_name + "(" + for i in range(len(args)): + completion_string = completion_string + args[i] + if i < len(args) - 1: + completion_string = completion_string + ", " + completion_string = completion_string + ")" + return completion_string + + +def get_method_completion_insertion(method_name, args): + + no_parens = False + + completion_string = re.sub("[$]", "\$", method_name) + + if len(args) == 1: + function_match = re.search(r".*?[=\-]>.*", args[0]) + if function_match: + no_parens = True + + if no_parens: + completion_string = completion_string + " " + else: + completion_string = completion_string + "(" + + for i in range(len(args)): + escaped_arg = re.sub("[$]", "\$", args[i]) + completion_string = completion_string + "${" + str(i + 1) + ":" + escaped_arg + "}" + if i < len(args) - 1: + completion_string = completion_string + ", " + + if not no_parens: + completion_string = completion_string + ")" + + return completion_string + + +def get_method_completion_tuple(method_name, arg_names, arg_insertions, is_inherited=False): + completion_tuple = (get_method_completion_alias(method_name, arg_names, is_inherited), get_method_completion_insertion(method_name, arg_insertions)) + return completion_tuple + + +def get_view_contents(view): + contents = "" + start = 0 + end = view.size() - 1 + if end > start: + entire_doc_region = sublime.Region(start, end) + contents = view.substr(entire_doc_region) + return contents + + +def convert_file_contents_to_lines(contents): + lines = contents.split("\n") + count = len(lines) + for i in range(count): + # Don't add to the last one--that would put an extra \n + if i < count - 1: + lines[i] = lines[i] + "\n" + return lines + + +def get_view_content_lines(view): + return convert_file_contents_to_lines(get_view_contents(view)) + + +def is_autocomplete_trigger(text): + trigger = False + trigger = trigger or text == THIS_SUGAR_SYMBOL + trigger = trigger or text == PERIOD_OPERATOR + return trigger + + +def is_member_excluded(member, exclusion_regexes): + excluded = False + for next_exclusion_regex in exclusion_regexes: + if re.search(next_exclusion_regex, member): + excluded = True + return excluded diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/CoffeeComplete Plus (Autocompletion)/messages.json b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/CoffeeComplete Plus (Autocompletion)/messages.json new file mode 100644 index 0000000..4f51010 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/CoffeeComplete Plus (Autocompletion)/messages.json @@ -0,0 +1,3 @@ +{ + "install": "README.md" +} \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/CoffeeComplete Plus (Autocompletion)/package-metadata.json b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/CoffeeComplete Plus (Autocompletion)/package-metadata.json new file mode 100644 index 0000000..6edb4ef --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/CoffeeComplete Plus (Autocompletion)/package-metadata.json @@ -0,0 +1 @@ +{"url": "https://github.com/justinmahar/SublimeCSAutocompletePlus", "version": "2013.03.20.10.00.10", "description": "CoffeeScript autocompletions and more!"} \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/DocBlockr/Add DocBlockr Line Before.sublime-macro b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/DocBlockr/Add DocBlockr Line Before.sublime-macro new file mode 100644 index 0000000..0db4daf --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/DocBlockr/Add DocBlockr Line Before.sublime-macro @@ -0,0 +1,7 @@ +[ + {"command": "move_to", "args": {"to": "bol"}}, + {"command": "insert_snippet", "args": { + "contents": "${TM_CURRENT_LINE/^\\s*(\\*\\s*).*$/$1/}\n" + }}, + {"command": "move", "args": {"by": "lines", "forward": false}} +] diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/DocBlockr/Add DocBlockr Line.sublime-macro b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/DocBlockr/Add DocBlockr Line.sublime-macro new file mode 100644 index 0000000..2726a69 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/DocBlockr/Add DocBlockr Line.sublime-macro @@ -0,0 +1,6 @@ +[ + {"command": "move_to", "args": {"to": "hardeol"}}, + {"command": "insert_snippet", "args": { + "contents": "\n${TM_CURRENT_LINE/^\\s*(\\*\\s*).*$/$1/}" + }} +] diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/DocBlockr/Base File.sublime-settings b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/DocBlockr/Base File.sublime-settings new file mode 100644 index 0000000..fcf1cb2 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/DocBlockr/Base File.sublime-settings @@ -0,0 +1,94 @@ +{ + // If true, when in a docblock, pressing tab after a @tag line (like @param, @return) + // will indent to the description. This is useful if you are writing a long description + // and want that block of text to stay aligned. + "jsdocs_deep_indent": true, + + // If true, then pressing enter while in a double-slash comment (like this one) + // will automatically add two slashes to the next line as well + "jsdocs_extend_double_slash": true, + + // the number of spaces to add after the leading * + "jsdocs_indentation_spaces": 1, + + // The number of spaces to add after the leading * in lines under the first line of each + // paragraph. This is only used together with automatic line wrapping. For example, a value + // of 3 might look like this: + // + // /** + // * Duis sed arcu non tellus eleifend ullamcorper quis non erat. Curabitur + // * metus elit, ultrices et tristique a, blandit at justo. + // * @param {String} foo Lorem ipsum dolor sit amet. + // * @param {Number} bar Nullam fringilla feugiat pretium. Quisque + // * consectetur, risus eu pellentesque tincidunt, nulla ipsum imperdiet + // * massa, sit amet adipiscing dolor. + // * @return {[Type]} + // */ + "jsdocs_indentation_spaces_same_para": 1, + + // whether the words following the @tags should align. + // Possible values are 'no', 'shallow', 'deep' + // For backwards compatibility, false is equivalent to 'no', true is equivalent to 'shallow' + // + // 'shallow' will just align the first words after the tag. eg: + // @param {MyCustomClass} myVariable desc1 + // @return {String} foo desc2 + // @property {Number} blahblah desc3 + // + // 'deep' will align each component of the tags, eg: + // @param {MyCustomClass} myVariable desc1 + // @return {String} foo desc2 + // @property {Number} blahblah desc3 + "jsdocs_align_tags": "deep", + + // Any additional boilerplate tags which should be added to each block. Should be an array of strings. + // Note that this only applies when a docblock is opened directly preceding a function. + // Tab points can be added by using snippet syntax, eg: ${1:default text} + "jsdocs_extra_tags": [], + + // A map to determine the value of variables, should hungarian notation (or similar) be in use + "jsdocs_notation_map": [], + + // Since there seems to be no agreed standard for "@return" or "@returns", use this setting to rename it as you wish. + "jsdocs_return_tag": "@return", + + // Add a '[description]' placeholder for the return tag? + "jsdocs_return_description": true, + + // Add a '[description]' placeholder for the param tag? + "jsdocs_param_description": true, + + // Whether there should be blank lines added between the description line, and between tags of different types. + // If true, the output might look like this: + // + // /** + // * [description] + // * + // * @param {String} foo + // * @param {Number} bar + // * + // * @return {[Type]} + // */ + "jsdocs_spacer_between_sections": false, + + // Whether each section should be indented to the same level, or indent each one individually. + // (When true, the @param section will lose the extra space immediately after each '@param'). + "jsdocs_per_section_indent": false, + + // Minimum spaces between cols (default is 1). For example, a value + // of 2 might look like this: + // + // /** + // * Duis sed arcu non tellus eleifend ullamcorper quis non erat. Curabitur + // * + // * @param {String} foo Lorem ipsum dolor sit amet. + // * @param {Number} bar Nullam fringilla feugiat pretium. Quisque + // * + // * @return {[Type]} description + // */ + "jsdocs_min_spaces_between_columns": 1, + + // indicates whether the @method tag should be added automatically + "jsdocs_autoadd_method_tag": false + +} diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/DocBlockr/Default (Linux).sublime-keymap b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/DocBlockr/Default (Linux).sublime-keymap new file mode 100644 index 0000000..bab2c68 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/DocBlockr/Default (Linux).sublime-keymap @@ -0,0 +1,7 @@ +[ + { "keys": ["alt+shift+tab"], "command": "jsdocs_reparse", "context": + [ + { "key": "selector", "operator": "equal", "operand": "comment.block" } + ] + } +] diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/DocBlockr/Default (OSX).sublime-keymap b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/DocBlockr/Default (OSX).sublime-keymap new file mode 100644 index 0000000..17ed188 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/DocBlockr/Default (OSX).sublime-keymap @@ -0,0 +1,36 @@ +[ + { "keys": ["super+j"], "command": "jsdocs_join", "context": + [ + { "key": "selector", "operator": "equal", "operand": "comment.block" } + ] + }, + { "keys": ["super+j"], "command": "jsdocs_join", "context": + [ + { "key": "selector", "operator": "equal", "operand": "comment.line" } + ] + }, + { "keys": ["super+alt+q"], "command": "jsdocs_wrap_lines", + "context": [ + { "key": "selector", "operator": "equal", "operand": "comment.block", "match_all": true } + ] + }, + // add line after, in a DocBlock + { "keys": ["super+enter"], "command": "run_macro_file", "args": {"file": "Packages/DocBlockr/Add DocBlockr Line.sublime-macro"}, + "context": [ + { "key": "setting.auto_indent", "operator": "equal", "operand": true, "match_all": true }, + { "key": "selector", "operator": "equal", "operand": "comment.block", "match_all": true }, + { "key": "auto_complete_visible", "operator": "equal", "operand": false, "match_all": true }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*\\*", "match_all": true } + ] + }, + + // add line before, in a DocBlock + { "keys": ["super+shift+enter"], "command": "run_macro_file", "args": {"file": "Packages/DocBlockr/Add DocBlockr Line Before.sublime-macro"}, + "context": [ + { "key": "setting.auto_indent", "operator": "equal", "operand": true, "match_all": true }, + { "key": "selector", "operator": "equal", "operand": "comment.block", "match_all": true }, + { "key": "auto_complete_visible", "operator": "equal", "operand": false, "match_all": true }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*\\*", "match_all": true } + ] + } +] diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/DocBlockr/Default.sublime-commands b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/DocBlockr/Default.sublime-commands new file mode 100644 index 0000000..338c837 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/DocBlockr/Default.sublime-commands @@ -0,0 +1,10 @@ +[ + { + "caption": "DocBlockr: Decorate line comment", + "command": "jsdocs_decorate" + }, + { + "caption": "DocBlockr: Reparse comment block", + "command": "jsdocs_reparse" + } +] diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/DocBlockr/Default.sublime-keymap b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/DocBlockr/Default.sublime-keymap new file mode 100644 index 0000000..73897e1 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/DocBlockr/Default.sublime-keymap @@ -0,0 +1,246 @@ +[ + // open a docblock with enter + { "keys": ["enter"], "command": "jsdocs", + "context": [ + { "key": "setting.auto_indent", "operator": "equal", "operand": true, "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, + { "key": "auto_complete_visible", "operator": "equal", "operand": false, "match_all": true }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*(\\/\\*|###)\\*$", "match_all": true } + ] + }, + // open a docblock with keypad enter + { "keys": ["keypad_enter"], "command": "jsdocs", + "context": [ + { "key": "setting.auto_indent", "operator": "equal", "operand": true, "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, + { "key": "auto_complete_visible", "operator": "equal", "operand": false, "match_all": true }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*(\\/\\*|###)\\*$", "match_all": true } + ] + }, + // open a docblock with tab + { "keys": ["tab"], "command": "jsdocs", + "context": [ + { "key": "setting.auto_indent", "operator": "equal", "operand": true, "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, + { "key": "auto_complete_visible", "operator": "equal", "operand": false, "match_all": true }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*(\\/\\*|###)\\*$", "match_all": true } + ] + }, + // extend a docblock by adding an asterisk at the start + { "keys": ["enter"], "command": "insert_snippet", "args": {"contents": "\n${TM_CURRENT_LINE/^\\s*(\\*\\s*).*$/$1/}"}, + "context": [ + { "key": "setting.auto_indent", "operator": "equal", "operand": true, "match_all": true }, + { "key": "selector", "operator": "equal", "operand": "comment.block", "match_all": true }, + { "key": "auto_complete_visible", "operator": "equal", "operand": false, "match_all": true }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*\\*\\s*\\S", "match_all": true } + ] + }, + // extend a docblock by adding an asterisk at the start + { "keys": ["enter"], "command": "insert_snippet", "args": {"contents": "\n${TM_CURRENT_LINE/^\\s*(\\*\\s*).*$/$1/}"}, + "context": [ + { "key": "setting.auto_indent", "operator": "equal", "operand": true, "match_all": true }, + { "key": "selector", "operator": "equal", "operand": "comment.block", "match_all": true }, + { "key": "auto_complete_visible", "operator": "equal", "operand": false, "match_all": true }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*\\*", "match_all": true } + ] + }, + // extend a docblock with keypad enter by adding an asterisk at the start + { "keys": ["keypad_enter"], "command": "insert_snippet", "args": {"contents": "\n${TM_CURRENT_LINE/^\\s*(\\*\\s*).*$/$1/}"}, + "context": [ + { "key": "setting.auto_indent", "operator": "equal", "operand": true, "match_all": true }, + { "key": "selector", "operator": "equal", "operand": "comment.block", "match_all": true }, + { "key": "auto_complete_visible", "operator": "equal", "operand": false, "match_all": true }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*\\*", "match_all": true } + ] + }, + // trim the automatically added whitespace + { "keys": ["enter"], "command": "jsdocs_trim_auto_whitespace", + "context": [ + { "key": "setting.auto_indent", "operator": "equal", "operand": true, "match_all": true }, + { "key": "selector", "operator": "equal", "operand": "comment.block", "match_all": true }, + { "key": "auto_complete_visible", "operator": "equal", "operand": false, "match_all": true }, + { "key": "setting.trim_automatic_white_space", "operator": "equal", "operand": true, "match_all": true }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*\\*\\s*$", "match_all": true }, + { "key": "following_text", "operator": "regex_contains", "operand": "^\\s*$", "match_all": true } + ] + }, + // trim the automatically added whitespace + { "keys": ["keypad_enter"], "command": "jsdocs_trim_auto_whitespace", + "context": [ + { "key": "setting.auto_indent", "operator": "equal", "operand": true, "match_all": true }, + { "key": "selector", "operator": "equal", "operand": "comment.block", "match_all": true }, + { "key": "auto_complete_visible", "operator": "equal", "operand": false, "match_all": true }, + { "key": "setting.trim_automatic_white_space", "operator": "equal", "operand": true, "match_all": true }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*\\*\\s*$", "match_all": true }, + { "key": "following_text", "operator": "regex_contains", "operand": "^\\s*$", "match_all": true } + ] + }, + // extend line comments (// and #) + { "keys": ["enter"], "command": "insert_snippet", "args": {"contents": "\n${TM_CURRENT_LINE/^\\s*((?:#|\\/\\/)\\s*).*/$1/}"}, + "context": [ + { "key": "setting.auto_indent", "operator": "equal", "operand": true, "match_all": true }, + { "key": "setting.jsdocs_extend_double_slash", "operator": "equal", "operand": true, "match_all": true }, + { "key": "selector", "operator": "equal", "operand": "comment.line", "match_all": true }, + { "key": "auto_complete_visible", "operator": "equal", "operand": false, "match_all": true }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*(\\/\\/|#)", "match_all": true } + ] + }, + // extend line comments (// #) with keypad enter + { "keys": ["keypad_enter"], "command": "insert_snippet", "args": {"contents": "\n${TM_CURRENT_LINE/^\\s*((?:#|\\/\\/)\\s*).*$/$1/}"}, + "context": [ + { "key": "setting.auto_indent", "operator": "equal", "operand": true, "match_all": true }, + { "key": "setting.jsdocs_extend_double_slash", "operator": "equal", "operand": true, "match_all": true }, + { "key": "selector", "operator": "equal", "operand": "comment.line", "match_all": true }, + { "key": "auto_complete_visible", "operator": "equal", "operand": false, "match_all": true }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*\\/\\/", "match_all": true } + ] + }, + // close a block comment (/* */) + { "keys": ["enter"], "command": "insert_snippet", "args": {"contents": "\n$0\n */"}, + "context": [ + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*\\/\\*$", "match_all": true } + ] + }, + // close a block comment (/* */) + { "keys": ["keypad_enter"], "command": "insert_snippet", "args": {"contents": "\n$0\n */"}, + "context": [ + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*\\/\\*$", "match_all": true } + ] + }, + { "keys": ["tab"], "command": "insert_snippet", "args": {"contents": "\n$0\n */"}, + "context": [ + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*\\/\\*$", "match_all": true } + ] + }, + { "keys": ["enter"], "command": "insert_snippet", "args": {"contents": "\n$0\n "}, "context": + [ + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true}, + { "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*\\/\\*$", "match_all": true}, + { "key": "following_text", "operator": "regex_contains", "operand": "^\\*\\/\\s*$", "match_all": true} + ] + }, + { "keys": ["keypad_enter"], "command": "insert_snippet", "args": {"contents": "\n$0\n "}, "context": + [ + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true}, + { "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*\\/\\*$", "match_all": true}, + { "key": "following_text", "operator": "regex_contains", "operand": "^\\*\\/$", "match_all": true} + ] + }, + // De-indent at the end of a comment block + { "keys": ["enter"], "command": "jsdocs_deindent", + "context": [ + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s+\\*/", "match_all": true } + ] + }, + // de-indent at the end of a comment block with keypad-enter + { "keys": ["keypad_enter"], "command": "jsdocs_deindent", + "context": [ + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s+\\*/", "match_all": true } + ] + }, + // Open an inline docblock (/** */) + { "keys": ["shift+enter"], "command": "jsdocs", "args": {"inline": true}, + "context": [ + { "key": "setting.auto_indent", "operator": "equal", "operand": true, "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, + { "key": "auto_complete_visible", "operator": "equal", "operand": false, "match_all": true }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*\\/\\*{2}$", "match_all": true } + ] + }, + // Open an inline docblock + { "keys": ["shift+keypad_enter"], "command": "jsdocs", "args": {"inline": true}, + "context": [ + { "key": "setting.auto_indent", "operator": "equal", "operand": true, "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, + { "key": "auto_complete_visible", "operator": "equal", "operand": false, "match_all": true }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*\\/\\*{2}$", "match_all": true } + ] + }, + // show the autocomplete + { "keys": ["@"], "command": "run_macro_file", "args": {"file": "Packages/DocBlockr/jsdocs-auto-complete.sublime-macro"}, + "context": [ + { "key": "setting.auto_complete", "operator": "equal", "operand": true, "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*(?:\\/\\*|###)?\\*\\s*$", "match_all": true }, + { "key": "selector", "operator": "equal", "operand": "comment.block", "match_all": true } + ] + }, + // show the autocomplete in a coffee doc block + { "keys": ["@"], "command": "run_macro_file", "args": {"file": "Packages/DocBlockr/jsdocs-auto-complete.sublime-macro"}, + "context": [ + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*#\\s*$", "match_all": true }, + { "key": "selector", "operator": "equal", "operand": "comment.line.number-sign.coffee", "match_all": true } + ] + }, + // indent to align with the previous line + { "keys": ["tab"], "command": "jsdocs_indent", + "context": [ + { "key": "setting.jsdocs_deep_indent", "operator": "equal", "operand": true, "match_all": true }, + { "key": "setting.auto_indent", "operator": "equal", "operand": true, "match_all": true }, + { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*\\*\\s*$", "match_all": true }, + { "key": "selector", "operator": "equal", "operand": "comment.block", "match_all": true } + ] + }, + // decorate a double-slash comment + { "keys": ["ctrl+enter"], "command": "jsdocs_decorate", + "context": [ + { "key": "selector", "operator": "equal", "operand": "comment.line.double-slash"} + ] + }, + // decorate a double-slash comment + { "keys": ["ctrl+keypad_enter"], "command": "jsdocs_decorate", + "context": [ + { "key": "selector", "operator": "equal", "operand": "comment.line.double-slash"} + ] + }, + // join lines inside a comment block, stripping the leading asterisk + { "keys": ["ctrl+j"], "command": "jsdocs_join", + "context": [ + { "key": "selector", "operator": "equal", "operand": "comment.block" } + ] + }, + // join lines in a line comment, stripping the leading // or # + { "keys": ["ctrl+j"], "command": "jsdocs_join", + "context": [ + { "key": "selector", "operator": "equal", "operand": "comment.line" } + ] + }, + // reparse a comment block's placeholders + { "keys": ["ctrl+alt+tab"], "command": "jsdocs_reparse", + "context": [ + { "key": "selector", "operator": "equal", "operand": "comment.block" } + ] + }, + { "keys": ["alt+q"], "command": "jsdocs_wrap_lines", + "context": [ + { "key": "selector", "operator": "equal", "operand": "comment.block", "match_all": true } + ] + }, + + // add line after, in a DocBlock + { "keys": ["ctrl+enter"], "command": "run_macro_file", "args": {"file": "Packages/DocBlockr/Add DocBlockr Line.sublime-macro"}, + "context": [ + { "key": "setting.auto_indent", "operator": "equal", "operand": true, "match_all": true }, + { "key": "selector", "operator": "equal", "operand": "comment.block", "match_all": true }, + { "key": "auto_complete_visible", "operator": "equal", "operand": false, "match_all": true }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*\\*", "match_all": true } + ] + }, + + // add line before, in a DocBlock + { "keys": ["ctrl+shift+enter"], "command": "run_macro_file", "args": {"file": "Packages/DocBlockr/Add DocBlockr Line Before.sublime-macro"}, + "context": [ + { "key": "setting.auto_indent", "operator": "equal", "operand": true, "match_all": true }, + { "key": "selector", "operator": "equal", "operand": "comment.block", "match_all": true }, + { "key": "auto_complete_visible", "operator": "equal", "operand": false, "match_all": true }, + { "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*\\*", "match_all": true } + ] + } +] diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/DocBlockr/HISTORY.md b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/DocBlockr/HISTORY.md new file mode 100644 index 0000000..72063ff --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/DocBlockr/HISTORY.md @@ -0,0 +1,119 @@ +# DocBlockr Extended Changelog + +- **v2.10.0**, *21 February 2013* + - Adds Sublime Text 3 support (thanks to @lxe and @rmarscher) + - YUI-style `@method` tags can be automatically added with the `jsdocs_autoadd_method_tag` setting (thanks to @maheshjag) + - Variables starting with `$` are not wiped out when reparsing a doc block (thanks @ryrun) +- **v2.9.3**, *12 December 2012* + - Fixed bug which stopped regular comments from closing automatically +- **v2.9.2**, *11 December 2012* + - This one goes out to [Thanasis Polychronakis](https://github.com/thanpolas). + - Structure of the modules greatly improved + - Fixes bug with matching languages with hyphens in the name + - Adds support for CUDA-C++ +- **v2.9.1**, *31 October 2012* + - Thanks to [wronex](https://github.com/wronex), Alt+Q will reformat the entire DocBlock, with customisable indentation. + - Thanks to [Pavel Voronin](https://github.com/pavel-voronin), spaces around arguments are handled properly. + - **C/C++**: Array arguments are accepted + - **C/C++**: An argument list containing only `void` doesn't output any `@param` tags + - **PHP**: Arguments with an array as a default value inside multi-line arguments are handled properly + - Ctrl/Cmd + Enter and Ctrl/Cmd + Shift + Enter work inside DocBlocks. +- **v2.9.0**, *1 October 2012* + - Adds ObjectiveC and ObjectiveC++ support, thanks to some help from [Robb Böhnke](https://github.com/robb) + - Very buggy code, support isn't great but it's better than nothing (hopefully). + - Single-line comments inside function definitions are handled + - Notation rules are applied to functions, which means they can define a return type by their name, eg: `strFoo` + - Notation rules can define arbitrary tags, for example: functions with a prefix of "_" should get the `@private` tag. + - Given the above addition, JS functions starting with an underscore are no longer marked as `@private` by default. +- **v2.8.2**, *28 September 2012* + - When a function is defined across many lines, the parser will find the arguments on extra lines. +- **v2.8.1**, *13 September 2012* + - Pressing tab on an empty line will perform a deep indentation instead of moving to the next field + - Functions starting with `_` will get a `@private` tag in Javascript (thanks to [Andrew Hanna](https://github.com/percyhanna)) +- **v2.8.0**, *26 August 2012* + - New feature: Alt+Q to reformat the description field of a docblock to make it fit nicely within your ruler. + - Adds support for C++ (thanks to [Rafał Chłodnicki](https://github.com/rchl)) + - Indenting to the description field works in languages which don't require type information in the docblock. +- **v2.7.4**, *8 August 2012* + - Fix for Actionscript docblocks not working +- **v2.7.3**, *7 August 2012* + - No trailing whitespace added on the spacer lines added when `jsdocs_spacer_between_sections` is on (thanks to [Rafał Chłodnicki](https://github.com/rchl)) + - Fixes a bug with detecting variable names when they have a default value in PHP + - Changes the notation map to not ignore the leading `$` or `_`, meaning that (for example), you could specify that variables starting with `$` are `HTMLElement`s. +- **v2.7.2**, *6 August 2012* + - Small bug fix, thanks to [djuliusl](https://github.com/djuliusl) +- **v2.7.1**, *5 August 2012* + - Adds per-section alignment (can be set using `jsdocs_per_section_indent`) + - Description field for `@return` tag can be disabled using `jsdocs_return_description`. *(Both thanks to [Drarok](https://github.com/Drarok))* +- **v2.7.0**, *5 August 2012* + - Adds support for ASDocs (Actionscript) + - Changes Linux shortcut for reparsing a comment block to Alt+Shift+Tab +- **v2.6.5**, *19 June 2012* + - Bugfix for adding linebreaks when not at the start or end of a line +- **v2.6.4**, *4 June 2012* + - Better support for indentation using tabs + - YUI tags are supported by the autocomplete + - When only whitespace exists on a docblock line, and `trim_automatic_white_space` is set to true, the whitespace is removed. + - Better support for comment blocks opened with `/*` +- **v2.6.3**, *30 April 2012* + - Fixes the join-lines command Ctrl+J for CoffeeScript. +- **v2.6.2**, *22 March 2012* + - PHP `__destruct` functions don't get a return value *(thanks to [Alex Whitman](https://github.com/whitman))*. +- **v2.6.1**, *16 March 2012* + - Fixes bug whereby the return values of functions which are named `set` or `add`, *etc* were not being guessed correctly. + - `@return` tags are now given a description field *(thanks to [Nick Dowdell](https://github.com/mikulad13))*. +- **v2.6.0**, *4 March 2012* + - Added CoffeeScript support +- **v2.5.0**, *11 February 2012* + - Implemented DocBlock reparsing to re-enable tabstop fields. Hotkey is `Ctrl+Alt+Tab`. +- **v2.4.1**, *2 February 2012* + - Fixed bug [#36](https://github.com/spadgos/sublime-jsdocs/issues/36) whereby docblocks were not being properly extended inside of `$0]]> + script + source.php,text.html + <script> + text.html + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Entities/ampersand.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Entities/ampersand.sublime-snippet new file mode 100644 index 0000000..91020d7 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Entities/ampersand.sublime-snippet @@ -0,0 +1,7 @@ + + + & + source.php,text.html + & + text.html + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Entities/non-breaking space.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Entities/non-breaking space.sublime-snippet new file mode 100644 index 0000000..d74934f --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Entities/non-breaking space.sublime-snippet @@ -0,0 +1,7 @@ + + + nbsp + source.php,text.html +   + text.html + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Internet Explorer Conditional Comments/IE Conditional Comment - HTML 5 Shim.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Internet Explorer Conditional Comments/IE Conditional Comment - HTML 5 Shim.sublime-snippet new file mode 100644 index 0000000..b4352ee --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Internet Explorer Conditional Comments/IE Conditional Comment - HTML 5 Shim.sublime-snippet @@ -0,0 +1,6 @@ + + ]]> + ! + IE Conditional Comment: HTML5 Shim + source.php,text.html + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Internet Explorer Conditional Comments/IE Conditional Comment - Internet Explorer 5_0 only.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Internet Explorer Conditional Comments/IE Conditional Comment - Internet Explorer 5_0 only.sublime-snippet new file mode 100644 index 0000000..cf35945 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Internet Explorer Conditional Comments/IE Conditional Comment - Internet Explorer 5_0 only.sublime-snippet @@ -0,0 +1,6 @@ + + $1]]> + ! + IE Conditional Comment: IE5 only + source.php,text.html + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Internet Explorer Conditional Comments/IE Conditional Comment - Internet Explorer 5_5 only.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Internet Explorer Conditional Comments/IE Conditional Comment - Internet Explorer 5_5 only.sublime-snippet new file mode 100644 index 0000000..735c25a --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Internet Explorer Conditional Comments/IE Conditional Comment - Internet Explorer 5_5 only.sublime-snippet @@ -0,0 +1,6 @@ + + $1]]> + ! + IE Conditional Comment: IE5.5 only + source.php,text.html + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Internet Explorer Conditional Comments/IE Conditional Comment - Internet Explorer 5_x.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Internet Explorer Conditional Comments/IE Conditional Comment - Internet Explorer 5_x.sublime-snippet new file mode 100644 index 0000000..cdb31ff --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Internet Explorer Conditional Comments/IE Conditional Comment - Internet Explorer 5_x.sublime-snippet @@ -0,0 +1,6 @@ + + $1]]> + ! + IE Conditional Comment: IE5.x + source.php,text.html + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Internet Explorer Conditional Comments/IE Conditional Comment - Internet Explorer 6 and below.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Internet Explorer Conditional Comments/IE Conditional Comment - Internet Explorer 6 and below.sublime-snippet new file mode 100644 index 0000000..22e3877 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Internet Explorer Conditional Comments/IE Conditional Comment - Internet Explorer 6 and below.sublime-snippet @@ -0,0 +1,6 @@ + + $1]]> + ! + IE Conditional Comment: <IE6 + source.php,text.html + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Internet Explorer Conditional Comments/IE Conditional Comment - Internet Explorer 6 only.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Internet Explorer Conditional Comments/IE Conditional Comment - Internet Explorer 6 only.sublime-snippet new file mode 100644 index 0000000..7e1606d --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Internet Explorer Conditional Comments/IE Conditional Comment - Internet Explorer 6 only.sublime-snippet @@ -0,0 +1,6 @@ + + $1]]> + ! + IE Conditional Comment: IE6 + source.php,text.html + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Internet Explorer Conditional Comments/IE Conditional Comment - Internet Explorer 7 and above.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Internet Explorer Conditional Comments/IE Conditional Comment - Internet Explorer 7 and above.sublime-snippet new file mode 100644 index 0000000..ef45bed --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Internet Explorer Conditional Comments/IE Conditional Comment - Internet Explorer 7 and above.sublime-snippet @@ -0,0 +1,6 @@ + + $1]]> + ! + IE Conditional Comment: IE7> + source.php,text.html + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Internet Explorer Conditional Comments/IE Conditional Comment - Internet Explorer 7 and below.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Internet Explorer Conditional Comments/IE Conditional Comment - Internet Explorer 7 and below.sublime-snippet new file mode 100644 index 0000000..c9c8cba --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Internet Explorer Conditional Comments/IE Conditional Comment - Internet Explorer 7 and below.sublime-snippet @@ -0,0 +1,6 @@ + + $1]]> + ! + IE Conditional Comment: <IE7 + source.php,text.html + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Internet Explorer Conditional Comments/IE Conditional Comment - Internet Explorer 8 and below.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Internet Explorer Conditional Comments/IE Conditional Comment - Internet Explorer 8 and below.sublime-snippet new file mode 100644 index 0000000..6768ec7 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Internet Explorer Conditional Comments/IE Conditional Comment - Internet Explorer 8 and below.sublime-snippet @@ -0,0 +1,6 @@ + + $1]]> + ! + IE Conditional Comment: <IE8 + source.php,text.html + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Internet Explorer Conditional Comments/IE Conditional Comment - Internet Explorer 9 and below.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Internet Explorer Conditional Comments/IE Conditional Comment - Internet Explorer 9 and below.sublime-snippet new file mode 100644 index 0000000..9f99f2f --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Internet Explorer Conditional Comments/IE Conditional Comment - Internet Explorer 9 and below.sublime-snippet @@ -0,0 +1,6 @@ + + $1]]> + ! + IE Conditional Comment: <IE9 + source.php,text.html + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Internet Explorer Conditional Comments/IE Conditional Comment - Internet Explorer.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Internet Explorer Conditional Comments/IE Conditional Comment - Internet Explorer.sublime-snippet new file mode 100644 index 0000000..b347030 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Internet Explorer Conditional Comments/IE Conditional Comment - Internet Explorer.sublime-snippet @@ -0,0 +1,6 @@ + + $1]]> + ! + IE Conditional Comment: IE + source.php,text.html + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Internet Explorer Conditional Comments/IE Conditional Comment - NOT Internet Explorer.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Internet Explorer Conditional Comments/IE Conditional Comment - NOT Internet Explorer.sublime-snippet new file mode 100644 index 0000000..2bb8eb7 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Internet Explorer Conditional Comments/IE Conditional Comment - NOT Internet Explorer.sublime-snippet @@ -0,0 +1,6 @@ + + $1]]> + ! + IE Conditional Comment: Not IE + source.php,text.html + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Javascript Libraries/Google AJAX Libraries - Chrome Frame.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Javascript Libraries/Google AJAX Libraries - Chrome Frame.sublime-snippet new file mode 100644 index 0000000..dcf2ef2 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Javascript Libraries/Google AJAX Libraries - Chrome Frame.sublime-snippet @@ -0,0 +1,12 @@ + + +]]> + Google AJAX Libraries: Chrome Frame + source.php,text.html + ajax + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Javascript Libraries/Google AJAX Libraries - Dojo.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Javascript Libraries/Google AJAX Libraries - Dojo.sublime-snippet new file mode 100644 index 0000000..75e7286 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Javascript Libraries/Google AJAX Libraries - Dojo.sublime-snippet @@ -0,0 +1,6 @@ + + $0]]> + Google AJAX Libraries: Dojo + text.html + source.php,text.html + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Javascript Libraries/Google AJAX Libraries - Ext Core.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Javascript Libraries/Google AJAX Libraries - Ext Core.sublime-snippet new file mode 100644 index 0000000..4e1409a --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Javascript Libraries/Google AJAX Libraries - Ext Core.sublime-snippet @@ -0,0 +1,6 @@ + + $0]]> + ajax + Google AJAX Libraries: Ext Core + source.php,text.html + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Javascript Libraries/Google AJAX Libraries - MooTools.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Javascript Libraries/Google AJAX Libraries - MooTools.sublime-snippet new file mode 100644 index 0000000..6af0521 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Javascript Libraries/Google AJAX Libraries - MooTools.sublime-snippet @@ -0,0 +1,6 @@ + + $0]]> + ajax + Google AJAX Libraries: MooTools + source.php,text.html + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Javascript Libraries/Google AJAX Libraries - Prototype.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Javascript Libraries/Google AJAX Libraries - Prototype.sublime-snippet new file mode 100644 index 0000000..dba0a01 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Javascript Libraries/Google AJAX Libraries - Prototype.sublime-snippet @@ -0,0 +1,6 @@ + + $0]]> + ajax + Google AJAX Libraries: Prototype + source.php,text.html + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Javascript Libraries/Google AJAX Libraries - SWFObject.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Javascript Libraries/Google AJAX Libraries - SWFObject.sublime-snippet new file mode 100644 index 0000000..eebd6b3 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Javascript Libraries/Google AJAX Libraries - SWFObject.sublime-snippet @@ -0,0 +1,6 @@ + + $0]]> + ajax + Google AJAX Libraries: SWFObject + source.php,text.html + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Javascript Libraries/Google AJAX Libraries - WebFont Loader.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Javascript Libraries/Google AJAX Libraries - WebFont Loader.sublime-snippet new file mode 100644 index 0000000..adca419 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Javascript Libraries/Google AJAX Libraries - WebFont Loader.sublime-snippet @@ -0,0 +1,6 @@ + + $0]]> + ajax + Google AJAX Libraries: WebFont Loader + source.php,text.html + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Javascript Libraries/Google AJAX Libraries - YUI!.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Javascript Libraries/Google AJAX Libraries - YUI!.sublime-snippet new file mode 100644 index 0000000..30df7bd --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Javascript Libraries/Google AJAX Libraries - YUI!.sublime-snippet @@ -0,0 +1,6 @@ + + $0]]> + ajax + Google AJAX Libraries: YUI! + source.php,text.html + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Javascript Libraries/Google AJAX Libraries - jQuery UI.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Javascript Libraries/Google AJAX Libraries - jQuery UI.sublime-snippet new file mode 100644 index 0000000..568be94 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Javascript Libraries/Google AJAX Libraries - jQuery UI.sublime-snippet @@ -0,0 +1,6 @@ + + $0]]> + ajax + Google AJAX Libraries: jQuery UI + source.php,text.html + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Javascript Libraries/Google AJAX Libraries - jQuery.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Javascript Libraries/Google AJAX Libraries - jQuery.sublime-snippet new file mode 100644 index 0000000..c8017f4 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Javascript Libraries/Google AJAX Libraries - jQuery.sublime-snippet @@ -0,0 +1,6 @@ + + $0]]> + ajax + Google AJAX Libraries: jQuery + source.php,text.html + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Javascript Libraries/Google AJAX Libraries - script_aculo_us.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Javascript Libraries/Google AJAX Libraries - script_aculo_us.sublime-snippet new file mode 100644 index 0000000..2c7421c --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Javascript Libraries/Google AJAX Libraries - script_aculo_us.sublime-snippet @@ -0,0 +1,6 @@ + + $0]]> + ajax + Google AJAX Libraries: Scriptaculous + source.php,text.html + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Macros/Forward Delete All Whitespace.tmMacro b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Macros/Forward Delete All Whitespace.tmMacro new file mode 100644 index 0000000..5e1561c --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Macros/Forward Delete All Whitespace.tmMacro @@ -0,0 +1,42 @@ + + + + + commands + + + argument + + action + findNext + findInProjectIgnoreCase + 0 + findString + (?=\S)|\s+ + ignoreCase + 0 + regularExpression + 1 + replaceAllScope + document + wrapAround + 0 + + command + findWithOptions: + + + command + deleteBackward: + + + keyEquivalent + ^~ + name + Forward Delete All Whitespace + scope + text.html + uuid + 7B7E945E-A112-11D9-A5A2-000D93C8BE28 + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Preferences/Comments.tmPreferences b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Preferences/Comments.tmPreferences new file mode 100644 index 0000000..3aab8ef --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Preferences/Comments.tmPreferences @@ -0,0 +1,30 @@ + + + + + name + Comments + scope + text.html + settings + + shellVariables + + + name + TM_COMMENT_START + value + <!-- + + + name + TM_COMMENT_END + value + --> + + + + uuid + B79BDBCF-D0C9-468E-BE62-744074D7825F + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Preferences/Completions HTML Attributes.tmPreferences b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Preferences/Completions HTML Attributes.tmPreferences new file mode 100644 index 0000000..7891a7b --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Preferences/Completions HTML Attributes.tmPreferences @@ -0,0 +1,346 @@ + + + + + name + Completions HTML Attributes + scope + text.html meta.tag -(entity.other.attribute-name | source | entity.name.tag | string | invalid.illegal.incomplete.html) + settings + + completions + + ABBR + abbr + ABOVE + above + ACCEPT + accept + ACCESSKEY + accesskey + ACTION + action + ALIGN + align + ALINK + alink + ALT + alt + ARCHIVE + archive + AUTOSTART + autostart + AXIS + axis + BACKGROUND + background + BALANCE + balance + BEHAVIOR + behavior + BELOW + below + BGCOLOR + bgcolor + BGPROPERTIES + bgproperties + BORDER + border + BORDERCOLOR + bordercolor + BORDERCOLORDARK + bordercolordark + BORDERCOLORLIGHT + bordercolorlight + BOTTOMMARGIN + bottommargin + CABBASE + cabbase + CELLPADDING + cellpadding + CELLSPACING + cellspacing + CHARSET + charset + CHECKED + checked + CITE + cite + CLASS + class + CLASSID + classid + CLEAR + clear + CLIP + clip + CODE + code + CODEBASE + codebase + CODETYPE + codetype + COLOR + color + COLS + cols + COLSPAN + colspan + COMPACT + compact + CONTENT + content + CONTROLS + controls + COORDS + coords + DATA + data + DATAPAGESIZE + datapagesize + DATETIME + datetime + DECLARE + declare + DEFER + defer + DELAY + delay + DIR + dir + DIRECTION + direction + DISABLED + disabled + DYNSRC + dynsrc + ENCTYPE + enctype + FACE + face + FOR + for + FRAME + frame + FRAMEBORDER + frameborder + FRAMESPACING + framespacing + GUTTER + gutter + HEADERS + headers + HEIGHT + height + HIDDEN + hidden + HREF + href + HREFLANG + hreflang + HSPACE + hspace + HTTP-EQUIV + http-equiv + ID + id + ISMAP + ismap + LABEL + label + LANG + lang + lang + language + LEFT + left + LEFTMARGIN + leftmargin + LINK + link + LONGDESC + longdesc + LOOP + loop + LOWSRC + lowsrc + MARGINHEIGHT + marginheight + MARGINWIDTH + marginwidth + MAXLENGTH + maxlength + MAYSCRIPT + mayscript + MEDIA + media + METHOD + method + MULTIPLE + multiple + NAME + name + NOEXTERNALDATA + noexternaldata + NORESIZE + noresize + NOSHADE + noshade + NOWRAP + nowrap + onBlur + onblur + onChange + onchange + onClick + onclick + onDblClick + ondblclick + onError + onerror + onFocus + onfocus + onKeyDown + onkeydown + onKeyPress + onkeypress + onKeyUp + onkeyup + onLoad + onload + onMouseDown + onmousedown + onMouseMove + onmousemove + onMouseOut + onmouseout + onMouseOver + onmouseover + onMouseUp + onmouseup + onReset + onreset + onResize + onresize + onSelect + onselect + onSubmit + onsubmit + onUnload + onunload + PAGEX + pagex + PAGEY + pagey + POINTSIZE + pointsize + READONLY + readonly + REL + rel + REV + rev + RIGHTMARGIN + rightmargin + ROWS + rows + ROWSPAN + rowspan + RULES + rules + runat + SCOPE + scope + SCROLLAMOUNT + scrollamount + SCROLLDELAY + scrolldelay + SCROLLING + scrolling + SELECTED + selected + SHAPE + shape + SIZE + size + SPAN + span + SRC + src + STANDBY + standby + START + start + STYLE + style + SUMMARY + summary + TABINDEX + tabindex + TARGET + target + TEXT + text + TITLE + title + TOP + top + TOPMARGIN + topmargin + TRUESPEED + truespeed + TYPE + type + USEMAP + usemap + VALIGN + valign + VALUE + value + VALUETYPE + valuetype + VISIBILITY + visibility + VLINK + vlink + VOLUME + volume + VSPACE + vspace + WIDTH + width + WRAP + wrap + xml:lang + xmlns + Z-INDEX + z-index + + disableDefaultCompletion + 1 + shellVariables + + + name + TM_COMPLETION_split + value + , + + + name + TM_COMPLETION_scope + value + html_attributes + + + name + TM_COMPLETIONS + value + <a href="",<a name="",<a title="",<a target="",<a charset="",<a class="",<a id="",<a style="",<a hreflang="",<a accesskey="",<a tabindex="",<a rel="",<a rev="",<a shape="",<a coords="",<a dir="",<a lang="",<a onfocus="",<a onblur="",<a onclick="",<a ondblclick="",<a onmousedown="",<a onmouseup="",<a onmouseover="",<a onmousemove="",<a onmouseout="",<a onkeypress="",<a onkeydown="",<a onkeyup="",<abbr class="",<abbr id="",<abbr style="",<abbr title="",<abbr dir="",<abbr lang="",<abbr onclick="",<abbr ondblclick="",<abbr onmousedown="",<abbr onmouseup="",<abbr onmouseover="",<abbr onmousemove="",<abbr onmouseout="",<abbr onkeypress="",<abbr onkeydown="",<abbr onkeyup="",<acronym class="",<acronym id="",<acronym style="",<acronym title="",<acronym dir="",<acronym lang="",<acronym onclick="",<acronym ondblclick="",<acronym onmousedown="",<acronym onmouseup="",<acronym onmouseover="",<acronym onmousemove="",<acronym onmouseout="",<acronym onkeypress="",<acronym onkeydown="",<acronym onkeyup="",<address class="",<address id="",<address style="",<address title="",<address dir="",<address lang="",<address onclick="",<address ondblclick="",<address onmousedown="",<address onmouseup="",<address onmouseover="",<address onmousemove="",<address onmouseout="",<address onkeypress="",<address onkeydown="",<address onkeyup="",<applet noexternaldata="",<applet code="",<applet codebase="",<applet name="",<applet alt="",<applet width="",<applet height="",<applet hspace="",<applet vspace="",<applet align="",<applet cabbase="",<applet mayscript="",<applet archive="",<applet class="",<applet id="",<applet style="",<area name="",<area value="",<area shape="",<area coords="",<area href="",<area target="",<area alt="",<area disabled="disabled",<area class="",<area id="",<area style="",<area accesskey="",<area tabindex="",<area title="",<area dir="",<area lang="",<area onfocus="",<area onblur="",<area onclick="",<area ondblclick="",<area onmousedown="",<area onmouseup="",<area onmouseover="",<area onmousemove="",<area onmouseout="",<area onkeypress="",<area onkeydown="",<area onkeyup="",<b class="",<b id="",<b style="",<b title="",<b dir="",<b lang="",<b onclick="",<b ondblclick="",<b onmousedown="",<b onmouseup="",<b onmouseover="",<b onmousemove="",<b onmouseout="",<b onkeypress="",<b onkeydown="",<b onkeyup="",<base href="",<base target="",<basefont size="",<basefont face="",<basefont color="#333333",<basefont id="",<bdo dir="",<bdo lang="",<bdo class="",<bdo id="",<bdo style="",<bdo title="",<bgsound src="",<bgsound loop="",<bgsound balance="",<bgsound volume="",<bgsound delay="",<big class="",<big id="",<big style="",<big title="",<big dir="",<big lang="",<big onclick="",<big ondblclick="",<big onmousedown="",<big onmouseup="",<big onmouseover="",<big onmousemove="",<big onmouseout="",<big onkeypress="",<big onkeydown="",<big onkeyup="",<blockquote cite="",<blockquote class="",<blockquote id="",<blockquote style="",<blockquote title="",<blockquote dir="",<blockquote lang="",<blockquote onclick="",<blockquote ondblclick="",<blockquote onmousedown="",<blockquote onmouseup="",<blockquote onmouseover="",<blockquote onmousemove="",<blockquote onmouseout="",<blockquote onkeypress="",<blockquote onkeydown="",<blockquote onkeyup="",<body bgcolor="",<body background="",<body text="",<body link="",<body vlink="",<body alink="",<body leftmargin="",<body topmargin="",<body bgproperties="",<body rightmargin="",<body bottommargin="",<body marginwidth="",<body marginheight="",<body class="",<body id="",<body style="",<body title="",<body dir="",<body lang="",<body onload="",<body onunload="",<body onblur="",<body onerror="",<body onfocus="",<body onresize="",<br clear="",<br class="",<br id="",<br style="",<br title="",<button name="",<button value="",<button type="",<button disabled="disabled",<button class="",<button id="",<button style="",<button accesskey="",<button tabindex="",<button title="",<button dir="",<button lang="",<button onfocus="",<button onblur="",<button onclick="",<button ondblclick="",<button onmousedown="",<button onmouseup="",<button onmouseover="",<button onmousemove="",<button onmouseout="",<button onkeypress="",<button onkeydown="",<button onkeyup="",<caption align="",<caption valign="",<caption class="",<caption id="",<caption style="",<caption title="",<caption dir="",<caption lang="",<caption onclick="",<caption ondblclick="",<caption onmousedown="",<caption onmouseup="",<caption onmouseover="",<caption onmousemove="",<caption onmouseout="",<caption onkeypress="",<caption onkeydown="",<caption onkeyup="",<cite class="",<cite id="",<cite style="",<cite title="",<cite dir="",<cite lang="",<cite onclick="",<cite ondblclick="",<cite onmousedown="",<cite onmouseup="",<cite onmouseover="",<cite onmousemove="",<cite onmouseout="",<cite onkeypress="",<cite onkeydown="",<cite onkeyup="",<code class="",<code id="",<code style="",<code title="",<code dir="",<code lang="",<code onclick="",<code ondblclick="",<code onmousedown="",<code onmouseup="",<code onmouseover="",<code onmousemove="",<code onmouseout="",<code onkeypress="",<code onkeydown="",<code onkeyup="",<col align="",<col valign="",<col span="",<col width="",<col class="",<col id="",<col style="",<col title="",<col dir="",<col lang="",<col onclick="",<col ondblclick="",<col onmousedown="",<col onmouseup="",<col onmouseover="",<col onmousemove="",<col onmouseout="",<col onkeypress="",<col onkeydown="",<col onkeyup="",<colgroup align="",<colgroup valign="",<colgroup span="",<colgroup width="",<colgroup class="",<colgroup id="",<colgroup style="",<colgroup title="",<colgroup dir="",<colgroup lang="",<colgroup onclick="",<colgroup ondblclick="",<colgroup onmousedown="",<colgroup onmouseup="",<colgroup onmouseover="",<colgroup onmousemove="",<colgroup onmouseout="",<colgroup onkeypress="",<colgroup onkeydown="",<colgroup onkeyup="",<dd class="",<dd id="",<dd style="",<dd title="",<dd dir="",<dd lang="",<dd onclick="",<dd ondblclick="",<dd onmousedown="",<dd onmouseup="",<dd onmouseover="",<dd onmousemove="",<dd onmouseout="",<dd onkeypress="",<dd onkeydown="",<dd onkeyup="",<del cite="",<del datetime="",<del class="",<del id="",<del style="",<del title="",<del dir="",<del lang="",<del onclick="",<del ondblclick="",<del onmousedown="",<del onmouseup="",<del onmouseover="",<del onmousemove="",<del onmouseout="",<del onkeypress="",<del onkeydown="",<del onkeyup="",<dfn class="",<dfn id="",<dfn style="",<dfn title="",<dfn dir="",<dfn lang="",<dfn onclick="",<dfn ondblclick="",<dfn onmousedown="",<dfn onmouseup="",<dfn onmouseover="",<dfn onmousemove="",<dfn onmouseout="",<dfn onkeypress="",<dfn onkeydown="",<dfn onkeyup="",<div align="",<div class="",<div id="",<div style="",<div title="",<div dir="",<div lang="",<div onclick="",<div ondblclick="",<div onmousedown="",<div onmouseup="",<div onmouseover="",<div onmousemove="",<div onmouseout="",<div onkeypress="",<div onkeydown="",<div onkeyup="",<dl compact="",<dl class="",<dl id="",<dl style="",<dl title="",<dl dir="",<dl lang="",<dl onclick="",<dl ondblclick="",<dl onmousedown="",<dl onmouseup="",<dl onmouseover="",<dl onmousemove="",<dl onmouseout="",<dl onkeypress="",<dl onkeydown="",<dl onkeyup="",<dt class="",<dt id="",<dt style="",<dt title="",<dt dir="",<dt lang="",<dt onclick="",<dt ondblclick="",<dt onmousedown="",<dt onmouseup="",<dt onmouseover="",<dt onmousemove="",<dt onmouseout="",<dt onkeypress="",<dt onkeydown="",<dt onkeyup="",<em class="",<em id="",<em style="",<em title="",<em dir="",<em lang="",<em onclick="",<em ondblclick="",<em onmousedown="",<em onmouseup="",<em onmouseover="",<em onmousemove="",<em onmouseout="",<em onkeypress="",<em onkeydown="",<em onkeyup="",<embed src="",<embed width="",<embed height="",<embed hspace="",<embed vspace="",<embed hidden="",<embed autostart="",<embed loop="",<embed align="",<embed class="",<embed style="",<embed dir="",<embed lang="",<fieldset class="",<fieldset id="",<fieldset style="",<fieldset title="",<fieldset accesskey="",<fieldset dir="",<fieldset lang="",<fieldset onclick="",<fieldset ondblclick="",<fieldset onmousedown="",<fieldset onmouseup="",<fieldset onmouseover="",<fieldset onmousemove="",<fieldset onmouseout="",<fieldset onkeypress="",<fieldset onkeydown="",<fieldset onkeyup="",<font color="#333333",<font size="",<font face="",<font pointsize="",<font class="",<font id="",<font style="",<font title="",<font dir="",<font lang="",<form action="",<form method="",<form enctype="",<form name="",<form target="",<form class="",<form id="",<form style="",<form title="",<form dir="",<form lang="",<form runat="",<form onsubmit="",<form onreset="",<form onclick="",<form ondblclick="",<form onmousedown="",<form onmouseup="",<form onmouseover="",<form onmousemove="",<form onmouseout="",<form onkeypress="",<form onkeydown="",<form onkeyup="",<frame src="",<frame name="",<frame frameborder="",<frame scrolling="",<frame noresize="",<frame marginwidth="",<frame marginheight="",<frame bordercolor="#CCCCCC",<frame class="",<frame id="",<frame style="",<frame title="",<frame longdesc="",<frameset rows="",<frameset cols="",<frameset framespacing="",<frameset frameborder="",<frameset border="",<frameset bordercolor="#CCCCCC",<frameset class="",<frameset id="",<frameset style="",<frameset title="",<frameset onload="",<frameset onunload="",<h1 align="",<h1 class="",<h1 id="",<h1 style="",<h1 title="",<h1 dir="",<h1 lang="",<h1 onclick="",<h1 ondblclick="",<h1 onmousedown="",<h1 onmouseup="",<h1 onmouseover="",<h1 onmousemove="",<h1 onmouseout="",<h1 onkeypress="",<h1 onkeydown="",<h1 onkeyup="",<h2 align="",<h2 class="",<h2 id="",<h2 style="",<h2 title="",<h2 dir="",<h2 lang="",<h2 onclick="",<h2 ondblclick="",<h2 onmousedown="",<h2 onmouseup="",<h2 onmouseover="",<h2 onmousemove="",<h2 onmouseout="",<h2 onkeypress="",<h2 onkeydown="",<h2 onkeyup="",<h3 align="",<h3 class="",<h3 id="",<h3 style="",<h3 title="",<h3 dir="",<h3 lang="",<h3 onclick="",<h3 ondblclick="",<h3 onmousedown="",<h3 onmouseup="",<h3 onmouseover="",<h3 onmousemove="",<h3 onmouseout="",<h3 onkeypress="",<h3 onkeydown="",<h3 onkeyup="",<h4 align="",<h4 class="",<h4 id="",<h4 style="",<h4 title="",<h4 dir="",<h4 lang="",<h4 onclick="",<h4 ondblclick="",<h4 onmousedown="",<h4 onmouseup="",<h4 onmouseover="",<h4 onmousemove="",<h4 onmouseout="",<h4 onkeypress="",<h4 onkeydown="",<h4 onkeyup="",<h5 align="",<h5 class="",<h5 id="",<h5 style="",<h5 title="",<h5 dir="",<h5 lang="",<h5 onclick="",<h5 ondblclick="",<h5 onmousedown="",<h5 onmouseup="",<h5 onmouseover="",<h5 onmousemove="",<h5 onmouseout="",<h5 onkeypress="",<h5 onkeydown="",<h5 onkeyup="",<h6 align="",<h6 class="",<h6 id="",<h6 style="",<h6 title="",<h6 dir="",<h6 lang="",<h6 onclick="",<h6 ondblclick="",<h6 onmousedown="",<h6 onmouseup="",<h6 onmouseover="",<h6 onmousemove="",<h6 onmouseout="",<h6 onkeypress="",<h6 onkeydown="",<h6 onkeyup="",<hr align="",<hr width="",<hr size="",<hr noshade="",<hr color="#333333",<hr class="",<hr id="",<hr style="",<hr title="",<hr onclick="",<hr ondblclick="",<hr onmousedown="",<hr onmouseup="",<hr onmouseover="",<hr onmousemove="",<hr onmouseout="",<hr onkeypress="",<hr onkeydown="",<hr onkeyup="",<html xmlns="",<html xml:lang="",<html lang="",<html dir="",<i class="",<i id="",<i style="",<i title="",<i dir="",<i lang="",<i onclick="",<i ondblclick="",<i onmousedown="",<i onmouseup="",<i onmouseover="",<i onmousemove="",<i onmouseout="",<i onkeypress="",<i onkeydown="",<i onkeyup="",<iframe src="",<iframe name="",<iframe width="",<iframe marginwidth="",<iframe height="",<iframe marginheight="",<iframe align="",<iframe scrolling="",<iframe frameborder="",<iframe hspace="",<iframe vspace="",<iframe class="",<iframe id="",<iframe style="",<iframe title="",<iframe longdesc="",<ilayer name="",<ilayer id="",<ilayer left="",<ilayer top="",<ilayer pagex="",<ilayer pagey="",<ilayer above="",<ilayer below="",<ilayer z-index="",<ilayer width="",<ilayer height="",<ilayer visibility="",<ilayer clip="",<ilayer bgcolor="",<ilayer background="",<ilayer src="",<ilayer onfocus="",<ilayer onblur="",<ilayer onload="",<ilayer onmouseover="",<ilayer onmouseout="",<img src="",<img alt="",<img name="",<img width="",<img height="",<img hspace="",<img vspace="",<img border="",<img align="",<img usemap="",<img ismap="ismap",<img dynsrc="",<img controls="",<img start="",<img loop="",<img lowsrc="",<img class="",<img id="",<img style="",<img title="",<img longdesc="",<img dir="",<img lang="",<img onclick="",<img ondblclick="",<img onmousedown="",<img onmouseup="",<img onmouseover="",<img onmousemove="",<img onmouseout="",<img onkeypress="",<img onkeydown="",<img onkeyup="",<input name="",<input type="",<input disabled="disabled",<input class="",<input id="",<input style="",<input accesskey="",<input tabindex="",<input title="",<input dir="",<input lang="",<input onfocus="",<input onblur="",<input onselect="",<input onchange="",<input onclick="",<input ondblclick="",<input onmousedown="",<input onmouseup="",<input onmouseover="",<input onmousemove="",<input onmouseout="",<input onkeypress="",<input onkeydown="",<input onkeyup="",<input value="",<input size="",<input maxlength="",<input readonly="readonly",<input checked="checked",<input src="",<input alt="",<input align="",<input usemap="",<input width="",<input height="",<input hspace="",<input vspace="",<input border="",<input accept="",<ins cite="",<ins datetime="",<ins class="",<ins id="",<ins style="",<ins title="",<ins dir="",<ins lang="",<ins onclick="",<ins ondblclick="",<ins onmousedown="",<ins onmouseup="",<ins onmouseover="",<ins onmousemove="",<ins onmouseout="",<ins onkeypress="",<ins onkeydown="",<ins onkeyup="",<kbd class="",<kbd id="",<kbd style="",<kbd title="",<kbd dir="",<kbd lang="",<kbd onclick="",<kbd ondblclick="",<kbd onmousedown="",<kbd onmouseup="",<kbd onmouseover="",<kbd onmousemove="",<kbd onmouseout="",<kbd onkeypress="",<kbd onkeydown="",<kbd onkeyup="",<label for="",<label class="",<label id="",<label style="",<label accesskey="",<label title="",<label dir="",<label lang="",<label onfocus="",<label onblur="",<label onclick="",<label ondblclick="",<label onmousedown="",<label onmouseup="",<label onmouseover="",<label onmousemove="",<label onmouseout="",<label onkeypress="",<label onkeydown="",<label onkeyup="",<layer name="",<layer left="",<layer top="",<layer pagex="",<layer pagey="",<layer above="",<layer below="",<layer z-index="",<layer width="",<layer height="",<layer visibility="",<layer clip="",<layer bgcolor="",<layer background="",<layer src="",<layer onfocus="",<layer onblur="",<layer onload="",<layer onmouseover="",<layer onmouseout="",<legend align="",<legend class="",<legend id="",<legend style="",<legend accesskey="",<legend title="",<legend dir="",<legend lang="",<legend onclick="",<legend ondblclick="",<legend onmousedown="",<legend onmouseup="",<legend onmouseover="",<legend onmousemove="",<legend onmouseout="",<legend onkeypress="",<legend onkeydown="",<legend onkeyup="",<li type="",<li value="",<li class="",<li id="",<li style="",<li title="",<li dir="",<li lang="",<li onclick="",<li ondblclick="",<li onmousedown="",<li onmouseup="",<li onmouseover="",<li onmousemove="",<li onmouseout="",<li onkeypress="",<li onkeydown="",<li onkeyup="",<link href="",<link rel="",<link rev="",<link title="",<link type="",<link media="",<link disabled="disabled",<link class="",<link id="",<link hreflang="",<link style="",<map name="",<map class="",<map id="",<map style="",<map title="",<map dir="",<map lang="",<map onfocus="",<map onblur="",<map onclick="",<map ondblclick="",<map onmousedown="",<map onmouseup="",<map onmouseover="",<map onmousemove="",<map onmouseout="",<map onkeypress="",<map onkeydown="",<map onkeyup="",<var class="",<var id="",<var style="",<var title="",<var dir="",<var lang="",<var onclick="",<var ondblclick="",<var onmousedown="",<var onmouseup="",<var onmouseover="",<var onmousemove="",<var onmouseout="",<var onkeypress="",<var onkeydown="",<var onkeyup="",<ul type="",<ul compact="",<ul class="",<ul id="",<ul style="",<ul title="",<ul dir="",<ul lang="",<ul onclick="",<ul ondblclick="",<ul onmousedown="",<ul onmouseup="",<ul onmouseover="",<ul onmousemove="",<ul onmouseout="",<ul onkeypress="",<ul onkeydown="",<ul onkeyup="",<tt class="",<tt id="",<tt style="",<tt title="",<tt dir="",<tt lang="",<tt onclick="",<tt ondblclick="",<tt onmousedown="",<tt onmouseup="",<tt onmouseover="",<tt onmousemove="",<tt onmouseout="",<tt onkeypress="",<tt onkeydown="",<tt onkeyup="",<tr align="",<tr valign="",<tr bordercolor="#CCCCCC",<tr bordercolorlight="",<tr bordercolordark="",<tr nowrap="",<tr bgcolor="",<tr class="",<tr id="",<tr style="",<tr title="",<tr dir="",<tr lang="en",<tr onclick="",<tr ondblclick="",<tr onmousedown="",<tr onmouseup="",<tr onmouseover="",<tr onmousemove="",<tr onmouseout="",<tr onkeypress="",<tr onkeydown="",<tr onkeyup="",<thead align="",<thead valign="",<thead bgcolor="",<thead class="",<thead id="",<thead style="",<thead title="",<thead dir="",<thead lang="",<thead onclick="",<thead ondblclick="",<thead onmousedown="",<thead onmouseup="",<thead onmouseover="",<thead onmousemove="",<thead onmouseout="",<thead onkeypress="",<thead onkeydown="",<thead onkeyup="",<th width="",<th height="",<th colspan="",<th rowspan="",<th align="",<th valign="",<th nowrap="",<th bordercolor="#CCCCCC",<th bordercolorlight="",<th bordercolordark="",<th background="",<th bgcolor="",<th class="",<th id="",<th style="",<th title="",<th axis="",<th headers="",<th scope="",<th abbr="",<th dir="",<th lang="",<th onclick="",<th ondblclick="",<th onmousedown="",<th onmouseup="",<th onmouseover="",<th onmousemove="",<th onmouseout="",<th onkeypress="",<th onkeydown="",<th onkeyup="",<tfoot align="",<tfoot valign="",<tfoot bgcolor="",<tfoot class="",<tfoot id="",<tfoot style="",<tfoot title="",<tfoot dir="",<tfoot lang="",<tfoot onclick="",<tfoot ondblclick="",<tfoot onmousedown="",<tfoot onmouseup="",<tfoot onmouseover="",<tfoot onmousemove="",<tfoot onmouseout="",<tfoot onkeypress="",<tfoot onkeydown="",<tfoot onkeyup="",<textarea name="",<textarea cols="",<textarea rows="",<textarea disabled="disabled",<textarea readonly="readonly",<textarea wrap="",<textarea class="",<textarea id="",<textarea style="",<textarea accesskey="",<textarea tabindex="",<textarea title="",<textarea dir="",<textarea lang="",<textarea onfocus="",<textarea onblur="",<textarea onselect="",<textarea onchange="",<textarea onclick="",<textarea ondblclick="",<textarea onmousedown="",<textarea onmouseup="",<textarea onmouseover="",<textarea onmousemove="",<textarea onmouseout="",<textarea onkeypress="",<textarea onkeydown="",<textarea onkeyup="",<td width="",<td height="",<td colspan="",<td rowspan="",<td align="",<td valign="",<td nowrap="",<td bordercolor="#CCCCCC",<td bordercolorlight="",<td bordercolordark="",<td background="",<td bgcolor="",<td class="",<td id="",<td style="",<td title="",<td axis="",<td headers="",<td scope="",<td abbr="",<td dir="",<td lang="",<td onclick="",<td ondblclick="",<td onmousedown="",<td onmouseup="",<td onmouseover="",<td onmousemove="",<td onmouseout="",<td onkeypress="",<td onkeydown="",<td onkeyup="",<tbody align="",<tbody valign="",<tbody bgcolor="",<tbody class="",<tbody id="",<tbody style="",<tbody title="",<tbody dir="",<tbody lang="",<tbody onclick="",<tbody ondblclick="",<tbody onmousedown="",<tbody onmouseup="",<tbody onmouseover="",<tbody onmousemove="",<tbody onmouseout="",<tbody onkeypress="",<tbody onkeydown="",<tbody onkeyup="",<table width="",<table height="",<table border="",<table align="",<table cellpadding="0",<table cellspacing="0",<table bordercolor="#CCCCCC",<table bordercolorlight="",<table bordercolordark="",<table datapagesize="",<table background="",<table cols="",<table bgcolor="",<table frame="",<table rules="",<table dir="",<table lang="",<table onclick="",<table ondblclick="",<table onmousedown="",<table onmouseup="",<table onmouseover="",<table onmousemove="",<table onmouseout="",<table onkeypress="",<table onkeydown="",<table onkeyup="",<table class="",<table id="",<table style="",<table title="",<table summary="",<sup class="",<sup id="",<sup style="",<sup title="",<sup dir="",<sup lang="",<sup onclick="",<sup ondblclick="",<sup onmousedown="",<sup onmouseup="",<sup onmouseover="",<sup onmousemove="",<sup onmouseout="",<sup onkeypress="",<sup onkeydown="",<sup onkeyup="",<sub class="",<sub id="",<sub style="",<sub title="",<sub dir="",<sub lang="",<sub onclick="",<sub ondblclick="",<sub onmousedown="",<sub onmouseup="",<sub onmouseover="",<sub onmousemove="",<sub onmouseout="",<sub onkeypress="",<sub onkeydown="",<sub onkeyup="",<style type="",<style media="",<style disabled="disabled",<style title="",<strong class="",<strong id="",<strong style="",<strong title="",<strong dir="",<strong lang="",<strong onclick="",<strong ondblclick="",<strong onmousedown="",<strong onmouseup="",<strong onmouseover="",<strong onmousemove="",<strong onmouseout="",<strong onkeypress="",<strong onkeydown="",<strong onkeyup="",<span class="",<span id="",<span style="",<span title="",<span dir="",<span lang="",<span onclick="",<span ondblclick="",<span onmousedown="",<span onmouseup="",<span onmouseover="",<span onmousemove="",<span onmouseout="",<span onkeypress="",<span onkeydown="",<span onkeyup="",<sound src="",<sound loop="",<sound delay="",<small class="",<small id="",<small style="",<small title="",<small dir="",<small lang="",<small onclick="",<small ondblclick="",<small onmousedown="",<small onmouseup="",<small onmouseover="",<small onmousemove="",<small onmouseout="",<small onkeypress="",<small onkeydown="",<small onkeyup="",<select name="",<select size="",<select multiple="",<select disabled="disabled",<select class="",<select id="",<select style="",<select accesskey="",<select tabindex="",<select title="",<select dir="",<select lang="",<select onfocus="",<select onblur="",<select onchange="",<script language="",<script src="",<script type="",<script runat="",<script defer="defer",<samp class="",<samp id="",<samp style="",<samp title="",<samp dir="",<samp lang="",<samp onclick="",<samp ondblclick="",<samp onmousedown="",<samp onmouseup="",<samp onmouseover="",<samp onmousemove="",<samp onmouseout="",<samp onkeypress="",<samp onkeydown="",<samp onkeyup="",<q cite="",<q class="",<q id="",<q style="",<q title="",<q dir="",<q lang="",<q onclick="",<q ondblclick="",<q onmousedown="",<q onmouseup="",<q onmouseover="",<q onmousemove="",<q onmouseout="",<q onkeypress="",<q onkeydown="",<q onkeyup="",<pre class="",<pre id="",<pre style="",<pre title="",<pre dir="",<pre lang="",<pre onclick="",<pre ondblclick="",<pre onmousedown="",<pre onmouseup="",<pre onmouseover="",<pre onmousemove="",<pre onmouseout="",<pre onkeypress="",<pre onkeydown="",<pre onkeyup="",<param name="",<param value="",<param valuetype="",<param type="",<param id="",<p align="",<p class="",<p id="",<p style="",<p title="",<p dir="",<p lang="",<p onclick="",<p ondblclick="",<p onmousedown="",<p onmouseup="",<p onmouseover="",<p onmousemove="",<p onmouseout="",<p onkeypress="",<p onkeydown="",<p onkeyup="",<option value="",<option selected="",<option disabled="disabled",<option class="",<option id="",<option style="",<option title="",<option label="",<option dir="",<option lang="",<option onfocus="",<option onblur="",<option onchange="",<option onclick="",<option ondblclick="",<option onmousedown="",<option onmouseup="",<option onmouseover="",<option onmousemove="",<option onmouseout="",<option onkeypress="",<option onkeydown="",<option onkeyup="",<optgroup label="",<optgroup disabled="disabled",<optgroup class="",<optgroup id="",<optgroup style="",<optgroup title="",<optgroup dir="",<optgroup lang="",<optgroup onfocus="",<optgroup onblur="",<optgroup onchange="",<optgroup onclick="",<optgroup ondblclick="",<optgroup onmousedown="",<optgroup onmouseup="",<optgroup onmouseover="",<optgroup onmousemove="",<optgroup onmouseout="",<optgroup onkeypress="",<optgroup onkeydown="",<optgroup onkeyup="",<ol start="",<ol type="",<ol compact="",<ol class="",<ol id="",<ol style="",<ol title="",<ol dir="",<ol lang="",<ol onclick="",<ol ondblclick="",<ol onmousedown="",<ol onmouseup="",<ol onmouseover="",<ol onmousemove="",<ol onmouseout="",<ol onkeypress="",<ol onkeydown="",<ol onkeyup="",<object noexternaldata="",<object classid="",<object codebase="",<object codetype="",<object data="",<object type="",<object archive="",<object declare="",<object name="",<object width="",<object height="",<object hspace="",<object vspace="",<object align="",<object border="",<object standby="",<object class="",<object id="",<object style="",<object accesskey="",<object tabindex="",<object title="",<object usemap="",<object dir="",<object lang="",<object onclick="",<object ondblclick="",<object onmousedown="",<object onmouseup="",<object onmouseover="",<object onmousemove="",<object onmouseout="",<object onkeypress="",<object onkeydown="",<object onkeyup="",<noscript class="",<noscript id="",<noscript style="",<noscript title="",<noframes class="",<noframes id="",<noframes style="",<noframes title="",<multicol cols="",<multicol width="",<multicol gutter="",<meta name="",<meta http-equiv="",<meta content="",<marquee behavior="",<marquee align="",<marquee direction="",<marquee bgcolor="",<marquee width="",<marquee hspace="",<marquee height="",<marquee vspace="",<marquee loop="",<marquee scrollamount="",<marquee scrolldelay="",<marquee truespeed="",<marquee class="",<marquee id="",<marquee style="",<marquee title="",<marquee dir="",<marquee lang="",<marquee onclick="",<marquee ondblclick="",<marquee onmousedown="",<marquee onmouseup="",<marquee onmouseover="",<marquee onmousemove="",<marquee onmouseout="",<marquee onkeypress="",<marquee onkeydown="",<marquee onkeyup="",<A HREF="",<A NAME="",<A TITLE="",<A TARGET="",<A CHARSET="",<A CLASS="",<A ID="",<A STYLE="",<A HREFLANG="",<A ACCESSKEY="",<A TABINDEX="",<A REL="",<A REV="",<A SHAPE="",<A COORDS="",<A DIR="",<A LANG="",<A onFocus="",<A onBlur="",<A onClick="",<A onDblClick="",<A onMouseDown="",<A onMouseUp="",<A onMouseOver="",<A onMouseMove="",<A onMouseOut="",<A onKeyPress="",<A onKeyDown="",<A onKeyUp="",<ABBR CLASS="",<ABBR ID="",<ABBR STYLE="",<ABBR TITLE="",<ABBR DIR="",<ABBR LANG="",<ABBR onClick="",<ABBR onDblClick="",<ABBR onMouseDown="",<ABBR onMouseUp="",<ABBR onMouseOver="",<ABBR onMouseMove="",<ABBR onMouseOut="",<ABBR onKeyPress="",<ABBR onKeyDown="",<ABBR onKeyUp="",<ACRONYM CLASS="",<ACRONYM ID="",<ACRONYM STYLE="",<ACRONYM TITLE="",<ACRONYM DIR="",<ACRONYM LANG="",<ACRONYM onClick="",<ACRONYM onDblClick="",<ACRONYM onMouseDown="",<ACRONYM onMouseUp="",<ACRONYM onMouseOver="",<ACRONYM onMouseMove="",<ACRONYM onMouseOut="",<ACRONYM onKeyPress="",<ACRONYM onKeyDown="",<ACRONYM onKeyUp="",<ADDRESS CLASS="",<ADDRESS ID="",<ADDRESS STYLE="",<ADDRESS TITLE="",<ADDRESS DIR="",<ADDRESS LANG="",<ADDRESS onClick="",<ADDRESS onDblClick="",<ADDRESS onMouseDown="",<ADDRESS onMouseUp="",<ADDRESS onMouseOver="",<ADDRESS onMouseMove="",<ADDRESS onMouseOut="",<ADDRESS onKeyPress="",<ADDRESS onKeyDown="",<ADDRESS onKeyUp="",<APPLET NOEXTERNALDATA="",<APPLET CODE="",<APPLET CODEBASE="",<APPLET NAME="",<APPLET ALT="",<APPLET WIDTH="",<APPLET HEIGHT="",<APPLET HSPACE="",<APPLET VSPACE="",<APPLET ALIGN="",<APPLET CABBASE="",<APPLET MAYSCRIPT="",<APPLET ARCHIVE="",<APPLET CLASS="",<APPLET ID="",<APPLET STYLE="",<AREA NAME="",<AREA VALUE="",<AREA SHAPE="",<AREA COORDS="",<AREA HREF="",<AREA TARGET="",<AREA ALT="",<AREA DISABLED="DISABLED",<AREA CLASS="",<AREA ID="",<AREA STYLE="",<AREA ACCESSKEY="",<AREA TABINDEX="",<AREA TITLE="",<AREA DIR="",<AREA LANG="",<AREA onFocus="",<AREA onBlur="",<AREA onClick="",<AREA onDblClick="",<AREA onMouseDown="",<AREA onMouseUp="",<AREA onMouseOver="",<AREA onMouseMove="",<AREA onMouseOut="",<AREA onKeyPress="",<AREA onKeyDown="",<AREA onKeyUp="",<B CLASS="",<B ID="",<B STYLE="",<B TITLE="",<B DIR="",<B LANG="",<B onClick="",<B onDblClick="",<B onMouseDown="",<B onMouseUp="",<B onMouseOver="",<B onMouseMove="",<B onMouseOut="",<B onKeyPress="",<B onKeyDown="",<B onKeyUp="",<BASE HREF="",<BASE TARGET="",<BASEFONT SIZE="",<BASEFONT FACE="",<BASEFONT COLOR="",<BASEFONT ID="",<BDO DIR="",<BDO LANG="",<BDO CLASS="",<BDO ID="",<BDO STYLE="",<BDO TITLE="",<BGSOUND SRC="",<BGSOUND LOOP="",<BGSOUND BALANCE="",<BGSOUND VOLUME="",<BGSOUND DELAY="",<BIG CLASS="",<BIG ID="",<BIG STYLE="",<BIG TITLE="",<BIG DIR="",<BIG LANG="",<BIG onClick="",<BIG onDblClick="",<BIG onMouseDown="",<BIG onMouseUp="",<BIG onMouseOver="",<BIG onMouseMove="",<BIG onMouseOut="",<BIG onKeyPress="",<BIG onKeyDown="",<BIG onKeyUp="",<BLOCKQUOTE CITE="",<BLOCKQUOTE CLASS="",<BLOCKQUOTE ID="",<BLOCKQUOTE STYLE="",<BLOCKQUOTE TITLE="",<BLOCKQUOTE DIR="",<BLOCKQUOTE LANG="",<BLOCKQUOTE onClick="",<BLOCKQUOTE onDblClick="",<BLOCKQUOTE onMouseDown="",<BLOCKQUOTE onMouseUp="",<BLOCKQUOTE onMouseOver="",<BLOCKQUOTE onMouseMove="",<BLOCKQUOTE onMouseOut="",<BLOCKQUOTE onKeyPress="",<BLOCKQUOTE onKeyDown="",<BLOCKQUOTE onKeyUp="",<BODY BGCOLOR="",<BODY BACKGROUND="",<BODY TEXT="",<BODY LINK="",<BODY VLINK="",<BODY ALINK="",<BODY LEFTMARGIN="",<BODY TOPMARGIN="",<BODY BGPROPERTIES="",<BODY RIGHTMARGIN="",<BODY BOTTOMMARGIN="",<BODY MARGINWIDTH="",<BODY MARGINHEIGHT="",<BODY CLASS="",<BODY ID="",<BODY STYLE="",<BODY TITLE="",<BODY DIR="",<BODY LANG="",<BODY onLoad="",<BODY onUnload="",<BODY onBlur="",<BODY onError="",<BODY onFocus="",<BODY onResize="",<BR CLEAR="",<BR CLASS="",<BR ID="",<BR STYLE="",<BR TITLE="",<BUTTON NAME="",<BUTTON VALUE="",<BUTTON TYPE="",<BUTTON DISABLED="DISABLED",<BUTTON CLASS="",<BUTTON ID="",<BUTTON STYLE="",<BUTTON ACCESSKEY="",<BUTTON TABINDEX="",<BUTTON TITLE="",<BUTTON DIR="",<BUTTON LANG="",<BUTTON onFocus="",<BUTTON onBlur="",<BUTTON onClick="",<BUTTON onDblClick="",<BUTTON onMouseDown="",<BUTTON onMouseUp="",<BUTTON onMouseOver="",<BUTTON onMouseMove="",<BUTTON onMouseOut="",<BUTTON onKeyPress="",<BUTTON onKeyDown="",<BUTTON onKeyUp="",<CAPTION ALIGN="",<CAPTION VALIGN="",<CAPTION CLASS="",<CAPTION ID="",<CAPTION STYLE="",<CAPTION TITLE="",<CAPTION DIR="",<CAPTION LANG="",<CAPTION onClick="",<CAPTION onDblClick="",<CAPTION onMouseDown="",<CAPTION onMouseUp="",<CAPTION onMouseOver="",<CAPTION onMouseMove="",<CAPTION onMouseOut="",<CAPTION onKeyPress="",<CAPTION onKeyDown="",<CAPTION onKeyUp="",<CITE CLASS="",<CITE ID="",<CITE STYLE="",<CITE TITLE="",<CITE DIR="",<CITE LANG="",<CITE onClick="",<CITE onDblClick="",<CITE onMouseDown="",<CITE onMouseUp="",<CITE onMouseOver="",<CITE onMouseMove="",<CITE onMouseOut="",<CITE onKeyPress="",<CITE onKeyDown="",<CITE onKeyUp="",<CODE CLASS="",<CODE ID="",<CODE STYLE="",<CODE TITLE="",<CODE DIR="",<CODE LANG="",<CODE onClick="",<CODE onDblClick="",<CODE onMouseDown="",<CODE onMouseUp="",<CODE onMouseOver="",<CODE onMouseMove="",<CODE onMouseOut="",<CODE onKeyPress="",<CODE onKeyDown="",<CODE onKeyUp="",<COL ALIGN="",<COL VALIGN="",<COL SPAN="",<COL WIDTH="",<COL CLASS="",<COL ID="",<COL STYLE="",<COL TITLE="",<COL DIR="",<COL LANG="",<COL onClick="",<COL onDblClick="",<COL onMouseDown="",<COL onMouseUp="",<COL onMouseOver="",<COL onMouseMove="",<COL onMouseOut="",<COL onKeyPress="",<COL onKeyDown="",<COL onKeyUp="",<COLGROUP ALIGN="",<COLGROUP VALIGN="",<COLGROUP SPAN="",<COLGROUP WIDTH="",<COLGROUP CLASS="",<COLGROUP ID="",<COLGROUP STYLE="",<COLGROUP TITLE="",<COLGROUP DIR="",<COLGROUP LANG="",<COLGROUP onClick="",<COLGROUP onDblClick="",<COLGROUP onMouseDown="",<COLGROUP onMouseUp="",<COLGROUP onMouseOver="",<COLGROUP onMouseMove="",<COLGROUP onMouseOut="",<COLGROUP onKeyPress="",<COLGROUP onKeyDown="",<COLGROUP onKeyUp="",<DD CLASS="",<DD ID="",<DD STYLE="",<DD TITLE="",<DD DIR="",<DD LANG="",<DD onClick="",<DD onDblClick="",<DD onMouseDown="",<DD onMouseUp="",<DD onMouseOver="",<DD onMouseMove="",<DD onMouseOut="",<DD onKeyPress="",<DD onKeyDown="",<DD onKeyUp="",<DEL CITE="",<DEL DATETIME="",<DEL CLASS="",<DEL ID="",<DEL STYLE="",<DEL TITLE="",<DEL DIR="",<DEL LANG="",<DEL onClick="",<DEL onDblClick="",<DEL onMouseDown="",<DEL onMouseUp="",<DEL onMouseOver="",<DEL onMouseMove="",<DEL onMouseOut="",<DEL onKeyPress="",<DEL onKeyDown="",<DEL onKeyUp="",<DFN CLASS="",<DFN ID="",<DFN STYLE="",<DFN TITLE="",<DFN DIR="",<DFN LANG="",<DFN onClick="",<DFN onDblClick="",<DFN onMouseDown="",<DFN onMouseUp="",<DFN onMouseOver="",<DFN onMouseMove="",<DFN onMouseOut="",<DFN onKeyPress="",<DFN onKeyDown="",<DFN onKeyUp="",<DIV ALIGN="",<DIV CLASS="",<DIV ID="",<DIV STYLE="",<DIV TITLE="",<DIV DIR="",<DIV LANG="",<DIV onClick="",<DIV onDblClick="",<DIV onMouseDown="",<DIV onMouseUp="",<DIV onMouseOver="",<DIV onMouseMove="",<DIV onMouseOut="",<DIV onKeyPress="",<DIV onKeyDown="",<DIV onKeyUp="",<DL COMPACT="",<DL CLASS="",<DL ID="",<DL STYLE="",<DL TITLE="",<DL DIR="",<DL LANG="",<DL onClick="",<DL onDblClick="",<DL onMouseDown="",<DL onMouseUp="",<DL onMouseOver="",<DL onMouseMove="",<DL onMouseOut="",<DL onKeyPress="",<DL onKeyDown="",<DL onKeyUp="",<DT CLASS="",<DT ID="",<DT STYLE="",<DT TITLE="",<DT DIR="",<DT LANG="",<DT onClick="",<DT onDblClick="",<DT onMouseDown="",<DT onMouseUp="",<DT onMouseOver="",<DT onMouseMove="",<DT onMouseOut="",<DT onKeyPress="",<DT onKeyDown="",<DT onKeyUp="",<EM CLASS="",<EM ID="",<EM STYLE="",<EM TITLE="",<EM DIR="",<EM LANG="",<EM onClick="",<EM onDblClick="",<EM onMouseDown="",<EM onMouseUp="",<EM onMouseOver="",<EM onMouseMove="",<EM onMouseOut="",<EM onKeyPress="",<EM onKeyDown="",<EM onKeyUp="",<EMBED SRC="",<EMBED WIDTH="",<EMBED HEIGHT="",<EMBED HSPACE="",<EMBED VSPACE="",<EMBED HIDDEN="",<EMBED AUTOSTART="",<EMBED LOOP="",<EMBED ALIGN="",<EMBED CLASS="",<EMBED STYLE="",<EMBED DIR="",<EMBED LANG="",<FIELDSET CLASS="",<FIELDSET ID="",<FIELDSET STYLE="",<FIELDSET TITLE="",<FIELDSET ACCESSKEY="",<FIELDSET DIR="",<FIELDSET LANG="",<FIELDSET onClick="",<FIELDSET onDblClick="",<FIELDSET onMouseDown="",<FIELDSET onMouseUp="",<FIELDSET onMouseOver="",<FIELDSET onMouseMove="",<FIELDSET onMouseOut="",<FIELDSET onKeyPress="",<FIELDSET onKeyDown="",<FIELDSET onKeyUp="",<FONT COLOR="",<FONT SIZE="",<FONT FACE="",<FONT POINTSIZE="",<FONT CLASS="",<FONT ID="",<FONT STYLE="",<FONT TITLE="",<FONT DIR="",<FONT LANG="",<FORM ACTION="",<FORM METHOD="",<FORM ENCTYPE="",<FORM NAME="",<FORM TARGET="",<FORM CLASS="",<FORM ID="",<FORM STYLE="",<FORM TITLE="",<FORM DIR="",<FORM LANG="",<FORM runat="",<FORM onSubmit="",<FORM onReset="",<FORM onClick="",<FORM onDblClick="",<FORM onMouseDown="",<FORM onMouseUp="",<FORM onMouseOver="",<FORM onMouseMove="",<FORM onMouseOut="",<FORM onKeyPress="",<FORM onKeyDown="",<FORM onKeyUp="",<FRAME SRC="",<FRAME NAME="",<FRAME FRAMEBORDER="",<FRAME SCROLLING="",<FRAME NORESIZE="",<FRAME MARGINWIDTH="",<FRAME MARGINHEIGHT="",<FRAME BORDERCOLOR="",<FRAME CLASS="",<FRAME ID="",<FRAME STYLE="",<FRAME TITLE="",<FRAME LONGDESC="",<FRAMESET ROWS="",<FRAMESET COLS="",<FRAMESET FRAMESPACING="",<FRAMESET FRAMEBORDER="",<FRAMESET BORDER="",<FRAMESET BORDERCOLOR="",<FRAMESET CLASS="",<FRAMESET ID="",<FRAMESET STYLE="",<FRAMESET TITLE="",<FRAMESET onLoad="",<FRAMESET onUnload="",<H1 ALIGN="",<H1 CLASS="",<H1 ID="",<H1 STYLE="",<H1 TITLE="",<H1 DIR="",<H1 LANG="",<H1 onClick="",<H1 onDblClick="",<H1 onMouseDown="",<H1 onMouseUp="",<H1 onMouseOver="",<H1 onMouseMove="",<H1 onMouseOut="",<H1 onKeyPress="",<H1 onKeyDown="",<H1 onKeyUp="",<H2 ALIGN="",<H2 CLASS="",<H2 ID="",<H2 STYLE="",<H2 TITLE="",<H2 DIR="",<H2 LANG="",<H2 onClick="",<H2 onDblClick="",<H2 onMouseDown="",<H2 onMouseUp="",<H2 onMouseOver="",<H2 onMouseMove="",<H2 onMouseOut="",<H2 onKeyPress="",<H2 onKeyDown="",<H2 onKeyUp="",<H3 ALIGN="",<H3 CLASS="",<H3 ID="",<H3 STYLE="",<H3 TITLE="",<H3 DIR="",<H3 LANG="",<H3 onClick="",<H3 onDblClick="",<H3 onMouseDown="",<H3 onMouseUp="",<H3 onMouseOver="",<H3 onMouseMove="",<H3 onMouseOut="",<H3 onKeyPress="",<H3 onKeyDown="",<H3 onKeyUp="",<H4 ALIGN="",<H4 CLASS="",<H4 ID="",<H4 STYLE="",<H4 TITLE="",<H4 DIR="",<H4 LANG="",<H4 onClick="",<H4 onDblClick="",<H4 onMouseDown="",<H4 onMouseUp="",<H4 onMouseOver="",<H4 onMouseMove="",<H4 onMouseOut="",<H4 onKeyPress="",<H4 onKeyDown="",<H4 onKeyUp="",<H5 ALIGN="",<H5 CLASS="",<H5 ID="",<H5 STYLE="",<H5 TITLE="",<H5 DIR="",<H5 LANG="",<H5 onClick="",<H5 onDblClick="",<H5 onMouseDown="",<H5 onMouseUp="",<H5 onMouseOver="",<H5 onMouseMove="",<H5 onMouseOut="",<H5 onKeyPress="",<H5 onKeyDown="",<H5 onKeyUp="",<H6 ALIGN="",<H6 CLASS="",<H6 ID="",<H6 STYLE="",<H6 TITLE="",<H6 DIR="",<H6 LANG="",<H6 onClick="",<H6 onDblClick="",<H6 onMouseDown="",<H6 onMouseUp="",<H6 onMouseOver="",<H6 onMouseMove="",<H6 onMouseOut="",<H6 onKeyPress="",<H6 onKeyDown="",<H6 onKeyUp="",<HR ALIGN="",<HR WIDTH="",<HR SIZE="",<HR NOSHADE="",<HR COLOR="",<HR CLASS="",<HR ID="",<HR STYLE="",<HR TITLE="",<HR onClick="",<HR onDblClick="",<HR onMouseDown="",<HR onMouseUp="",<HR onMouseOver="",<HR onMouseMove="",<HR onMouseOut="",<HR onKeyPress="",<HR onKeyDown="",<HR onKeyUp="",<HTML xmlns="",<HTML xml:lang="",<HTML lang="",<HTML dir="",<I CLASS="",<I ID="",<I STYLE="",<I TITLE="",<I DIR="",<I LANG="",<I onClick="",<I onDblClick="",<I onMouseDown="",<I onMouseUp="",<I onMouseOver="",<I onMouseMove="",<I onMouseOut="",<I onKeyPress="",<I onKeyDown="",<I onKeyUp="",<IFRAME SRC="",<IFRAME NAME="",<IFRAME WIDTH="",<IFRAME MARGINWIDTH="",<IFRAME HEIGHT="",<IFRAME MARGINHEIGHT="",<IFRAME ALIGN="",<IFRAME SCROLLING="",<IFRAME FRAMEBORDER="",<IFRAME HSPACE="",<IFRAME VSPACE="",<IFRAME CLASS="",<IFRAME ID="",<IFRAME STYLE="",<IFRAME TITLE="",<IFRAME LONGDESC="",<ILAYER NAME="",<ILAYER ID="",<ILAYER LEFT="",<ILAYER TOP="",<ILAYER PAGEX="",<ILAYER PAGEY="",<ILAYER ABOVE="",<ILAYER BELOW="",<ILAYER Z-INDEX="",<ILAYER WIDTH="",<ILAYER HEIGHT="",<ILAYER VISIBILITY="",<ILAYER CLIP="",<ILAYER BGCOLOR="",<ILAYER BACKGROUND="",<ILAYER SRC="",<ILAYER onFocus="",<ILAYER onBlur="",<ILAYER onLoad="",<ILAYER onMouseOver="",<ILAYER onMouseOut="",<IMG SRC="",<IMG ALT="",<IMG NAME="",<IMG WIDTH="",<IMG HEIGHT="",<IMG HSPACE="",<IMG VSPACE="",<IMG BORDER="",<IMG ALIGN="",<IMG USEMAP="",<IMG ISMAP="ISMAP",<IMG DYNSRC="",<IMG CONTROLS="",<IMG START="",<IMG LOOP="",<IMG LOWSRC="",<IMG CLASS="",<IMG ID="",<IMG STYLE="",<IMG TITLE="",<IMG LONGDESC="",<IMG DIR="",<IMG LANG="",<IMG onClick="",<IMG onDblClick="",<IMG onMouseDown="",<IMG onMouseUp="",<IMG onMouseOver="",<IMG onMouseMove="",<IMG onMouseOut="",<IMG onKeyPress="",<IMG onKeyDown="",<IMG onKeyUp="",<INPUT NAME="",<INPUT TYPE="",<INPUT DISABLED="DISABLED",<INPUT CLASS="",<INPUT ID="",<INPUT STYLE="",<INPUT ACCESSKEY="",<INPUT TABINDEX="",<INPUT TITLE="",<INPUT DIR="",<INPUT LANG="",<INPUT onFocus="",<INPUT onBlur="",<INPUT onSelect="",<INPUT onChange="",<INPUT onClick="",<INPUT onDblClick="",<INPUT onMouseDown="",<INPUT onMouseUp="",<INPUT onMouseOver="",<INPUT onMouseMove="",<INPUT onMouseOut="",<INPUT onKeyPress="",<INPUT onKeyDown="",<INPUT onKeyUp="",<INPUT VALUE="",<INPUT SIZE="",<INPUT MAXLENGTH="",<INPUT READONLY="READONLY",<INPUT CHECKED="CHECKED",<INPUT SRC="",<INPUT ALT="",<INPUT ALIGN="",<INPUT USEMAP="",<INPUT WIDTH="",<INPUT HEIGHT="",<INPUT HSPACE="",<INPUT VSPACE="",<INPUT BORDER="",<INPUT ACCEPT="",<INS CITE="",<INS DATETIME="",<INS CLASS="",<INS ID="",<INS STYLE="",<INS TITLE="",<INS DIR="",<INS LANG="",<INS onClick="",<INS onDblClick="",<INS onMouseDown="",<INS onMouseUp="",<INS onMouseOver="",<INS onMouseMove="",<INS onMouseOut="",<INS onKeyPress="",<INS onKeyDown="",<INS onKeyUp="",<KBD CLASS="",<KBD ID="",<KBD STYLE="",<KBD TITLE="",<KBD DIR="",<KBD LANG="",<KBD onClick="",<KBD onDblClick="",<KBD onMouseDown="",<KBD onMouseUp="",<KBD onMouseOver="",<KBD onMouseMove="",<KBD onMouseOut="",<KBD onKeyPress="",<KBD onKeyDown="",<KBD onKeyUp="",<LABEL FOR="",<LABEL CLASS="",<LABEL ID="",<LABEL STYLE="",<LABEL ACCESSKEY="",<LABEL TITLE="",<LABEL DIR="",<LABEL LANG="",<LABEL onFocus="",<LABEL onBlur="",<LABEL onClick="",<LABEL onDblClick="",<LABEL onMouseDown="",<LABEL onMouseUp="",<LABEL onMouseOver="",<LABEL onMouseMove="",<LABEL onMouseOut="",<LABEL onKeyPress="",<LABEL onKeyDown="",<LABEL onKeyUp="",<LAYER NAME="",<LAYER LEFT="",<LAYER TOP="",<LAYER PAGEX="",<LAYER PAGEY="",<LAYER ABOVE="",<LAYER BELOW="",<LAYER Z-INDEX="",<LAYER WIDTH="",<LAYER HEIGHT="",<LAYER VISIBILITY="",<LAYER CLIP="",<LAYER BGCOLOR="",<LAYER BACKGROUND="",<LAYER SRC="",<LAYER onFocus="",<LAYER onBlur="",<LAYER onLoad="",<LAYER onMouseOver="",<LAYER onMouseOut="",<LEGEND ALIGN="",<LEGEND CLASS="",<LEGEND ID="",<LEGEND STYLE="",<LEGEND ACCESSKEY="",<LEGEND TITLE="",<LEGEND DIR="",<LEGEND LANG="",<LEGEND onClick="",<LEGEND onDblClick="",<LEGEND onMouseDown="",<LEGEND onMouseUp="",<LEGEND onMouseOver="",<LEGEND onMouseMove="",<LEGEND onMouseOut="",<LEGEND onKeyPress="",<LEGEND onKeyDown="",<LEGEND onKeyUp="",<LI TYPE="",<LI VALUE="",<LI CLASS="",<LI ID="",<LI STYLE="",<LI TITLE="",<LI DIR="",<LI LANG="",<LI onClick="",<LI onDblClick="",<LI onMouseDown="",<LI onMouseUp="",<LI onMouseOver="",<LI onMouseMove="",<LI onMouseOut="",<LI onKeyPress="",<LI onKeyDown="",<LI onKeyUp="",<LINK HREF="",<LINK REL="",<LINK REV="",<LINK TITLE="",<LINK TYPE="",<LINK MEDIA="",<LINK DISABLED="DISABLED",<LINK CLASS="",<LINK ID="",<LINK HREFLANG="",<LINK STYLE="",<MAP NAME="",<MAP CLASS="",<MAP ID="",<MAP STYLE="",<MAP TITLE="",<MAP DIR="",<MAP LANG="",<MAP onFocus="",<MAP onBlur="",<MAP onClick="",<MAP onDblClick="",<MAP onMouseDown="",<MAP onMouseUp="",<MAP onMouseOver="",<MAP onMouseMove="",<MAP onMouseOut="",<MAP onKeyPress="",<MAP onKeyDown="",<MAP onKeyUp="",<VAR CLASS="",<VAR ID="",<VAR STYLE="",<VAR TITLE="",<VAR DIR="",<VAR LANG="",<VAR onClick="",<VAR onDblClick="",<VAR onMouseDown="",<VAR onMouseUp="",<VAR onMouseOver="",<VAR onMouseMove="",<VAR onMouseOut="",<VAR onKeyPress="",<VAR onKeyDown="",<VAR onKeyUp="",<UL TYPE="",<UL COMPACT="",<UL CLASS="",<UL ID="",<UL STYLE="",<UL TITLE="",<UL DIR="",<UL LANG="",<UL onClick="",<UL onDblClick="",<UL onMouseDown="",<UL onMouseUp="",<UL onMouseOver="",<UL onMouseMove="",<UL onMouseOut="",<UL onKeyPress="",<UL onKeyDown="",<UL onKeyUp="",<TT CLASS="",<TT ID="",<TT STYLE="",<TT TITLE="",<TT DIR="",<TT LANG="",<TT onClick="",<TT onDblClick="",<TT onMouseDown="",<TT onMouseUp="",<TT onMouseOver="",<TT onMouseMove="",<TT onMouseOut="",<TT onKeyPress="",<TT onKeyDown="",<TT onKeyUp="",<TR ALIGN="",<TR VALIGN="",<TR BORDERCOLOR="",<TR BORDERCOLORLIGHT="",<TR BORDERCOLORDARK="",<TR NOWRAP="",<TR BGCOLOR="",<TR CLASS="",<TR ID="",<TR STYLE="",<TR TITLE="",<TR DIR="",<TR LANG="",<TR onClick="",<TR onDblClick="",<TR onMouseDown="",<TR onMouseUp="",<TR onMouseOver="",<TR onMouseMove="",<TR onMouseOut="",<TR onKeyPress="",<TR onKeyDown="",<TR onKeyUp="",<THEAD ALIGN="",<THEAD VALIGN="",<THEAD BGCOLOR="",<THEAD CLASS="",<THEAD ID="",<THEAD STYLE="",<THEAD TITLE="",<THEAD DIR="",<THEAD LANG="",<THEAD onClick="",<THEAD onDblClick="",<THEAD onMouseDown="",<THEAD onMouseUp="",<THEAD onMouseOver="",<THEAD onMouseMove="",<THEAD onMouseOut="",<THEAD onKeyPress="",<THEAD onKeyDown="",<THEAD onKeyUp="",<TH WIDTH="",<TH HEIGHT="",<TH COLSPAN="",<TH ROWSPAN="",<TH ALIGN="",<TH VALIGN="",<TH NOWRAP="",<TH BORDERCOLOR="",<TH BORDERCOLORLIGHT="",<TH BORDERCOLORDARK="",<TH BACKGROUND="",<TH BGCOLOR="",<TH CLASS="",<TH ID="",<TH STYLE="",<TH TITLE="",<TH AXIS="",<TH HEADERS="",<TH SCOPE="",<TH ABBR="",<TH DIR="",<TH LANG="",<TH onClick="",<TH onDblClick="",<TH onMouseDown="",<TH onMouseUp="",<TH onMouseOver="",<TH onMouseMove="",<TH onMouseOut="",<TH onKeyPress="",<TH onKeyDown="",<TH onKeyUp="",<TFOOT ALIGN="",<TFOOT VALIGN="",<TFOOT BGCOLOR="",<TFOOT CLASS="",<TFOOT ID="",<TFOOT STYLE="",<TFOOT TITLE="",<TFOOT DIR="",<TFOOT LANG="",<TFOOT onClick="",<TFOOT onDblClick="",<TFOOT onMouseDown="",<TFOOT onMouseUp="",<TFOOT onMouseOver="",<TFOOT onMouseMove="",<TFOOT onMouseOut="",<TFOOT onKeyPress="",<TFOOT onKeyDown="",<TFOOT onKeyUp="",<TEXTAREA NAME="",<TEXTAREA COLS="",<TEXTAREA ROWS="",<TEXTAREA DISABLED="DISABLED",<TEXTAREA READONLY="READONLY",<TEXTAREA WRAP="",<TEXTAREA CLASS="",<TEXTAREA ID="",<TEXTAREA STYLE="",<TEXTAREA ACCESSKEY="",<TEXTAREA TABINDEX="",<TEXTAREA TITLE="",<TEXTAREA DIR="",<TEXTAREA LANG="",<TEXTAREA onFocus="",<TEXTAREA onBlur="",<TEXTAREA onSelect="",<TEXTAREA onChange="",<TEXTAREA onClick="",<TEXTAREA onDblClick="",<TEXTAREA onMouseDown="",<TEXTAREA onMouseUp="",<TEXTAREA onMouseOver="",<TEXTAREA onMouseMove="",<TEXTAREA onMouseOut="",<TEXTAREA onKeyPress="",<TEXTAREA onKeyDown="",<TEXTAREA onKeyUp="",<TD WIDTH="",<TD HEIGHT="",<TD COLSPAN="",<TD ROWSPAN="",<TD ALIGN="",<TD VALIGN="",<TD NOWRAP="",<TD BORDERCOLOR="",<TD BORDERCOLORLIGHT="",<TD BORDERCOLORDARK="",<TD BACKGROUND="",<TD BGCOLOR="",<TD CLASS="",<TD ID="",<TD STYLE="",<TD TITLE="",<TD AXIS="",<TD HEADERS="",<TD SCOPE="",<TD ABBR="",<TD DIR="",<TD LANG="",<TD onClick="",<TD onDblClick="",<TD onMouseDown="",<TD onMouseUp="",<TD onMouseOver="",<TD onMouseMove="",<TD onMouseOut="",<TD onKeyPress="",<TD onKeyDown="",<TD onKeyUp="",<TBODY ALIGN="",<TBODY VALIGN="",<TBODY BGCOLOR="",<TBODY CLASS="",<TBODY ID="",<TBODY STYLE="",<TBODY TITLE="",<TBODY DIR="",<TBODY LANG="",<TBODY onClick="",<TBODY onDblClick="",<TBODY onMouseDown="",<TBODY onMouseUp="",<TBODY onMouseOver="",<TBODY onMouseMove="",<TBODY onMouseOut="",<TBODY onKeyPress="",<TBODY onKeyDown="",<TBODY onKeyUp="",<TABLE WIDTH="",<TABLE HEIGHT="",<TABLE BORDER="",<TABLE ALIGN="",<TABLE CELLPADDING="0",<TABLE CELLSPACING="0",<TABLE BORDERCOLOR="",<TABLE BORDERCOLORLIGHT="",<TABLE BORDERCOLORDARK="",<TABLE DATAPAGESIZE="",<TABLE BACKGROUND="",<TABLE COLS="",<TABLE BGCOLOR="",<TABLE FRAME="",<TABLE RULES="",<TABLE DIR="",<TABLE LANG="",<TABLE onClick="",<TABLE onDblClick="",<TABLE onMouseDown="",<TABLE onMouseUp="",<TABLE onMouseOver="",<TABLE onMouseMove="",<TABLE onMouseOut="",<TABLE onKeyPress="",<TABLE onKeyDown="",<TABLE onKeyUp="",<TABLE CLASS="",<TABLE ID="",<TABLE STYLE="",<TABLE TITLE="",<TABLE SUMMARY="",<SUP CLASS="",<SUP ID="",<SUP STYLE="",<SUP TITLE="",<SUP DIR="",<SUP LANG="",<SUP onClick="",<SUP onDblClick="",<SUP onMouseDown="",<SUP onMouseUp="",<SUP onMouseOver="",<SUP onMouseMove="",<SUP onMouseOut="",<SUP onKeyPress="",<SUP onKeyDown="",<SUP onKeyUp="",<SUB CLASS="",<SUB ID="",<SUB STYLE="",<SUB TITLE="",<SUB DIR="",<SUB LANG="",<SUB onClick="",<SUB onDblClick="",<SUB onMouseDown="",<SUB onMouseUp="",<SUB onMouseOver="",<SUB onMouseMove="",<SUB onMouseOut="",<SUB onKeyPress="",<SUB onKeyDown="",<SUB onKeyUp="",<STYLE TYPE="",<STYLE MEDIA="",<STYLE DISABLED="DISABLED",<STYLE TITLE="",<STRONG CLASS="",<STRONG ID="",<STRONG STYLE="",<STRONG TITLE="",<STRONG DIR="",<STRONG LANG="",<STRONG onClick="",<STRONG onDblClick="",<STRONG onMouseDown="",<STRONG onMouseUp="",<STRONG onMouseOver="",<STRONG onMouseMove="",<STRONG onMouseOut="",<STRONG onKeyPress="",<STRONG onKeyDown="",<STRONG onKeyUp="",<SPAN CLASS="",<SPAN ID="",<SPAN STYLE="",<SPAN TITLE="",<SPAN DIR="",<SPAN LANG="",<SPAN onClick="",<SPAN onDblClick="",<SPAN onMouseDown="",<SPAN onMouseUp="",<SPAN onMouseOver="",<SPAN onMouseMove="",<SPAN onMouseOut="",<SPAN onKeyPress="",<SPAN onKeyDown="",<SPAN onKeyUp="",<SOUND SRC="",<SOUND LOOP="",<SOUND DELAY="",<SMALL CLASS="",<SMALL ID="",<SMALL STYLE="",<SMALL TITLE="",<SMALL DIR="",<SMALL LANG="",<SMALL onClick="",<SMALL onDblClick="",<SMALL onMouseDown="",<SMALL onMouseUp="",<SMALL onMouseOver="",<SMALL onMouseMove="",<SMALL onMouseOut="",<SMALL onKeyPress="",<SMALL onKeyDown="",<SMALL onKeyUp="",<SELECT NAME="",<SELECT SIZE="",<SELECT MULTIPLE="",<SELECT DISABLED="DISABLED",<SELECT CLASS="",<SELECT ID="",<SELECT STYLE="",<SELECT ACCESSKEY="",<SELECT TABINDEX="",<SELECT TITLE="",<SELECT DIR="",<SELECT LANG="",<SELECT onFocus="",<SELECT onBlur="",<SELECT onChange="",<SCRIPT language="",<SCRIPT SRC="",<SCRIPT TYPE="",<SCRIPT runat="",<SCRIPT DEFER="DEFER",<SAMP CLASS="",<SAMP ID="",<SAMP STYLE="",<SAMP TITLE="",<SAMP DIR="",<SAMP LANG="",<SAMP onClick="",<SAMP onDblClick="",<SAMP onMouseDown="",<SAMP onMouseUp="",<SAMP onMouseOver="",<SAMP onMouseMove="",<SAMP onMouseOut="",<SAMP onKeyPress="",<SAMP onKeyDown="",<SAMP onKeyUp="",<Q CITE="",<Q CLASS="",<Q ID="",<Q STYLE="",<Q TITLE="",<Q DIR="",<Q LANG="",<Q onClick="",<Q onDblClick="",<Q onMouseDown="",<Q onMouseUp="",<Q onMouseOver="",<Q onMouseMove="",<Q onMouseOut="",<Q onKeyPress="",<Q onKeyDown="",<Q onKeyUp="",<PRE CLASS="",<PRE ID="",<PRE STYLE="",<PRE TITLE="",<PRE DIR="",<PRE LANG="",<PRE onClick="",<PRE onDblClick="",<PRE onMouseDown="",<PRE onMouseUp="",<PRE onMouseOver="",<PRE onMouseMove="",<PRE onMouseOut="",<PRE onKeyPress="",<PRE onKeyDown="",<PRE onKeyUp="",<PARAM NAME="",<PARAM VALUE="",<PARAM VALUETYPE="",<PARAM TYPE="",<PARAM ID="",<P ALIGN="",<P CLASS="",<P ID="",<P STYLE="",<P TITLE="",<P DIR="",<P LANG="",<P onClick="",<P onDblClick="",<P onMouseDown="",<P onMouseUp="",<P onMouseOver="",<P onMouseMove="",<P onMouseOut="",<P onKeyPress="",<P onKeyDown="",<P onKeyUp="",<OPTION VALUE="",<OPTION SELECTED="",<OPTION DISABLED="DISABLED",<OPTION CLASS="",<OPTION ID="",<OPTION STYLE="",<OPTION TITLE="",<OPTION LABEL="",<OPTION DIR="",<OPTION LANG="",<OPTION onFocus="",<OPTION onBlur="",<OPTION onChange="",<OPTION onClick="",<OPTION onDblClick="",<OPTION onMouseDown="",<OPTION onMouseUp="",<OPTION onMouseOver="",<OPTION onMouseMove="",<OPTION onMouseOut="",<OPTION onKeyPress="",<OPTION onKeyDown="",<OPTION onKeyUp="",<OPTGROUP LABEL="",<OPTGROUP DISABLED="DISABLED",<OPTGROUP CLASS="",<OPTGROUP ID="",<OPTGROUP STYLE="",<OPTGROUP TITLE="",<OPTGROUP DIR="",<OPTGROUP LANG="",<OPTGROUP onFocus="",<OPTGROUP onBlur="",<OPTGROUP onChange="",<OPTGROUP onClick="",<OPTGROUP onDblClick="",<OPTGROUP onMouseDown="",<OPTGROUP onMouseUp="",<OPTGROUP onMouseOver="",<OPTGROUP onMouseMove="",<OPTGROUP onMouseOut="",<OPTGROUP onKeyPress="",<OPTGROUP onKeyDown="",<OPTGROUP onKeyUp="",<OL START="",<OL type="",<OL COMPACT="",<OL CLASS="",<OL ID="",<OL STYLE="",<OL TITLE="",<OL DIR="",<OL LANG="",<OL onClick="",<OL onDblClick="",<OL onMouseDown="",<OL onMouseUp="",<OL onMouseOver="",<OL onMouseMove="",<OL onMouseOut="",<OL onKeyPress="",<OL onKeyDown="",<OL onKeyUp="",<OBJECT NOEXTERNALDATA="",<OBJECT CLASSID="",<OBJECT CODEBASE="",<OBJECT CODETYPE="",<OBJECT DATA="",<OBJECT TYPE="",<OBJECT ARCHIVE="",<OBJECT DECLARE="",<OBJECT NAME="",<OBJECT WIDTH="",<OBJECT HEIGHT="",<OBJECT HSPACE="",<OBJECT VSPACE="",<OBJECT ALIGN="",<OBJECT BORDER="",<OBJECT STANDBY="",<OBJECT CLASS="",<OBJECT ID="",<OBJECT STYLE="",<OBJECT ACCESSKEY="",<OBJECT TABINDEX="",<OBJECT TITLE="",<OBJECT USEMAP="",<OBJECT DIR="",<OBJECT LANG="",<OBJECT onClick="",<OBJECT onDblClick="",<OBJECT onMouseDown="",<OBJECT onMouseUp="",<OBJECT onMouseOver="",<OBJECT onMouseMove="",<OBJECT onMouseOut="",<OBJECT onKeyPress="",<OBJECT onKeyDown="",<OBJECT onKeyUp="",<NOSCRIPT CLASS="",<NOSCRIPT ID="",<NOSCRIPT STYLE="",<NOSCRIPT TITLE="",<NOFRAMES CLASS="",<NOFRAMES ID="",<NOFRAMES STYLE="",<NOFRAMES TITLE="",<MULTICOL COLS="",<MULTICOL WIDTH="",<MULTICOL GUTTER="",<META NAME="",<META HTTP-EQUIV="",<META CONTENT="",<MARQUEE BEHAVIOR="",<MARQUEE ALIGN="",<MARQUEE DIRECTION="",<MARQUEE BGCOLOR="",<MARQUEE WIDTH="",<MARQUEE HSPACE="",<MARQUEE HEIGHT="",<MARQUEE VSPACE="",<MARQUEE LOOP="",<MARQUEE SCROLLAMOUNT="",<MARQUEE SCROLLDELAY="",<MARQUEE TRUESPEED="",<MARQUEE CLASS="",<MARQUEE ID="",<MARQUEE STYLE="",<MARQUEE TITLE="",<MARQUEE DIR="",<MARQUEE LANG="",<MARQUEE onClick="",<MARQUEE onDblClick="",<MARQUEE onMouseDown="",<MARQUEE onMouseUp="",<MARQUEE onMouseOver="",<MARQUEE onMouseMove="",<MARQUEE onMouseOut="",<MARQUEE onKeyPress="",<MARQUEE onKeyDown="",<MARQUEE onKeyUp="", + + + + uuid + 69BD9C8F-15C0-4F67-8B7E-64E48B5E9E71 + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Preferences/Completions HTML Tags.tmPreferences b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Preferences/Completions HTML Tags.tmPreferences new file mode 100644 index 0000000..8470801 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Preferences/Completions HTML Tags.tmPreferences @@ -0,0 +1,30 @@ + + + + + name + Completions HTML Tags + scope + text.html -(meta.tag | source), invalid.illegal.incomplete.html -source + settings + + shellVariables + + + name + TM_COMPLETION_split + value + , + + + name + TM_COMPLETIONS + value + html,head,title,base,link,meta,style,script,noscript,body,section,nav,article,aside,h1,h2,h3,h4,h5,h6,hgroup,header,footer,address,p,hr,br,pre,dialog,blockquote,ol,ul,li,dl,dt,dd,a,q,cite,em,strong,small,mark,dfn,abbr,time,progress,meter,code,var,samp,kbd,sub,sup,span,i,b,bdo,ruby,rt,rp,ins,del,figure,img,iframe,embed,object,param,video,audio,source,canvas,map,area,table,caption,colgroup,col,tbody,thead,tfoot,tr,td,th,form,fieldset,label,input,button,select,datalist,optgroup,option,textarea,output,details,datagrid,command,bb,menu,legend,div + + + + uuid + 4720ADB8-DD17-4F97-A715-AFD72E22CE45 + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Preferences/Miscellaneous.tmPreferences b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Preferences/Miscellaneous.tmPreferences new file mode 100644 index 0000000..b875dff --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Preferences/Miscellaneous.tmPreferences @@ -0,0 +1,93 @@ + + + + + name + Miscellaneous + scope + text.html + settings + + decreaseIndentPattern + (?x) + ^\s* + (</(?!html) + [A-Za-z0-9]+\b[^>]*> + |--> + |<\?(php)?\s+(else(if)?|end(if|for(each)?|while)) + |\} + ) + highlightPairs + + + ( + ) + + + { + } + + + [ + ] + + + + + + + < + > + + + increaseIndentPattern + (?x) + <(?!\?|area|base|br|col|frame|hr|html|img|input|link|meta|param|[^>]*/>) + ([A-Za-z0-9]+)(?=\s|>)\b[^>]*>(?!.*</\1>) + |<!--(?!.*-->) + |<\?php.+?\b(if|else(?:if)?|for(?:each)?|while)\b.*:(?!.*end\1) + |\{[^}"']*$ + + indentNextLinePattern + <!DOCTYPE(?!.*>) + shellVariables + + + name + TM_HTML_EMPTY_TAGS + value + area|base|basefont|br|col|frame|hr|img|input|isindex|link|meta|param + + + smartTypingPairs + + + " + " + + + ( + ) + + + { + } + + + [ + ] + + + + + + + < + > + + + + uuid + FC34BE82-69DC-47B0-997A-37A8763D4E69 + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Preferences/Symbol List - ID.tmPreferences b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Preferences/Symbol List - ID.tmPreferences new file mode 100644 index 0000000..6769182 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Preferences/Symbol List - ID.tmPreferences @@ -0,0 +1,17 @@ + + + + + name + Symbol List: ID + scope + text.html meta.toc-list.id.html + settings + + symbolTransformation + s/^/ID: / + + uuid + E7C5859E-122D-4382-84BE-5AB584DC2409 + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Preferences/Tag Preferences.tmPreferences b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Preferences/Tag Preferences.tmPreferences new file mode 100644 index 0000000..85b6497 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Preferences/Tag Preferences.tmPreferences @@ -0,0 +1,48 @@ + + + + + name + Tag Preferences + scope + meta.tag + settings + + smartTypingPairs + + + " + " + + + ( + ) + + + { + } + + + [ + ] + + + + + + + < + > + + + ' + ' + + + spellChecking + 0 + + uuid + 73251DBE-EBD2-470F-8148-E6F2EC1A9641 + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Preferences/Typing Pairs - Empty Tag.tmPreferences b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Preferences/Typing Pairs - Empty Tag.tmPreferences new file mode 100644 index 0000000..8ca2a5e --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Preferences/Typing Pairs - Empty Tag.tmPreferences @@ -0,0 +1,26 @@ + + + + + name + Typing Pairs: Empty Tag + scope + text.html invalid.illegal.incomplete + settings + + smartTypingPairs + + + ? + ? + + + % + % + + + + uuid + 6D6B631D-0D6C-413C-B4FA-1D535CBCE890 + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Support/entities.txt b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Support/entities.txt new file mode 100644 index 0000000..2949b04 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Support/entities.txt @@ -0,0 +1,252 @@ +160 nbsp +161 iexcl +162 cent +163 pound +164 curren +165 yen +166 brvbar +167 sect +168 uml +169 copy +170 ordf +171 laquo +172 not +173 shy +174 reg +175 macr +176 deg +177 plusmn +178 sup2 +179 sup3 +180 acute +181 micro +182 para +183 middot +184 cedil +185 sup1 +186 ordm +187 raquo +188 frac14 +189 frac12 +190 frac34 +191 iquest +192 Agrave +193 Aacute +194 Acirc +195 Atilde +196 Auml +197 Aring +198 AElig +199 Ccedil +200 Egrave +201 Eacute +202 Ecirc +203 Euml +204 Igrave +205 Iacute +206 Icirc +207 Iuml +208 ETH +209 Ntilde +210 Ograve +211 Oacute +212 Ocirc +213 Otilde +214 Ouml +215 times +216 Oslash +217 Ugrave +218 Uacute +219 Ucirc +220 Uuml +221 Yacute +222 THORN +223 szlig +224 agrave +225 aacute +226 acirc +227 atilde +228 auml +229 aring +230 aelig +231 ccedil +232 egrave +233 eacute +234 ecirc +235 euml +236 igrave +237 iacute +238 icirc +239 iuml +240 eth +241 ntilde +242 ograve +243 oacute +244 ocirc +245 otilde +246 ouml +247 divide +248 oslash +249 ugrave +250 uacute +251 ucirc +252 uuml +253 yacute +254 thorn +255 yuml +402 fnof +913 Alpha +914 Beta +915 Gamma +916 Delta +917 Epsilon +918 Zeta +919 Eta +920 Theta +921 Iota +922 Kappa +923 Lambda +924 Mu +925 Nu +926 Xi +927 Omicron +928 Pi +929 Rho +931 Sigma +932 Tau +933 Upsilon +934 Phi +935 Chi +936 Psi +937 Omega +945 alpha +946 beta +947 gamma +948 delta +949 epsilon +950 zeta +951 eta +952 theta +953 iota +954 kappa +955 lambda +956 mu +957 nu +958 xi +959 omicron +960 pi +961 rho +962 sigmaf +963 sigma +964 tau +965 upsilon +966 phi +967 chi +968 psi +969 omega +977 thetasym +978 upsih +982 piv +8226 bull +8230 hellip +8242 prime +8243 Prime +8254 oline +8260 frasl +8472 weierp +8465 image +8476 real +8482 trade +8501 alefsym +8592 larr +8593 uarr +8594 rarr +8595 darr +8596 harr +8629 crarr +8656 lArr +8657 uArr +8658 rArr +8659 dArr +8660 hArr +8704 forall +8706 part +8707 exist +8709 empty +8711 nabla +8712 isin +8713 notin +8715 ni +8719 prod +8721 sum +8722 minus +8727 lowast +8730 radic +8733 prop +8734 infin +8736 ang +8743 and +8744 or +8745 cap +8746 cup +8747 int +8756 there4 +8764 sim +8773 cong +8776 asymp +8800 ne +8801 equiv +8804 le +8805 ge +8834 sub +8835 sup +8836 nsub +8838 sube +8839 supe +8853 oplus +8855 otimes +8869 perp +8901 sdot +8968 lceil +8969 rceil +8970 lfloor +8971 rfloor +9001 lang +9002 rang +9674 loz +9824 spades +9827 clubs +9829 hearts +9830 diams +34 quot +38 amp +60 lt +62 gt +338 OElig +339 oelig +352 Scaron +353 scaron +376 Yuml +710 circ +732 tilde +8194 ensp +8195 emsp +8201 thinsp +8204 zwnj +8205 zwj +8206 lrm +8207 rlm +8211 ndash +8212 mdash +8216 lsquo +8217 rsquo +8218 sbquo +8220 ldquo +8221 rdquo +8222 bdquo +8224 dagger +8225 Dagger +8240 permil +8249 lsaquo +8250 rsaquo +8364 euro diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Support/nibs/Insert Entity.nib/classes.nib b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Support/nibs/Insert Entity.nib/classes.nib new file mode 100644 index 0000000..a731b33 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Support/nibs/Insert Entity.nib/classes.nib @@ -0,0 +1,7 @@ +{ + IBClasses = ( + {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, + {ACTIONS = {performButtonClick = id; }; CLASS = NSObject; LANGUAGE = ObjC; } + ); + IBVersion = 1; +} \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Support/nibs/Insert Entity.nib/info.nib b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Support/nibs/Insert Entity.nib/info.nib new file mode 100644 index 0000000..42c6d2f --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Support/nibs/Insert Entity.nib/info.nib @@ -0,0 +1,16 @@ + + + + + IBDocumentLocation + 69 14 356 240 0 0 1920 1178 + IBFramework Version + 446.1 + IBOpenObjects + + 5 + + IBSystem Version + 8L127 + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Support/nibs/Insert Entity.nib/keyedobjects.nib b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Support/nibs/Insert Entity.nib/keyedobjects.nib new file mode 100644 index 0000000..2a9ea60 Binary files /dev/null and b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Support/nibs/Insert Entity.nib/keyedobjects.nib differ diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Syntaxes/HTML 5.tmLanguage b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Syntaxes/HTML 5.tmLanguage new file mode 100644 index 0000000..454da19 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Syntaxes/HTML 5.tmLanguage @@ -0,0 +1,938 @@ + + + + + fileTypes + + html + htm + shtml + xhtml + phtml + php + inc + tmpl + tpl + ctp + + firstLineMatch + <!DOCTYPE|doctype|<(?i:html)|<\?(?i:php) + foldingStartMarker + (?x) + (<(?i:a|article|aside|audio|blockquote|body|canvas|datalist|details|div|dl|fieldset|figcaption|figure|footer|form|head|header|hgroup|li|mark|meter|nav|ol|output|p|progress|rp|rt|ruby|script|section|select|small|style|summary|table|tbody|tfoot|thead|time|tr|ul|video)\b.*?> + |<!--(?!.*--\s*>) + |^<!--\ \#tminclude\ (?>.*?-->)$ + |<\?(?:php)?.*\b(if|for(each)?|while)\b.+: + |\{\{?(if|foreach|capture|literal|foreach|php|section|strip) + |\{\s*($|\?>\s*$|//|/\*(.*\*/\s*$|(?!.*?\*/))) + ) + foldingStopMarker + (?x) + (</(?i:a|article|aside|audio|blockquote|body|canvas|datalist|details|div|dl|fieldset|figcaption|figure|footer|form|head|header|hgroup|li|mark|meter|nav|ol|output|p|progress|rp|rt|ruby|script|section|select|small|style|summary|table|tbody|tfoot|thead|time|tr|ul|video)> + |^(?!.*?<!--).*?--\s*> + |^<!--\ end\ tminclude\ -->$ + |<\?(?:php)?.*\bend(if|for(each)?|while)\b + |\{\{?/(if|foreach|capture|literal|foreach|php|section|strip) + |^[^{]*\} + ) + keyEquivalent + ^~H + name + HTML5 + patterns + + + begin + (<)([a-zA-Z0-9:]+)(?=[^>]*></\2>) + beginCaptures + + 1 + + name + punctuation.definition.tag.html + + 2 + + name + entity.name.tag.html + + + end + (>(<)/)(\2)(>) + endCaptures + + 1 + + name + punctuation.definition.tag.html + + 2 + + name + meta.scope.between-tag-pair.html + + 3 + + name + entity.name.tag.html + + 4 + + name + punctuation.definition.tag.html + + + name + meta.tag.any.html + patterns + + + include + #tag-stuff + + + + + begin + (<\?)(xml) + captures + + 1 + + name + punctuation.definition.tag.html + + 2 + + name + entity.name.tag.xml.html + + + end + (\?>) + name + meta.tag.preprocessor.xml.html + patterns + + + include + #tag-generic-attribute + + + include + #string-double-quoted + + + include + #string-single-quoted + + + + + begin + <!-- + captures + + 0 + + name + punctuation.definition.comment.html + + + end + --\s*> + name + comment.block.html + patterns + + + match + -- + name + invalid.illegal.bad-comments-or-CDATA.html + + + include + #embedded-code + + + + + begin + <! + captures + + 0 + + name + punctuation.definition.tag.html + + + end + > + name + meta.tag.sgml.html + patterns + + + begin + (DOCTYPE|doctype) + captures + + 1 + + name + entity.name.tag.doctype.html + + + end + (?=>) + name + meta.tag.sgml.doctype.html + patterns + + + match + "[^">]*" + name + string.quoted.double.doctype.identifiers-and-DTDs.html + + + + + begin + \[CDATA\[ + end + ]](?=>) + name + constant.other.inline-data.html + + + match + (\s*)(?!--|>)\S(\s*) + name + invalid.illegal.bad-comments-or-CDATA.html + + + + + include + #embedded-code + + + begin + (?:^\s+)?(<)((?i:style))\b(?![^>]*/>) + captures + + 1 + + name + punctuation.definition.tag.html + + 2 + + name + entity.name.tag.style.html + + 3 + + name + punctuation.definition.tag.html + + + end + (</)((?i:style))(>)(?:\s*\n)? + name + source.css.embedded.html + patterns + + + include + #tag-stuff + + + begin + (>) + beginCaptures + + 1 + + name + punctuation.definition.tag.html + + + end + (?=</(?i:style)) + patterns + + + include + #embedded-code + + + include + source.css + + + + + + + begin + (?:^\s+)?(<)((?i:script))\b(?![^>]*/>) + beginCaptures + + 1 + + name + punctuation.definition.tag.html + + 2 + + name + entity.name.tag.script.html + + + end + (?<=</(script|SCRIPT))(>)(?:\s*\n)? + endCaptures + + 2 + + name + punctuation.definition.tag.html + + + name + source.js.embedded.html + patterns + + + include + #tag-stuff + + + begin + (?<!</(?:script|SCRIPT))(>) + captures + + 1 + + name + punctuation.definition.tag.html + + 2 + + name + entity.name.tag.script.html + + + end + (</)((?i:script)) + patterns + + + captures + + 1 + + name + punctuation.definition.comment.js + + + match + (//).*?((?=</script)|$\n?) + name + comment.line.double-slash.js + + + begin + /\* + captures + + 0 + + name + punctuation.definition.comment.js + + + end + \*/|(?=</script) + name + comment.block.js + + + include + #php + + + include + source.js + + + + + + + begin + (</?)((?i:body|head|html)\b) + captures + + 1 + + name + punctuation.definition.tag.html + + 2 + + name + entity.name.tag.structure.any.html + + + end + (>) + name + meta.tag.structure.any.html + patterns + + + include + #tag-stuff + + + + + begin + (</?)((?i:address|blockquote|dd|div|header|section|footer|aside|nav|dl|dt|fieldset|form|frame|frameset|h1|h2|h3|h4|h5|h6|iframe|noframes|object|ol|p|ul|applet|center|dir|hr|menu|pre)\b) + captures + + 1 + + name + punctuation.definition.tag.html + + 2 + + name + entity.name.tag.block.any.html + + + end + (>) + name + meta.tag.block.any.html + patterns + + + include + #tag-stuff + + + + + begin + (</?)((?i:a|abbr|acronym|area|b|base|basefont|bdo|big|br|button|caption|cite|code|col|colgroup|del|dfn|em|font|head|html|i|img|input|ins|isindex|kbd|label|legend|li|link|map|meta|noscript|optgroup|option|param|q|s|samp|script|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|title|tr|tt|u|var)\b) + captures + + 1 + + name + punctuation.definition.tag.html + + 2 + + name + entity.name.tag.inline.any.html + + + end + ((?: ?/)?>) + name + meta.tag.inline.any.html + patterns + + + include + #tag-stuff + + + + + begin + (</?)([a-zA-Z0-9:]+) + captures + + 1 + + name + punctuation.definition.tag.html + + 2 + + name + entity.name.tag.other.html + + + end + (>) + name + meta.tag.other.html + patterns + + + include + #tag-stuff + + + + + include + #entities + + + match + <> + name + invalid.illegal.incomplete.html + + + match + < + name + invalid.illegal.bad-angle-bracket.html + + + repository + + embedded-code + + patterns + + + include + #ruby + + + include + #php + + + include + #smarty + + + include + #python + + + + entities + + patterns + + + captures + + 1 + + name + punctuation.definition.entity.html + + 3 + + name + punctuation.definition.entity.html + + + match + (&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;) + name + constant.character.entity.html + + + match + & + name + invalid.illegal.bad-ampersand.html + + + + php + + begin + (?=(^\s*)?<\?) + end + (?!(^\s*)?<\?) + patterns + + + include + source.php + + + + python + + begin + (?:^\s*)<\?python(?!.*\?>) + end + \?>(?:\s*$\n)? + name + source.python.embedded.html + patterns + + + include + source.python + + + + ruby + + patterns + + + begin + <%+# + captures + + 0 + + name + punctuation.definition.comment.erb + + + end + %> + name + comment.block.erb + + + begin + <%+(?!>)=? + captures + + 0 + + name + punctuation.section.embedded.ruby + + + end + -?%> + name + source.ruby.embedded.html + patterns + + + captures + + 1 + + name + punctuation.definition.comment.ruby + + + match + (#).*?(?=-?%>) + name + comment.line.number-sign.ruby + + + include + source.ruby + + + + + begin + <\?r(?!>)=? + captures + + 0 + + name + punctuation.section.embedded.ruby.nitro + + + end + -?\?> + name + source.ruby.nitro.embedded.html + patterns + + + captures + + 1 + + name + punctuation.definition.comment.ruby.nitro + + + match + (#).*?(?=-?\?>) + name + comment.line.number-sign.ruby.nitro + + + include + source.ruby + + + + + + smarty + + patterns + + + begin + (\{(literal)\}) + captures + + 1 + + name + source.smarty.embedded.html + + 2 + + name + support.function.built-in.smarty + + + end + (\{/(literal)\}) + + + begin + {{|{ + disabled + 1 + end + }}|} + name + source.smarty.embedded.html + patterns + + + include + source.smarty + + + + + + string-double-quoted + + begin + " + beginCaptures + + 0 + + name + punctuation.definition.string.begin.html + + + end + " + endCaptures + + 0 + + name + punctuation.definition.string.end.html + + + name + string.quoted.double.html + patterns + + + include + #embedded-code + + + include + #entities + + + + string-single-quoted + + begin + ' + beginCaptures + + 0 + + name + punctuation.definition.string.begin.html + + + end + ' + endCaptures + + 0 + + name + punctuation.definition.string.end.html + + + name + string.quoted.single.html + patterns + + + include + #embedded-code + + + include + #entities + + + + tag-generic-attribute + + match + \b([a-zA-Z\-:]+) + name + entity.other.attribute-name.html + + tag-id-attribute + + begin + \b(id)\b\s*(=) + captures + + 1 + + name + entity.other.attribute-name.id.html + + 2 + + name + punctuation.separator.key-value.html + + + end + (?<='|") + name + meta.attribute-with-value.id.html + patterns + + + begin + " + beginCaptures + + 0 + + name + punctuation.definition.string.begin.html + + + contentName + meta.toc-list.id.html + end + " + endCaptures + + 0 + + name + punctuation.definition.string.end.html + + + name + string.quoted.double.html + patterns + + + include + #embedded-code + + + include + #entities + + + + + begin + ' + beginCaptures + + 0 + + name + punctuation.definition.string.begin.html + + + contentName + meta.toc-list.id.html + end + ' + endCaptures + + 0 + + name + punctuation.definition.string.end.html + + + name + string.quoted.single.html + patterns + + + include + #embedded-code + + + include + #entities + + + + + + tag-stuff + + patterns + + + include + #tag-id-attribute + + + include + #tag-generic-attribute + + + include + #string-double-quoted + + + include + #string-single-quoted + + + include + #embedded-code + + + + + scopeName + text.html.basic + uuid + 6F87DAE1-56E0-4193-A940-8D68BC76874C + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Wrap Selection in Open -Close Tag.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Wrap Selection in Open -Close Tag.sublime-snippet new file mode 100644 index 0000000..09840ed --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/Wrap Selection in Open -Close Tag.sublime-snippet @@ -0,0 +1,6 @@ + + $SELECTION]]> + ^W + source.php,text.html + Wrap Selection in Open/Close Tag + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/info.plist b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/info.plist new file mode 100644 index 0000000..bd15797 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/info.plist @@ -0,0 +1,531 @@ + + + + + mainMenu + + excludedItems + + 3C44EABE-8D6F-4B1B-AB91-F419FAD1A0AD + 0658019F-3635-462E-AAC2-74E4FE508A9B + 2ED44A32-C353-447F-BAE4-E3522DB6944D + CBD82CF3-74E9-4E7A-B3F6-9348754EB5AA + 3463E85F-F500-49A0-8631-D78ED85F9D60 + 7B7E945E-A112-11D9-A5A2-000D93C8BE28 + + items + + 1274DFD1-175E-43A0-B226-58EF777D0285 + 637CEA2B-578C-429C-BB74-30E8D42BFA22 + 16E02FC6-2D39-406B-8927-E2770AFC72BA + ------------------------------------ + A7283C84-9E44-4D4A-983A-0F185F68BB71 + B002A609-8235-4368-BBA8-B35FBF4F676E + 7E81E32E-BAB1-4BD3-BFDC-17E319F6244D + ------------------------------------ + 98F922A8-AE66-4787-9CE2-50F3E5924E36 + 2E2E84F9-D2E2-44E2-9B31-6FEC64E0D277 + ------------------------------------ + F1601C6B-65F1-4614-BFFB-BDA644E6920D + EF47CF92-CB4E-417D-BA8A-F24D46A7A5EC + ------------------------------------ + B8651C6E-A05E-11D9-86AC-000D93C8BE28 + 970EE6B4-A091-11D9-A5A2-000D93C8BE28 + ------------------------------------ + 20D760B5-A127-11D9-A5A2-000D93C8BE28 + BC8B8AE2-5F16-11D9-B9C3-000D93589AF6 + 991E7EBD-F3F5-469A-BA01-DC30E04AD472 + + submenus + + 2E2E84F9-D2E2-44E2-9B31-6FEC64E0D277 + + items + + 3DD8406C-A116-11D9-A5A2-000D93C8BE28 + 43C9E8AE-3E53-4B82-A1AF-56697BB3EF09 + 6B024865-6095-4CE3-8EDD-DC6F2230C2FF + C183920D-A126-11D9-A5A2-000D93C8BE28 + 2C4C9673-B166-432A-8938-75A5CA622481 + 9B13543F-8356-443C-B6E7-D9259B604927 + + name + URL escapes + + 511CD76D-8D49-448E-8114-71836FAE1D09 + + items + + 65EB1ADC-76BC-4CBB-AEFA-FCE33E490A93 + 5B30570C-13C1-4CEF-84AE-C6C153434B25 + 6AF6D81C-1242-4B8E-89AC-5C628F87F15C + C0446BA4-B6E9-4181-8C71-65F13F8DFE1F + FB0C19EC-B5EC-4558-8B34-45865217E821 + 72AFB7AB-63FB-4EF0-8ECD-8706416AB79F + B0DA1BE6-1A64-48F7-869F-A78E7F3EB770 + A3F0F503-4775-42DD-8E0A-71D2EBBFFE4E + 63A80A54-B877-453B-8E24-200F493DEE47 + F216C3A5-7288-4816-997D-0F79894DDC18 + + name + Sections + + 515E8765-CC12-47C9-8DF1-C57975CA0CCB + + items + + D8D4017E-BB4E-4002-BBBD-E69161E551C9 + FF93F160-ECB8-4279-A976-4A7D4F91C607 + 908BA846-F4B0-4855-975F-AA0B4AF3D1A9 + 2593C830-3C1E-4BB5-86B1-2DFA51888C75 + 8C79DB07-1D44-4AFD-A9A6-E64AED876C54 + 187ED135-0799-4E06-80AD-A3E5C7FA2E49 + 9A3939A7-BC78-40EC-9C58-E12BFE53BF38 + BF5EB4C0-0F10-44EE-9587-411750DA7845 + 828CFBFA-C61E-4957-9554-0BC59534BFDD + 1882B588-F340-4CEE-8E96-3F0776596457 + 343372EA-958B-44B9-AE79-ED367E475B18 + 55498DAC-4699-4296-809B-90C021DD3F5C + BCC2AC1B-8AA0-42B6-9FDD-D5251F7F7E30 + 571EAAE4-24D0-4D50-88F1-D015E56DFA60 + C02BD316-2F58-4F37-9C24-8BDB0A63BBC8 + + name + Embedded content + + 5878F656-3EBC-4FEF-A2B7-356F6236F268 + + items + + 176E2E83-9B9D-4F85-BA4C-52AB8073622E + 72C5D28E-6A44-4293-8F6A-5105A190E218 + 3E008E42-A5C9-11D9-9BCD-000D93C8BE28 + 0A2DD7D0-F48D-47E6-A8B3-1C676B176611 + AB3FE377-10F9-4837-AAA8-8BA4E4178AB9 + B859CBE9-1B75-4938-B62D-7FBF02AEA3D5 + BC696789-359A-4663-AC9D-FD96ACEDC5FD + E523A7AE-A923-4E4B-A286-84D5EC588E1A + 9057B333-A8EB-494A-80DD-E188849F12A0 + 2E052273-464E-4EA1-9C38-1041527F8634 + EBE37587-6235-4BE1-A389-FECE0325198E + BD8EB824-A106-4FE4-BF41-339BDE48AAEF + + name + Grouping content + + 7E81E32E-BAB1-4BD3-BFDC-17E319F6244D + + items + + 067A025E-9E05-493D-A57F-2B563927213D + 13A82635-CD7A-4EDC-B1BB-306F905DF2BE + + name + Comments + + 8A265312-483B-4666-B129-79D6AECAED87 + + items + + 232C2E8B-A08E-11D9-A5A2-000D93C8BE28 + 9BD2BE01-A854-4D55-B584-725D04C075C0 + 576036C0-A60E-11D9-ABD6-000D93C8BE28 + 9BF7061E-F2AC-492A-A532-B5B2CC0D2922 + D8DCCC81-749A-4E2A-B4BC-D109D5799CAA + E14F25E5-CD93-4E44-8729-9A836EE7E91D + F225A3D3-7958-4B05-81F1-9107933D1870 + 4C145C29-48B4-4A63-9451-3D499AF962D3 + B62CE929-D9CB-4D94-A8F1-D3D5B6BC142D + 0F493D1E-7F8E-43A1-93D3-CDBD16FB70D6 + 59A9E8E1-A161-4B57-92AF-2A869C31FCCB + 5883EC93-ED49-4DCA-8C1B-E9400298203A + 0483EF5E-42F2-4BF5-8233-FA1A77EB8B25 + 976E3238-D6FF-410F-AAD7-00A70D4449B3 + D45E99AC-E273-4C60-87E0-D76061B624E9 + AD249766-BC28-408C-ABE4-9E5964148F48 + 06146486-AA88-47E8-9C53-78E0C38605F9 + 21CA431A-CEE5-41BD-921D-F3369D24B855 + 1A834330-07D9-44C7-8B67-4A57CE1AD4E9 + 897B22FB-E495-4C67-A21B-4B1CE25D6859 + AA97B975-76D8-440F-A64A-E445565AB4C0 + 84A78FA1-46DA-4DDE-A803-BAACE4E84845 + 8B144B82-FDDE-4E96-9E85-BA34107207C7 + F6B0C187-0D11-4678-A0EB-D4E98A5D2C13 + F296AF7A-DB65-48F3-8F08-180E9BF2DD30 + A79FB8FF-A8AE-462B-8768-EC9B6984A43D + 3D193589-7F16-4369-836F-73675EB112CE + 44180979-A08E-11D9-A5A2-000D93C8BE28 + FE789948-0498-4209-BA0C-FC7CB600F35A + 26023CFF-C73F-4EF5-9803-E4DBA2CBEADD + F806B6F2-4896-4681-8ACD-DD89C78D6F51 + 63C7CC12-ECF8-443F-AC02-846550D4F398 + 5820372E-A093-4F38-B25C-B0CCC50A0FC4 + AAC9D7B8-A12C-11D9-A5A2-000D93C8BE28 + 9E6F15F4-69A8-49B8-A928-4F6102131608 + 6FF2530E-99F5-493F-8D29-25B7AC8E3DE0 + BF1FB951-2E7A-4703-9818-DB70D4F4139C + 988E575B-9158-48E4-BF80-83A3328F648C + + name + Forms + + 909160DB-D37B-47E3-A90B-1F6E69E0A45C + + items + + 942BCB25-1F1E-4F51-9D16-BE62A481B39F + D14DE56E-D23C-410B-A580-8BD33AFB4D6C + + name + Edits + + 95F1910C-ABF2-4CD9-85C2-E5048AD11C3E + + items + + 9E586FE2-E066-440D-880C-5493FD54FA33 + 81DA4C74-A530-11D9-9BCD-000D93C8BE28 + EBB98620-3292-4621-BA38-D8A9A65D9551 + 4117D930-B6FA-4022-97E7-ECCAF4E70F63 + 76CAFE9F-4C6D-454B-BF2C-34555DF7B534 + 2512A1D9-7CFF-4233-89BA-92056FA647D8 + 28149211-5F22-4E40-97C5-D0E3A6959992 + 9CCF1FDD-A66B-41E4-90D6-3BF48D00A105 + 5E9C1787-987F-4ACB-8307-2B30333D6D56 + C2FC35FB-041E-45AC-BAF5-1813DD69EA2F + E438992B-3762-4F98-8ABF-1D8E7DE016D7 + C7399601-B555-4051-9828-8DA76BC36697 + 553B07F3-D33C-40B1-B78C-17DED3BD3FC7 + AAAE2350-580D-47CB-B9DE-7BC1325A6F7A + F81E1BBE-8FC9-438C-B9E5-501E37B7BCD1 + 1C55A2AC-97B1-4B32-BFDF-0CB7DB438CF6 + B476570F-987F-4DA9-B548-426D1CA7A5CE + 7CE2862C-ED73-45AF-A7E4-2846A6890D0A + EA4FD535-4DCF-4D5D-AB5B-DD6C2860A61A + CA26794E-8751-4813-BEE3-8EA4A5E30806 + BF09850D-AA80-493B-93C2-8B909783889F + 3CF8BA96-B4D5-43EF-B02A-E5B5CE533720 + D5A80705-04F2-4C05-8022-B020FA53E9B9 + EBBBB55D-4424-43C0-96C0-EC86A282EFED + + name + Text-level semantics + + 980CF231-E644-4852-82F1-93B2AD0CBC24 + + items + + 7D36AE50-5C5F-445C-9FD2-B6AFBFAD29A9 + DA80E7E5-2832-434F-9BCF-A86C3FC99E88 + 389C2FDE-B363-44DE-9B3E-3339EF88CB4E + 84DC4FE8-DB87-46B1-9783-D83909545074 + + name + Interactive elements + + 98F922A8-AE66-4787-9CE2-50F3E5924E36 + + items + + 89E5CC0A-3EFF-4DEF-A299-2E9651DE6529 + 73B40BAE-A295-11D9-87F7-000D93C8BE28 + + name + Entities + + B002A609-8235-4368-BBA8-B35FBF4F676E + + items + + 172060BD-346E-4B95-95E7-57D3F9995DCB + B7C071AB-FC12-4E93-8937-A212D5640C3A + 6592050A-A087-11D9-A5A2-000D93C8BE28 + 511CD76D-8D49-448E-8114-71836FAE1D09 + 5878F656-3EBC-4FEF-A2B7-356F6236F268 + 95F1910C-ABF2-4CD9-85C2-E5048AD11C3E + 909160DB-D37B-47E3-A90B-1F6E69E0A45C + 515E8765-CC12-47C9-8DF1-C57975CA0CCB + EFFECF63-B3A8-401D-90C2-06679D6D6235 + 8A265312-483B-4666-B129-79D6AECAED87 + 980CF231-E644-4852-82F1-93B2AD0CBC24 + + name + Elements + + B7C071AB-FC12-4E93-8937-A212D5640C3A + + items + + EE9882E9-DEB6-46BB-9CF2-038A4AC6DD73 + 091B74AF-45E9-4F78-9013-79943E2319D2 + 4462A6B8-A08A-11D9-A5A2-000D93C8BE28 + EE92C22E-948C-41B4-9F44-BC5B0F953316 + D92E1546-77AB-43E9-8C63-D7749E045BEB + 58735A26-840E-4F3B-AC60-19ADA7732060 + 526CA680-5A5C-401A-AEA3-EDB17AD3DD2A + C6469B90-D3FB-42FE-B33F-416BA7D1E193 + 8EFB1A8D-B4D6-4BAD-B718-43FB277F3AE6 + 883D7DD9-4E34-457F-B019-04B382233FFB + 5EF160F9-5735-4611-9053-99F93F2E8D91 + 77BFD0C0-A08A-11D9-A5A2-000D93C8BE28 + DA99AC44-A083-11D9-A5A2-000D93C8BE28 + 9D101904-8090-4F6C-B63B-2EF2EB79CB5F + 3C518074-A088-11D9-A5A2-000D93C8BE28 + + name + Document metadata + + EF47CF92-CB4E-417D-BA8A-F24D46A7A5EC + + items + + E4C05331-DBD8-47D5-9CAF-2E4C2509D1FC + 363DDC2B-0E64-424E-9B1F-0D13DB0DBE48 + 303A4EE5-A97F-4478-A347-8DB682354B2C + 315EEBED-BBF9-4CE6-AEB6-65022CC31532 + A150DD2B-3CBB-415E-A76D-80772CF725D3 + 08C01157-7A32-4D3B-A15B-32FE02F288A9 + 34438ACE-808E-4D60-8589-826FB7C6CBE0 + F3BE0F2E-93D8-40FD-BA2B-4636F7726DDC + 157E2240-DC62-40C7-8BEE-2EA193E575F4 + 8415F03D-0CE4-4478-808B-65ED611D5BCD + CEF25D24-ED3B-445E-890E-124984B1C842 + + name + Javascript Libraries + + EFFECF63-B3A8-401D-90C2-06679D6D6235 + + items + + 57176082-A12F-11D9-A5A2-000D93C8BE28 + 16E03CBE-8F97-43A8-971B-49FB6F9C4B4C + 7C1CF811-3622-4311-ACEF-03BBC88505F7 + 75AB9A5D-A2BE-4D4D-8A83-7A9124B4A9C4 + FE67502A-0B4C-4114-9B94-29A6D2C32C09 + EF4250A0-0407-437D-9B84-4151232A1706 + 4CE017E0-0B8B-4451-8F4A-DD2B085CD4D3 + 93D2BF9E-D92B-4123-91B1-E2984E457C78 + C034D9F7-3866-4CCA-B50A-F564F7E80735 + 9A6AB468-1233-48D9-9CD8-DF0B2DA8E049 + + name + Tabular data + + F1601C6B-65F1-4614-BFFB-BDA644E6920D + + items + + 0ED6DA73-F38F-4A65-B18F-3379D2BA9387 + 3A517A94-001E-464D-8184-1FE56D0D0D70 + E3F8984E-7269-4981-9D30-967AB56A6ACE + F3512848-7889-45DA-993B-0547976C8E6D + 32BBB9AB-8732-4F91-A587-354941A27B69 + 48DF7485-52EA-49B3-88AF-3A41F933F325 + CBC24AF4-88E0-498B-BE50-934B9CF29EC7 + F00170EE-4A82-413F-A88B-85293E69A88B + 069239F5-589C-4564-9354-79369058937F + + name + Internet Explorer conditional comments + + + + name + HTML5 + ordering + + 6F87DAE1-56E0-4193-A940-8D68BC76874C + A7283C84-9E44-4D4A-983A-0F185F68BB71 + 172060BD-346E-4B95-95E7-57D3F9995DCB + EE9882E9-DEB6-46BB-9CF2-038A4AC6DD73 + 091B74AF-45E9-4F78-9013-79943E2319D2 + 4462A6B8-A08A-11D9-A5A2-000D93C8BE28 + EE92C22E-948C-41B4-9F44-BC5B0F953316 + D92E1546-77AB-43E9-8C63-D7749E045BEB + 58735A26-840E-4F3B-AC60-19ADA7732060 + 526CA680-5A5C-401A-AEA3-EDB17AD3DD2A + C6469B90-D3FB-42FE-B33F-416BA7D1E193 + 8EFB1A8D-B4D6-4BAD-B718-43FB277F3AE6 + 883D7DD9-4E34-457F-B019-04B382233FFB + 5EF160F9-5735-4611-9053-99F93F2E8D91 + 77BFD0C0-A08A-11D9-A5A2-000D93C8BE28 + C8B717C2-6B33-11D9-BB47-000D93589AF6 + DA99AC44-A083-11D9-A5A2-000D93C8BE28 + 9D101904-8090-4F6C-B63B-2EF2EB79CB5F + 3C518074-A088-11D9-A5A2-000D93C8BE28 + 6592050A-A087-11D9-A5A2-000D93C8BE28 + 52124611-B363-40AD-B9F0-0A811941CD20 + 65EB1ADC-76BC-4CBB-AEFA-FCE33E490A93 + 5B30570C-13C1-4CEF-84AE-C6C153434B25 + 6AF6D81C-1242-4B8E-89AC-5C628F87F15C + C0446BA4-B6E9-4181-8C71-65F13F8DFE1F + FB0C19EC-B5EC-4558-8B34-45865217E821 + 72AFB7AB-63FB-4EF0-8ECD-8706416AB79F + B0DA1BE6-1A64-48F7-869F-A78E7F3EB770 + A3F0F503-4775-42DD-8E0A-71D2EBBFFE4E + 63A80A54-B877-453B-8E24-200F493DEE47 + F216C3A5-7288-4816-997D-0F79894DDC18 + 176E2E83-9B9D-4F85-BA4C-52AB8073622E + 72C5D28E-6A44-4293-8F6A-5105A190E218 + 3E008E42-A5C9-11D9-9BCD-000D93C8BE28 + 0A2DD7D0-F48D-47E6-A8B3-1C676B176611 + AB3FE377-10F9-4837-AAA8-8BA4E4178AB9 + B859CBE9-1B75-4938-B62D-7FBF02AEA3D5 + BC696789-359A-4663-AC9D-FD96ACEDC5FD + E523A7AE-A923-4E4B-A286-84D5EC588E1A + 9057B333-A8EB-494A-80DD-E188849F12A0 + 2E052273-464E-4EA1-9C38-1041527F8634 + EBE37587-6235-4BE1-A389-FECE0325198E + BD8EB824-A106-4FE4-BF41-339BDE48AAEF + 9E586FE2-E066-440D-880C-5493FD54FA33 + 81DA4C74-A530-11D9-9BCD-000D93C8BE28 + B23D6E15-6B33-11D9-86C1-000D93589AF6 + EBB98620-3292-4621-BA38-D8A9A65D9551 + 4117D930-B6FA-4022-97E7-ECCAF4E70F63 + 76CAFE9F-4C6D-454B-BF2C-34555DF7B534 + 2512A1D9-7CFF-4233-89BA-92056FA647D8 + 28149211-5F22-4E40-97C5-D0E3A6959992 + 9CCF1FDD-A66B-41E4-90D6-3BF48D00A105 + 5E9C1787-987F-4ACB-8307-2B30333D6D56 + C2FC35FB-041E-45AC-BAF5-1813DD69EA2F + E438992B-3762-4F98-8ABF-1D8E7DE016D7 + C7399601-B555-4051-9828-8DA76BC36697 + 553B07F3-D33C-40B1-B78C-17DED3BD3FC7 + AAAE2350-580D-47CB-B9DE-7BC1325A6F7A + F81E1BBE-8FC9-438C-B9E5-501E37B7BCD1 + 1C55A2AC-97B1-4B32-BFDF-0CB7DB438CF6 + B476570F-987F-4DA9-B548-426D1CA7A5CE + 7CE2862C-ED73-45AF-A7E4-2846A6890D0A + EA4FD535-4DCF-4D5D-AB5B-DD6C2860A61A + CA26794E-8751-4813-BEE3-8EA4A5E30806 + BF09850D-AA80-493B-93C2-8B909783889F + 3CF8BA96-B4D5-43EF-B02A-E5B5CE533720 + D5A80705-04F2-4C05-8022-B020FA53E9B9 + EBBBB55D-4424-43C0-96C0-EC86A282EFED + 942BCB25-1F1E-4F51-9D16-BE62A481B39F + D14DE56E-D23C-410B-A580-8BD33AFB4D6C + D8D4017E-BB4E-4002-BBBD-E69161E551C9 + FF93F160-ECB8-4279-A976-4A7D4F91C607 + 908BA846-F4B0-4855-975F-AA0B4AF3D1A9 + CD6D2CC6-6B33-11D9-BDFD-000D93589AF6 + 2593C830-3C1E-4BB5-86B1-2DFA51888C75 + 8C79DB07-1D44-4AFD-A9A6-E64AED876C54 + 187ED135-0799-4E06-80AD-A3E5C7FA2E49 + 9A3939A7-BC78-40EC-9C58-E12BFE53BF38 + BF5EB4C0-0F10-44EE-9587-411750DA7845 + 828CFBFA-C61E-4957-9554-0BC59534BFDD + 1882B588-F340-4CEE-8E96-3F0776596457 + 343372EA-958B-44B9-AE79-ED367E475B18 + 55498DAC-4699-4296-809B-90C021DD3F5C + BCC2AC1B-8AA0-42B6-9FDD-D5251F7F7E30 + 571EAAE4-24D0-4D50-88F1-D015E56DFA60 + C02BD316-2F58-4F37-9C24-8BDB0A63BBC8 + 57176082-A12F-11D9-A5A2-000D93C8BE28 + 16E03CBE-8F97-43A8-971B-49FB6F9C4B4C + 7C1CF811-3622-4311-ACEF-03BBC88505F7 + 75AB9A5D-A2BE-4D4D-8A83-7A9124B4A9C4 + FE67502A-0B4C-4114-9B94-29A6D2C32C09 + EF4250A0-0407-437D-9B84-4151232A1706 + 4CE017E0-0B8B-4451-8F4A-DD2B085CD4D3 + 93D2BF9E-D92B-4123-91B1-E2984E457C78 + C034D9F7-3866-4CCA-B50A-F564F7E80735 + 9A6AB468-1233-48D9-9CD8-DF0B2DA8E049 + 232C2E8B-A08E-11D9-A5A2-000D93C8BE28 + 9BD2BE01-A854-4D55-B584-725D04C075C0 + 576036C0-A60E-11D9-ABD6-000D93C8BE28 + 9BF7061E-F2AC-492A-A532-B5B2CC0D2922 + D8DCCC81-749A-4E2A-B4BC-D109D5799CAA + E14F25E5-CD93-4E44-8729-9A836EE7E91D + F225A3D3-7958-4B05-81F1-9107933D1870 + 4C145C29-48B4-4A63-9451-3D499AF962D3 + B62CE929-D9CB-4D94-A8F1-D3D5B6BC142D + 0F493D1E-7F8E-43A1-93D3-CDBD16FB70D6 + 59A9E8E1-A161-4B57-92AF-2A869C31FCCB + 5883EC93-ED49-4DCA-8C1B-E9400298203A + 0483EF5E-42F2-4BF5-8233-FA1A77EB8B25 + 976E3238-D6FF-410F-AAD7-00A70D4449B3 + D45E99AC-E273-4C60-87E0-D76061B624E9 + AD249766-BC28-408C-ABE4-9E5964148F48 + 06146486-AA88-47E8-9C53-78E0C38605F9 + 21CA431A-CEE5-41BD-921D-F3369D24B855 + 1A834330-07D9-44C7-8B67-4A57CE1AD4E9 + 897B22FB-E495-4C67-A21B-4B1CE25D6859 + AA97B975-76D8-440F-A64A-E445565AB4C0 + 84A78FA1-46DA-4DDE-A803-BAACE4E84845 + 8B144B82-FDDE-4E96-9E85-BA34107207C7 + F6B0C187-0D11-4678-A0EB-D4E98A5D2C13 + F296AF7A-DB65-48F3-8F08-180E9BF2DD30 + A79FB8FF-A8AE-462B-8768-EC9B6984A43D + 3D193589-7F16-4369-836F-73675EB112CE + 44180979-A08E-11D9-A5A2-000D93C8BE28 + FE789948-0498-4209-BA0C-FC7CB600F35A + 26023CFF-C73F-4EF5-9803-E4DBA2CBEADD + F806B6F2-4896-4681-8ACD-DD89C78D6F51 + 63C7CC12-ECF8-443F-AC02-846550D4F398 + 5820372E-A093-4F38-B25C-B0CCC50A0FC4 + AAC9D7B8-A12C-11D9-A5A2-000D93C8BE28 + 9E6F15F4-69A8-49B8-A928-4F6102131608 + 6FF2530E-99F5-493F-8D29-25B7AC8E3DE0 + BF1FB951-2E7A-4703-9818-DB70D4F4139C + 988E575B-9158-48E4-BF80-83A3328F648C + 7D36AE50-5C5F-445C-9FD2-B6AFBFAD29A9 + DA80E7E5-2832-434F-9BCF-A86C3FC99E88 + 389C2FDE-B363-44DE-9B3E-3339EF88CB4E + 84DC4FE8-DB87-46B1-9783-D83909545074 + 637CEA2B-578C-429C-BB74-30E8D42BFA22 + 1274DFD1-175E-43A0-B226-58EF777D0285 + 16E02FC6-2D39-406B-8927-E2770AFC72BA + 7B7E945E-A112-11D9-A5A2-000D93C8BE28 + 3463E85F-F500-49A0-8631-D78ED85F9D60 + 4720ADB8-DD17-4F97-A715-AFD72E22CE45 + CBD82CF3-74E9-4E7A-B3F6-9348754EB5AA + 69BD9C8F-15C0-4F67-8B7E-64E48B5E9E71 + 2ED44A32-C353-447F-BAE4-E3522DB6944D + 0658019F-3635-462E-AAC2-74E4FE508A9B + 3C44EABE-8D6F-4B1B-AB91-F419FAD1A0AD + 991E7EBD-F3F5-469A-BA01-DC30E04AD472 + BC8B8AE2-5F16-11D9-B9C3-000D93589AF6 + 3DD8406C-A116-11D9-A5A2-000D93C8BE28 + 43C9E8AE-3E53-4B82-A1AF-56697BB3EF09 + 6B024865-6095-4CE3-8EDD-DC6F2230C2FF + C183920D-A126-11D9-A5A2-000D93C8BE28 + 2C4C9673-B166-432A-8938-75A5CA622481 + 9B13543F-8356-443C-B6E7-D9259B604927 + 89E5CC0A-3EFF-4DEF-A299-2E9651DE6529 + 20D760B5-A127-11D9-A5A2-000D93C8BE28 + 970EE6B4-A091-11D9-A5A2-000D93C8BE28 + B8651C6E-A05E-11D9-86AC-000D93C8BE28 + B79BDBCF-D0C9-468E-BE62-744074D7825F + E7C5859E-122D-4382-84BE-5AB584DC2409 + 73251DBE-EBD2-470F-8148-E6F2EC1A9641 + 6D6B631D-0D6C-413C-B4FA-1D535CBCE890 + FC34BE82-69DC-47B0-997A-37A8763D4E69 + 73B40BAE-A295-11D9-87F7-000D93C8BE28 + 0ED6DA73-F38F-4A65-B18F-3379D2BA9387 + 3A517A94-001E-464D-8184-1FE56D0D0D70 + E3F8984E-7269-4981-9D30-967AB56A6ACE + F3512848-7889-45DA-993B-0547976C8E6D + 32BBB9AB-8732-4F91-A587-354941A27B69 + 48DF7485-52EA-49B3-88AF-3A41F933F325 + CBC24AF4-88E0-498B-BE50-934B9CF29EC7 + F00170EE-4A82-413F-A88B-85293E69A88B + 069239F5-589C-4564-9354-79369058937F + E4C05331-DBD8-47D5-9CAF-2E4C2509D1FC + 363DDC2B-0E64-424E-9B1F-0D13DB0DBE48 + 303A4EE5-A97F-4478-A347-8DB682354B2C + 315EEBED-BBF9-4CE6-AEB6-65022CC31532 + A150DD2B-3CBB-415E-A76D-80772CF725D3 + 08C01157-7A32-4D3B-A15B-32FE02F288A9 + 34438ACE-808E-4D60-8589-826FB7C6CBE0 + F3BE0F2E-93D8-40FD-BA2B-4636F7726DDC + 157E2240-DC62-40C7-8BEE-2EA193E575F4 + 8415F03D-0CE4-4478-808B-65ED611D5BCD + CEF25D24-ED3B-445E-890E-124984B1C842 + 067A025E-9E05-493D-A57F-2B563927213D + 13A82635-CD7A-4EDC-B1BB-306F905DF2BE + + uuid + 79DE1A1A-DCD0-4E2F-B20B-8FEFE97A7270 + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/package-metadata.json b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/package-metadata.json new file mode 100644 index 0000000..c39e45b --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/HTML5/package-metadata.json @@ -0,0 +1 @@ +{"url": "https://github.com/mrmartineau/HTML5", "version": "2013.03.15.05.45.36", "description": "HTML5 bundle for Sublime Text 2"} \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Hayaku - tools for writing CSS faster/.gitignore b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Hayaku - tools for writing CSS faster/.gitignore new file mode 100644 index 0000000..52e4e61 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Hayaku - tools for writing CSS faster/.gitignore @@ -0,0 +1,2 @@ +*.pyc +*.pyo diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Hayaku - tools for writing CSS faster/CHANGELOG.md b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Hayaku - tools for writing CSS faster/CHANGELOG.md new file mode 100644 index 0000000..6f49360 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Hayaku - tools for writing CSS faster/CHANGELOG.md @@ -0,0 +1,133 @@ +# Changelog for Hayaku + +## 1.3.3 2013.03.02 + +- **New setting:** `hayaku_CSS_syntax_quote_symbol` for used quote symbol ([#71][]) + +- **New setting:** `hayaku_CSS_syntax_url_quotes` for wrapping clipboarded links in urls with quotes ([#208][]) + +- Added support for `user-select` property ([#207][]) + +- Fixing values in abbreviations for `opacity` property ([#209][]) + +- Don't add units if the value could be unitless (like `line-height`), also `hayaku_CSS_units_for_unitless_numbers` setting for this ([#153][]) + +[#71]: https://github.com/hayaku/hayaku/issues/71 +[#207]: https://github.com/hayaku/hayaku/issues/207 +[#208]: https://github.com/hayaku/hayaku/issues/208 +[#209]: https://github.com/hayaku/hayaku/issues/209 +[#153]: https://github.com/hayaku/hayaku/issues/153 + +## 1.3.2 2013.02.27 + +- Fix the importing method for ST3 again, now should work from the `.sublime-package`. + +## 1.3.1 2013.02.08 + +- Fix the importing method, now the plugin would work from PC in ST3 ([#205][]) + +[#205]: https://github.com/hayaku/hayaku/issues/205 + +## 1.3.0 2013.02.07 + +- **Support for [Sublime Text 3](http://www.sublimetext.com/3) ([#201][])** + +- Fixed inline comment setting for OS X and Linux ([#200][], thanks to @freshmango) + +- Disable inline commenting in functions and quotes ([#203][]) + +[#200]: https://github.com/hayaku/hayaku/issues/200 +[#201]: https://github.com/hayaku/hayaku/issues/201 +[#203]: https://github.com/hayaku/hayaku/issues/203 + +## 1.2.1 2012.12.23 + +- Hotfixing automatic new line after expand's bug ([#190][]) + +[#190]: https://github.com/hayaku/hayaku/issues/190 + +## 1.2.0 2012.12.23 + +- **New feature:** [basic clipboard defaults](https://github.com/hayaku/hayaku/#clipboard-defaults) (for colors and urls) ([#180][]) +- **New setting:** optional [automatic new line after expand](https://github.com/hayaku/hayaku/#automatic-new-line-after-expand) (not by default) ([#123][]) +- Better handling of multiple carets in snippets ([#188][]) +- Fixed an issue with color postexpands and their default values ([#189][]) +- Restructured the repo, so it would be better updatable and maintainable. + +[#123]: https://github.com/hayaku/hayaku/issues/123 +[#180]: https://github.com/hayaku/hayaku/issues/180 +[#188]: https://github.com/hayaku/hayaku/issues/188 +[#189]: https://github.com/hayaku/hayaku/issues/189 + +## 1.1.1 2012.12.16 + +- Fixed bug with more than 99 completion parts in a snippet (`display: inline` affected) ([#182][]) +- Fixed bug with wrong position of color postexpand in prefixed clusters ([#183][]) +- Better handling for values that can be parts of other values in postexpands ([#184][]) +- Overall refactoring of the postexpands, not completed, but already fixed some minor issues and the code is almost ready for moving the postexpands to the dictionaries. + +[#182]: https://github.com/hayaku/hayaku/issues/182 +[#183]: https://github.com/hayaku/hayaku/issues/183 +[#184]: https://github.com/hayaku/hayaku/issues/184 + +## 1.1.0 2012.12.10 + +- **Changed default setting**: now when you use the block expand it expands to the more common code style. +- **New feature:** added [importance to the postexpand](https://github.com/hayaku/hayaku/#postexpand-for-importance) ([#156][]) +- **New setting:** disabling the [inline comment](https://github.com/hayaku/hayaku/#inline-comments) shortcut for CSS ([#169][]) +- **New setting:** [handling the case of expanded colors](https://github.com/hayaku/hayaku/#colors-case) ([#177][]) +- **New setting:** [handling the length of expanded colors](https://github.com/hayaku/hayaku/#shorthand-colors) ([#50][]) +- Moved the default syntax settings to code, so no restart needed for them to apply ([#160][]) +- Don't indent prefixed properties when using Stylus or Sass ([#176][]) + +[#169]: https://github.com/hayaku/hayaku/issues/169 +[#156]: https://github.com/hayaku/hayaku/issues/156 +[#160]: https://github.com/hayaku/hayaku/issues/160 +[#176]: https://github.com/hayaku/hayaku/issues/176 +[#177]: https://github.com/hayaku/hayaku/issues/177 +[#50]: https://github.com/hayaku/hayaku/issues/50 + +## 1.0.4 2012.11.29 + +- Fixed jumping to newline with proper indentation by tab/enter in non-CSS syntaxes ([#166][]) +- Fixed the occasional removing of the content right to the point where the tab/enter happened ([#168][]) +- Allowing expand to work on a line with other properties (“single line” code style) ([#170][]) +- Some minor refactoring. + +[#166]: https://github.com/hayaku/hayaku/issues/166 +[#168]: https://github.com/hayaku/hayaku/issues/168 +[#170]: https://github.com/hayaku/hayaku/issues/170 + +## 1.0.3 2012.11.27 + +- **New feature:** Added a way to write [color abbreviations for rgba](https://github.com/hayaku/hayaku/#rgba-values), like `cF.5` to `color: rgba(255,255,255,.5)` etc. ([#66][]) +- Removed colons from default Stylus syntax ([#161][]) +- Fixed possible leaks of default values ([#164][]) + +[#66]: https://github.com/hayaku/hayaku/issues/66 +[#161]: https://github.com/hayaku/hayaku/issues/161 +[#164]: https://github.com/hayaku/hayaku/issues/164 + +## 1.0.2 2012.11.26 + +- Tab didn't work at the empty line after the last statement in Stylus/Sass ([#146][]) +- Enhanced the behaviour of the `enter`/`tab` at the end of the prefixed cluster ([#52][]) +- Fixed strange bugs in expands, when the `` token could show up ([#155][]) +- Upgraded expand code block action (you can press `enter` inside the brackets — in this position: `{|}` — to create a block), so it is not hardcoded now ([#159][]) +- Added an option to disable postexpand ([#152][]) + +[#146]: https://github.com/hayaku/hayaku/issues/146 +[#52]: https://github.com/hayaku/hayaku/issues/52 +[#155]: https://github.com/hayaku/hayaku/issues/155 +[#159]: https://github.com/hayaku/hayaku/issues/159 +[#152]: https://github.com/hayaku/hayaku/issues/152 + +## 1.0.1 2012.11.23 + +- Updated installation instructions ([#147][]) + +[#147]: https://github.com/hayaku/hayaku/issues/147 + +## 1.0.0 2012.11.22 + +- Initial public alpha \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Hayaku - tools for writing CSS faster/Default (Linux).sublime-keymap b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Hayaku - tools for writing CSS faster/Default (Linux).sublime-keymap new file mode 100644 index 0000000..1c0aad1 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Hayaku - tools for writing CSS faster/Default (Linux).sublime-keymap @@ -0,0 +1,92 @@ +[ + // Main Hayaku context + { + "keys": ["tab"], + "command": "hayaku", + "context": [{"key": "hayaku_css_context"}] + } + + // tab or enter at the end of a line should jump to a correct line + , { + "keys": ["tab"], + "command": "hayaku_add_line", + "context": [ + {"key": "hayaku_add_line"}, + {"key": "hayaku_at_css"}, + {"key": "hayaku_single_caret"} + ] + } + , { + "keys": ["enter"], + "command": "hayaku_add_line", + "context": [ + {"key": "hayaku_add_line"}, + {"key": "hayaku_at_css"}, + {"key": "hayaku_single_caret"} + ] + } + + // Temporary fix for the semicolon inserting (bad bad whitespace after) + , { "keys": [":"], "command": "insert_snippet", "args": {"contents": ":$0"}, "context": + [ + { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true }, + { "key": "hayaku_at_css" }, + { "key": "hayaku_single_caret" }, + { "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\}|$)", "match_all": true } + ] + } + + // Temporary inline comment for CSS (would be replaced by a more useful command) + , { + "keys": ["/","/"], + "command": "insert_snippet", + "args": {"contents": "/* ${1} */$0"}, + "context": [ + { "key": "selector", "operator": "equal", "operand": "source.css -comment.block.css -punctuation.section.function.css -string.quoted", "match_all": true }, + { "key": "setting.hayaku_CSS_disable_inline_comment", "operator": "not_equal", "operand": true } + ] + } + + // Command for inserting CSS code block + , { + "keys": ["ctrl+enter"], + "command": "hayaku_add_code_block", + "context": [ + {"key": "hayaku_add_code_block"}, + {"key": "hayaku_at_css"}, + {"key": "hayaku_single_caret"} + ] + } + + // Command for inserting right indent for code block by enter in braces + , { + "keys": ["enter"], + "command": "hayaku_expand_code_block", + "context": [ + {"key": "hayaku_at_css"}, + {"key": "hayaku_single_caret"}, + {"key": "preceding_text", "operator": "regex_match", "operand": ".*\\{$" }, + {"key": "following_text", "operator": "regex_match", "operand": "^\\}" } + ] + }, + + // Commands to jump out of multiple selections in CSS + { + "keys": ["up"], + "command": "clear_fields", + "context": [ + {"key": "has_next_field", "operator": "equal", "operand": true}, + {"key": "hayaku_at_css"}, + {"key": "hayaku_going_up"} + ] + }, + { + "keys": ["down"], + "command": "clear_fields", + "context": [ + {"key": "has_next_field", "operator": "equal", "operand": true}, + {"key": "hayaku_at_css"}, + {"key": "hayaku_going_down"} + ] + } +] diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Hayaku - tools for writing CSS faster/Default (OSX).sublime-keymap b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Hayaku - tools for writing CSS faster/Default (OSX).sublime-keymap new file mode 100644 index 0000000..2d4ba50 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Hayaku - tools for writing CSS faster/Default (OSX).sublime-keymap @@ -0,0 +1,92 @@ +[ + // Main Hayaku context + { + "keys": ["tab"], + "command": "hayaku", + "context": [{"key": "hayaku_css_context"}] + } + + // tab or enter at the end of a line should jump to a correct line + , { + "keys": ["tab"], + "command": "hayaku_add_line", + "context": [ + {"key": "hayaku_add_line"}, + {"key": "hayaku_at_css"}, + {"key": "hayaku_single_caret"} + ] + } + , { + "keys": ["enter"], + "command": "hayaku_add_line", + "context": [ + {"key": "hayaku_add_line"}, + {"key": "hayaku_at_css"}, + {"key": "hayaku_single_caret"} + ] + } + + // Temporary fix for the semicolon inserting (bad bad whitespace after) + , { "keys": [":"], "command": "insert_snippet", "args": {"contents": ":$0"}, "context": + [ + { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true }, + { "key": "hayaku_at_css" }, + { "key": "hayaku_single_caret" }, + { "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\}|$)", "match_all": true } + ] + } + + // Temporary inline comment for CSS (would be replaced by a more useful command) + , { + "keys": ["/","/"], + "command": "insert_snippet", + "args": {"contents": "/* ${1} */$0"}, + "context": [ + { "key": "selector", "operator": "equal", "operand": "source.css -comment.block.css -punctuation.section.function.css -string.quoted", "match_all": true }, + { "key": "setting.hayaku_CSS_disable_inline_comment", "operator": "not_equal", "operand": true } + ] + } + + // Command for inserting CSS code block + , { + "keys": ["super+enter"], + "command": "hayaku_add_code_block", + "context": [ + {"key": "hayaku_add_code_block"}, + {"key": "hayaku_at_css"}, + {"key": "hayaku_single_caret"} + ] + } + + // Command for inserting right indent for code block by enter in braces + , { + "keys": ["enter"], + "command": "hayaku_expand_code_block", + "context": [ + {"key": "hayaku_at_css"}, + {"key": "hayaku_single_caret"}, + {"key": "preceding_text", "operator": "regex_match", "operand": ".*\\{$" }, + {"key": "following_text", "operator": "regex_match", "operand": "^\\}" } + ] + }, + + // Commands to jump out of multiple selections in CSS + { + "keys": ["up"], + "command": "clear_fields", + "context": [ + {"key": "has_next_field", "operator": "equal", "operand": true}, + {"key": "hayaku_at_css"}, + {"key": "hayaku_going_up"} + ] + }, + { + "keys": ["down"], + "command": "clear_fields", + "context": [ + {"key": "has_next_field", "operator": "equal", "operand": true}, + {"key": "hayaku_at_css"}, + {"key": "hayaku_going_down"} + ] + } +] diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Hayaku - tools for writing CSS faster/Default (Windows).sublime-keymap b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Hayaku - tools for writing CSS faster/Default (Windows).sublime-keymap new file mode 100644 index 0000000..1c0aad1 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Hayaku - tools for writing CSS faster/Default (Windows).sublime-keymap @@ -0,0 +1,92 @@ +[ + // Main Hayaku context + { + "keys": ["tab"], + "command": "hayaku", + "context": [{"key": "hayaku_css_context"}] + } + + // tab or enter at the end of a line should jump to a correct line + , { + "keys": ["tab"], + "command": "hayaku_add_line", + "context": [ + {"key": "hayaku_add_line"}, + {"key": "hayaku_at_css"}, + {"key": "hayaku_single_caret"} + ] + } + , { + "keys": ["enter"], + "command": "hayaku_add_line", + "context": [ + {"key": "hayaku_add_line"}, + {"key": "hayaku_at_css"}, + {"key": "hayaku_single_caret"} + ] + } + + // Temporary fix for the semicolon inserting (bad bad whitespace after) + , { "keys": [":"], "command": "insert_snippet", "args": {"contents": ":$0"}, "context": + [ + { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true }, + { "key": "hayaku_at_css" }, + { "key": "hayaku_single_caret" }, + { "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\}|$)", "match_all": true } + ] + } + + // Temporary inline comment for CSS (would be replaced by a more useful command) + , { + "keys": ["/","/"], + "command": "insert_snippet", + "args": {"contents": "/* ${1} */$0"}, + "context": [ + { "key": "selector", "operator": "equal", "operand": "source.css -comment.block.css -punctuation.section.function.css -string.quoted", "match_all": true }, + { "key": "setting.hayaku_CSS_disable_inline_comment", "operator": "not_equal", "operand": true } + ] + } + + // Command for inserting CSS code block + , { + "keys": ["ctrl+enter"], + "command": "hayaku_add_code_block", + "context": [ + {"key": "hayaku_add_code_block"}, + {"key": "hayaku_at_css"}, + {"key": "hayaku_single_caret"} + ] + } + + // Command for inserting right indent for code block by enter in braces + , { + "keys": ["enter"], + "command": "hayaku_expand_code_block", + "context": [ + {"key": "hayaku_at_css"}, + {"key": "hayaku_single_caret"}, + {"key": "preceding_text", "operator": "regex_match", "operand": ".*\\{$" }, + {"key": "following_text", "operator": "regex_match", "operand": "^\\}" } + ] + }, + + // Commands to jump out of multiple selections in CSS + { + "keys": ["up"], + "command": "clear_fields", + "context": [ + {"key": "has_next_field", "operator": "equal", "operand": true}, + {"key": "hayaku_at_css"}, + {"key": "hayaku_going_up"} + ] + }, + { + "keys": ["down"], + "command": "clear_fields", + "context": [ + {"key": "has_next_field", "operator": "equal", "operand": true}, + {"key": "hayaku_at_css"}, + {"key": "hayaku_going_down"} + ] + } +] diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Hayaku - tools for writing CSS faster/LICENSE b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Hayaku - tools for writing CSS faster/LICENSE new file mode 100644 index 0000000..b189e6c --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Hayaku - tools for writing CSS faster/LICENSE @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2012 Roman Komarov , Sergey Mezentsev + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Hayaku - tools for writing CSS faster/Preferences.sublime-settings b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Hayaku - tools for writing CSS faster/Preferences.sublime-settings new file mode 100644 index 0000000..bd65b06 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Hayaku - tools for writing CSS faster/Preferences.sublime-settings @@ -0,0 +1,54 @@ +{ + "disable_tab_abbreviations_for_scopes": "css,less,sass,scss,stylus", + "auto_complete_selector": "source -comment -source.css -source.sass -source.scss -source.stylus", + + +// Unused settings, work in progress + +// Code Style + + // "hayaku_CSS_colors_use_names": false, // Would expand `#000` to `black` when `true` + // "hayaku_CSS_numbers_leading_zero": true, // Would expand `.3` to `0.3` when `true` + + // "hayaku_CSS_default_unit": "px", // `w10` -> `width: 10px` + // "hayaku_CSS_default_unit_decimal": "em" // `w.5` -> `width: 10em` + + + // DO NOT EDIT + "hayaku_css_dict_snippets": { + "": { + ".": "em" + }, + "": { + "percentage": "%" + }, + "": { + "linear-gradient()" : "linear-gradient(${1:top}, ${2:#000} ${3:0}, ${4:#FFF} ${5:100%})", + "repeating-linear-gradient()" : "repeating-linear-gradient(${1:center}, ${2:#000} ${3:0}, ${4:#FFF} ${5:25%})", + "radial-gradient()" : "radial-gradient(${1:center}, ${2:#000} ${3:0}, ${4:#FFF} ${5:100%})", + "repeating-radial-gradient()" : "repeating-radial-gradient(${1:center}, ${2:#000} ${3:0}, ${4:#FFF} ${5:25%})" + }, + // "box-shadow": { + // "inset" : "inset ${1:0} ${2:0} ${3:0} ${4:rgba(0,0,0,.5)}", + // "[${1:0} ${2:0} ${3:0} ${4:rgba(0,0,0,.5)}]" + // }, + // "text-shadow": { + // "[${1:0} ${2:0} ${3:0} ${4:rgba(255,255,255,.5)}]" + // }, + // "content": { + // "[\"$1\"]" + // }, + "quotes": { + "english": "\"\\201C\" \"\\201D\" \"\\2018\" \"\\2019\"", + "russian": "\"\\00AB\" \"\\00BB\" \"\\201E\" \"\\201C\"" + }, + "font": { + "arial" : "1em/1.4 \"Helvetica Neue\", Arial, sans-serif", + "verdana" : "86%/1.4 Verdana, sans-serif" + } + // "transition" : { + // "[${1:all} ${2:linear} ${3:.3s}]" + // } +} + +} diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Hayaku - tools for writing CSS faster/README.md b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Hayaku - tools for writing CSS faster/README.md new file mode 100644 index 0000000..b161b56 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Hayaku - tools for writing CSS faster/README.md @@ -0,0 +1,404 @@ +# Hayaku [1.3.3](https://github.com/hayaku/hayaku/blob/master/CHANGELOG.md) + +Hayaku is a bundle of useful scripts aiming for rapid front-end web development. + +The main aim of Hayaku is to create the fastest way to write and maintain CSS code in an editor. + +# Table of Contents + +1. [Install Hayaku for Sublime Text](#install-hayaku-for-sublime-text) + +2. [Features](#features) + - [Smart CSS Abbreviations](#smart-css-abbreviations) + - [Fuzzy CSS property abbreviations](#fuzzy-css-property-abbreviations) + - [Smart CSS values abbreviations](#smart-css-values-abbreviations) + - [Numeric values in abbreviations](#numeric-values-in-abbreviations) + - [Color values in abbreviations](#color-values-in-abbreviations) with [RGBA values](#rgba-values) + - [Importance modifier](#importance-modifier) + - [Default values](#Default-values) + - [Clipboard defaults](#clipoard-defaults) + - [Postexpands](#postexpands) + - [Simple property postexpands](#simple-property-postexpands) + - [Postexpands for units](#postexpands-for-units) + - [Postexpands for colors](#postexpands-for-colors) + - [Postexpand for importance](#postexpand-for-importance) + - [Creating new CSS rule blocks](#creating-new-css-rule-blocks) + - [Inline comments](#inline-comments) +

+ +3. [Settings and Preferences](#settings-and-preferences) + - [Autoguessing the code style](#autoguessing-the-code-style) + - [Single code style](#single-code-style) + - [Automatic new line after expand](#automatic-new-line-after-expand) + - [Quotes and URLs](#quotes-and-urls) + - [Units for unitless values](#units-for-unitless-values) + - [Prefixes options](#prefixes-options) + - [The aligning for the prefixes](#the-aligning-for-the-prefixes) + - [Using only specific prefixes](#using-only-specific-prefixes) + - [Options for colors](#options-for-colors) + - [Colors' case](#colors-case) + - [Shorthand colors](#shorthand-colors) +

+ +4. [Using Hayaku with CSS Preprocessors](#using-hayaku-with-css-preprocessors) + +5. [License and copyrights](#license-and-copyrights) + + +# Install Hayaku for [Sublime Text](http://www.sublimetext.com/2) + +Right now Hayaku is available only for Sublime Text (even for third version!), but when it would be complete, we would port it to some other editors. + +#### Using [Package Control](http://wbond.net/sublime_packages/package_control): + +1. Run `Package Control: Install Package` command +2. Search for `Hayaku - tools for writing CSS faster` (`Hayaku` should be enough) and wait for it to be installed +3. Restart Sublime Text (required to make default settings for different syntaxes to work) + +#### Or manually, using git: + +Clone repository into Packages directory (can be found using `Preferences: Browse Packages` command in Sublime Text) +``` sh +git clone git://github.com/hayaku/hayaku.git +``` + +And then restart Sublime Text. + +# Features + +## Smart CSS Abbreviations + +Hayaku is not your average snippet engine. Most of the CSS snippets to date are static — you need to remember all the abbreviations if you want to use them. + +Hayaku offers a better and faster way: you don't need to remember anything, you can just try to write the shortest abbreviation for a thing you want to write in CSS — and Hayaku would try to guess it when you press `tab`. + +There are a lot of things Hayaku can do in abbeviations, here are some of them: + +### Fuzzy CSS property abbreviations + +This is the first basic thing: Hayaku don't have any premade snippets for CSS, it have a dictionary with a lot of CSS properties, so when you write some abrakadabra, it tries to parse it and guess what you meant. For most properties those abbreviations could be rather short, but you're not sticked to them: you can write as much letters for a property as you wish. + +So, writing `w`, `wi` or `wid` would give you `width`. And don't forget about the fuzzy part: `wdt` and `wdth` would work too. + +Sometimes you would guess that some abbreviations must become other things, but in most cases all the variants have some logic beyound. `b` could be expanded to `background` or `border`, but expanded to `bottom` instead — it's becouse all the “sides” values are abbreviated to just one letter: **l**eft, **r**eft, **t**op, so **b**ottom goes by this path. + +However, if you feel that some abbreviation just need to be not that is expands to, feel free to [fill up an issue](https://github.com/hayaku/hayaku/issues/new). + +### Smart CSS values abbreviations + +Here comes the second basic thing of Hayaku, the awesome one. You can expand abbreviations for the property+value parts, but you don't need to use any delimiters in those abbreviations! That's right — you can just write something like `por` and get `position: relative`! + +This works also fuzzy, so to get `position: relative` you could use any number of letters: `pore`, `posrel`, `pstnrltv` etc. Also, if you want, you can still use a delimiter — just add a colon between the property and value and get the same result. So, if you want to stick to Zen style, use it — `pos:r` would work as intended. And `p:r` would work too — while `pr` would expand to `padding-right`, adding delimiter could help by removing ambiguity — padding can't have any values containing `r`, so hayaku falls to `position`. + +### Numeric values in abbreviations + +Hayaku understands a lot of ways of writing numeric abbreviations. + +- You can just write a number after abbreviation to treat it as a value: `w10` would expand to `width: 10px` (see? automatic pixels!). + +- Negative numbers supported too: `ml-10` would expand to `margin-left: -10px`. + +- If you'd write a dot somewhere in abbreviation, Hayaku would guess what you need `em`s, so `w10.5` would expand to `width: 10.5em`. + +- There are some abbreviations for some units, like `percents` for `%`, or `.` for em, so `100p` would expand to `100%` and `10.` to `10em`. + +- All other units are supported, `h2pt` would expand to `height:2pt` and so on. Fuzzy guess is there too: if you'd want `vh` you could write just `w10h` and get `width: 10vh`. + +### Color values in abbreviations + +Actually, you can not only expand strings and numbers, you can expand even colors using abbreviations! You can use different ways to achieve that (as anything in Hayaku), so just look at those examples: + +- `c0` → `color: #000` +- `cF` → `color: #FFF` (use uppercase to tell Hayaku it's a color) +- `cFA` → `color: #FAFAFA` +- `c#fa` → `color: #FAFAFA` (no need in uppercase if you use `#`) + +And, of course, this works everywhere you would expect colors to work, so `brc0` would expand to `border-right-color: #000;` + +#### RGBA values + +There is also a way to expand `rgba` values for colors — you can either use rgba's alpha after the dot, either use hexadecimal alpha after the full color, if you'd like. This would look like this: + +- `c0.5` → `color: rgba(0,0,0,.5)` +- `cF.2` → `color: rgba(255,255,255,.2)` +- `cABCD` → `color: rgba(170,187,204,0.87)` +- `cABC80` → `color: rgba(170,187,204,0.5)` + +You can also write just the dot and get the placeholder on the `alpha` part of the `rgba`: + +- `cF00.` → `color: rgba(255,0,0,.[5])` + +### Importance modifier + +A nice little feature: add `!` after abbreviation and get ` !important` at the end. Not that importance is something you would want to use everyday, but still. + +`dn!` would give you `display:none !important;`, yeah. + +### Automatic vendor prefixes + +If you need some vendor prefixes, Hayaku could provide them! + +`bra1.5` would expand to this: + +``` CSS +-webkit-border-radius: 1.5em; + border-radius: 1.5em; +``` + +Right now there are no prefixes for values (like gradients etc.) but someday they'd be there. + +### Default values + +If you'd write something that is only a property (as Hayaku would guess), Hayaku would insert a snippet with some default value already selected for you, so you could start writing your own value to replace it or to press `tab` again to keep it and move forward. So, writing `w` would actually expand to `width: [100%]` (braces mean that this value is selected by default). + +### Clipboard defaults + +Aside from the normal defaults, Hayaku would try to use your clipboard for getting the value from it as the default value. + +Right now it's available for colors and images urls: + +- If you'd have color in hexadecimal, rgb(a) or hsl(a) in your clipboard, Hayaku would use it as a default shown value. That would work even is the value is hashless, so if you've copied `808080` from anywhere, then on expanding `c` you would get `color: #[808080]`. + +- If you'd have an image url in your clipboard (even relative, Hayaku would look at extension), you'd have it added as default values along inside an `url()`. Also, see [quotes and URLs](#quotes-and-urls) settings on how to adjust the quoting of the inserted url if you want. + +#### Configure clipboard defaults + +Hayaku offers a setting to set up the behavior of the Clipboard defaults: `hayaku_CSS_clipboard_defaults`. It is an array of the value types that Hayaku could accept as the defaults. So, to disable all the clipboard defaults you could use this setting: + +``` JSON +{ + "hayaku_CSS_clipboard_defaults": [""] +} +``` + +## Postexpands + +“Postexpands” is a nice Hayaku's feature, that allows you to expand only the property at first and then use instant autocomplete for the values of numbers. + +That must be said is that postexpand is a bit different from the usual abbreviation expands — it don't have any fuzzy search inside, so only the first letters matter. However, as you'd use it you would see that it is still a powerfull feature. + +### Simple property postexpands + +The simplest postexpand feature is autocomplete for the string values of different properties. + +If you'd expand some property like `po` to `position: |;`, then you could start writing any of it's values and get they expanded right after the cursor. So, writing `a` would give you `position: a|bsolute;`. + +### Postexpands for units + +Another postexpand feature would allow you to firstly expand the property that can have numeric values, like `width` and then write only the digits and let Hayaku place the corresponding units automatically. + +So, when you expand, for example, `w` to `width: |;`, you'd get different options: + +- write any iteger like `10` and you'd get `width: 10|px;` +- write any float like `1.5` and you'd get `width: 1.5|em;` +- write an integer and them `e`, so you'd get `width: 10e|m;` +- if the value have any string values, you can also use them: writing `a` would give you `width: a|uto;` + +Negative numbers could still be used and if you'd like any other unit, you could just write it down, the autocompleted units won't bother you. + +### Postexpands for colors + +As you can use shortcuts to colors in abbreviations, you could also write the color values after expanding only the property. The basics are the same: `color: |;` + `F` would give you `color: #F|FF;`, and so on. You can use or don't use the hash symbol. + +Another somewhat obscure (but helpful) feature is postexpand for `rgba` colors. This is triggered by writing the comma after decimal value. There is also a shortcut to the alpha value. + +- `color: 255,|` would transform to `color: rgba(255,|255,255,1);` +- `color: 255,.|` would transform to `color: rgba(255,255,255,.|5);` + +There are a lot of things we could improve there, so stay tuned. + +### Postexpand for importance + +If you'd like to make some value important, you could just write the first symbols of `!important` keyword and Hayaku would autocomplete it for you. + +### Disabling postexpands + +If you'd wish to disable postexpands at all for some reason, you could use this setting for this: `"hayaku_CSS_disable_postexpand": true` + +## Creating new CSS rule blocks + +In Hayaku there is a simple but powerful feature: when you wrote a selector, you could just press `CMD+Enter` to get a block for writing CSS here. + +## Inline comments + +Another little helper: write `//` in CSS to have it expanded to `/* | */` (where the pipe is a caret placement). + +If you'd wish to disable inline comments, you could use this setting: `"hayaku_CSS_disable_inline_comment": true` + +*This feature is in development, we plan on adding a lot of things to make commenting fun.* + +# Settings and Preferences + +Hayaku have **a lot** of different configurable options, both for your code style and for different features you'd wish to use. + +## Autoguessing the code style + +The easiest way to set the basic settings for your codestyle, is to use `hayaku_CSS_syntax_autoguess` option: + +``` JSON +{ + "hayaku_CSS_syntax_autoguess": [ + " selector { ", + " property: value; ", + " } " + ] +} +``` + +There you can use any whitespaces between the predefined keywords and they would be used by Hayaku. A few notes regarding this setting: + +- You should use the newline symbol `\n` or multiple array items, because JSON don't support multiline well. +- For your convenience you can use any leading of trailing spaces. Trailing spaces would be stripped at all, leading spaces would be stripped as if there weren't spaces at the start of the selector. + +Maybe someday there'd be a _real_ autoguessing, that would read your open stylesheet and find what better suits it, but not today. + +## Single code style + +If you don't want to use autoguessing, then you could define single options one by one. This would also be helpful if you'd want to redefine only some of the code styling settings in other project or syntax. + +Here is a JSON with all the available single code styling options: + +``` JSON +{ + "hayaku_CSS_whitespace_after_colon": " ", + "hayaku_CSS_whitespace_block_start_before": " ", + "hayaku_CSS_whitespace_block_start_after": "\n\t", + "hayaku_CSS_whitespace_block_end_before": "\n\t", + "hayaku_CSS_whitespace_block_end_after": "" +} +``` + +The names speak for themselves there. + +The important thing is that the single code style settings always override the autoguessed one. + +## Automatic new line after expand + +That's somewhat experimental feature, that is disabled by default. To enable it use this setting: + +``` JSON +{ + "hayaku_CSS_newline_after_expand": true +} +``` + +With this setting you could save a bit more time, cause Hayaku would add a new line after you expand your abbreviations. The only downside is that you'll need to delete a line when you finish with the selector or when you're inserting something between existing lines. + +## Quotes and URLs + +By default Hayaku uses double quotes for different CSS stuff (like `content: ""`). You can change this by setting this: + +``` JSON +{ + "hayaku_CSS_syntax_quote_symbol": "'" +} +``` + +Also, by default the image urls wouldn't have quotes in CSS-like syntaxes and would have them in Sass or Stylus, you can override this automatic behaviour by setting `hayaku_CSS_syntax_url_quotes` setting to `true` or `false`. + +## Units for unitless values + +By default Hayaku won't add `em` or `px` after values for properties like `line-height`. If you're not using unit less values for those properties, you could enable them like this: + +``` JSON +{ + "hayaku_CSS_units_for_unitless_numbers": true +} +``` + +## Prefixes options + +If you don't want to use any prefixes at all (as if you're using some mixins for it in Stylus, or use prefix-free), you can disable them with that option: + +``` JSON +{ + "hayaku_CSS_prefixes_disable": true +} +``` + +### The aligning for the prefixes + +By default Hayaku aligns expanded prefixed properties in this nice way: + +``` CSS +.foo { + -webkit-transform: rotate(45deg); + -moz-transform: rotate(45deg); + -ms-transform: rotate(45deg); + -o-transform: rotate(45deg); + transform: rotate(45deg); + } +``` + +This way it's easier to spot changes to a single prefixed property and to use multiline edit on them. + +However, if you'd want to expand such properties left aligned, set + +``` JSON +{ + "hayaku_CSS_prefixes_align": false +} +``` + +### Using only specific prefixes + +This is not something that you would use often, but if you'd need, you could use only prefixes for browsers you want. There are two settigns for this: + +``` JSON +{ + "hayaku_CSS_prefixes_only": ["webkit","moz","o"], + "hayaku_CSS_prefixes_no_unprefixed": true +} +``` + +- `hayaku_CSS_prefixes_only` is an array of the prefixes you'd want to use **only**. In the upper example I excuded `ms` prefix, so if you'd use meta to emulate all IE versions to IE7 for example, then you could remove `ms` prefix, so your CSS would be a bit cleaner. +- when `hayaku_CSS_prefixes_no_unprefixed` is set to `True`, such prefixed clusters won't contain the official unprefixed variant. + +Right now there is no easy way to adjust prefixes per property, but it would be there in a near feature, so stay tuned! + +## Options for colors + +Note that those settings would work for every pre-set and expanded colors, like the default color values, but they won't work for postexpands due to their mechanics. + +### Colors' case + +You can tell Hayaku if you prefer `lowercase` or `uppercase` for color values, so it would change the case while expanding abbreviations like `c#f`, `cF` etc. + +The default value is `uppercase`, so `c#f` would become `color: #FFF`. If you'd like to change that to `lowercase`, you can set it this way: + +``` JSON +{ + "hayaku_CSS_colors_case": "lowercase" +} +``` + +And if you'd like it to leave the color as is, you could use value `initial`. + +### Shorthand colors + +By default Hayaku shortens the colous, so if there could be `#FFFFFF` expanded, Hayaku would make it `#FFF`. + +However, if you wish, you can redefine this behavior using this setting: + +``` JSON +{ + "hayaku_CSS_colors_length": "long" +} +``` + +That would make `cF` to be expanded into `color: #FFFFFF`. + + +# Using Hayaku with CSS Preprocessors + +“Hey! I don't need to write CSS faster — I use Preprocessors!” you could say. But, well, you would still need to write all those extra symbols, so abbreviations would fit preprocessors well. And as Hayaku is highly customizable, you could use it with any preprocessor: Sass, Less, Stylus etc. + +Right now only basic things are available, but in feature you could expand different mixins and functions too, so just wait for it. + +- - - + +And this is just the start, there would be a lot of other nice features, so still tuned and follow the [official bundle's twitter](http://twitter.com/#!/hayakubundle)! + +# License and copyrights + +This software is released under the terms of the [MIT license](https://github.com/hayaku/hayaku/blob/master/LICENSE). diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Hayaku - tools for writing CSS faster/add_code_block.py b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Hayaku - tools for writing CSS faster/add_code_block.py new file mode 100644 index 0000000..19fde65 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Hayaku - tools for writing CSS faster/add_code_block.py @@ -0,0 +1,159 @@ +#!/usr/bin/python +import re +import sublime +import sublime_plugin + + +# __all__ = [ +# 'HayakuAddCodeBlockCommand', +# 'HayakuExpandCodeBlockCommand', +# ] + +# Guessing the codestyle 1 2 3 4 5 6 7 8 9 +GUESS_REGEX = re.compile(r'selector(\s*)(\{)?(\s*)property(:)?(\s*)value(;)?(\s*)(\})?(\s*)', re.IGNORECASE) + + +def get_hayaku_options(self): + settings = self.view.settings() + options = {} + match = {} + # Autoguessing the options + if settings.get("hayaku_CSS_syntax_autoguess"): + autoguess = settings.get("hayaku_CSS_syntax_autoguess") + offset = len(autoguess[0]) - len(autoguess[0].lstrip()) + autoguess = [ s[offset:].rstrip() for s in autoguess] + + match = GUESS_REGEX.search('\n'.join(autoguess)) + + # Helper to set an option got from multiple sources + def get_setting(setting, fallback, match_group = False): + if match_group and match: + fallback = match.group(match_group) + single_setting = False + if settings.has("hayaku_" + setting): + single_setting = settings.get("hayaku_" + setting, fallback) + options[setting] = single_setting or fallback + + # Some hardcode for different scopes + # (could this be defined better?) + scope_name = self.view.scope_name(self.view.sel()[0].a) + is_sass = sublime.score_selector(scope_name, 'source.sass') > 0 + is_stylus = sublime.score_selector(scope_name, 'source.stylus') > 0 + + disable_braces = is_stylus or is_sass + if is_stylus and match and match.group(2) and match.group(8): + disable_braces = False + + disable_colons = is_stylus + if match and match.group(4): + disable_colons = False + + disable_semicolons = is_stylus or is_sass + if is_stylus and match and match.group(6): + disable_semicolons = False + + # Calling helper, getting all the needed options + get_setting("CSS_whitespace_block_start_before", " ", 1 ) + get_setting("CSS_whitespace_block_start_after", "\n\t", 3 ) + get_setting("CSS_whitespace_block_end_before", "\n", 7 ) + get_setting("CSS_whitespace_block_end_after", "", 9 ) + get_setting("CSS_whitespace_after_colon", " ", 5 ) + get_setting("CSS_newline_after_expand", False) + get_setting("CSS_syntax_no_curly_braces", disable_braces ) + get_setting("CSS_syntax_no_colons", disable_colons ) + get_setting("CSS_syntax_no_semicolons", disable_semicolons ) + get_setting("CSS_syntax_url_quotes", (is_stylus or is_sass) ) + get_setting("CSS_syntax_quote_symbol", "\"" ) # or "'" + get_setting("CSS_prefixes_disable", False ) + get_setting("CSS_prefixes_align", not (is_stylus or is_sass) ) + get_setting("CSS_prefixes_only", [] ) + get_setting("CSS_prefixes_no_unprefixed", False ) + get_setting("CSS_disable_postexpand", False ) + get_setting("CSS_units_for_unitless_numbers", False ) + get_setting("CSS_colors_case", "uppercase" ) # or "lowercase" or "initial" + get_setting("CSS_colors_length", "short" ) # or "long" or "initial" + get_setting("CSS_clipboard_defaults", ["colors","images"] ) + + return options + +def hayaku_get_block_snippet(options, inside = False): + start_before = options["CSS_whitespace_block_start_before"] + start_after = options["CSS_whitespace_block_start_after"] + end_before = options["CSS_whitespace_block_end_before"] + end_after = options["CSS_whitespace_block_end_after"] + opening_brace = "{" + closing_brace = "}" + + if options["CSS_syntax_no_curly_braces"]: + opening_brace = "" + closing_brace = "" + start_after = "" + end_after = "" + + if inside: + opening_brace = "" + closing_brace = "" + start_before = "" + end_after = "" + + return ''.join([ + start_before + , opening_brace + , start_after + , "$0" + , end_before + , closing_brace + , end_after + ]) + +# Command +class HayakuExpandCodeBlockCommand(sublime_plugin.TextCommand): + def run(self, edit): + # TODO: consume the braces and whitespaces around and inside + self.view.run_command("insert_snippet", {"contents": hayaku_get_block_snippet(get_hayaku_options(self),True)}) + +class HayakuAddCodeBlockCommand(sublime_plugin.TextCommand): + def run(self, edit): + result = '/* OVERRIDE ME */' + + # Determine the limits for place searching + regions = self.view.sel() + region = regions[0] + line = self.view.line(region) + stop_point = self.view.find('[}]\s*',line.begin()) + if stop_point is not None and not (-1, -1): + end = stop_point.end() + else: + end = self.view.find('[^}]*',line.begin()).end() + where_to_search = self.view.substr( + sublime.Region( + line.begin(), + end + ) + ) + + options = get_hayaku_options(self) + + # Insert a code block if we must + found_insert_position = re.search('^([^}{]*?[^;,}{\s])\s*(?=\n|$)',where_to_search) + if found_insert_position is not None: + self.view.sel().clear() + self.view.sel().add(sublime.Region(len(found_insert_position.group(1)) + line.begin(), len(found_insert_position.group(1)) + line.begin())) + + result = hayaku_get_block_snippet(options) + else: + # Place a caret + create a new line otherwise + # FIXME: the newline is not perfectly inserted. Must rethink it so there wouldn't + # be replacement of all whitespaces and would be better insertion handling + found_insert_rule = re.search('^(([^}]*?[^;]?)\s*)(?=\})',where_to_search) + if found_insert_rule: + self.view.sel().clear() + self.view.sel().add(sublime.Region(len(found_insert_rule.group(2)) + line.begin(), len(found_insert_rule.group(1)) + line.begin())) + + result = ''.join([ + options["CSS_whitespace_block_start_after"] + , "$0" + , options["CSS_whitespace_block_end_before"] + ]) + + self.view.run_command("insert_snippet", {"contents": result}) diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Hayaku - tools for writing CSS faster/contexts.py b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Hayaku - tools for writing CSS faster/contexts.py new file mode 100644 index 0000000..ac86901 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Hayaku - tools for writing CSS faster/contexts.py @@ -0,0 +1,141 @@ +#!/usr/bin/python +import re +import sublime +import sublime_plugin + +REGEX_WHITESPACES = re.compile(r'^\s*$') + +class HayakuSingleCaretContext(sublime_plugin.EventListener): + def on_query_context(self, view, key, *args): + if key != "hayaku_single_caret": + return None + + # Multiple blocks inserting doesn't make sense + if len(view.sel()) > 1: + return None + + # TODO: understand selection, but don't replace it on code block inserting + if not view.sel()[0].empty(): + return None + + return True + +class HayakuAtCssContext(sublime_plugin.EventListener): + def on_query_context(self, view, key, *args): + if key != "hayaku_at_css": + return None + + # Looking for the scope + if not view.score_selector(view.sel()[0].begin(),'source.css, source.stylus, source.sass, source.scss'): + return None + + return True + +class HayakuAddCodeBlockContext(sublime_plugin.EventListener): + def on_query_context(self, view, key, *args): + if key != "hayaku_add_code_block": + return None + + # Determining the left and the right parts + region = view.sel()[0] + line = view.line(region) + left_part = view.substr(sublime.Region(line.begin(), region.begin())) + right_part = view.substr(sublime.Region(region.begin(), line.end())) + + # Check if the line isn't just a line of whitespace + if REGEX_WHITESPACES.search(left_part + right_part) is not None: + return None + # Simple check if the left part is ok + if left_part.find(';') != -1: + return None + # Simple check if the right part is ok + if right_part.find(';') != -1: + return None + + return True + +class HayakuAddLineContext(sublime_plugin.EventListener): + def on_query_context(self, view, key, *args): + if key != "hayaku_add_line": + return None + + # Determining the left and the right parts + region = view.sel()[0] + line = view.line(region) + left_part = view.substr(sublime.Region(line.begin(), region.begin())) + right_part = view.substr(sublime.Region(region.begin(), line.end())) + + # Simple check if the left part is ok + if re.search(';\s*$|[^\s;\{] [^;\{]+$',left_part) is None: + return None + + # Simple check if the right part is ok + if re.search('^\s*\}?$',right_part) is None: + return None + + return True + + +class HayakuStyleContext(sublime_plugin.EventListener): + def on_query_context(self, view, key, *args): + if key != "hayaku_css_context": + return None + + regions = view.sel() + # We won't do anything for multiple carets for now + if len(regions) > 1: + return None + + region = regions[0] + + # We don't do anything for selection for now + if not region.empty(): + return None + + # Looking for the scope + # TODO: Make it expandable in HTML's attributes (+ left/right fixes) + if view.score_selector(region.begin(),'source.css -meta.selector.css, source.stylus, source.sass, source.scss') == 0: + return None + + # Determining the left and the right parts + line = view.line(region) + left_part = view.substr(sublime.Region(line.begin(), region.begin())) + right_part = view.substr(sublime.Region(region.begin(),line.end())) + + # Simple check if the left part is ok + # 1. Caret is not straight after semicolon, slash or plus sign + # 2. We're not at the empty line + # 3. There were no property/value like entities before caret + # 1 2 3 + if re.search('[;\s\/\+]$|^$|[^\s;\{] [^;\{]+$',left_part) is not None: + return None + + # Simple check if the right part is ok + # 1. The next symbol after caret is not space or curly brace + # 2. There could be only full property+value part afterwards + # 1 2 + if re.search('^[^\s\}]|^\s[^:\}]+[;\}]',right_part) is not None: + return None + + return True + +# Context-commands to jump out of multiple selections in snippets +class HayakuGoingUpContext(sublime_plugin.EventListener): + def on_query_context(self, view, key, *args): + if key != "hayaku_going_up": + return None + if len(view.sel()) > 1: + region = view.sel()[0] + view.sel().clear() + view.sel().add(region) + return None + +class HayakuGoingDownContext(sublime_plugin.EventListener): + def on_query_context(self, view, key, *args): + if key != "hayaku_going_down": + return None + if len(view.sel()) > 1: + region = view.sel()[1] + view.sel().clear() + view.sel().add(region) + return None diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Hayaku - tools for writing CSS faster/css_dict_driver.py b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Hayaku - tools for writing CSS faster/css_dict_driver.py new file mode 100644 index 0000000..e679441 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Hayaku - tools for writing CSS faster/css_dict_driver.py @@ -0,0 +1,109 @@ +# -*- coding: utf-8 -*- +# (c) 2012 Sergey Mezentsev +import string + +from itertools import chain, product, starmap + + +def parse_dict_json(raw_dict): + result_dict = {} + + valuable = (i for i in raw_dict if 'name' in i and 'values' in i) + + def strip(s): + return string.strip(s) if hasattr(string, 'strip') else s.strip() + + for i in valuable: + name, values, default = i['name'], i['values'], i.get('default') + names = name if isinstance(name, list) else map(strip, name.split(',')) + for n in names: + assert n not in result_dict + + val = { 'values': values } + + if default is not None: + val['default'] = default + + if 'prefixes' in i: + val['prefixes'] = i['prefixes'] + if 'no-unprefixed-property' in i: + val['no-unprefixed-property'] = i['no-unprefixed-property'] + else: + assert 'no-unprefixed-property' not in i + + result_dict[n] = val + + return result_dict + +get_css_dict_cache = None +def get_css_dict(): + global get_css_dict_cache + if get_css_dict_cache is not None: + return get_css_dict_cache + else: + CSS_DICT_DIR = 'dictionaries' + CSS_DICT_FILENAME = 'hayaku_CSS_dictionary.json' + DICT_KEY = 'hayaku_CSS_dictionary' + + import json + import os + try: + import sublime + css_dict = sublime.load_settings(CSS_DICT_FILENAME).get(DICT_KEY) + if css_dict is None: + import zipfile + zf = zipfile.ZipFile(os.path.dirname(os.path.realpath(__file__))) + f = zf.read('{0}/{1}'.format(CSS_DICT_DIR, CSS_DICT_FILENAME)) + css_dict = json.loads(f.decode())[DICT_KEY] + except ImportError: + css_dict_path = os.path.join(CSS_DICT_DIR, CSS_DICT_FILENAME) + css_dict = json.load(open(css_dict_path))[DICT_KEY] + + assert css_dict is not None + get_css_dict_cache = parse_dict_json(css_dict) + return get_css_dict_cache + +def css_defaults(name, css_dict): + """Находит первое значение по-умолчанию + background -> #FFF + color -> #FFF + content -> "" + """ + cur = css_dict.get(name) or css_dict.get(name[1:-1]) + if cur is None: + return None + default = cur.get('default') + if default is not None: + return default + + for v in cur['values']: + if v.startswith('<') and v.endswith('>'): + ret = css_defaults(v, css_dict) + if ret is not None: + return ret + +def css_flat(name, values=None, css_dict=None): + """Все значения у свойства (по порядку) + left -> [u'auto', u'', u'', u'', u'.em', u'.ex', + u'.vw', u'.vh', u'.vmin', u'.vmax', u'.ch', u'.rem', u'.px', u'.cm', + u'.mm', u'.in', u'.pt', u'.pc', u'', u'.%'] + """ + cur = css_dict.get(name) or css_dict.get(name[1:-1]) + if values is None: + values = [] + if cur is None: + return values + for value in cur['values']: + values.append(value) + if value.startswith('<') and value.endswith('>'): + values = css_flat(value, values, css_dict) + return values + +def css_flat_list(name, css_dict): + """Возвращает список кортежей (свойство, возможное значение) + left -> [(left, auto), (left, ), (left, .px)...] + """ + return list(product((name,), css_flat(name, css_dict=get_css_dict()))) + +def get_flat_css(): + return list(chain.from_iterable(starmap(css_flat_list, ((i, get_css_dict()) for i in get_css_dict())))) diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Hayaku - tools for writing CSS faster/dictionaries/hayaku_CSS_dictionary.json b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Hayaku - tools for writing CSS faster/dictionaries/hayaku_CSS_dictionary.json new file mode 100644 index 0000000..12220ba --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Hayaku - tools for writing CSS faster/dictionaries/hayaku_CSS_dictionary.json @@ -0,0 +1,533 @@ +{ "hayaku_CSS_dictionary": +[ + {"_Description": [ + " Dictionary for Hayaku Core, http://hayakubundle.com ", + " Copyright © 2011 Roman Komarov, http://kizu.ru/en/ ", + " Licensed under MIT license ", + + " Got inspiration from ", + " Zen Coding snippets for CSS ", + " Copyright © 2008–2011 Vadim Makeev, http://pepelsbey.net ", + " Licensed under MIT license " + ] + },{ + "name": "", + "values": [ "inherit" ], + "_comment": [ + "Common values, that any single property can have", + "Must have lesser priority than any other value" + ] + },{ + "name": "", + "values": [ "", "" ] + },{ + "name": "", + "values": [ + ".em", ".ex", ".vw", ".vh", ".vmin", ".vmax", ".ch", ".rem", + ".px", ".cm", ".mm", ".in", ".pt", ".pc" + ] + },{ + "name": "", + "values": [ ".%" ] + },{ + "name": "", + "values": [ ".deg", ".grad", ".rad", ".turn" ] + },{ + "name": "
+]]> + tbalert:e + Bootstrap error alert + text.html + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/alert-info.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/alert-info.sublime-snippet new file mode 100644 index 0000000..8149197 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/alert-info.sublime-snippet @@ -0,0 +1,11 @@ + + + × + ${1:Information!} ${2:This alert needs your attention, but it's not super important.} + +]]> + tbalert:i + Bootstrap information alert + text.html + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/alert-success.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/alert-success.sublime-snippet new file mode 100644 index 0000000..a6dd2a6 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/alert-success.sublime-snippet @@ -0,0 +1,11 @@ + + + × + ${1:Success!} ${2:You successfully read this important alert message.} + +]]> + tbalert:s + Bootstrap success alert + text.html + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/alert.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/alert.sublime-snippet new file mode 100644 index 0000000..1e6b3f7 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/alert.sublime-snippet @@ -0,0 +1,11 @@ + + + × + ${1:Warning!} ${2:Best check yo self, you're not looking too good}. + +]]> + tbalert + Bootstrap default alert + text.html + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/badge-error.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/badge-error.sublime-snippet new file mode 100644 index 0000000..a6f51dc --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/badge-error.sublime-snippet @@ -0,0 +1,8 @@ + + ${1:6} +]]> + tbbadge:e + Bootstrap error badge + text.html + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/badge-info.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/badge-info.sublime-snippet new file mode 100644 index 0000000..f73d272 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/badge-info.sublime-snippet @@ -0,0 +1,8 @@ + + ${1:8} +]]> + tbbadge:if + Bootstrap info badge + text.html + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/badge-inverse.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/badge-inverse.sublime-snippet new file mode 100644 index 0000000..bf19459 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/badge-inverse.sublime-snippet @@ -0,0 +1,8 @@ + + ${1:10} +]]> + tbbadge:iv + Bootstrap inverse badge + text.html + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/badge-success.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/badge-success.sublime-snippet new file mode 100644 index 0000000..6b00a10 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/badge-success.sublime-snippet @@ -0,0 +1,8 @@ + + ${1:2} +]]> + tbbadge:s + Bootstrap success badge + text.html + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/badge-warning.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/badge-warning.sublime-snippet new file mode 100644 index 0000000..0d3ad90 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/badge-warning.sublime-snippet @@ -0,0 +1,8 @@ + + ${1:4} +]]> + tbbadge:w + Bootstrap warning badge + text.html + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/badge.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/badge.sublime-snippet new file mode 100644 index 0000000..3bfc05a --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/badge.sublime-snippet @@ -0,0 +1,8 @@ + + ${1:1} +]]> + tbbadge + Bootstrap default badge + text.html + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/breadcrumb.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/breadcrumb.sublime-snippet new file mode 100644 index 0000000..babed2d --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/breadcrumb.sublime-snippet @@ -0,0 +1,18 @@ + + +
  • + ${1:Home} / +
  • +
  • + ${2:Library} / +
  • +
  • + ${3:Data} +
  • + +]]>
    + tbbreadcrumb + Bootstrap breadcrumb + text.html +
    \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/buttons-dropdown.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/buttons-dropdown.sublime-snippet new file mode 100644 index 0000000..3ee06a4 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/buttons-dropdown.sublime-snippet @@ -0,0 +1,17 @@ + + + Action + + +]]> + tbbuttons:d + Bootstrap button dropdowns + text.html + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/buttons-grouped.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/buttons-grouped.sublime-snippet new file mode 100644 index 0000000..c28a96d --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/buttons-grouped.sublime-snippet @@ -0,0 +1,12 @@ + + + ${1:Button1} + ${2:Button2} + ${3:Button3} + +]]> + tbbuttons:g + Bootstrap grouped buttons + text.html + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/label-important.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/label-important.sublime-snippet new file mode 100644 index 0000000..05069c2 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/label-important.sublime-snippet @@ -0,0 +1,8 @@ + + ${1:Important} +]]> + tblabel:it + Bootstrap important inline label + text.html + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/label-info.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/label-info.sublime-snippet new file mode 100644 index 0000000..298e97b --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/label-info.sublime-snippet @@ -0,0 +1,8 @@ + + ${1:Info} +]]> + tblabel:io + Bootstrap info inline label + text.html + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/label-success.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/label-success.sublime-snippet new file mode 100644 index 0000000..d5f6fba --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/label-success.sublime-snippet @@ -0,0 +1,8 @@ + + ${1:Success} +]]> + tblabel:s + Bootstrap success inline label + text.html + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/label-warning.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/label-warning.sublime-snippet new file mode 100644 index 0000000..d0f9ee7 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/label-warning.sublime-snippet @@ -0,0 +1,8 @@ + + ${1:Warning} +]]> + tblabel:w + Bootstrap warning inline label + text.html + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/label.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/label.sublime-snippet new file mode 100644 index 0000000..62aa266 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/label.sublime-snippet @@ -0,0 +1,8 @@ + + ${1:Default} +]]> + tblabel + Bootstrap basic inline label + text.html + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/navbar.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/navbar.sublime-snippet new file mode 100644 index 0000000..7741c8e --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/navbar.sublime-snippet @@ -0,0 +1,56 @@ + + + + +]]> + tbnavbar + Bootstrap navigation bar + text.html + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/pager-aligned.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/pager-aligned.sublime-snippet new file mode 100644 index 0000000..dd62a73 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/pager-aligned.sublime-snippet @@ -0,0 +1,15 @@ + + + + + +]]> + tbpager:a + Bootstrap pager with aligned links + text.html + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/pager.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/pager.sublime-snippet new file mode 100644 index 0000000..8ea5a4a --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/pager.sublime-snippet @@ -0,0 +1,15 @@ + + +
  • + Previous +
  • +
  • + Next +
  • + +]]>
    + tbpager + Bootstrap default pager + text.html +
    \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/pagination.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/pagination.sublime-snippet new file mode 100644 index 0000000..10c9e62 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/pagination.sublime-snippet @@ -0,0 +1,19 @@ + + + + +]]> + tbpagination + Bootstrap pagination + text.html + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/pills-dropdown.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/pills-dropdown.sublime-snippet new file mode 100644 index 0000000..3bb39fa --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/pills-dropdown.sublime-snippet @@ -0,0 +1,21 @@ + + +
  • ${1:Home}
  • +
  • ${2:Profile}
  • + + +]]>
    + tbpills:d + Bootstrap pills with dropdowns + text.html +
    \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/pills-stacked.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/pills-stacked.sublime-snippet new file mode 100644 index 0000000..3ac6245 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/pills-stacked.sublime-snippet @@ -0,0 +1,14 @@ + + +
  • + ${1:Home} +
  • +
  • ${2:Profile}
  • +
  • ${3:Messages}
  • + +]]>
    + tbpills + Bootstrap basic pills + text.html +
    \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/pills.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/pills.sublime-snippet new file mode 100644 index 0000000..104317f --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/pills.sublime-snippet @@ -0,0 +1,14 @@ + + +
  • + ${1:Home} +
  • +
  • ${2:Profile}
  • +
  • ${3:Messages}
  • + +]]>
    + tbpills + Bootstrap basic pills + text.html +
    \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/progress-stripped.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/progress-stripped.sublime-snippet new file mode 100644 index 0000000..ce01110 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/progress-stripped.sublime-snippet @@ -0,0 +1,10 @@ + + +
    + +]]>
    + tbprogress:s + Bootstrap stripped progress bar + text.html +
    \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/progress.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/progress.sublime-snippet new file mode 100644 index 0000000..9dd8841 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/progress.sublime-snippet @@ -0,0 +1,10 @@ + + +
    + +]]>
    + tbprogress + Bootstrap basic progress bar + text.html +
    \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/tabbable-below.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/tabbable-below.sublime-snippet new file mode 100644 index 0000000..a080ea2 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/tabbable-below.sublime-snippet @@ -0,0 +1,21 @@ + + + +
    +
    +

    I'm in Section 1.

    +
    +
    +

    Howdy, I'm in Section 2.

    +
    +
    + +]]>
    + tbtabbable:b + Bootstrap tabbable navigation tabs on the bottom + text.html +
    \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/tabbable-left.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/tabbable-left.sublime-snippet new file mode 100644 index 0000000..84e6cd8 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/tabbable-left.sublime-snippet @@ -0,0 +1,21 @@ + + + +
    +
    +

    I'm in Section 1.

    +
    +
    +

    Howdy, I'm in Section 2.

    +
    +
    + +]]>
    + tbtabbable:l + Bootstrap tabbable navigation tabs on the left + text.html +
    \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/tabbable-right.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/tabbable-right.sublime-snippet new file mode 100644 index 0000000..fb94a2b --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/tabbable-right.sublime-snippet @@ -0,0 +1,21 @@ + + + +
    +
    +

    I'm in Section 1.

    +
    +
    +

    Howdy, I'm in Section 2.

    +
    +
    + +]]>
    + tbtabbable:r + Bootstrap tabbable navigation tabs on the right + text.html +
    \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/tabbable.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/tabbable.sublime-snippet new file mode 100644 index 0000000..2e68f84 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/tabbable.sublime-snippet @@ -0,0 +1,21 @@ + + + +
    +
    +

    I'm in Section 1.

    +
    +
    +

    Howdy, I'm in Section 2.

    +
    +
    + +]]>
    + tbtabbable + Bootstrap tabbable navigation tabs + text.html +
    \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/tabs-alert.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/tabs-alert.sublime-snippet new file mode 100644 index 0000000..f5908cf --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/tabs-alert.sublime-snippet @@ -0,0 +1,14 @@ + + +
  • + ${1:Home} +
  • +
  • ${2:Profile}
  • +
  • ${3:Messages}
  • + +]]>
    + tbtabs + Bootstrap basic tabs + text.html +
    \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/tabs-dropdown.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/tabs-dropdown.sublime-snippet new file mode 100644 index 0000000..e5e6b43 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/tabs-dropdown.sublime-snippet @@ -0,0 +1,21 @@ + + +
  • ${1:Home}
  • +
  • ${2:Profile}
  • + + +]]>
    + tbtabs:d + Bootstrap tabs with dropdowns + text.html +
    \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/tabs-stacked.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/tabs-stacked.sublime-snippet new file mode 100644 index 0000000..e4968e3 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/tabs-stacked.sublime-snippet @@ -0,0 +1,12 @@ + + +
  • ${1:Home}
  • +
  • ${2:Profile}
  • +
  • ${3:Messages}
  • + +]]>
    + tbtabs:s + Bootstrap basic tabs + text.html +
    \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/thumbnails.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/thumbnails.sublime-snippet new file mode 100644 index 0000000..aec8719 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/thumbnails.sublime-snippet @@ -0,0 +1,30 @@ + + +
  • + + + +

    Basic marketing site

    +

    Featuring a hero unit for a primary message and three supporting elements.

    +
  • +
  • + + + +

    Fluid layout

    +

    Uses our new responsive, fluid grid system to create seamless liquid layout.

    +
  • +
  • + + + +

    Starter template

    +

    A barebones HTML document with all the Bootstrap CSS and javascript included.

    +
  • + +]]>
    + tbthumbnails + Bootstrap thumbnails + text.html +
    \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/toolbar.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/toolbar.sublime-snippet new file mode 100644 index 0000000..e8bf8c6 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Components/toolbar.sublime-snippet @@ -0,0 +1,23 @@ + + +
    + 1 + 2 + 3 + 4 +
    +
    + 5 + 6 + 7 +
    +
    + 8 +
    + +]]>
    + tbtoolbar + Bootstrap toolbar + text.html +
    \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Examples/fluid.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Examples/fluid.sublime-snippet new file mode 100644 index 0000000..10ae71a --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Examples/fluid.sublime-snippet @@ -0,0 +1,146 @@ + + + + + + Bootstrap, from Twitter + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    + +
    +
    +
    +

    Hello, world!

    +

    This is a template for a simple marketing or informational website. It includes a large callout called the hero unit and three supporting pieces of content. Use it as a starting point to create something more unique.

    +

    Learn more »

    +
    +
    +
    +

    Heading

    +

    Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui.

    +

    View details »

    +
    +
    +

    Heading

    +

    Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui.

    +

    View details »

    +
    +
    +

    Heading

    +

    Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui.

    +

    View details »

    +
    +
    +
    +
    +

    Heading

    +

    Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui.

    +

    View details »

    +
    +
    +

    Heading

    +

    Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui.

    +

    View details »

    +
    +
    +

    Heading

    +

    Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui.

    +

    View details »

    +
    +
    +
    +
    +
    +
    +

    © Company 2012

    +
    +
    + + + + + + + + + + + + + + + + + + +]]>
    + tbfluid + Bootstrap fluid layout + text.html +
    \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Examples/hero.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Examples/hero.sublime-snippet new file mode 100644 index 0000000..a98fba6 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Examples/hero.sublime-snippet @@ -0,0 +1,107 @@ + + + + + + Bootstrap, from Twitter + + + + + + + + + + + + + + + + + + + + + + +
    + +
    +

    Hello, world!

    +

    This is a template for a simple marketing or informational website. It includes a large callout called the hero unit and three supporting pieces of content. Use it as a starting point to create something more unique.

    +

    Learn more »

    +
    + + +
    +
    +

    Heading

    +

    Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui.

    +

    View details »

    +
    +
    +

    Heading

    +

    Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui.

    +

    View details »

    +
    +
    +

    Heading

    +

    Donec sed odio dui. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Vestibulum id ligula porta felis euismod semper. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.

    +

    View details »

    +
    +
    +
    +
    +

    © Company 2012

    +
    + +
    + + + + + + + + + + + + + + + + + + +]]>
    + tbhero + Bootstrap hero example + text.html +
    \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Examples/starter.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Examples/starter.sublime-snippet new file mode 100644 index 0000000..810b932 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Examples/starter.sublime-snippet @@ -0,0 +1,107 @@ + + + + + + Bootstrap, from Twitter + + + + + + + + + + + + + + + + + + + + + + +
    + +
    +

    Hello, world!

    +

    This is a template for a simple marketing or informational website. It includes a large callout called the hero unit and three supporting pieces of content. Use it as a starting point to create something more unique.

    +

    Learn more »

    +
    + +
    +
    +

    Heading

    +

    Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui.

    +

    View details »

    +
    +
    +

    Heading

    +

    Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui.

    +

    View details »

    +
    +
    +

    Heading

    +

    Donec sed odio dui. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Vestibulum id ligula porta felis euismod semper. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.

    +

    View details »

    +
    +
    + +
    + +
    +

    © Company 2012

    +
    +
    + + + + + + + + + + + + + + + + + + +]]>
    + tbstarter + Bootstrap starter + text.html +
    \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Javascript Plugins/accordion.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Javascript Plugins/accordion.sublime-snippet new file mode 100644 index 0000000..de5ddb6 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Javascript Plugins/accordion.sublime-snippet @@ -0,0 +1,45 @@ + + +
    + +
    +
    + Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. +
    +
    +
    +
    + +
    +
    + Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. +
    +
    +
    +
    + +
    +
    + Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. +
    +
    +
    + +]]>
    + tbaccordion + Bootstrap accordion + text.html +
    \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Javascript Plugins/carousel.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Javascript Plugins/carousel.sublime-snippet new file mode 100644 index 0000000..2363453 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Javascript Plugins/carousel.sublime-snippet @@ -0,0 +1,34 @@ + + + + + + +]]> + tbcarousel + Bootstrap carousel + text.html + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Javascript Plugins/modal.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Javascript Plugins/modal.sublime-snippet new file mode 100644 index 0000000..3bd2eeb --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Javascript Plugins/modal.sublime-snippet @@ -0,0 +1,21 @@ + + Launch Modal + +]]> + tbmodal + Bootstrap modal + text.html + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Javascript Plugins/modaljs.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Javascript Plugins/modaljs.sublime-snippet new file mode 100644 index 0000000..acb85b2 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Javascript Plugins/modaljs.sublime-snippet @@ -0,0 +1,10 @@ + + + tbmodaljs + source.js,source.js.embedded.html + Bootstrap modal events + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Javascript Plugins/scripts.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Javascript Plugins/scripts.sublime-snippet new file mode 100644 index 0000000..a1a3db8 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Javascript Plugins/scripts.sublime-snippet @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + +]]> + tbscripts + Bootstrap scripts reference + text.html + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Javascript Plugins/tooltip.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Javascript Plugins/tooltip.sublime-snippet new file mode 100644 index 0000000..4dab27a --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Javascript Plugins/tooltip.sublime-snippet @@ -0,0 +1,8 @@ + + hover over me +]]> + tbtooltip + Bootstrap tooltips + text.html + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/README.md b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/README.md new file mode 100644 index 0000000..4873f7e --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/README.md @@ -0,0 +1,17 @@ +[Sublime Text Twitter Bootstrap Snippets](http://github.com/devtellect/sublime-twitter-bootstrap-snippets/) +======================================== + +A bunch of nicely described and categorized [Twitter Bootstrap](http://twitter.github.com/bootstrap/) code snippets for [Sublime Text](http://sublimetext.com) editor. + +## Installation +*1.* Clone the repository into your packages folder. + + git clone git@github.com:devtellect/sublime-twitter-bootstrap-snippets.git + +*2.* Download the [.zip](http://github.com/devtellect/sublime-twitter-bootstrap-snippets/zipball/master) file and unzip it into your ST2 packages directory. + +## License +License: MIT [http://www.opensource.org/licenses/mit-license.php](http://www.opensource.org/licenses/mit-license.php) + +## Author +Twitter: [DEVtellect](http://twitter.com/devtellect) | GitHub: [DEVtellect](http://github.com/devtellect) \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Scaffolding/grid-four.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Scaffolding/grid-four.sublime-snippet new file mode 100644 index 0000000..bcf1bf9 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Scaffolding/grid-four.sublime-snippet @@ -0,0 +1,13 @@ + + +
    ${1:Column 1}
    +
    ${2:Column 2}
    +
    ${3:Column 3}
    +
    ${4:Column 4}
    + +]]>
    + tbgrid:4 + Bootstrap basic four column grid + text.html +
    \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Scaffolding/grid-three.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Scaffolding/grid-three.sublime-snippet new file mode 100644 index 0000000..ec202e9 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Scaffolding/grid-three.sublime-snippet @@ -0,0 +1,12 @@ + + +
    ${1:Column 1}
    +
    ${2:Column 2}
    +
    ${3:Column 3}
    + +]]>
    + tbgrid:3 + Bootstrap basic three column grid + text.html +
    \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Scaffolding/grid-two.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Scaffolding/grid-two.sublime-snippet new file mode 100644 index 0000000..563e8ae --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/Scaffolding/grid-two.sublime-snippet @@ -0,0 +1,11 @@ + + +
    ${1:Column 1}
    +
    ${2:Column 2}
    + +]]>
    + tbgrid:2 + Bootstrap basic two column grid + text.html +
    \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/package-metadata.json b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/package-metadata.json new file mode 100644 index 0000000..6d5243d --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/Twitter Bootstrap Snippets/package-metadata.json @@ -0,0 +1 @@ +{"url": "http://devtellect.github.com/sublime-twitter-bootstrap-snippets", "version": "2012.08.26.13.27.14", "description": "Twitter Bootstrap snippets for Sublime Text 2"} \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/ZZZ.EthanBrown.SublimeKeyMap.Web/Default (Windows).sublime-keymap b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/ZZZ.EthanBrown.SublimeKeyMap.Web/Default (Windows).sublime-keymap new file mode 100644 index 0000000..1ff0c07 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/ZZZ.EthanBrown.SublimeKeyMap.Web/Default (Windows).sublime-keymap @@ -0,0 +1,87 @@ +[ + // AutoFileName - https://github.com/BoundInCode/AutoFileName + { "keys": ["tab"], "command": "insert_dimensions", "context": + [ + { "key": "setting.auto_complete_commit_on_tab" }, + { "key": "auto_complete_visible", "operator": "equal", "operand": true }, + { "key": "afn_insert_dimensions", "operator": "equal", "operand": true } + ] + }, + { "keys": ["enter"], "command": "insert_dimensions", "context": + [ + { "key": "setting.auto_complete_commit_on_tab", "operator": "equal", "operand": false }, + { "key": "auto_complete_visible", "operator": "equal", "operand": true }, + { "key": "afn_insert_dimensions", "operator": "equal", "operand": true } + ] + }, + { "keys": ["backspace"], "command": "reload_auto_complete", "context": + [ + { "key": "afn_deleting_slash", "operator": "equal", "operand": true } + ] + }, + + //CoffeeComplete Plus (Autocompletion) - https://github.com/justinmahar/SublimeCSAutocompletePlus + { "keys": ["ctrl+alt+d"], "command": "coffee_goto_definition" }, + { "keys": ["f12"], "command": "coffee_goto_definition" }, + + //CoffeeScript (Better) - https://github.com/aponxi/sublime-better-coffeescript + //not needed - cover by linter + //{"keys": ["alt+shift+s"], "command": "check_syntax"}, + {"keys": ["alt+shift+r"], "command": "run_script"}, + //{"keys": ["alt+shift+t"], "command": "run_cake_task"}, + {"keys": ["alt+shift+c"], "command": "compile"}, + {"keys": ["alt+shift+d"], "command": "compile_and_display", "args": {"opt": "-p"}}, + //{"keys": ["alt+shift+l"], "command": "compile_and_display", "args": {"opt": "-t"}}, + //{"keys": ["alt+shift+n"], "comand": "compile_and_display", "args": {"opt": "-n"}}, + {"keys": ["alt+shift+w"], "command": "toggle_watch"}, + //{"keys": ["alt+shift+z"], "command": "toggle_output_panel"}, + + //DocBlockr - https://github.com/spadgos/sublime-jsdocs + //large keymap, should be pulled in automatically + + //Emmet - https://github.com/sergeche/emmet-sublime + //Many other bindings should be picked up as defaults + {"keys": ["ctrl+alt+enter"],"command": "expand_as_you_type", + "context": [ + {"operand": false, "operator": "equal", "match_all": true, "key": "setting.is_widget"}, + {"match_all": true, "key": "emmet_action_enabled.expand_as_you_type"} + ] + }, + + //Hayaku - https://github.com/hayaku/hayaku + //Like Emmet, many others defined should be picked up automatically + { + "keys": ["tab"],"command": "hayaku", "context": [{"key": "hayaku_css_context"}] + }, + + //HttpRequester - https://github.com/braindamageinc/SublimeHttpRequester + { + "keys": ["ctrl+alt+r"], "command": "http_requester" + }, + // { + // "keys": ["f5"], "command": "http_requester_refresh" + // }, + + //PrettyJSON - https://github.com/dzhibas/SublimePrettyJson + { "keys": ["ctrl+alt+j"], "command": "prettyjson" }, + + //SublimeLinter - https://github.com/SublimeLinter/SublimeLinter + { "keys": ["ctrl+alt+l"], "command": "sublimelinter", "args": {"action": "lint"} }, + { "keys": ["ctrl+alt+e"], "command": "find_next_lint_error" }, + { "keys": ["ctrl+alt+shift+e"], "command": "find_previous_lint_error" }, + + //Tag - https://github.com/SublimeText/Tag + {"keys": ["/"], "command": "tag_close_tag_on_slash", + "context": [ + { "key": "preceding_text", "operator": "regex_contains", "operand": "<$", "match_all": true}, + { "key": "setting.is_widget", "operator": "equal", "operand": false } + ]}, + { "keys": ["ctrl+shift+,"], "command": "tag_insert_as_tag" }, + { "keys": ["alt+."], "command": "tag_close_tag" }, + + //Simple helpers for Snippet Binding + { "keys": ["shift+f2"], "command": "show_overlay", + "args": {"overlay": "command_palette", "text": "Bootstrap"} }, + { "keys": ["shift+f3"], "command": "show_overlay", + "args": {"overlay": "command_palette", "text": "Ng "} } +] diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/ZZZ.EthanBrown.SublimeKeyMap.Web/README.md b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/ZZZ.EthanBrown.SublimeKeyMap.Web/README.md new file mode 100644 index 0000000..fe10666 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/ZZZ.EthanBrown.SublimeKeyMap.Web/README.md @@ -0,0 +1,39 @@ +SublimeKeyMap.Web +================= + +A simple repository used to host / share my customized Sublime Text 2 key bindings for web plugins + +Designed to be incorporated into `Package Control.sublime-settings` like: + +```json +{ + "installed_packages": + [ + "AngularJS (CoffeeScript)", + "AutoFileName", + "Chai Completions", + "CoffeeComplete Plus (Autocompletion)", + "DocBlockr", + "Emmet", + "Grunt", + "Hayaku - tools for writing CSS faster", + "HTML5", + "jQuery", + "LESS", + "LiveReload", + "Pretty JSON", + "sublime-better-coffeescript", + "SublimeLinter", + "Tag", + "Twitter Bootstrap Snippets" + ], + "package_name_map": { + "SublimeKeyMap.Web": "ZZZ.EthanBrown.SublimeKeyMap.Web" + }, + "repositories": + [ + "https://github.com/Iristyle/SublimeKeyMap.Web", + "https://github.com/Iristyle/SublimeLinter" + ] +} +``` diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/ZZZ.EthanBrown.SublimeKeyMap.Web/package-metadata.json b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/ZZZ.EthanBrown.SublimeKeyMap.Web/package-metadata.json new file mode 100644 index 0000000..35cfced --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/ZZZ.EthanBrown.SublimeKeyMap.Web/package-metadata.json @@ -0,0 +1 @@ +{"url": "https://github.com/Iristyle/SublimeKeyMap.Web", "version": "2013.03.17.19.58.48", "description": "A simple repository used to host / share my customized Sublime Text 2 key bindings for web plugins"} \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$.sublime-snippet new file mode 100644 index 0000000..e3ad01e --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$.sublime-snippet @@ -0,0 +1,6 @@ + + + $ + $('#select DOM Element') + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$ajaxSend.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$ajaxSend.sublime-snippet new file mode 100644 index 0000000..41d6ee5 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$ajaxSend.sublime-snippet @@ -0,0 +1,9 @@ + + + .ajaxsend + $.ajaxSend() + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$ajaxSetup.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$ajaxSetup.sublime-snippet new file mode 100644 index 0000000..c2ed8df --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$ajaxSetup.sublime-snippet @@ -0,0 +1,21 @@ + + + .ajaxsetup + $.ajaxSetup() + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$ajaxStart.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$ajaxStart.sublime-snippet new file mode 100644 index 0000000..ba1dc55 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$ajaxStart.sublime-snippet @@ -0,0 +1,9 @@ + + + .ajaxstart + $.ajaxStart() + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$ajaxStop.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$ajaxStop.sublime-snippet new file mode 100644 index 0000000..6eaebc4 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$ajaxStop.sublime-snippet @@ -0,0 +1,9 @@ + + + .ajaxstop + $.ajaxStop() + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$ajaxSuccess.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$ajaxSuccess.sublime-snippet new file mode 100644 index 0000000..5c11402 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$ajaxSuccess.sublime-snippet @@ -0,0 +1,8 @@ + + + .ajaxsuccess + $.ajaxSuccess() + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$boxModel.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$boxModel.sublime-snippet new file mode 100644 index 0000000..0ec159e --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$boxModel.sublime-snippet @@ -0,0 +1,7 @@ + + + .boxmodel + $.boxModel() + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$browser-version.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$browser-version.sublime-snippet new file mode 100644 index 0000000..1e0e647 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$browser-version.sublime-snippet @@ -0,0 +1,6 @@ + + + .browser + $.browser.version + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$browser.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$browser.sublime-snippet new file mode 100644 index 0000000..2de593f --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$browser.sublime-snippet @@ -0,0 +1,6 @@ + + + .browser + $.browser() + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$each.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$each.sublime-snippet new file mode 100644 index 0000000..2a340d9 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$each.sublime-snippet @@ -0,0 +1,8 @@ + + + .each + $.each() + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$extend.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$extend.sublime-snippet new file mode 100644 index 0000000..24be006 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$extend.sublime-snippet @@ -0,0 +1,7 @@ + + + .extend + $.extend() + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$get.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$get.sublime-snippet new file mode 100644 index 0000000..5b812a4 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$get.sublime-snippet @@ -0,0 +1,9 @@ + + + .get + $.get() + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$getScript.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$getScript.sublime-snippet new file mode 100644 index 0000000..f99e9f6 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$getScript.sublime-snippet @@ -0,0 +1,9 @@ + + + .get + $.getScript() + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$holdReady.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$holdReady.sublime-snippet new file mode 100644 index 0000000..54cabf2 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$holdReady.sublime-snippet @@ -0,0 +1,6 @@ + + + .holdready + $.holdReady + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$inArray.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$inArray.sublime-snippet new file mode 100644 index 0000000..ef12f60 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$inArray.sublime-snippet @@ -0,0 +1,6 @@ + + + .inarray + $.inArray() + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$isEmptyObject.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$isEmptyObject.sublime-snippet new file mode 100644 index 0000000..9442241 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$isEmptyObject.sublime-snippet @@ -0,0 +1,6 @@ + + + .is + $.isEmptyObject() + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$isNumeric.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$isNumeric.sublime-snippet new file mode 100644 index 0000000..653d8ec --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$isNumeric.sublime-snippet @@ -0,0 +1,6 @@ + + + .is + $.isNumeric() + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$isPlainObject.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$isPlainObject.sublime-snippet new file mode 100644 index 0000000..c2201e1 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$isPlainObject.sublime-snippet @@ -0,0 +1,6 @@ + + + .is + $.isPlainObject() + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$isWindow.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$isWindow.sublime-snippet new file mode 100644 index 0000000..46817b9 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$isWindow.sublime-snippet @@ -0,0 +1,6 @@ + + + .is + $.isWindow() + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$map.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$map.sublime-snippet new file mode 100644 index 0000000..f340418 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$map.sublime-snippet @@ -0,0 +1,8 @@ + + + .map + $.map() + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$merge.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$merge.sublime-snippet new file mode 100644 index 0000000..ff2d6f1 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$merge.sublime-snippet @@ -0,0 +1,6 @@ + + + .merge + $.merge() + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$noop.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$noop.sublime-snippet new file mode 100644 index 0000000..3a6c2a5 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$noop.sublime-snippet @@ -0,0 +1,6 @@ + + + .noop + $.noop() + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$now.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$now.sublime-snippet new file mode 100644 index 0000000..62561c8 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$now.sublime-snippet @@ -0,0 +1,6 @@ + + + .now + $.now() + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$parseJSON.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$parseJSON.sublime-snippet new file mode 100644 index 0000000..7ff7fce --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$parseJSON.sublime-snippet @@ -0,0 +1,6 @@ + + + .parse + $.parseJSON() + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$parseXML.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$parseXML.sublime-snippet new file mode 100644 index 0000000..a4f46dd --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$parseXML.sublime-snippet @@ -0,0 +1,6 @@ + + + .parse + $.parseXML() + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$post.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$post.sublime-snippet new file mode 100644 index 0000000..ed59dfd --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$post.sublime-snippet @@ -0,0 +1,9 @@ + + + .post + $.post() + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$sub.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$sub.sublime-snippet new file mode 100644 index 0000000..7895fc0 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$sub.sublime-snippet @@ -0,0 +1,6 @@ + + + .sub + $.sub() + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$trim.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$trim.sublime-snippet new file mode 100644 index 0000000..0b6ffb5 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$trim.sublime-snippet @@ -0,0 +1,6 @@ + + + .trim + $.trim() + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$type.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$type.sublime-snippet new file mode 100644 index 0000000..2744ed7 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$type.sublime-snippet @@ -0,0 +1,6 @@ + + + .type + $.type() + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$unique.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$unique.sublime-snippet new file mode 100644 index 0000000..4065e7b --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$unique.sublime-snippet @@ -0,0 +1,7 @@ + + + .unique + $.unique() + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$when.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$when.sublime-snippet new file mode 100644 index 0000000..7ee17de --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/$when.sublime-snippet @@ -0,0 +1,7 @@ + + + .when + $.when() + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/.gitignore b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/.gitignore new file mode 100644 index 0000000..20b4900 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/.gitignore @@ -0,0 +1,4 @@ +tmp/* +*.DS_Store +*.svn +Support/test/* diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/README.md b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/README.md new file mode 100644 index 0000000..f59d79c --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/README.md @@ -0,0 +1,18 @@ +# jQuery Package for Sublime Text + +This is a Sublime Text bundle to help with jQuery functions. + +## Authors + +* Zander Martineau +* Karl Swedberg +* Jonathan Chaffer + +## License + +This bundle is dual-licensed under MIT and GPL licenses (just like jQuery). + +* [http://www.opensource.org/licenses/mit-license.php](http://www.opensource.org/licenses/mit-license.php) +* [http://www.gnu.org/licenses/gpl.html](http://www.gnu.org/licenses/gpl.html) + +Use it, change it, fork it, sell it. Do what you will, but please leave the author attribution. diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/QUnit module.tmSnippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/QUnit module.tmSnippet new file mode 100644 index 0000000..dc2e849 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/QUnit module.tmSnippet @@ -0,0 +1,24 @@ + + + + + content + module('${1:module name}'${2:, {${6/(.+)/(?1: + setup\: function\(\) { + :)/}${6:// setup for $1 }${6/(.+)/(?1: + }:)/}${7/(.+)/(?1:, + teardown\: function\(\) { + :)/}${7://teardown for $1}${7/(.+)/(?1: + }:)/} +\}}); +$0 + name + QUnit module + scope + source.js + tabTrigger + module + uuid + 08389AF0-8A25-4FC4-9AF2-D18C42CBD051 + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/QUnit test.tmSnippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/QUnit test.tmSnippet new file mode 100644 index 0000000..00c4e7e --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/QUnit test.tmSnippet @@ -0,0 +1,18 @@ + + + + + content + test('${1:description}'${2/(.+)/(?1:, :)/}${2:numberexpected}${3:, ${4:function() { + $0 +\}}}); + name + QUnit test + scope + source.js + tabTrigger + test + uuid + 002C9C57-F00E-4338-B3FF-601D8E93F122 + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/deferred_done.tmSnippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/deferred_done.tmSnippet new file mode 100644 index 0000000..586b0d2 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/deferred_done.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + .done(${1:doneCallbacks})$0 + name + deferred.done + scope + source.js + tabTrigger + .done + uuid + 79F89635-37BB-4BA9-8415-981C8598013B + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/deferred_fail.tmSnippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/deferred_fail.tmSnippet new file mode 100644 index 0000000..60fc315 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/deferred_fail.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + .fail(${1:failCallbacks})$0 + name + deferred.fail + scope + source.js + tabTrigger + .fail + uuid + 2951E2A1-1F48-466F-8F43-04C1BC71A2DE + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/deferred_isRejected.tmSnippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/deferred_isRejected.tmSnippet new file mode 100644 index 0000000..4527615 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/deferred_isRejected.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + .isRejected()$0 + name + deferred.isRejected + scope + source.js + tabTrigger + .isRejected + uuid + 9090253A-EDB0-4E86-AFBD-02776C5DBCBE + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/deferred_isResolved.tmSnippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/deferred_isResolved.tmSnippet new file mode 100644 index 0000000..47e8cd3 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/deferred_isResolved.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + .isResolved()$0 + name + deferred.isResolved + scope + source.js + tabTrigger + .isResolved + uuid + 9E2BF3EE-B220-454A-9132-0EE3A5E5F0C4 + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/deferred_reject.tmSnippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/deferred_reject.tmSnippet new file mode 100644 index 0000000..2847e94 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/deferred_reject.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + .reject(${1:args})$0 + name + deferred.reject + scope + source.js + tabTrigger + .reject + uuid + D05CC3EE-718F-47D6-AA8B-FD5FDCA57282 + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/deferred_rejectWith.tmSnippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/deferred_rejectWith.tmSnippet new file mode 100644 index 0000000..30faa24 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/deferred_rejectWith.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + .rejectWith(${1:context}${2/(^,).*|.+/(?1::, )/}${2:args})$0 + name + deferred.rejectWith + scope + source.js + tabTrigger + .rejectWith + uuid + C6D45B8E-3494-45C4-BEDD-3C0B71B414E1 + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/deferred_then.tmSnippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/deferred_then.tmSnippet new file mode 100644 index 0000000..c0b7132 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/deferred_then.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + .then(${1:doneCallbacks}, ${2:failCallbacks})$0 + name + deferred.then + scope + source.js + tabTrigger + .then + uuid + 6129A0BF-7084-44F7-89C7-AB36526DAD87 + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_ajax.tmSnippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_ajax.tmSnippet new file mode 100644 index 0000000..15e2be7 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_ajax.tmSnippet @@ -0,0 +1,31 @@ + + + + + content + jQuery.ajax({ + url: '${1:/path/to/file}', +${2/(.+)/(?1: type\: ':)/}${2:POST}${2/(.+)/(?1:', +:)/}${3/(.+)/(?1: dataType\: ':)/}${3:xml/html/script/json/jsonp}${3/(.+)/(?1:', +:)/}${4/(.+)/(?1: data\: {:)/}${4:param1: 'value1'}${4/(.+)/(?1:}, +:)/}${5/(.+)/(?1: complete\: function\(xhr, textStatus\) { + :)/}${5://called when complete}${5/(.+)/(?1: + }, +:)/}${6/(.+)/(?1: success\: function\(data, textStatus, xhr\) { + :)/}${6://called when successful}${6/(.+)/(?1: + }, +:)/}${7/(.+)/(?1: error\: function\(xhr, textStatus, errorThrown\) { + :)/}${7://called when there is an error} +${7/(.+)/(?1: } +:)/}}); +$0 + name + jQuery.ajax + scope + source.js + tabTrigger + jQuery.ajax + uuid + F18DAC78-14B2-4D02-AFBC-A9C47F915590 + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_ajaxSetup.tmSnippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_ajaxSetup.tmSnippet new file mode 100644 index 0000000..729d82d --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_ajaxSetup.tmSnippet @@ -0,0 +1,31 @@ + + + + + content + jQuery.ajaxSetup({ + url: '${1:/path/to/file}', +${2/(.+)/(?1: type\: ':)/}${2:POST}${2/(.+)/(?1:', +:)/}${3/(.+)/(?1: dataType\: ':)/}${3:xml/html/script/json/jsonp}${3/(.+)/(?1:', +:)/}${4/(.+)/(?1: data\: {:)/}${4:param1: 'value1'}${4/(.+)/(?1:}, +:)/}${5/(.+)/(?1: complete\: function\(xhr, textStatus\) { + :)/}${5://called when complete}${5/(.+)/(?1: + }, +:)/}${6/(.+)/(?1: success\: function\(data, textStatus, xhr\) { + :)/}${6://called when successful}${6/(.+)/(?1: + }, +:)/}${7/(.+)/(?1: error\: function\(xhr, textStatus, errorThrown\) { + :)/}${7://called when there is an error} +${7/(.+)/(?1: } +:)/}}); +$0 + name + jQuery.ajaxSetup + scope + source.js + tabTrigger + jQuery.ajaxSetup + uuid + D65B8AE7-6504-4CC4-9EFB-4012D980DFB5 + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_boxModel.tmSnippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_boxModel.tmSnippet new file mode 100644 index 0000000..aca5c86 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_boxModel.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + jQuery.boxModel + name + jQuery.boxModel + scope + source.js + tabTrigger + jQuery.boxModel + uuid + 928C97F0-0994-4F91-BDDA-40C8E77A3666 + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_browser.tmSnippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_browser.tmSnippet new file mode 100644 index 0000000..95d443b --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_browser.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + jQuery.browser${1/(.+)/(?1:.:)/}${1:webkit/opera/msie/mozilla}${1/(.+)/(?1: :)/}$0 + name + jQuery.browser + scope + source.js + tabTrigger + jQuery.browser + uuid + E53A000B-0E54-4DCD-A53B-89FFA80B7F9E + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_browser_version.tmSnippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_browser_version.tmSnippet new file mode 100644 index 0000000..0e514fa --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_browser_version.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + jQuery.browser.version + name + jQuery.browser.version + scope + source.js + tabTrigger + jQuery.browser + uuid + 6F342C78-D195-4062-81D2-A6B91C8DAD72 + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_each.tmSnippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_each.tmSnippet new file mode 100644 index 0000000..60a1598 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_each.tmSnippet @@ -0,0 +1,18 @@ + + + + + content + jQuery.each(${1:array/object}, function(${2:index}${3:, ${4:val}}) { + ${0://iterate through array or object} +}); + name + jQuery.each + scope + source.js + tabTrigger + jQuery.each + uuid + A16AD94D-AA5D-4CDB-81F2-D7DBC87EB03D + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_extend.tmSnippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_extend.tmSnippet new file mode 100644 index 0000000..a9d6295 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_extend.tmSnippet @@ -0,0 +1,17 @@ + + + + + content + jQuery.extend(${1:true, }${2:target object}, ${3:object1}); +$0 + name + jQuery.extend + scope + source.js + tabTrigger + jQuery.extend + uuid + 71CE8077-FA1A-44DE-AD87-9C809702BAC4 + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_get.tmSnippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_get.tmSnippet new file mode 100644 index 0000000..fcbfae9 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_get.tmSnippet @@ -0,0 +1,19 @@ + + + + + content + jQuery.get('${1:/path/to/file}'${2/(.+)/(?1:, {:)/}${2:param1: 'value1'}${2/(.+)/(?1:}:)/}${3/(.+)/(?1:, function\(data, textStatus, xhr\) { + :)/}${3://optional stuff to do after success}${3/(.+)/(?1: +}:)/}); +$0 + name + jQuery.get + scope + source.js + tabTrigger + jQuery.get + uuid + 8F8BE76F-F6AC-448A-9F75-339275ED18BF + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_getJSON.tmSnippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_getJSON.tmSnippet new file mode 100644 index 0000000..2636234 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_getJSON.tmSnippet @@ -0,0 +1,19 @@ + + + + + content + jQuery.getJSON('${1:/path/to/file}'${2/(.+)/(?1:, {:)/}${2:param1: 'value1'}${2/(.+)/(?1:}:)/}${3/(.+)/(?1:, function\(json, textStatus\) { + :)/}${3://optional stuff to do after success}${3/(.+)/(?1: +}:)/}); +$0 + name + jQuery.getJSON + scope + source.js + tabTrigger + jQuery.getJSON + uuid + 1E5851C8-C77F-48B1-B81E-CCF2E9F50E90 + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_getScript.tmSnippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_getScript.tmSnippet new file mode 100644 index 0000000..f548966 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_getScript.tmSnippet @@ -0,0 +1,19 @@ + + + + + content + jQuery.getScript('${1:path/to/file}'${2/(.+)/(?1:, function\(data, textStatus\) { + :)/}${2://optional stuff to do after getScript}${2/(.+)/(?1: +}:)/}); +$0 + name + jQuery.getScript + scope + source.js + tabTrigger + jQuery.getScript + uuid + E7A389DC-77F8-4D48-9B4E-35C966A9722B + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_inArray.tmSnippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_inArray.tmSnippet new file mode 100644 index 0000000..1012449 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_inArray.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + jQuery.inArray(${1:value}, ${2:array});$0 + name + jQuery.inArray + scope + source.js + tabTrigger + jQuery.inArray + uuid + E96A90AC-73ED-46A6-A0C5-6E47043B8F4B + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_isEmptyObject.tmSnippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_isEmptyObject.tmSnippet new file mode 100644 index 0000000..3c8b86f --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_isEmptyObject.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + jQuery.isEmptyObject('${1:object}')$0 + name + jQuery.isEmptyObject + scope + source.js + tabTrigger + jQuery.isEmptyObject + uuid + C91FAB3B-AB50-4113-B29A-A93B79930A56 + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_isPlainObject.tmSnippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_isPlainObject.tmSnippet new file mode 100644 index 0000000..292502b --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_isPlainObject.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + jQuery.isPlainObject('${1:object}')$0 + name + jQuery.isPlainObject + scope + source.js + tabTrigger + jQuery.isPlainObject + uuid + BB98D569-21AB-4A7A-BA0B-95322E41715E + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_isWindow.tmSnippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_isWindow.tmSnippet new file mode 100644 index 0000000..52918ae --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_isWindow.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + jQuery.isWindow('${1:object}')$0 + name + jQuery.isWindow + scope + source.js + tabTrigger + jQuery.isWindow + uuid + 085903F9-746E-42A6-A075-701E666B1080 + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_map.tmSnippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_map.tmSnippet new file mode 100644 index 0000000..f812f08 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_map.tmSnippet @@ -0,0 +1,18 @@ + + + + + content + jQuery.map(${1:array}, function(${2:item}${3:, ${4:index}}) { + ${5:return ${6:something};} +}); + name + jQuery.map + scope + source.js + tabTrigger + jQuery.map + uuid + AE82E287-8D4F-4077-85C3-75CF4B1083C7 + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_merge.tmSnippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_merge.tmSnippet new file mode 100644 index 0000000..fe14fe4 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_merge.tmSnippet @@ -0,0 +1,17 @@ + + + + + content + jQuery.merge(${1:array1}, ${2:array2}); +$0 + name + jQuery.merge + scope + source.js + tabTrigger + jQuery.merge + uuid + 55304395-C690-4D69-B696-1837C5A5B03D + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_noop.tmSnippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_noop.tmSnippet new file mode 100644 index 0000000..0bfb394 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_noop.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + jQuery.noop()${0:;}${1:} + name + jQuery.noop + scope + source.js + tabTrigger + jQuery.noop + uuid + 390F8483-BB8F-45F1-B2EB-C943AC5B24CA + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_parseJSON.tmSnippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_parseJSON.tmSnippet new file mode 100644 index 0000000..9f4489c --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_parseJSON.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + jQuery.parseJSON(${1:json});${0:} + name + jQuery.parseJSON + scope + source.js + tabTrigger + jQuery.parseJSON + uuid + D502E460-8AD5-487D-9AAD-D39FC1A62127 + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_parseXML.tmSnippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_parseXML.tmSnippet new file mode 100644 index 0000000..bd9f0cc --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_parseXML.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + jQuery.parseXML(${1:data});${0:} + name + jQuery.parseXML + scope + source.js + tabTrigger + jQuery.parseXML + uuid + 71C02AD2-0CD3-44EA-931A-D9A3C04D6C47 + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_post.tmSnippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_post.tmSnippet new file mode 100644 index 0000000..3aaa8d8 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_post.tmSnippet @@ -0,0 +1,19 @@ + + + + + content + jQuery.post('${1:/path/to/file}'${2/(.+)/(?1:, {:)/}${2:param1: 'value1'}${2/(.+)/(?1:}:)/}${3/(.+)/(?1:, function\(data, textStatus, xhr\) { + :)/}${3://optional stuff to do after success}${3/(.+)/(?1: +}:)/}); +$0 + name + jQuery.post + scope + source.js + tabTrigger + jQuery.post + uuid + 5E500FD9-6E49-4D3F-91F2-733051DE2CD9 + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_sub.tmSnippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_sub.tmSnippet new file mode 100644 index 0000000..dec279b --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_sub.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + jQuery.sub()$0 + name + jQuery.sub + scope + source.js + tabTrigger + jQuery.sub + uuid + D89081D7-8E1A-454D-B6A5-1ACFE9C10A5C + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_trim.tmSnippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_trim.tmSnippet new file mode 100644 index 0000000..32168c1 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_trim.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + jQuery.trim(${1:'${2:string}'})$0 + name + jQuery.trim + scope + source.js + tabTrigger + jQuery.trim + uuid + C4C61E6A-6FA9-491A-97B0-23C645338713 + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_type.tmSnippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_type.tmSnippet new file mode 100644 index 0000000..4be59ea --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_type.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + jQuery.type(${1:object})$0 + name + jQuery.type + scope + source.js + tabTrigger + jQuery.type + uuid + 0A75E731-B728-4968-BA71-4EEBACC3F6E0 + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_unique.tmSnippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_unique.tmSnippet new file mode 100644 index 0000000..7c19e70 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_unique.tmSnippet @@ -0,0 +1,17 @@ + + + + + content + jQuery.unique(${1:DOMelementArray}); +$0 + name + jQuery.unique + scope + source.js + tabTrigger + jQuery.unique + uuid + 7CE997DA-D8B8-4908-BFAF-2299C067CDAE + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_when.tmSnippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_when.tmSnippet new file mode 100644 index 0000000..d3762f4 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/jQuery_when.tmSnippet @@ -0,0 +1,17 @@ + + + + + content + jQuery.when(${1:deferreds}); +$0 + name + jQuery.when + scope + source.js + tabTrigger + jQuery.when + uuid + 2872872D-9EEC-417E-955A-107AF523FE5D + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/plugin (animation).tmSnippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/plugin (animation).tmSnippet new file mode 100644 index 0000000..708b11d --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/plugin (animation).tmSnippet @@ -0,0 +1,18 @@ + + + + + content + jQuery.fn.${1:myeffect} = function(speed, easing, callback) { + return this.animate({${2:param1}: ${3:'value'}}, speed, easing, callback); +}; + name + plugin (animation) + scope + source.js + tabTrigger + plugin + uuid + D2949488-1293-4CF9-B57A-43BC8E4089FF + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/plugin (method extras).tmSnippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/plugin (method extras).tmSnippet new file mode 100644 index 0000000..377dc83 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/plugin (method extras).tmSnippet @@ -0,0 +1,129 @@ + + + + + content + // jQuery ${1:pluginName} Plugin +(function( \$ ) { + var settings = { + ${30:} + }; + + var methods = { + init: function( options ) { + + this.each(function() { + var data, dataId, opts, + ${10:\$this} = $(this); + + $10.$1('options', options); + data = $10.data('$1') || {}; + opts = data.options; + + // If the plugin hasn't been initialized yet + if ( !data.$1 ) { + dataId = +new Date; + + data = { + cluetip: $1, + options: opts, + id: dataId + }; + + $10.data('$1', data); + ${14: + // create element and append to body + var $1 = \$('<div />', { + 'class': '$1' + \}).appendTo( 'body' ); + + $1.data( '$1', {target: $10, id: dataId\} ); +} + + } // !data.$1 + + $0 + + }); + + return this; + }, + destroy: function( ) { + + this.each(function() { + + var $10 = \$(this), + data = $10.data( '$1' ); + + // Remove created elements, unbind namespaced events, and remove data + \$(document).unbind( '.$1' ); + data.$1.remove(); + $10.unbind( '.$1' ) + .removeData( '$1' ); + + }); + + return this; + }, + options: function( options ) { + + this.each(function() { + var $10 = \$(this), + // don't use our getData() function here + // because we want an object regardless + data = $10.data( '$1' ) || {}, + opts = data.options || {}; + + // deep extend (merge) default settings, per-call options, and options set with: + // html10 data-$1 options JSON and \$('selector').$1( 'options', {} ); + opts = \$.extend( true, {}, \$.fn.cluetip.defaults, opts, options || {} ); + data.options = opts; + \$.data( this, '$1', data ); + }); + + return this; + }${20/(.+)/(?1:, + :)/}${20:someOtherMethod}${20/(.+)/(?1:\: function\(\) { + + }:)/} + }; + + var protoSlice = Array.prototype.slice; + + \$.fn.$1 = function( method ) { + + if ( methods[method] ) { + return methods[method].apply( this, protoSlice.call( arguments, 1 ) ); + } else if ( typeof method === 'object' || ! method ) { + return methods.init.apply( this, arguments ); + } else { + \$.error( 'Method ' + method + ' does not exist on jQuery.fn.$1' ); + } + + }; + + \$.extend(\$.fn.$1, { + defaults: settings + }); + + function getData(el) { + var $1, opts, + $10 = \$(el), + data = $10.data( '$1' ) || {}; + + if (!data.$1) { return false; } + + return data; + } + +})( jQuery ); + name + plugin (method extras) + scope + source.js + tabTrigger + plugin + uuid + 39192EFA-D490-4E52-B7F8-D68584397A41 + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/plugin (selector).tmSnippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/plugin (selector).tmSnippet new file mode 100644 index 0000000..9f8319a --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/plugin (selector).tmSnippet @@ -0,0 +1,24 @@ + + + + + content + (function(\$) { + \$.extend(\$.expr[':'], { + ${1:selectorName}: function(element, index, matches, set) { + $0 + return something; + } + }); +})(jQuery); + + name + plugin (selector) + scope + source.js + tabTrigger + plugin + uuid + 27C91862-CFF5-4D6F-8BBB-7DCF2122FA74 + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/plugin.tmSnippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/plugin.tmSnippet new file mode 100644 index 0000000..a53ab0c --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/plugin.tmSnippet @@ -0,0 +1,40 @@ + + + + + content + (function(\$) { +${2:// ${3:What does the $1 plugin do?}} +\$.fn.${1:pluginName} = function(options) { + + if (!this.length) { return this; } + + var opts = \$.extend(${5:true, }{}, \$.fn.$1.defaults, options); + + this.each(function() { + var ${6:\$this} = \$(this); + $0 + }); + + return this; +}; + +// default options +\$.fn.$1.defaults = { + ${4:defaultOne: true, + defaultTwo: false, + defaultThree: 'yay!'} +}; + +})(jQuery); + + name + plugin (method basic) + scope + source.js + tabTrigger + plugin + uuid + 02F87930-5CDC-414A-BA7F-D74CCFD2CBA3 + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/qUnit HTML.tmSnippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/qUnit HTML.tmSnippet new file mode 100644 index 0000000..d176e7e --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Snippets/qUnit HTML.tmSnippet @@ -0,0 +1,38 @@ + + + + + content + <!DOCTYPE HTML> +<html lang="en"> +<head> + <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> + <title>${1:}</title> + <link rel="stylesheet" href="${2:}qunit.css" type="text/css" media="screen"> + <script src="${3:http://code.jquery.com/jquery-latest.js}"></script> + <script src="${4:}qunit.js"></script> + <script src="${5:myscript.js}"></script>${6: + <script src="${7:test.js}"></script>} + +</head> +<body> + <h1 id="qunit-header">${8:$1}</h1> + <h2 id="qunit-banner"></h2> + <div id="qunit-testrunner-toolbar"></div> + <h2 id="qunit-userAgent"></h2> + <ol id="qunit-tests"></ol> + <div id="qunit-fixture"> + ${9:<!-- my test markup goes here -->} + </div> +</body> +</html> + name + QUnit HTML + scope + text.html + tabTrigger + qhtml + uuid + A3107EF3-17D8-4453-9DB3-4F5CE1B502D9 + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Syntaxes/jQueryJavaScript.tmLanguage b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Syntaxes/jQueryJavaScript.tmLanguage new file mode 100644 index 0000000..6211101 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/Syntaxes/jQueryJavaScript.tmLanguage @@ -0,0 +1,600 @@ + + + + + comment + jQuery Javascript Library. Sublime Text 2 package forked by Zander Martineau from original Textmate bundle by Jonathan Chaffer & Karl Swedberg. Dual licensed under MIT (http://www.opensource.org/licenses/mit-license.php) and GPL (http://www.gnu.org/licenses/gpl.html) licenses. + fileTypes + + js + + foldingStartMarker + (^.*\{[^}]*$|^.*\([^\)]*$|^.*/\*(?!.*\*/).*$) + foldingStopMarker + (^\s*\}|^\s*\)|^(?!.*/\*).*\*/) + keyEquivalent + ^~J + name + jQuery (JavaScript) + patterns + + + include + source + + + begin + (\$|jQuery)(\((?!('|")<)) + beginCaptures + + 1 + + name + support.class.js.jquery + + 2 + + name + punctuation.section.class.js + + + contentName + meta.selector.jquery + end + (\)) + endCaptures + + 1 + + name + punctuation.section.class.js + + + patterns + + + include + #nested-parens + + + begin + ' + beginCaptures + + 0 + + name + punctuation.definition.selector.begin.js + + + end + ' + endCaptures + + 0 + + name + punctuation.definition.selector.end.js + + + patterns + + + include + #css-selector + + + + + begin + " + beginCaptures + + 0 + + name + punctuation.definition.selector.begin.js + + + end + " + endCaptures + + 0 + + name + punctuation.definition.selector.end.js + + + patterns + + + include + #css-selector + + + + + include + source.js + + + + + begin + \b(add|appendTo|children|closest|detach|filter|find|has|index|insertAfter|insertBefore|is|next|nextAll|nextUntil|not|parent|parents|parentsUntil|prependTo|prev|prevAll|prevUntil|remove|replaceAll|siblings)\s*(\((?!('|")<)) + beginCaptures + + 1 + + name + support.function.js.jquery + + 2 + + name + punctuation.section.function.js + + + contentName + meta.selector.jquery + end + (\)) + endCaptures + + 1 + + name + punctuation.section.function.js + + + patterns + + + include + #nested-parens + + + begin + ' + beginCaptures + + 0 + + name + punctuation.definition.selector.begin.js + + + end + ' + endCaptures + + 0 + + name + punctuation.definition.selector.end.js + + + patterns + + + include + #css-selector + + + + + begin + " + beginCaptures + + 0 + + name + punctuation.definition.selector.begin.js + + + end + " + endCaptures + + 0 + + name + punctuation.definition.selector.end.js + + + patterns + + + include + #css-selector + + + + + include + source.js + + + + + begin + (\$|jQuery)(\((?=('|")<)) + beginCaptures + + 1 + + name + support.class.js.jquery + + 2 + + name + punctuation.section.class.js + + + contentName + meta.markup.jquery + end + (\)) + endCaptures + + 1 + + name + punctuation.section.class.js + + + patterns + + + begin + ' + beginCaptures + + 0 + + name + punctuation.definition.markup.begin.js + + + end + ' + endCaptures + + 0 + + name + punctuation.definition.markup.end.js + + + patterns + + + include + #html-markup-single + + + + + begin + " + beginCaptures + + 0 + + name + punctuation.definition.markup.begin.js + + + end + " + endCaptures + + 0 + + name + punctuation.definition.markup.end.js + + + patterns + + + include + #html-markup-double + + + + + include + source.js + + + + + begin + \b(add|after|append|before|html|prepend|replaceWith|wrap|wrapAll|wrapInner)\s*(\((?=('|")<)) + beginCaptures + + 1 + + name + support.function.js.jquery + + 2 + + name + punctuation.section.class.js + + + contentName + meta.markup.jquery + end + (\)) + endCaptures + + 1 + + name + punctuation.section.class.js + + + patterns + + + begin + ' + beginCaptures + + 0 + + name + punctuation.definition.markup.begin.js + + + end + ' + endCaptures + + 0 + + name + punctuation.definition.markup.end.js + + + patterns + + + include + #html-markup-single + + + + + begin + " + beginCaptures + + 0 + + name + punctuation.definition.markup.begin.js + + + end + " + endCaptures + + 0 + + name + punctuation.definition.markup.end.js + + + patterns + + + include + #html-markup-double + + + + + include + source.js + + + + + captures + + 1 + + name + support.class.js + + 2 + + name + support.constant.js + + + match + (\$|jQuery)\.(ajaxSettings|boxModel|browser|fx|isReady|support|fn) + name + meta.property.jquery + + + match + (?<=\.)(length|selector|context)\b + name + support.constant.js.jquery + + + match + (?<=\.)(add|addClass|after|ajaxComplete|ajaxError|ajaxSend|ajaxStart|ajaxStop|ajaxSuccess|always|andSelf|animate|append|appendTo|attr|before|bind|blur|change|children|clearQueue|click|clone|closest|contents|css|data|dblclick|delay|delegate|dequeue|detach|disable|disabled|die|domManip|done|each|empty|end|eq|error|fadeIn|fadeOut|fadeTo|fadeToggle|fail|filter|find|first|fire|fired|fireWith|focus|focusin|focusout|get|has|hasClass|height|hide|hover|html|index|innerHeight|innerWidth|insertAfter|insertBefore|is|isRejected|isResolved|keydown|keypress|keyup|last|live|load|lock|locked|map|mousedown|mouseenter|mouseleave|mousemove|mouseout|mouseover|mouseup|next|nextAll|nextUntil|not|notify|notifyWith|off|offset|offsetParent|on|one|outerHeight|outerWidth|parent|parents|parentsUntil|pipe|position|prepend|prependTo|prev|prevAll|prevUntil|progress|promise|prop|pushStack|queue|ready|reject|rejectWith|remove|removeAttr|removeClass|removeData|replaceAll|replaceWith|resize|resolve|resolveWith|scroll|scrollLeft|scrollTop|select|serialize|serializeArray|show|siblings|size|slice|slideDown|slideToggle|slideUp|state|stop|submit|text|then|toArray|toggle|toggleClass|trigger|triggerHandler|unbind|undelegate|unload|unwrap|val|width|wrap|wrapAll|wrapInner)\b + name + support.function.js.jquery + + + captures + + 1 + + name + support.class.js + + 3 + + name + support.function.js + + + match + (\$|jQuery)(\.)(Callbacks|Deferred|Event|ajax|ajaxPrefilter|ajaxSetup|ajaxTransport|bindReady|clean|cleanData|contains|css|data|dequeue|each|error|extend|Event|get|getJSON|getScript|globalEval|grep|inArray|isArray|isEmptyObject|isFunction|isNumeric|isPlainObject|isWindow|isXMLDoc|makeArray|map|merge|noConflict|noop|param|parseJSON|parseXML|post|proxy|queue|ready|removeData|sibling|sub|text|triggerGlobal|trim|type|unique|when)\b + name + support.function.js.jquery + + + include + source.js + + + repository + + css-selector + + begin + (?=\s*[.*#a-zA-Z]) + end + (?=["']) + name + meta.selector.css + patterns + + + match + \b(a|abbr|acronym|address|area|article|aside|audio|b|base|big|blockquote|body|br|button|canvas|caption|cite|command|code|col|colgroup|datalist|dd|del|details|device|dfn|div|dl|dt|em|embed|fieldset|fig(ure|caption)|footer|form|frame|frameset|(h[1-6])|head(er)?|hgroup|hr|html|i|iframe|img|input|ins|kbd|keygen|label|legend|li|link|map|menu|meta|meter|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|samp|script|section|select|small|span|strike|strong|style|summary|sub|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video)\b + name + entity.name.tag.css + + + captures + + 1 + + name + punctuation.definition.attribute-name.css + + + match + (\.)[a-zA-Z0-9_-]+ + name + entity.other.attribute-name.class.css + + + captures + + 1 + + name + punctuation.definition.attribute-name.css + + + match + (#)[a-zA-Z0-9_-]+ + name + entity.other.attribute-name.id.css + + + match + \* + name + entity.name.tag.wildcard.css + + + captures + + 1 + + name + punctuation.definition.attribute-name.css + + + match + (:)\b(active|after|before|first-letter|first-line|hover|link|target|visited)\b + name + entity.other.attribute-name.pseudo-class.css + + + + html-markup-double + + name + meta.markup.html + patterns + + + include + text.html.basic + + + match + \\(") + name + constant.character.escape.js + + + + html-markup-single + + name + meta.markup.html + patterns + + + include + text.html.basic + + + match + \\(') + name + constant.character.escape.js + + + + nested-parens + + begin + \( + captures + + 0 + + name + punctuation.section.scope.js + + + end + \) + patterns + + + include + #nested-parens + + + include + source.js + + + + + scopeName + source.js.jquery + uuid + 1AD8EB10-62BE-417C-BC4B-29B5C6F0B36A + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/add.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/add.sublime-snippet new file mode 100644 index 0000000..219686c --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/add.sublime-snippet @@ -0,0 +1,5 @@ + + + .add + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/addClass.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/addClass.sublime-snippet new file mode 100644 index 0000000..ad332ce --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/addClass.sublime-snippet @@ -0,0 +1,5 @@ + + + .addClass + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/after.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/after.sublime-snippet new file mode 100644 index 0000000..17120cd --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/after.sublime-snippet @@ -0,0 +1,5 @@ + + + .after + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/ajax.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/ajax.sublime-snippet new file mode 100644 index 0000000..46bb022 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/ajax.sublime-snippet @@ -0,0 +1,20 @@ + + + .ajax + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/ajaxComplete.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/ajaxComplete.sublime-snippet new file mode 100644 index 0000000..6f95a0b --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/ajaxComplete.sublime-snippet @@ -0,0 +1,8 @@ + + + .ajaxComplete + .ajaxComplete() + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/ajaxError.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/ajaxError.sublime-snippet new file mode 100644 index 0000000..2dfc28b --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/ajaxError.sublime-snippet @@ -0,0 +1,8 @@ + + + .ajaxerror + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/andSelf.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/andSelf.sublime-snippet new file mode 100644 index 0000000..8c5397e --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/andSelf.sublime-snippet @@ -0,0 +1,5 @@ + + + .andSelf + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/animate-(with-callback).sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/animate-(with-callback).sublime-snippet new file mode 100644 index 0000000..fe184f8 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/animate-(with-callback).sublime-snippet @@ -0,0 +1,11 @@ + + + .animate + .animate() with callback + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/animate.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/animate.sublime-snippet new file mode 100644 index 0000000..460a76e --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/animate.sublime-snippet @@ -0,0 +1,5 @@ + + + .animate + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/append.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/append.sublime-snippet new file mode 100644 index 0000000..638c8ed --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/append.sublime-snippet @@ -0,0 +1,6 @@ + + + .append + .append + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/appendTo.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/appendTo.sublime-snippet new file mode 100644 index 0000000..9d25d62 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/appendTo.sublime-snippet @@ -0,0 +1,6 @@ + + + .appendTo + .appendTo + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/attr-multiple.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/attr-multiple.sublime-snippet new file mode 100644 index 0000000..bf481aa --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/attr-multiple.sublime-snippet @@ -0,0 +1,9 @@ + + + .attr + .attr() - multiple + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/attr.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/attr.sublime-snippet new file mode 100644 index 0000000..0b295da --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/attr.sublime-snippet @@ -0,0 +1,6 @@ + + + .attr + .attr() - single + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/before.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/before.sublime-snippet new file mode 100644 index 0000000..8e90a3e --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/before.sublime-snippet @@ -0,0 +1,6 @@ + + + .before + .before() + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/bind.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/bind.sublime-snippet new file mode 100644 index 0000000..337db1f --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/bind.sublime-snippet @@ -0,0 +1,8 @@ + + + .bind + .bind + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/blur.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/blur.sublime-snippet new file mode 100644 index 0000000..9c7076f --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/blur.sublime-snippet @@ -0,0 +1,8 @@ + + + .blur + .blur + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/change.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/change.sublime-snippet new file mode 100644 index 0000000..f9805c7 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/change.sublime-snippet @@ -0,0 +1,8 @@ + + + .change + .change + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/children.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/children.sublime-snippet new file mode 100644 index 0000000..9a7db3b --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/children.sublime-snippet @@ -0,0 +1,6 @@ + + + .children + .children + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/clearqueue.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/clearqueue.sublime-snippet new file mode 100644 index 0000000..dd6b4a7 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/clearqueue.sublime-snippet @@ -0,0 +1,6 @@ + + + .clearQueue + .clearQueue() + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/click.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/click.sublime-snippet new file mode 100644 index 0000000..a0672f6 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/click.sublime-snippet @@ -0,0 +1,7 @@ + + + .click + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/clone.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/clone.sublime-snippet new file mode 100644 index 0000000..9d67148 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/clone.sublime-snippet @@ -0,0 +1,6 @@ + + + .clone + .clone + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/closest.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/closest.sublime-snippet new file mode 100644 index 0000000..3977ed8 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/closest.sublime-snippet @@ -0,0 +1,6 @@ + + + .closest + .closest + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/contains.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/contains.sublime-snippet new file mode 100644 index 0000000..76c2942 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/contains.sublime-snippet @@ -0,0 +1,6 @@ + + + .contains + .contains() + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/contents.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/contents.sublime-snippet new file mode 100644 index 0000000..472f1f0 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/contents.sublime-snippet @@ -0,0 +1,6 @@ + + + .contents + .contents() + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/css-multiple.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/css-multiple.sublime-snippet new file mode 100644 index 0000000..c0429e5 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/css-multiple.sublime-snippet @@ -0,0 +1,9 @@ + + + .css + .css() - multiple + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/css.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/css.sublime-snippet new file mode 100644 index 0000000..98b0c61 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/css.sublime-snippet @@ -0,0 +1,6 @@ + + + .css + .css() - single + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/data.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/data.sublime-snippet new file mode 100644 index 0000000..4f51531 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/data.sublime-snippet @@ -0,0 +1,6 @@ + + + .data + .data + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/dblclick.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/dblclick.sublime-snippet new file mode 100644 index 0000000..6f4fa40 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/dblclick.sublime-snippet @@ -0,0 +1,7 @@ + + + .dblclick + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/delay.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/delay.sublime-snippet new file mode 100644 index 0000000..72af054 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/delay.sublime-snippet @@ -0,0 +1,6 @@ + + + .delay + .delay + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/delegate.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/delegate.sublime-snippet new file mode 100644 index 0000000..dd2712a --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/delegate.sublime-snippet @@ -0,0 +1,8 @@ + + + .delegate + .delegate + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/dequeue.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/dequeue.sublime-snippet new file mode 100644 index 0000000..4160279 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/dequeue.sublime-snippet @@ -0,0 +1,5 @@ + + + .dequeue + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/die.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/die.sublime-snippet new file mode 100644 index 0000000..3ab941f --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/die.sublime-snippet @@ -0,0 +1,5 @@ + + + .die + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/document-ready-1.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/document-ready-1.sublime-snippet new file mode 100644 index 0000000..f86fed8 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/document-ready-1.sublime-snippet @@ -0,0 +1,8 @@ + + + ready + jQuery(document).ready + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/document-ready-2.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/document-ready-2.sublime-snippet new file mode 100644 index 0000000..6fe0fe4 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/document-ready-2.sublime-snippet @@ -0,0 +1,8 @@ + + + ready + $(document).ready + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/document-ready.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/document-ready.sublime-snippet new file mode 100644 index 0000000..145ca03 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/document-ready.sublime-snippet @@ -0,0 +1,8 @@ + + + ready + document.ready - $(function() + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/each.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/each.sublime-snippet new file mode 100644 index 0000000..e9838e2 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/each.sublime-snippet @@ -0,0 +1,7 @@ + + + .each + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/end.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/end.sublime-snippet new file mode 100644 index 0000000..218faec --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/end.sublime-snippet @@ -0,0 +1,5 @@ + + + .end + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/eq.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/eq.sublime-snippet new file mode 100644 index 0000000..bf69072 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/eq.sublime-snippet @@ -0,0 +1,5 @@ + + + .eq + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/error.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/error.sublime-snippet new file mode 100644 index 0000000..7911064 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/error.sublime-snippet @@ -0,0 +1,8 @@ + + + .error + .error() + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/fadeIn.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/fadeIn.sublime-snippet new file mode 100644 index 0000000..b5bebed --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/fadeIn.sublime-snippet @@ -0,0 +1,8 @@ + + + .fadeIn + .fadeIn() + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/fadeOut.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/fadeOut.sublime-snippet new file mode 100644 index 0000000..5589584 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/fadeOut.sublime-snippet @@ -0,0 +1,8 @@ + + + .fadeOut + .fadeOut() + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/fadeTo.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/fadeTo.sublime-snippet new file mode 100644 index 0000000..56c0527 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/fadeTo.sublime-snippet @@ -0,0 +1,8 @@ + + + .fadeto + .fadeTo() + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/fadeToggle.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/fadeToggle.sublime-snippet new file mode 100644 index 0000000..e88caec --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/fadeToggle.sublime-snippet @@ -0,0 +1,8 @@ + + + .fadeToggle + .fadeToggle() + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/filter-function.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/filter-function.sublime-snippet new file mode 100644 index 0000000..5af9613 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/filter-function.sublime-snippet @@ -0,0 +1,8 @@ + + + .filter + .filter function + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/filter.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/filter.sublime-snippet new file mode 100644 index 0000000..18b82bf --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/filter.sublime-snippet @@ -0,0 +1,6 @@ + + + .filter + .filter() + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/find.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/find.sublime-snippet new file mode 100644 index 0000000..7994001 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/find.sublime-snippet @@ -0,0 +1,5 @@ + + + .find + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/first.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/first.sublime-snippet new file mode 100644 index 0000000..ce2b885 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/first.sublime-snippet @@ -0,0 +1,5 @@ + + + .first + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/focus.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/focus.sublime-snippet new file mode 100644 index 0000000..75b64ed --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/focus.sublime-snippet @@ -0,0 +1,7 @@ + + + .focus + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/focusin.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/focusin.sublime-snippet new file mode 100644 index 0000000..34f5f16 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/focusin.sublime-snippet @@ -0,0 +1,8 @@ + + + .focusin + .focusin() + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/focusout.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/focusout.sublime-snippet new file mode 100644 index 0000000..355f6a8 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/focusout.sublime-snippet @@ -0,0 +1,8 @@ + + + .focusout + .focusout() + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/get.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/get.sublime-snippet new file mode 100644 index 0000000..0d0ca05 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/get.sublime-snippet @@ -0,0 +1,5 @@ + + + .get + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/getJSON.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/getJSON.sublime-snippet new file mode 100644 index 0000000..8232df7 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/getJSON.sublime-snippet @@ -0,0 +1,9 @@ + + + .getjson + $.getjson() + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/has.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/has.sublime-snippet new file mode 100644 index 0000000..d6e188f --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/has.sublime-snippet @@ -0,0 +1,6 @@ + + + .has + .has + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/hasClass.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/hasClass.sublime-snippet new file mode 100644 index 0000000..7b99106 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/hasClass.sublime-snippet @@ -0,0 +1,6 @@ + + + .hasClass + .hasClass + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/height.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/height.sublime-snippet new file mode 100644 index 0000000..c197877 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/height.sublime-snippet @@ -0,0 +1,5 @@ + + + .height + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/hide.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/hide.sublime-snippet new file mode 100644 index 0000000..8f0aabb --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/hide.sublime-snippet @@ -0,0 +1,7 @@ + + + .hide + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/hover.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/hover.sublime-snippet new file mode 100644 index 0000000..f89ecd1 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/hover.sublime-snippet @@ -0,0 +1,9 @@ + + + .hover + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/html.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/html.sublime-snippet new file mode 100644 index 0000000..07e609a --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/html.sublime-snippet @@ -0,0 +1,6 @@ + + + .html + .html + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/index.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/index.sublime-snippet new file mode 100644 index 0000000..3b131b1 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/index.sublime-snippet @@ -0,0 +1,5 @@ + + + .index + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/innerHeight.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/innerHeight.sublime-snippet new file mode 100644 index 0000000..ee757fc --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/innerHeight.sublime-snippet @@ -0,0 +1,6 @@ + + + .innerHeight + .innerHeight + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/innerWidth.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/innerWidth.sublime-snippet new file mode 100644 index 0000000..1930a4a --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/innerWidth.sublime-snippet @@ -0,0 +1,6 @@ + + + .innerWidth + .innerWidth + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/insertAfter.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/insertAfter.sublime-snippet new file mode 100644 index 0000000..f9ad23c --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/insertAfter.sublime-snippet @@ -0,0 +1,5 @@ + + + .insertAfter + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/insertBefore.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/insertBefore.sublime-snippet new file mode 100644 index 0000000..8091dc2 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/insertBefore.sublime-snippet @@ -0,0 +1,6 @@ + + + .insertBefore + .insertBefore + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/is.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/is.sublime-snippet new file mode 100644 index 0000000..dacf171 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/is.sublime-snippet @@ -0,0 +1,6 @@ + + + .is + .is() + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/keydown.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/keydown.sublime-snippet new file mode 100644 index 0000000..484ac6f --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/keydown.sublime-snippet @@ -0,0 +1,7 @@ + + + .keydown + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/keypress.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/keypress.sublime-snippet new file mode 100644 index 0000000..0daf726 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/keypress.sublime-snippet @@ -0,0 +1,7 @@ + + + .keypress + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/keyup.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/keyup.sublime-snippet new file mode 100644 index 0000000..3f53bdd --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/keyup.sublime-snippet @@ -0,0 +1,7 @@ + + + .keyup + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/last.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/last.sublime-snippet new file mode 100644 index 0000000..3bcfb8f --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/last.sublime-snippet @@ -0,0 +1,5 @@ + + + .last + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/live.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/live.sublime-snippet new file mode 100644 index 0000000..dfed323 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/live.sublime-snippet @@ -0,0 +1,7 @@ + + + .live + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/load.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/load.sublime-snippet new file mode 100644 index 0000000..cd4224d --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/load.sublime-snippet @@ -0,0 +1,8 @@ + + + .load + .load + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/loadAHAH.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/loadAHAH.sublime-snippet new file mode 100644 index 0000000..3f67819 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/loadAHAH.sublime-snippet @@ -0,0 +1,11 @@ + + + .load + .load + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/map.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/map.sublime-snippet new file mode 100644 index 0000000..d196d5f --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/map.sublime-snippet @@ -0,0 +1,7 @@ + + + .map + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/mousedown.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/mousedown.sublime-snippet new file mode 100644 index 0000000..4b27c5f --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/mousedown.sublime-snippet @@ -0,0 +1,7 @@ + + + .mousedown + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/mouseenter.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/mouseenter.sublime-snippet new file mode 100644 index 0000000..25529bd --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/mouseenter.sublime-snippet @@ -0,0 +1,7 @@ + + + .mouseenter + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/mouseleave.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/mouseleave.sublime-snippet new file mode 100644 index 0000000..ba13f5f --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/mouseleave.sublime-snippet @@ -0,0 +1,7 @@ + + + .mouseleave + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/mousemove.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/mousemove.sublime-snippet new file mode 100644 index 0000000..2799f47 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/mousemove.sublime-snippet @@ -0,0 +1,7 @@ + + + .mousemove + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/mouseout.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/mouseout.sublime-snippet new file mode 100644 index 0000000..4619118 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/mouseout.sublime-snippet @@ -0,0 +1,7 @@ + + + .mouseout + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/mouseover.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/mouseover.sublime-snippet new file mode 100644 index 0000000..a492160 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/mouseover.sublime-snippet @@ -0,0 +1,7 @@ + + + .mouseover + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/mouseup.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/mouseup.sublime-snippet new file mode 100644 index 0000000..89f5148 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/mouseup.sublime-snippet @@ -0,0 +1,7 @@ + + + .mouseup + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/next.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/next.sublime-snippet new file mode 100644 index 0000000..ba343e9 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/next.sublime-snippet @@ -0,0 +1,6 @@ + + + .next + .next + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/nextAll.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/nextAll.sublime-snippet new file mode 100644 index 0000000..53f82a8 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/nextAll.sublime-snippet @@ -0,0 +1,6 @@ + + + .nextAll + .nextAll + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/nextUntil.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/nextUntil.sublime-snippet new file mode 100644 index 0000000..e1df9ee --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/nextUntil.sublime-snippet @@ -0,0 +1,6 @@ + + + .nextUntil + .nextUntil + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/not.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/not.sublime-snippet new file mode 100644 index 0000000..f83e458 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/not.sublime-snippet @@ -0,0 +1,5 @@ + + + .not + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/off.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/off.sublime-snippet new file mode 100644 index 0000000..68e97be --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/off.sublime-snippet @@ -0,0 +1,5 @@ + + + .off + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/offset (function).sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/offset (function).sublime-snippet new file mode 100644 index 0000000..98c366e --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/offset (function).sublime-snippet @@ -0,0 +1,8 @@ + + + .offset + .offset + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/offset.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/offset.sublime-snippet new file mode 100644 index 0000000..fabf6ab --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/offset.sublime-snippet @@ -0,0 +1,6 @@ + + + .offset + .offset + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/offsetParent.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/offsetParent.sublime-snippet new file mode 100644 index 0000000..1635248 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/offsetParent.sublime-snippet @@ -0,0 +1,6 @@ + + + .offsetParent + .offsetParent() + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/on.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/on.sublime-snippet new file mode 100644 index 0000000..4b294fa --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/on.sublime-snippet @@ -0,0 +1,9 @@ + + + .on + .on() + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/one.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/one.sublime-snippet new file mode 100644 index 0000000..b4290f3 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/one.sublime-snippet @@ -0,0 +1,8 @@ + + + .one + .one + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/outerHeight.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/outerHeight.sublime-snippet new file mode 100644 index 0000000..a3b67a3 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/outerHeight.sublime-snippet @@ -0,0 +1,6 @@ + + + .outerHeight + .outerHeight + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/outerWidth.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/outerWidth.sublime-snippet new file mode 100644 index 0000000..6e1fb3d --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/outerWidth.sublime-snippet @@ -0,0 +1,6 @@ + + + .outerWidth + .outerWidth + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/package-metadata.json b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/package-metadata.json new file mode 100644 index 0000000..1c16759 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/package-metadata.json @@ -0,0 +1 @@ +{"url": "https://github.com/SublimeText/jQuery", "version": "2013.02.01.10.24.31", "description": "Sublime Text 2 package bundle for jQuery"} \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/parent.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/parent.sublime-snippet new file mode 100644 index 0000000..29779ef --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/parent.sublime-snippet @@ -0,0 +1,5 @@ + + + .parent + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/parents.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/parents.sublime-snippet new file mode 100644 index 0000000..c482de6 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/parents.sublime-snippet @@ -0,0 +1,5 @@ + + + .parents + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/parentsUntil.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/parentsUntil.sublime-snippet new file mode 100644 index 0000000..c383572 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/parentsUntil.sublime-snippet @@ -0,0 +1,5 @@ + + + .parentsUntil + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/prepend.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/prepend.sublime-snippet new file mode 100644 index 0000000..bbbe003 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/prepend.sublime-snippet @@ -0,0 +1,6 @@ + + + .prepend + .prepend + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/prependTo.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/prependTo.sublime-snippet new file mode 100644 index 0000000..b5d4f9f --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/prependTo.sublime-snippet @@ -0,0 +1,6 @@ + + + .prependTo + .prependTo + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/prev.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/prev.sublime-snippet new file mode 100644 index 0000000..a91ce2e --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/prev.sublime-snippet @@ -0,0 +1,6 @@ + + + .prev + .prev + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/prevAll.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/prevAll.sublime-snippet new file mode 100644 index 0000000..ab10daa --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/prevAll.sublime-snippet @@ -0,0 +1,6 @@ + + + .prevAll + .prevAll + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/prevUntil.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/prevUntil.sublime-snippet new file mode 100644 index 0000000..9e57e15 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/prevUntil.sublime-snippet @@ -0,0 +1,5 @@ + + + .prevUntil + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/prop(map).sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/prop(map).sublime-snippet new file mode 100644 index 0000000..08ccdc3 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/prop(map).sublime-snippet @@ -0,0 +1,8 @@ + + + .prop + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/prop.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/prop.sublime-snippet new file mode 100644 index 0000000..85ebcdf --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/prop.sublime-snippet @@ -0,0 +1,5 @@ + + + .prop + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/reject.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/reject.sublime-snippet new file mode 100644 index 0000000..a623a74 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/reject.sublime-snippet @@ -0,0 +1,5 @@ + + + .reject + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/remove.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/remove.sublime-snippet new file mode 100644 index 0000000..192d5ca --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/remove.sublime-snippet @@ -0,0 +1,6 @@ + + + .remove + .remove + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/removeAttr.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/removeAttr.sublime-snippet new file mode 100644 index 0000000..6d291ed --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/removeAttr.sublime-snippet @@ -0,0 +1,6 @@ + + + .removeAttr + .removeAttr + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/removeClass.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/removeClass.sublime-snippet new file mode 100644 index 0000000..95058b0 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/removeClass.sublime-snippet @@ -0,0 +1,6 @@ + + + .removeClass + .removeClass + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/removeData.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/removeData.sublime-snippet new file mode 100644 index 0000000..7acce34 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/removeData.sublime-snippet @@ -0,0 +1,6 @@ + + + .removeData + .removeData + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/replaceAll.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/replaceAll.sublime-snippet new file mode 100644 index 0000000..386e534 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/replaceAll.sublime-snippet @@ -0,0 +1,6 @@ + + + .replaceAll + .replaceAll + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/replaceWith.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/replaceWith.sublime-snippet new file mode 100644 index 0000000..d85dbdb --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/replaceWith.sublime-snippet @@ -0,0 +1,7 @@ + + + .replaceWith + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/reset.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/reset.sublime-snippet new file mode 100644 index 0000000..9f549fb --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/reset.sublime-snippet @@ -0,0 +1,8 @@ + + + .reset + .reset() + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/resize.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/resize.sublime-snippet new file mode 100644 index 0000000..46a84c0 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/resize.sublime-snippet @@ -0,0 +1,8 @@ + + + .resize + .resize + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/resolve.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/resolve.sublime-snippet new file mode 100644 index 0000000..ef0fee0 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/resolve.sublime-snippet @@ -0,0 +1,5 @@ + + + .resolve + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/resolveWith.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/resolveWith.sublime-snippet new file mode 100644 index 0000000..9e8bf78 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/resolveWith.sublime-snippet @@ -0,0 +1,5 @@ + + + .resolveWith + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/scroll.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/scroll.sublime-snippet new file mode 100644 index 0000000..e693f26 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/scroll.sublime-snippet @@ -0,0 +1,7 @@ + + + .scroll + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/scrollLeft.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/scrollLeft.sublime-snippet new file mode 100644 index 0000000..ca6233c --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/scrollLeft.sublime-snippet @@ -0,0 +1,5 @@ + + + .scrollLeft + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/scrollTop.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/scrollTop.sublime-snippet new file mode 100644 index 0000000..f34722d --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/scrollTop.sublime-snippet @@ -0,0 +1,5 @@ + + + .scrollTop + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/select.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/select.sublime-snippet new file mode 100644 index 0000000..d477f17 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/select.sublime-snippet @@ -0,0 +1,8 @@ + + + .select + .select() + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/serialize.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/serialize.sublime-snippet new file mode 100644 index 0000000..4c90b7a --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/serialize.sublime-snippet @@ -0,0 +1,6 @@ + + + .serialize + .serialize() + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/serializeArray.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/serializeArray.sublime-snippet new file mode 100644 index 0000000..1543b12 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/serializeArray.sublime-snippet @@ -0,0 +1,6 @@ + + + .serializeArray + .serializeArray() + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/show.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/show.sublime-snippet new file mode 100644 index 0000000..05a44d2 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/show.sublime-snippet @@ -0,0 +1,7 @@ + + + .show + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/siblings.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/siblings.sublime-snippet new file mode 100644 index 0000000..7988df3 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/siblings.sublime-snippet @@ -0,0 +1,5 @@ + + + .siblings + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/size.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/size.sublime-snippet new file mode 100644 index 0000000..977c91d --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/size.sublime-snippet @@ -0,0 +1,6 @@ + + + .size + .size() + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/slice.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/slice.sublime-snippet new file mode 100644 index 0000000..b9ad010 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/slice.sublime-snippet @@ -0,0 +1,5 @@ + + + .slice + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/slideDown.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/slideDown.sublime-snippet new file mode 100644 index 0000000..3a2ef9d --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/slideDown.sublime-snippet @@ -0,0 +1,8 @@ + + + .slideDown + .slideDown() + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/slideToggle.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/slideToggle.sublime-snippet new file mode 100644 index 0000000..c0f63c3 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/slideToggle.sublime-snippet @@ -0,0 +1,5 @@ + + + .slideToggle + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/slideUp.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/slideUp.sublime-snippet new file mode 100644 index 0000000..431bc1f --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/slideUp.sublime-snippet @@ -0,0 +1,5 @@ + + + .slideUp + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/stop.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/stop.sublime-snippet new file mode 100644 index 0000000..92b6ee4 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/stop.sublime-snippet @@ -0,0 +1,5 @@ + + + .stop + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/submit.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/submit.sublime-snippet new file mode 100644 index 0000000..9d9bbb6 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/submit.sublime-snippet @@ -0,0 +1,7 @@ + + + .submit + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/text.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/text.sublime-snippet new file mode 100644 index 0000000..bca7fb6 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/text.sublime-snippet @@ -0,0 +1,6 @@ + + + .text + .text + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/then.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/then.sublime-snippet new file mode 100644 index 0000000..8ef9ae7 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/then.sublime-snippet @@ -0,0 +1,5 @@ + + + .then + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/this.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/this.sublime-snippet new file mode 100644 index 0000000..d1f065e --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/this.sublime-snippet @@ -0,0 +1,6 @@ + + + this + $(this) + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/toArray.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/toArray.sublime-snippet new file mode 100644 index 0000000..d438a7a --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/toArray.sublime-snippet @@ -0,0 +1,5 @@ + + + .toArray + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/toggle-showHide.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/toggle-showHide.sublime-snippet new file mode 100644 index 0000000..cb1a700 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/toggle-showHide.sublime-snippet @@ -0,0 +1,6 @@ + + + .toggle + toggle (show/hide) + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/toggleClass.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/toggleClass.sublime-snippet new file mode 100644 index 0000000..20fd02e --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/toggleClass.sublime-snippet @@ -0,0 +1,7 @@ + + + .toggleClass + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/toggleEvent.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/toggleEvent.sublime-snippet new file mode 100644 index 0000000..7805a53 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/toggleEvent.sublime-snippet @@ -0,0 +1,11 @@ + + + .toggle + .toggle + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/trigger.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/trigger.sublime-snippet new file mode 100644 index 0000000..e1dd0b6 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/trigger.sublime-snippet @@ -0,0 +1,5 @@ + + + .trigger + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/triggerHandler.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/triggerHandler.sublime-snippet new file mode 100644 index 0000000..7691aed --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/triggerHandler.sublime-snippet @@ -0,0 +1,5 @@ + + + .triggerHandler + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/unbind.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/unbind.sublime-snippet new file mode 100644 index 0000000..927c3f3 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/unbind.sublime-snippet @@ -0,0 +1,5 @@ + + + .unbind + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/undelegate.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/undelegate.sublime-snippet new file mode 100644 index 0000000..b4166e7 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/undelegate.sublime-snippet @@ -0,0 +1,5 @@ + + + .undelegate + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/unwrap.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/unwrap.sublime-snippet new file mode 100644 index 0000000..821a763 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/unwrap.sublime-snippet @@ -0,0 +1,6 @@ + + + .unwrap + .unwrap() + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/val.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/val.sublime-snippet new file mode 100644 index 0000000..ad933f4 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/val.sublime-snippet @@ -0,0 +1,6 @@ + + + .val + .val + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/width.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/width.sublime-snippet new file mode 100644 index 0000000..229621f --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/width.sublime-snippet @@ -0,0 +1,6 @@ + + + .width + .width + source.js + \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/wrap.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/wrap.sublime-snippet new file mode 100644 index 0000000..aa95000 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/wrap.sublime-snippet @@ -0,0 +1,5 @@ + + + .wrap + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/wrapAll.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/wrapAll.sublime-snippet new file mode 100644 index 0000000..6a9e0a2 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/wrapAll.sublime-snippet @@ -0,0 +1,5 @@ + + + .wrapAll + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/wrapInner.sublime-snippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/wrapInner.sublime-snippet new file mode 100644 index 0000000..6dba0bb --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/jQuery/wrapInner.sublime-snippet @@ -0,0 +1,5 @@ + + + .wrapInner + source.js + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/.gitignore b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/.gitignore new file mode 100644 index 0000000..0069ea0 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/.gitignore @@ -0,0 +1,10 @@ +/package-metadata.json +*.pyc +*.cache +*.sublime-project +*.sublime-workspace +Test.* +code +spec +src +lib diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/CoffeeScript.py b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/CoffeeScript.py new file mode 100644 index 0000000..d10803a --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/CoffeeScript.py @@ -0,0 +1,462 @@ +#aponxi v0.6.0 +import sublime +import sys +from os import path +import os +from subprocess import Popen, PIPE +from sublime_plugin import TextCommand +from sublime_plugin import WindowCommand +import sublime_plugin +import time +import functools + +settings = sublime.load_settings('CoffeeScript.sublime-settings') + + +def run(cmd, args=[], source="", cwd=None, env=None): + if not type(args) is list: + args = [args] + if sys.platform == "win32": + proc = Popen([cmd] + args, env=env, cwd=cwd, stdout=PIPE, stdin=PIPE, stderr=PIPE, shell=True) + stat = proc.communicate(input=source.encode('utf-8')) + else: + if env is None: + env = {"PATH": settings.get('binDir', '/usr/local/bin')} + if source == "": + command = [cmd] + args + else: + command = [cmd] + args + [source] + # print "Debug - coffee command: " + # print command + proc = Popen(command, env=env, cwd=cwd, stdout=PIPE, stderr=PIPE) + stat = proc.communicate() + okay = proc.returncode == 0 + return {"okay": okay, "out": stat[0].decode('utf-8'), "err": stat[1].decode('utf-8')} + + +def brew(args, source): + if sys.platform == "win32": + args.append("-s") + else: + args.append("-e") + return run("coffee", args=args, source=source) + + +def cake(task, cwd): + return run("cake", args=task, cwd=cwd) + + +def isCoffee(view=None): + if view is None: + view = sublime.active_window().active_view() + return 'source.coffee' in view.scope_name(0) + + +class Text(): + @staticmethod + def all(view): + return view.substr(sublime.Region(0, view.size())) + + @staticmethod + def sel(view): + text = [] + for region in view.sel(): + if region.empty(): + continue + text.append(view.substr(region)) + return "".join(text) + + @staticmethod + def get(view): + text = Text.sel(view) + if len(text) > 0: + return text + return Text.all(view) + + +class CompileCommand(TextCommand): + def is_enabled(self): + return isCoffee(self.view) + + def run(self, *args, **kwargs): + no_wrapper = settings.get('noWrapper', True) + compile_dir = settings.get('compileDir') + args = ['-c', self.view.file_name()] + # print self.view.file_name() + if no_wrapper: + args = ['-b'] + args + # print compile_dir + # print isinstance(compile_dir, unicode) + if compile_dir and isinstance(compile_dir, str) or isinstance(compile_dir, unicode): + print "Compile dir specified: " + compile_dir + if not os.path.exists(compile_dir): + os.makedirs(compile_dir) + print "Compile dir did not exist, created folder: " + compile_dir + folder, file_nm = os.path.split(self.view.file_name()) + print folder + args = ['--output', compile_dir] + args + # print args + # print args + result = run("coffee", args=args) + + if result['okay'] is True: + status = 'Compilation Succeeded' + else: + status = 'Compilation Failed' + + sublime.status_message(status) + + +class CompileAndDisplayCommand(TextCommand): + def is_enabled(self): + return isCoffee(self.view) + + def run(self, edit, **kwargs): + output = self.view.window().new_file() + output.set_scratch(True) + opt = kwargs["opt"] + if opt == '-p': + output.set_syntax_file('Packages/JavaScript/JavaScript.tmLanguage') + no_wrapper = settings.get('noWrapper', True) + + args = [opt] + print args + if no_wrapper: + args = ['-b'] + args + + res = brew(args, Text.get(self.view)) + if res["okay"] is True: + output.insert(edit, 0, res["out"]) + else: + output.insert(edit, 0, res["err"].split("\n")[0]) + + +class CheckSyntaxCommand(TextCommand): + def is_enabled(self): + return isCoffee(self.view) + + def run(self, edit): + res = brew(['-b', '-p'], Text.get(self.view)) + if res["okay"] is True: + status = 'Valid' + else: + status = res["err"].split("\n")[0] + sublime.status_message('Syntax %s' % status) + + +class RunScriptCommand(WindowCommand): + def finish(self, text): + if text == '': + return + text = "{puts, print} = require 'util'\n" + text + res = brew(['-b'], text) + if res["okay"] is True: + output = self.window.new_file() + output.set_scratch(True) + edit = output.begin_edit() + output.insert(edit, 0, res["out"]) + output.end_edit(edit) + else: + sublime.status_message('Syntax %s' % res["err"].split("\n")[0]) + + def run(self): + sel = Text.sel(sublime.active_window().active_view()) + if len(sel) > 0: + if not isCoffee(): + return + self.finish(sel) + else: + self.window.show_input_panel('Coffee >', '', self.finish, None, None) + + +class RunCakeTaskCommand(WindowCommand): + def finish(self, task): + if task == '': + return + + if not self.window.folders(): + cakepath = path.dirname(self.window.active_view().file_name()) + else: + cakepath = path.join(self.window.folders()[0], 'Cakefile') + if not path.exists(cakepath): + cakepath = path.dirname(self.window.active_view().file_name()) + + if not path.exists(cakepath): + return sublime.status_message("Cakefile not found.") + + res = cake(task, cakepath) + if res["okay"] is True: + if "No such task" in res["out"]: + msg = "doesn't exist" + else: + msg = "suceeded" + else: + msg = "failed" + sublime.status_message("Task %s - %s." % (task, msg)) + + def run(self): + self.window.show_input_panel('Cake >', '', self.finish, None, None) + + +# _ +# __ _ _ __ ___ _ __ __ _(_) +# / _` | '_ \ / _ \| '_ \\ \/ / | +# | (_| | |_) | (_) | | | |> <| | +# \__,_| .__/ \___/|_| |_/_/\_\_| +# |_| + +def watched_filename(view_id): + view = ToggleWatch.views[view_id]['input_obj'] + if view.file_name() is not None: + filename = view.file_name().split('/')[-1] + else: + filename = "Unsaved File" + return filename + + +class ToggleWatch(TextCommand): + views = {} + outputs = {} + + def is_enabled(self): + return isCoffee(self.view) + + def run(self, edit): + myvid = self.view.id() + + if not myvid in ToggleWatch.views: + + views = ToggleWatch.views + views[myvid] = {'watched': True, 'modified': True, 'input_closed': False} + views[myvid]["input_obj"] = self.view + print "Now watching", watched_filename(myvid) + createOut(myvid) + + else: + views = ToggleWatch.views + + views[myvid]['watched'] = not views[myvid]['watched'] + if not views[myvid]['watched']: + print "Stopped watching", watched_filename(myvid) + + if views[myvid]['output_open'] is False: + print "Openning output and watching", watched_filename(myvid) + createOut(myvid) + + elif views[myvid]['watched'] is True: + print "Resuming watching", watched_filename(myvid) + refreshOut(myvid) + + +def cleanUp(input_view_id): + del ToggleWatch.outputs[ToggleWatch.views[input_view_id]['output_id']] + del ToggleWatch.views[input_view_id] + return + + +def get_output_filename(input_view_id): + input_filename = watched_filename(input_view_id) + fileName, fileExtension = os.path.splitext(input_filename) + output_filename = fileName + '.js' + return output_filename + + +def createOut(input_view_id): + #create output panel and save + this_view = ToggleWatch.views[input_view_id] + outputs = ToggleWatch.outputs + #print this_view + input_filename = watched_filename(input_view_id) + print input_filename + + output = this_view["input_obj"].window().new_file() + output.set_scratch(True) + output.set_syntax_file('Packages/JavaScript/JavaScript.tmLanguage') + this_view['output_id'] = output.id() + this_view["output_obj"] = output + this_view["output_open"] = True + # setting output filename + # print output.settings().set('filename', '[Compiled]' + input_filename) + # Getting file extension + output_filename = get_output_filename(input_view_id) + output.set_name(output_filename) + + if not output.id() in outputs: + outputs[output.id()] = {'boundto': input_view_id} + refreshOut(input_view_id) + return output + + +def refreshOut(view_id): + + this_view = ToggleWatch.views[view_id] + this_view['last_modified'] = time.mktime(time.gmtime()) + #refresh the output view + no_wrapper = settings.get('noWrapper', True) + + args = ['-p'] + if no_wrapper: + args = ['-b'] + args + + res = brew(args, Text.get(this_view['input_obj'])) + output = this_view['output_obj'] + this_view['modified'] = False + + if res["okay"] is True: + edit = output.begin_edit() + output.erase(edit, sublime.Region(0, output.size())) + output.insert(edit, 0, res["out"]) + output.end_edit(edit) + print "Refreshed" + else: + edit = output.begin_edit() + output.erase(edit, sublime.Region(0, output.size())) + output.insert(edit, 0, res["err"].split("\n")[0]) + output.end_edit(edit) + return + + +def isView(view_id): + # are they modifying a view (rather than a panel, etc.) + if not view_id: + return False + window = sublime.active_window() + view = window.active_view() if window != None else None + return (view is not None and view.id() == view_id) + + +def close_output(input_id): + views = ToggleWatch.views + v = views[input_id] + output = v['output_obj'] + # output_id = v['output_id'] + # print "close output" + if v['output_open'] is True: + #print "the output is open so we should attempt to close it" + output.window().focus_view(output) + output.window().run_command("close") + print watched_filename(input_id), "was closed. Closing the Output" + #v['output_open'] = False + cleanUp(input_id) + + return + + +class CaptureEditing(sublime_plugin.EventListener): + + def handleTimeout(self, vid): + this_view = ToggleWatch.views[vid] + modified = this_view['modified'] + if modified is True: + # been 1000ms since the last modification + #print "handling" + refreshOut(vid) + + def on_modified(self, view): + vid = view.id() + watch_modified = settings.get('watchOnModified') + + if watch_modified is not False and vid in ToggleWatch.views: + if watch_modified is True: + delay = 0.5 + elif watch_modified < 0.5: + delay = 0.5 + else: + delay = watch_modified + #then we have a watched input. + this_view = ToggleWatch.views[vid] + #print " this view is ", this_view + if this_view['modified'] is False: + this_view['modified'] = True + #print " trigger " + if this_view['watched'] is True: + sublime.set_timeout(functools.partial(self.handleTimeout, vid), int(delay * 1000)) + return + + def on_post_save(self, view): + # print "isCoffee " + str(isCoffee()) + watch_save = settings.get('watchOnSave', True) + if watch_save: + save_id = view.id() + views = ToggleWatch.views + if save_id in views: + # getting view object + save_view = ToggleWatch.views[save_id] + # check if modified + if save_view['modified'] is True: + refreshOut(save_id) + compile_on_save = settings.get('compileOnSave', True) + if compile_on_save is True and isCoffee() is True: + print "Compiling on save..." + view.run_command("compile") + show_compile_output_on_save = settings.get('showOutputOnSave', True) + if show_compile_output_on_save is True and isCoffee() is True and CompileOutput.IS_OPEN is True: + print "Updating output panel..." + view.run_command("compile_output") + + return + + def on_close(self, view): + close_id = view.id() + views = ToggleWatch.views + if close_id in views: + #this is an input + #print "input was closed" + views[close_id]['input_closed'] = True + close_output(close_id) + + if close_id in ToggleWatch.outputs and views[ToggleWatch.outputs[close_id]['boundto']]['input_closed'] is not True: + #this is an output + #print "an output was closed!" + boundview = ToggleWatch.outputs[close_id]['boundto'] + thatview = views[boundview] + thatview['output_open'] = False + thatview['watched'] = False + + filename = watched_filename(boundview) + print "The output was closed. No longer watching", filename + + return + + +class CompileOutput(TextCommand): + PANEL_NAME = 'coffee_compile_output' + IS_OPEN = False + + def is_enabled(self): + return isCoffee(self.view) + + def run(self, edit): + window = self.view.window() + + #refresh the output view + no_wrapper = settings.get('noWrapper', True) + + # args = ['-p'] + if no_wrapper: + args = ['-b'] + + res = brew(args, Text.get(self.view)) + panel = window.get_output_panel(self.PANEL_NAME) + panel.set_syntax_file('Packages/JavaScript/JavaScript.tmLanguage') + panel.set_read_only(False) + output = panel + # print res["err"] + + if res["okay"] is True: + edit = output.begin_edit() + output.erase(edit, sublime.Region(0, output.size())) + output.insert(edit, 0, res["out"]) + output.end_edit(edit) + # print "Refreshed" + else: + edit = output.begin_edit() + output.erase(edit, sublime.Region(0, output.size())) + output.insert(edit, 0, res["err"]) + output.end_edit(edit) + output.sel().clear() + output.set_read_only(True) + + window.run_command('show_panel', {'panel': 'output.%s' % self.PANEL_NAME}) + self.IS_OPEN = True + return diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/CoffeeScript.sublime-build b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/CoffeeScript.sublime-build new file mode 100644 index 0000000..07ddaf6 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/CoffeeScript.sublime-build @@ -0,0 +1,13 @@ +{ + "cmd": ["cake", "sbuild"] +, "path": "/usr/local/bin:$PATH" +, "selector": "source.coffee" +, "working_dir": "$project_path" +, "variants": + [ + { + "name": "Run", + "cmd": ["coffee", "$file"] + } + ] +} diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/CoffeeScript.sublime-commands b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/CoffeeScript.sublime-commands new file mode 100644 index 0000000..a359182 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/CoffeeScript.sublime-commands @@ -0,0 +1,42 @@ +[ + { + "caption": "Coffee: Check Syntax" + , "command": "check_syntax" + } +, { + "caption": "Coffee: Run Script" + , "command": "run_script" + } +, { + "caption": "Coffee: Run Cake Task" + , "command": "run_cake_task" + } +, { + "caption": "Coffee: Compile File" + , "command": "compile" + } +, { + "caption": "Coffee: Display JavaScript" + , "command": "compile_and_display", "args": {"opt": "-p"} + } +, { + "caption": "Coffee: Display Lexer Tokens" + , "command": "compile_and_display", "args": {"opt": "-t"} + } +, { + "caption": "Coffee: Display Parse Tree" + , "command": "compile_and_display", "args": {"opt": "-n"} + } +, { + "caption": "Coffee: Toggle Watch Mode" + , "command": "toggle_watch" + } +, { + "caption": "Coffee: Toggle Output Panel" + , "command": "toggle_output_panel" + } +, { + "caption": "Coffee: Show Compiled" + , "command": "compile_output" + } +] diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/CoffeeScript.sublime-settings b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/CoffeeScript.sublime-settings new file mode 100644 index 0000000..bedc4be --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/CoffeeScript.sublime-settings @@ -0,0 +1,52 @@ +{ + /* + The directory containing your coffee binary. Usually + /usr/local/bin. + */ + "binDir": "/usr/local/bin" + + /* + Compile without the top-level function wrapper (coffee -b). + */ + +, "noWrapper": true + + /* + Enable or disable refresh the compiled Output on Save. + Only available for watch mode. + */ +, "watchOnSave": true + /* + Enable refreshing compiled JS when CoffeeScript is modified. + + Put false to disable + Put a number of seconds to delay the refresh + */ +, "watchOnModified": 0.5 + /* + Enable Compiling on save. It will compile into the same folder. + */ +, "compileOnSave": true + /* + ## Enable outputting the results of the compiled coffeescript in a panel + */ +, "showOutputOnSave": false + /* + ## Enable compiling to a specific directory. + #### Description + + if it is a string like 'some/directory' then `-o some/directory` will be added to `coffee` compiler. + if it is false or not string then it will compile your `script.coffee` to the directory it is in. + + #### Example: + Directory is relative to the file you are editting if specified such as + compileDir": "out" + Directory is absolute if specified such as + compileDir": "/home/logan/Desktop/out" + + */ +, "compileDir": false + + + +} diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/CoffeeScript.tmLanguage b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/CoffeeScript.tmLanguage new file mode 100644 index 0000000..bd06348 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/CoffeeScript.tmLanguage @@ -0,0 +1,746 @@ + + + + + comment + CoffeeScript Syntax: version 1 + fileTypes + + coffee + Cakefile + coffee.erb + cson + + firstLineMatch + ^#!.*\bcoffee + foldingStartMarker + ^\s*class\s+\S.*$|.*(->|=>)\s*$|.*[\[{]\s*$ + foldingStopMarker + ^\s*$|^\s*[}\]]\s*$ + keyEquivalent + ^~C + name + CoffeeScript + patterns + + + captures + + 1 + + name + variable.parameter.function.coffee + + 2 + + name + storage.type.function.coffee + + + comment + match stuff like: a -> … + match + (\([^()]*?\))\s*([=-]>) + name + meta.inline.function.coffee + + + captures + + 1 + + name + keyword.operator.new.coffee + + 2 + + name + support.class.coffee + + + match + (new)\s+(\w+(?:\.\w*)*) + name + meta.class.instance.constructor + + + begin + ''' + beginCaptures + + 0 + + name + punctuation.definition.string.begin.coffee + + + end + ''' + endCaptures + + 0 + + name + punctuation.definition.string.end.coffee + + + name + string.quoted.heredoc.coffee + + + begin + """ + beginCaptures + + 0 + + name + punctuation.definition.string.begin.coffee + + + end + """ + endCaptures + + 0 + + name + punctuation.definition.string.end.coffee + + + name + string.quoted.double.heredoc.coffee + patterns + + + match + \\. + name + constant.character.escape.coffee + + + include + #interpolated_coffee + + + + + begin + ` + beginCaptures + + 0 + + name + punctuation.definition.string.begin.coffee + + + end + ` + endCaptures + + 0 + + name + punctuation.definition.string.end.coffee + + + name + string.quoted.script.coffee + patterns + + + match + \\(x\h{2}|[0-2][0-7]{,2}|3[0-6][0-7]|37[0-7]?|[4-7][0-7]?|.) + name + constant.character.escape.coffee + + + + + begin + (?<!#)###(?!#) + captures + + 0 + + name + punctuation.definition.comment.coffee + + + end + ###(?:[ \t]*\n) + name + comment.block.coffee + patterns + + + match + @\w* + name + storage.type.annotation.coffeescript + + + + + captures + + 1 + + name + punctuation.definition.comment.coffee + + + match + (#)(?!\{).*$\n? + name + comment.line.number-sign.coffee + + + begin + /{3} + end + /{3}[imgy]{0,4} + name + string.regexp.coffee + patterns + + + include + #interpolated_coffee + + + include + #embedded_comment + + + + + match + /(?![\s=/*+{}?]).*?[^\\]/[igmy]{0,4}(?![a-zA-Z0-9]) + name + string.regexp.coffee + + + match + (?x) + \b(?<![\.\$])( + break|by|catch|continue|else|finally|for|in|of|if|return|switch| + then|throw|try|unless|when|while|until|loop|do|(?<=for)\s+own + )(?!\s*:)\b + + name + keyword.control.coffee + + + match + (?x) + and=|or=|!|%|&|\^|\*|\/|(\-)?\-(?!>)|\+\+|\+|~|==|=(?!>)|!=|<=|>=|<<=|>>=| + >>>=|<>|<|>|!|&&|\.\.(\.)?|\?|\||\|\||\:|\*=|(?<!\()/=|%=|\+=|\-=|&=| + \^=|\b(?<![\.\$])(instanceof|new|delete|typeof|and|or|is|isnt|not|super)\b + + name + keyword.operator.coffee + + + captures + + 1 + + name + variable.assignment.coffee + + 4 + + name + punctuation.separator.key-value + + 5 + + name + keyword.operator.coffee + + + match + ([a-zA-Z\$_](\w|\$|\.)*\s*(?!\::)((:)|(=[^=]))(?!(\s*\(.*\))?\s*((=|-)>))) + name + variable.assignment.coffee + + + begin + (?<=\s|^)([\[\{])(?=.*?[\]\}]\s+[:=]) + beginCaptures + + 0 + + name + keyword.operator.coffee + + + end + ([\]\}]\s*[:=]) + endCaptures + + 0 + + name + keyword.operator.coffee + + + name + meta.variable.assignment.destructured.coffee + patterns + + + include + #variable_name + + + include + #instance_variable + + + include + #single_quoted_string + + + include + #double_quoted_string + + + include + #numeric + + + + + captures + + 2 + + name + entity.name.function.coffee + + 3 + + name + entity.name.function.coffee + + 4 + + name + variable.parameter.function.coffee + + 5 + + name + storage.type.function.coffee + + + match + (?x) + (\s*) + (?=[a-zA-Z\$_]) + ( + [a-zA-Z\$_](\w|\$|:|\.)*\s* + (?=[:=](\s*\(.*\))?\s*([=-]>)) + ) + + name + meta.function.coffee + + + comment + Show well-known functions from Express and Mocha in Go To Symbol view + name + meta.function.symbols.coffee + begin + ^\s*(describe|it|app\.(get|post|put|all|del|delete)) + end + $ + patterns + + + include + $self + + + + + match + [=-]> + name + storage.type.function.coffee + + + match + \b(?<!\.)(true|on|yes)(?!\s*[:=])\b + name + constant.language.boolean.true.coffee + + + match + \b(?<!\.)(false|off|no)(?!\s*[:=])\b + name + constant.language.boolean.false.coffee + + + match + \b(?<!\.)null(?!\s*[:=])\b + name + constant.language.null.coffee + + + match + \b(?<!\.)(this|extends)(?!\s*[:=])\b + name + variable.language.coffee + + + captures + + 1 + + name + storage.type.class.coffee + + 2 + + name + entity.name.type.class.coffee + + 3 + + name + keyword.control.inheritance.coffee + + 4 + + name + entity.other.inherited-class.coffee + + + match + (class\b)\s+(@?[a-zA-Z\$_][\w\.]*)?(?:\s+(extends)\s+(@?[a-zA-Z\$\._][\w\.]*))? + name + meta.class.coffee + + + match + \b(debugger|\\)\b + name + keyword.other.coffee + + + match + (?x)\b( + Array|ArrayBuffer|Blob|Boolean|Date|document|event|Function| + Int(8|16|32|64)Array|Math|Map|Number| + Object|Proxy|RegExp|Set|String|WeakMap| + window|Uint(8|16|32|64)Array|XMLHttpRequest + )\b + name + support.class.coffee + + + match + ((?<=console\.)(debug|warn|info|log|error|time|timeEnd|assert))\b + name + support.function.console.coffee + + + match + (?x)\b( + decodeURI(Component)?|encodeURI(Component)?|eval|parse(Float|Int)|require + )\b + name + support.function.coffee + + + match + (?x)((?<=\.)( + apply|call|concat|every|filter|forEach|from|hasOwnProperty|indexOf| + isPrototypeOf|join|lastIndexOf|map|of|pop|propertyIsEnumerable|push| + reduce(Right)?|reverse|shift|slice|some|sort|splice|to(Locale)?String| + unshift|valueOf + ))\b + name + support.function.method.array.coffee + + + match + (?x)((?<=Array\.)( + isArray + ))\b + name + support.function.static.array.coffee + + + match + (?x)((?<=Object\.)( + create|definePropert(ies|y)|freeze|getOwnProperty(Descriptors?|Names)| + getProperty(Descriptor|Names)|getPrototypeOf|is(Extensible|Frozen|Sealed)?| + isnt|keys|preventExtensions|seal + ))\b + name + support.function.static.object.coffee + + + match + (?x)((?<=Math\.)( + abs|acos|acosh|asin|asinh|atan|atan2|atanh|ceil|cos|cosh|exp|expm1|floor| + hypot|log|log10|log1p|log2|max|min|pow|random|round|sign|sin|sinh|sqrt| + tan|tanh|trunc + ))\b + name + support.function.static.math.coffee + + + match + (?x)((?<=Number\.)( + is(Finite|Integer|NaN)|toInteger + ))\b + name + support.function.static.number.coffee + + + match + \b(Infinity|NaN|undefined)\b + name + constant.language.coffee + + + match + \; + name + punctuation.terminator.statement.coffee + + + match + ,[ |\t]* + name + meta.delimiter.object.comma.coffee + + + match + \. + name + meta.delimiter.method.period.coffee + + + match + \{|\} + name + meta.brace.curly.coffee + + + match + \(|\) + name + meta.brace.round.coffee + + + match + \[|\]\s* + name + meta.brace.square.coffee + + + include + #instance_variable + + + include + #single_quoted_string + + + include + #double_quoted_string + + + include + #numeric + + + repository + + double_quoted_string + + patterns + + + begin + " + beginCaptures + + 0 + + name + punctuation.definition.string.begin.coffee + + + end + " + endCaptures + + 0 + + name + punctuation.definition.string.end.coffee + + + name + string.quoted.double.coffee + patterns + + + match + \\(x\h{2}|[0-2][0-7]{,2}|3[0-6][0-7]|37[0-7]?|[4-7][0-7]?|.) + name + constant.character.escape.coffee + + + include + #interpolated_coffee + + + + + + embedded_comment + + patterns + + + captures + + 1 + + name + punctuation.definition.comment.coffee + + + match + (?<!\\)(#).*$\n? + name + comment.line.number-sign.coffee + + + + instance_variable + + patterns + + + match + (@)([a-zA-Z_\$]\w*)? + name + variable.other.readwrite.instance.coffee + + + + interpolated_coffee + + patterns + + + begin + \#\{ + captures + + 0 + + name + punctuation.section.embedded.coffee + + + end + \} + name + source.coffee.embedded.source + patterns + + + include + $self + + + + + + numeric + + patterns + + + match + (?<!\$)\b((0([box])[0-9a-fA-F]+)|([0-9]+(\.[0-9]+)?(e[+\-]?[0-9]+)?))\b + name + constant.numeric.coffee + + + + single_quoted_string + + patterns + + + begin + ' + beginCaptures + + 0 + + name + punctuation.definition.string.begin.coffee + + + end + ' + endCaptures + + 0 + + name + punctuation.definition.string.end.coffee + + + name + string.quoted.single.coffee + patterns + + + match + \\(x\h{2}|[0-2][0-7]{,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.) + name + constant.character.escape.coffee + + + + + + variable_name + + patterns + + + captures + + 1 + + name + variable.assignment.coffee + + + match + ([a-zA-Z\$_]\w*(\.\w+)*) + name + variable.assignment.coffee + + + + + scopeName + source.coffee + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/CoffeeScript.tmPreferences b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/CoffeeScript.tmPreferences new file mode 100644 index 0000000..74b8b17 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/CoffeeScript.tmPreferences @@ -0,0 +1,34 @@ + + + + + name + Comments + scope + source.coffee + settings + + shellVariables + + + name + TM_COMMENT_START + value + # + + + name + TM_COMMENT_START_2 + value + ### + + + name + TM_COMMENT_END_2 + value + ### + + + + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Indent.tmPreferences b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Indent.tmPreferences new file mode 100644 index 0000000..5884402 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Indent.tmPreferences @@ -0,0 +1,25 @@ + + + + + name + Indent + scope + source.coffee + settings + + decreaseIndentPattern + ^\s*(\}|\]|else|catch|finally)$ + increaseIndentPattern + (?x) + ^\s* + (.*class + |[a-zA-Z\$_](\w|\$|:|\.)*\s*(?=\:(\s*\(.*\))?\s*((=|-)>\s*$)) # function that is not one line + |[a-zA-Z\$_](\w|\$|\.)*\s*(:|=)\s*((if|while)(?!.*?then)|for|$) # assignment using multiline if/while/for + |(if|while)\b(?!.*?then)|for\b + |(try|finally|catch\s+\S.*)\s*$ + |.*[-=]>$ + |.*[\{\[]$) + + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Keymaps/Default (Linux).sublime-keymap b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Keymaps/Default (Linux).sublime-keymap new file mode 100644 index 0000000..7514a1a --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Keymaps/Default (Linux).sublime-keymap @@ -0,0 +1,11 @@ +[ + {"keys": ["alt+shift+s"], "command": "check_syntax"} +, {"keys": ["alt+shift+r"], "command": "run_script"} +, {"keys": ["alt+shift+t"], "command": "run_cake_task"} +, {"keys": ["alt+shift+c"], "command": "compile"} +, {"keys": ["alt+shift+d"], "command": "compile_and_display", "args": {"opt": "-p"}} +, {"keys": ["alt+shift+l"], "command": "compile_and_display", "args": {"opt": "-t"}} +, {"keys": ["alt+shift+n"], "command": "compile_and_display", "args": {"opt": "-n"}} +, {"keys": ["alt+shift+w"], "command": "toggle_watch"} +, {"keys": ["alt+shift+z"], "command": "toggle_output_panel"} +] diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Keymaps/Default (OSX).sublime-keymap b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Keymaps/Default (OSX).sublime-keymap new file mode 100644 index 0000000..5bc81d1 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Keymaps/Default (OSX).sublime-keymap @@ -0,0 +1,11 @@ +[ + {"keys": ["alt+shift+s"], "command": "check_syntax"} +, {"keys": ["alt+shift+r"], "command": "run_script"} +, {"keys": ["alt+shift+t"], "command": "run_cake_task"} +, {"keys": ["alt+shift+c"], "command": "compile"} +, {"keys": ["alt+shift+d"], "command": "compile_and_display", "args": {"opt": "-p"}} +, {"keys": ["alt+shift+x"], "command": "compile_and_display", "args": {"opt": "-t"}} +, {"keys": ["alt+shift+n"], "command": "compile_and_display", "args": {"opt": "-n"}} +, {"keys": ["alt+shift+w"], "command": "toggle_watch"} +, {"keys": ["alt+shift+z"], "command": "toggle_output_panel"} +] diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Keymaps/Default (Windows).sublime-keymap b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Keymaps/Default (Windows).sublime-keymap new file mode 100644 index 0000000..7514a1a --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Keymaps/Default (Windows).sublime-keymap @@ -0,0 +1,11 @@ +[ + {"keys": ["alt+shift+s"], "command": "check_syntax"} +, {"keys": ["alt+shift+r"], "command": "run_script"} +, {"keys": ["alt+shift+t"], "command": "run_cake_task"} +, {"keys": ["alt+shift+c"], "command": "compile"} +, {"keys": ["alt+shift+d"], "command": "compile_and_display", "args": {"opt": "-p"}} +, {"keys": ["alt+shift+l"], "command": "compile_and_display", "args": {"opt": "-t"}} +, {"keys": ["alt+shift+n"], "command": "compile_and_display", "args": {"opt": "-n"}} +, {"keys": ["alt+shift+w"], "command": "toggle_watch"} +, {"keys": ["alt+shift+z"], "command": "toggle_output_panel"} +] diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Menu/Context.sublime-menu b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Menu/Context.sublime-menu new file mode 100644 index 0000000..97d16ed --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Menu/Context.sublime-menu @@ -0,0 +1,3 @@ +[ + { "command": "compile_output" } +] diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Menu/Main.sublime-menu b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Menu/Main.sublime-menu new file mode 100644 index 0000000..6d01a4a --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Menu/Main.sublime-menu @@ -0,0 +1,59 @@ +[ + { + "caption": "Preferences", + "mnemonic": "n", + "id": "preferences", + "children": + [ + { + "caption": "Package Settings", + "mnemonic": "P", + "id": "package-settings", + "children": + [ + { + "caption": "Better Coffeescript", + "children": + [ + { + "command": "open_file", + "args": {"file": "${packages}/sublime-better-coffeescript/CoffeeScript.sublime-settings"}, + "caption": "Settings – Default" + }, + { + "command": "open_file", + "args": {"file": "${packages}/User/CoffeeScript.sublime-settings"}, + "caption": "Settings – User" + }, + { + "command": "open_file", + "args": { + "file": "${packages}/sublime-better-coffeescript/Keymaps/Default (Windows).sublime-keymap", + "platform": "Windows" + }, + "caption": "Key Bindings – Default" + }, + { + "command": "open_file", + "args": { + "file": "${packages}/sublime-better-coffeescript/Keymaps/Default (OSX).sublime-keymap", + "platform": "OSX" + }, + "caption": "Key Bindings – Default" + }, + { + "command": "open_file", + "args": { + "file": "${packages}/sublime-better-coffeescript/Keymaps/Default (Linux).sublime-keymap", + "platform": "Linux" + }, + "caption": "Key Bindings – Default" + }, + { "caption": "-" } + ] + } + ] + } + ] + } +] diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/README.md b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/README.md new file mode 100644 index 0000000..e8dcf54 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/README.md @@ -0,0 +1,296 @@ + + __ + __ _____ ___ ___ __ _/\_\ + /'__`\ /\ '__`\ / __`\ /' _ `\ /\ \/'\/\ \ + /\ \L\.\_\ \ \L\ \/\ \L\ \/\ \/\ \\/> This is the recommended installation method. + +If you have Sublime Package Control, you know what to do. If not, well: it's a package manager for Sublime Text 2; it's awesome and you can [read about it here](http://wbond.net/sublime_packages/package_control). + +To install Package Control, open the Python Console (`ctrl+'` or ``cmd+` ``) and paste the following into it: + + import urllib2,os; pf='Package Control.sublime-package'; ipp=sublime.installed_packages_path(); os.makedirs(ipp) if not os.path.exists(ipp) else None; urllib2.install_opener(urllib2.build_opener(urllib2.ProxyHandler())); open(os.path.join(ipp,pf),'wb').write(urllib2.urlopen('http://sublime.wbond.net/'+pf.replace(' ','%20')).read()); print 'Please restart Sublime Text to finish installation' + +After installing the package and restarting the editor: + +* Open the Command Pallete (`ctrl+shift+P` or `cmd+shift+P`). +* Type "Install Package" and hit return. +* Type "sublime-better-coffeescript" and hit return. + +## via Source Control + +> If you plan to contribute, then you should install via this method. Otherwise it is recommended that you install the package via Package Control, see above. + +Sublime stores packages in the following locations: + + Nix: ~/.config/sublime-text-2/packages + Mac: ~/Library/Application\ Support/Sublime\ Text\ 2/Packages + Win: %APPDATA%\Sublime Text 2\Packages + +### As a repository within the packages directory + +Open a Terminal/Console and run the following commands, replacing `PACKAGE_PATH` with the path corresponding to your OS above. + + cd PACKAGE_PATH + git clone https://github.com/aponxi/sublime-better-coffeescript.git "sublime-better-coffeescript" + +### As a repository outside of the packages directory + +If you use Github for Mac/Windows which store repositories in a specific location, or if you just don't want a repository in your packages directory, then instead you can use a link. + +If you don't yet have the repository, then grab it via your GUI program or via the command line: + + cd WHEREVER_YOU_WANT + git clone https://github.com/aponxi/sublime-better-coffeescript.git + +Once that is done, we will create the link: + +#### Windows: + + cd PACKAGE_PATH + mklink /D sublime-better-coffeescript ABSOLUTE_PATH_TO_REPOSITORY + +#### Nix/Mac: + + cd PACKAGE_PATH + ln -s ABSOLUTE_PATH_TO_REPOSITORY sublime-better-coffeescript + +#### A note on Package Control + +When Package Control tries to update your packages, if you have a repository in your packages directory then it will try to pull down and merge any changes. If you don't want this to happen and would rather handle everything yourself, then you can add the following to your settings (Preferences » Package Settings » Package Control » Settings - User): + + "auto_upgrade_ignore": ["sublime-better-coffeescript"] + +# Updating + +If you are using Package Control, updating will be automatic and you don't have to worry about it. + +If using Source Control: + + cd PACKAGE_PATH/CoffeeScript + git fetch origin + git merge origin/master + +# Commands/Shortcuts + +You can access the commands either using the command palette (`ctrl+shift+P` or `cmd+shift+P`) or via shortcuts. + + alt+shift+t - Run a Cake task + alt+shift+r - Run some CoffeeScript (puts/print is available for output) + alt+shift+s - Run a syntax check + alt+shift+c - Compile a file + alt+shift+d - Display compiled JavaScript + alt+shift+l - Display lexer tokens + alt+shift+n - Display parser nodes + alt+shift+w - Toggle watch mode + alt+shift+p - Toggle output panel + + +Context menu has `Compile Output` that compiles the current CoffeeScript and outputs the javascript code that is run, in a panel. + +**Note:** Some of the commands use the Status Bar for output, so you'll probably want to enable it (Tools » Show Status Bar). + + + +# Snippets + +- Use `TAB` to run a snippet after typing the trigger. +- Use `TAB` and `shift+TAB` to cycle forward/backward through fields. +- Use `ESC` to exit snippet mode. + +### Snippet Triggers + +**Comprehension** + + Array: forin + Object: forof + Range: fori (inclusive) + Range: forx (exclusive) + +**Statements** + + If: if + Else: el + If Else: ifel + Else If: elif + Switch: swi + Ternary: ter + Try Catch: try + Unless: unl + +**Classes** + + Class - cla + +**Other** + + Function: - + Function: = (bound) + Interpolation: # + +# Building + +> When using the build system, it is assumed that your `.sublime-project` file lives in your project's base directory (due to limitations with the build system). + +Hitting `F7` (Tools » Build) will run the Cake task 'sbuild'. + +If you're not quite sure what the point of this is then read on. + +Let's say before distributing your project that you would like to combine all of your `.js` files into one and then minify them them using UglifyJS or something. + +That's what this is for! You would create a `Cakefile` and inside it you would write a task: + + task 'sbuild', 'Prepare project for distribution.', -> + # ... + +# Settings + +Go to `Preferences > Package Settings > CoffeeScript > Settings - User` to change settings. + +```Javascript +{ + /* + The directory containing your coffee binary. Usually + /usr/local/bin. + */ + "binDir": "/usr/local/bin" + + /* + Compile without the top-level function wrapper (coffee -b). + */ + +, "noWrapper": true + + /* + Enable or disable refresh the compiled Output on Save. + Only available for watch mode. + */ +, "watchOnSave": true + /* + Enable refreshing compiled JS when CoffeeScript is modified. + + Put false to disable + Put a number of seconds to delay the refresh + */ +, "watchOnModified": 0.5 + /* + Enable Compiling on save. It will compile into the same folder. + */ +, "compileOnSave": true + /* + ## Enable outputting the results of the compiled coffeescript in a panel + */ +, "showOutputOnSave": false + /* + ## Enable compiling to a specific directory. + #### Description + + if it is a string like 'some/directory' then `-o some/directory` will be added to `coffee` compiler. + if it is false or not string then it will compile your `script.coffee` to the directory it is in. + + #### Example: + Directory is relative to the file you are editting if specified such as + compileDir": "out" + Directory is absolute if specified such as + compileDir": "/home/logan/Desktop/out" + + */ +, "compileDir": false + + + +} + +``` +# Latest Changelog + +### v0.6.3 25/Jan/2013 +* added compileDir option which specifies `coffee -o` arg when compiling. +* Fixed settings file name. It was Coffeescript when it should have been CoffeeScript. Fixes #19 +* compileDir path works only if it exists. +* now also works if it doesn't exist. +* changed default compileDir option to false thus compiling a coffee script to the same directory as default. + +### v0.6.2 16/Jan/2013 +- Updated package.json, bumped up version. + +### v0.6.1 16/Jan/2013 +- Added utf-8 encode/decode to prevent unicode decode errors, fixed #17 +- Corrected years in 0.6 changelog... Should get used to it by now. +- Added error output in panel which fixes #16 + +### v0.6 Changelog - 16/Jan/2013 + +- Changed menu name to "Better Coffeescript" +- Changed menu arguments to be directed to `sublime-better-coffeescript` folders, settings files are still kept as `Coffeescript.sublime-settings` +- Fixed lint errors +- if delay is lower than < 0.5 then we are saying that minimum delay should be 0.5 +- added a method that gets the input's filename with .js extension +- setting the output view's name as filename.js fixes #13 +- added compileOnSave option fixes #14 +- updated readme fixes #6 +- added compile output class +- added compile_output command, it displays the console.logs and what not in a panel +- added compile_output command to the context menu (right click). This only works for coffeescripts. +- Added that it existed in README. +- Added option for showOutputOnSave +- Need a way of telling if output is open or closed/hidden #15 + + +# Special Thanks + +* [agibsonsw](https://github.com/agibsonsw) for his help in writing WatchMode +* [Xavura](https://github.com/Xavura) for writing the base of this plugin diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Snippets/Array comprehension.tmSnippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Snippets/Array comprehension.tmSnippet new file mode 100644 index 0000000..9539ea9 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Snippets/Array comprehension.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + for ${1:i} in ${2:array} + ${3:# ...} +$0 + name + Array Comprehension + scope + source.coffee + tabTrigger + forin + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Snippets/Bound Function.tmSnippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Snippets/Bound Function.tmSnippet new file mode 100644 index 0000000..8a7a238 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Snippets/Bound Function.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + ${1:(${2:arguments}) }=> + ${3:# ...} +$0 + name + Function (bound) + scope + source.coffee + tabTrigger + = + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Snippets/Class.tmSnippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Snippets/Class.tmSnippet new file mode 100644 index 0000000..d6c9ff0 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Snippets/Class.tmSnippet @@ -0,0 +1,18 @@ + + + + + content + class ${1:Name} + ${2:constructor: ${3:(${4:arguments}) }-> + ${5:# ...}} + $6 +$0 + name + Class + scope + source.coffee + tabTrigger + cla + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Snippets/Console Log.tmSnippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Snippets/Console Log.tmSnippet new file mode 100644 index 0000000..33e7add --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Snippets/Console Log.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + console.log $0 + name + log + scope + source.coffee + tabTrigger + log + uuid + FBC44B18-323A-4C00-A35B-15E41830C5AD + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Snippets/Else if.tmSnippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Snippets/Else if.tmSnippet new file mode 100644 index 0000000..33917ac --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Snippets/Else if.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + else if ${1:condition} + ${2:# ...} +$0 + name + Else if + scope + source.coffee + tabTrigger + elif + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Snippets/Else.tmSnippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Snippets/Else.tmSnippet new file mode 100644 index 0000000..6c05e98 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Snippets/Else.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + else + ${1:# ...} +$0 + name + Else + scope + source.coffee + tabTrigger + el + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Snippets/Function.tmSnippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Snippets/Function.tmSnippet new file mode 100644 index 0000000..51ec083 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Snippets/Function.tmSnippet @@ -0,0 +1,17 @@ + + + + + content + ${1:(${2:arguments}) }-> + ${3:# ...} +$0 + + name + Function + scope + source.coffee + tabTrigger + - + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Snippets/If Else.tmSnippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Snippets/If Else.tmSnippet new file mode 100644 index 0000000..c2fee80 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Snippets/If Else.tmSnippet @@ -0,0 +1,18 @@ + + + + + content + if ${1:condition} + ${2:# ...} +else + ${3:# ...} +$0 + name + If Else + scope + source.coffee + tabTrigger + ifel + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Snippets/If.tmSnippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Snippets/If.tmSnippet new file mode 100644 index 0000000..2aa8e7c --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Snippets/If.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + if ${1:condition} + ${2:# ...} +$0 + name + If + scope + source.coffee + tabTrigger + if + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Snippets/Interpolated Code.tmSnippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Snippets/Interpolated Code.tmSnippet new file mode 100644 index 0000000..4b37fe6 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Snippets/Interpolated Code.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + #{${1:$TM_SELECTED_TEXT}} + keyEquivalent + # + name + Interpolated Code + scope + (string.quoted.double.coffee) - string source, (string.quoted.double.heredoc.coffee) - string source + tabTrigger + # + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Snippets/Object comprehension.tmSnippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Snippets/Object comprehension.tmSnippet new file mode 100644 index 0000000..36dde02 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Snippets/Object comprehension.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + for ${1:${2:k}, ${3:v}} of ${4:object} + ${5:# ...} +$0 + name + Object Comprehension + scope + source.coffee + tabTrigger + forof + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Snippets/Range comprehension (exclusive).tmSnippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Snippets/Range comprehension (exclusive).tmSnippet new file mode 100644 index 0000000..525b590 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Snippets/Range comprehension (exclusive).tmSnippet @@ -0,0 +1,16 @@ + + + + + content + for ${1:i} in [${2:start}...${3:finish}]${4: by ${5:step}} + ${6:# ...} +$0 + name + Range Comprehension (exclusive) + scope + source.coffee + tabTrigger + forx + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Snippets/Range comprehension (inclusive).tmSnippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Snippets/Range comprehension (inclusive).tmSnippet new file mode 100644 index 0000000..9a0db77 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Snippets/Range comprehension (inclusive).tmSnippet @@ -0,0 +1,16 @@ + + + + + content + for ${1:i} in [${2:start}..${3:finish}]${4: by ${5:step}} + ${6:# ...} +$0 + name + Range Comprehension (inclusive) + scope + source.coffee + tabTrigger + fori + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Snippets/Switch.tmSnippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Snippets/Switch.tmSnippet new file mode 100644 index 0000000..42a5677 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Snippets/Switch.tmSnippet @@ -0,0 +1,18 @@ + + + + + content + switch ${1:object} + when ${2:value} + ${3:# ...} + $4 +$0 + name + Switch + scope + source.coffee + tabTrigger + swi + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Snippets/Ternary If.tmSnippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Snippets/Ternary If.tmSnippet new file mode 100644 index 0000000..ab4d228 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Snippets/Ternary If.tmSnippet @@ -0,0 +1,15 @@ + + + + + content + if ${1:condition} then ${2:...} else ${3:...} +$0 + name + Ternary If + scope + source.coffee + tabTrigger + ter + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Snippets/Try Catch.tmSnippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Snippets/Try Catch.tmSnippet new file mode 100644 index 0000000..6d42b7b --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Snippets/Try Catch.tmSnippet @@ -0,0 +1,18 @@ + + + + + content + try + ${1:# ...} +catch ${2:e} + ${3:# ...} +$0 + name + Try .. Catch + scope + source.coffee + tabTrigger + try + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Snippets/Unless.tmSnippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Snippets/Unless.tmSnippet new file mode 100644 index 0000000..b3b990f --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Snippets/Unless.tmSnippet @@ -0,0 +1,15 @@ + + + + + content + ${1:...} unless ${2:condition} +$0 + name + Unless + scope + source.coffee + tabTrigger + unl + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Snippets/require.tmSnippet b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Snippets/require.tmSnippet new file mode 100644 index 0000000..515a7dc --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Snippets/require.tmSnippet @@ -0,0 +1,14 @@ + + + + + content + ${2/^.*?([\w_]+).*$/\L$1/} = require ${2:'${1:sys}'}$3 + name + require + scope + source.coffee + tabTrigger + req + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Symbol List.tmPreferences b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Symbol List.tmPreferences new file mode 100644 index 0000000..dfea8c9 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/Symbol List.tmPreferences @@ -0,0 +1,17 @@ + + + + + name + Symbol List + scope + source.coffee meta.class.coffee, meta.function + settings + + showInSymbolList + 1 + + uuid + C02A31C1-E770-472F-A13E-358FF1C6AD89 + + diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/changelogs/0.5.1.txt b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/changelogs/0.5.1.txt new file mode 100644 index 0000000..2c7399b --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/changelogs/0.5.1.txt @@ -0,0 +1,10 @@ +CoffeeScript-Sublime-Plugin 0.5.1 Changelog + +Features + +- Added the missing Compile File command (alt+shift+c). This is useful if you +just want to quickly compile a .coffee file to a .js file in the same directory. + +Enhancements + +- Added support for showing upgrade and installation messages, like this one. diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/changelogs/0.5.2.txt b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/changelogs/0.5.2.txt new file mode 100644 index 0000000..597685a --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/changelogs/0.5.2.txt @@ -0,0 +1,9 @@ +CoffeeScript-Sublime-Plugin 0.5.2 Changelog + +Changes + +- On Mac OS, the shortcut for displaying lexer tokens has changed to alt+shift+x (for leXer tokens). This is because alt+shift+l is used to insert a pipe character on French keyboards. + +Enhancements + +- Improved the documentation. diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/changelogs/0.5.3.txt b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/changelogs/0.5.3.txt new file mode 100644 index 0000000..e52dd40 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/changelogs/0.5.3.txt @@ -0,0 +1,13 @@ +CoffeeScript-Sublime-Plugin 0.5.2 Changelog + +Fixes + +- Several syntax highlighting issues. +- Respect noWrapper setting when compiling. + +Enhancements + +- Added a build variant to quickly display the output of the current + script via (ctrl+shift+B or cmd+shift+B). +- CSON files are now recognised. +- Go To Symbol improvements (see: http://i.stack.imgur.com/2vssw.png). diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/changelogs/0.5.4.md b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/changelogs/0.5.4.md new file mode 100644 index 0000000..cf9c21f --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/changelogs/0.5.4.md @@ -0,0 +1,21 @@ +# Changelog +## Version 0.5.4 History by [aponxi](https://github.com/aponxi) + +### Log: +* Added Settings to the Package Settings Menu +* Added the following Settings: + * `watchOnModified` : + Can be `False`, `True`, or an `Integer`. + 1. If its `false`, the watched CoffeeScript won't be compiled when modified + 2. If its an `Integer` the watched CoffeeScript will be compiled when modified after X seconds. (If you put in 3 then it will be modified only if it has been 3 seconds after the last compile, if you don't make any modifications though, it won't compile until you do) + 3. If its `true` ( _default_ ), the watched CoffeeScript will be compiled when modified after 3 seconds. + * `watchOnSaved` : + Can be `True` or `False`. + This enables compiling when the CoffeeScript you were editing is Saved. + +* Added Watch Support + By default you can press `alt+shift+w` to start the watch mode. It will open an output view which you can close to stop watching. When you are watching your CoffeeScript the compiled output will be inserted in the output view at the begining. After that you can either compile when you modify the CoffeeScript or when you Save it, or both. You can set these settings by going into the package settings. Use the User Settings so that if you upgrade, you won't lose your settings. + +### Known Issues: + +1. [Issue #1](https://github.com/aponxi/CoffeeScript-Sublime-Plugin/issues/1): If you are watching the file and it compiles whenever you modify without delay, then Sublime Text 2 can be unresponsive. Until this is fixed, please use a delay on `watchOnModified` setting, by either setting it to True, False or something > 0. diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/changelogs/0.5.5.md b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/changelogs/0.5.5.md new file mode 100644 index 0000000..e31950e --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/changelogs/0.5.5.md @@ -0,0 +1,22 @@ +# Changelog +## Version 0.5.5 History by [aponxi](https://github.com/aponxi) + +### Log: +* Fixed refreshing on modified. Now there is always a delay by default which is 0.5 seconds. +* Now closing the CoffeeScript closes the Compiled JS output. +* When you close the Compiled JS Output view, you stop watch mode. +* `alt+shift+w` successfully toggles watchmode on and off. +* When the CoffeeScript is closed upon watch mode, the code is cleaned up. +* Fixed output messages. +* Removed unused settings + +The code runs smoother now. Doesn't slow down. + +On this version worked heavily on WatchMode. And it was a hell of a work! + + _ + __ _ _ __ ___ _ __ __ _(_) + / _` | '_ \ / _ \| '_ \\ \/ / | + | (_| | |_) | (_) | | | |> <| | + \__,_| .__/ \___/|_| |_/_/\_\_| + |_| \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/changelogs/0.5.6.md b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/changelogs/0.5.6.md new file mode 100644 index 0000000..48c45b0 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/changelogs/0.5.6.md @@ -0,0 +1,14 @@ +# Changelog +## Version 0.5.6 History by [aponxi](https://github.com/aponxi) + +### Log: +* Fixed some minor issues which disabled update on modified +* Now after creating output panel, it refreshes. + + + _ + __ _ _ __ ___ _ __ __ _(_) + / _` | '_ \ / _ \| '_ \\ \/ / | + | (_| | |_) | (_) | | | |> <| | + \__,_| .__/ \___/|_| |_/_/\_\_| + |_| diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/changelogs/0.6.md b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/changelogs/0.6.md new file mode 100644 index 0000000..64792ee --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/changelogs/0.6.md @@ -0,0 +1,31 @@ +# v0.6.3 25/Jan/2013 +* added compileDir option which specifies `coffee -o` arg when compiling. +* Fixed settings file name. It was Coffeescript when it should have been CoffeeScript. Fixes #19 +* compileDir path works only if it exists. +* now also works if it doesn't exist. +* changed default compileDir option to false thus compiling a coffee script to the same directory as default. + +# v0.6.2 16/Jan/2013 +- Updated package.json, bumped up version. + +# v0.6.1 16/Jan/2013 +- Added utf-8 encode/decode to prevent unicode decode errors, fixed #17 +- Corrected years in 0.6 changelog... Should get used to it by now. +- Added error output in panel which fixes #16 + +# v0.6 Changelog - 16/Jan/2013 + +- Changed menu name to "Better Coffeescript" +- Changed menu arguments to be directed to `sublime-better-coffeescript` folders, settings files are still kept as `Coffeescript.sublime-settings` +- Fixed lint errors +- if delay is lower than < 0.5 then we are saying that minimum delay should be 0.5 +- added a method that gets the input's filename with .js extension +- setting the output view's name as filename.js fixes #13 +- added compileOnSave option fixes #14 +- updated readme fixes #6 +- added compile output class +- added compile_output command, it displays the console.logs and what not in a panel +- added compile_output command to the context menu (right click). This only works for coffeescripts. +- Added that it existed in README. +- Added option for showOutputOnSave +- Need a way of telling if output is open or closed/hidden #15 \ No newline at end of file diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/messages.json b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/messages.json new file mode 100644 index 0000000..85bde38 --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/messages.json @@ -0,0 +1,7 @@ +{ + "0.5.1": "changelogs/0.5.1.txt", + "0.5.2": "changelogs/0.5.2.txt", + "0.5.3": "changelogs/0.5.3.txt", + "0.5.4": "changelogs/0.5.4.md", + "0.6.0": "changelogs/0.6.md" +} diff --git a/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/package.json b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/package.json new file mode 100644 index 0000000..95489ad --- /dev/null +++ b/EthanBrown.SublimeText2.WebPackages/tools/PackageCache/sublime-better-coffeescript/package.json @@ -0,0 +1,20 @@ +{ + "schema_version": "1.2", + "packages": [ + { + "name": "sublime-better-coffeescript", + "description": "Syntax highlighting and checking, commands, shortcuts, snippets, watched compilation and more.", + "author": "aponxi", + "homepage": "https://github.com/aponxi/sublime-better-coffeescript", + "last_modified": "2013-01-26 20:39:00", + "platforms": { + "*": [ + { + "version": "0.6.31", + "url": "https://github.com/aponxi/sublime-better-coffeescript/archive/master.zip" + } + ] + } + } + ] +} diff --git a/EthanBrown.SublimeText2.WebPackages/tools/chocolateyInstall.ps1 b/EthanBrown.SublimeText2.WebPackages/tools/chocolateyInstall.ps1 index 3f2cb2b..f010e11 100644 --- a/EthanBrown.SublimeText2.WebPackages/tools/chocolateyInstall.ps1 +++ b/EthanBrown.SublimeText2.WebPackages/tools/chocolateyInstall.ps1 @@ -49,6 +49,9 @@ try { ([IO.File]::ReadAllText($grunt)) -replace '{{node_path}}', $escapedNodeRoot | Out-File -FilePath (Join-Path $sublimeUserDataPath $gruntFileName) -Force -Encoding ASCII + $packageCache = Join-Path (Get-CurrentDirectory) 'PackageCache' + Install-SublimePackagesFromCache -Directory $packageCache + Install-SublimePackageControl $packageControl = (Join-Path $current 'Package Control.sublime-settings') Merge-PackageControlSettings -FilePath $packageControl diff --git a/SublimeText2.PackageControl/SublimeText2.PackageControl.nuspec b/SublimeText2.PackageControl/SublimeText2.PackageControl.nuspec new file mode 100644 index 0000000..5ad457f --- /dev/null +++ b/SublimeText2.PackageControl/SublimeText2.PackageControl.nuspec @@ -0,0 +1,30 @@ + + + + SublimeText2.PackageControl + Sublime Text 2 Package Control + 1.6.3 + Will Bond + Ethan J Brown + A full-featured package manager that helps discovering, installing, updating and removing packages for Sublime Text 2. It features an automatic upgrader and supports GitHub, BitBucket and a full channel/repository system. + * Easily find, install, upgrade and remove packages without restarting Sublime Text +* Keeps installed packages up-to-date with an auto-upgrade feature +* Downloads packages from GitHub, BitBucket and the custom JSON channel/repository system +* Handles updating packages cloned from GitHub and BitBucket via Git and Hg +* Provides commands for enabling and disabling packages +* Includes a command to bundle any package directory into a .sublime-package file. + Helper package to install Sublime Package Control. + http://wbond.net/sublime_packages/package_control + sublime text editor package + http://www.sublimetext.com/eula + false + https://github.com/Iristyle/ChocolateyPackages/raw/master/SublimeText2.app/Sublime_Text.png + + + + + + + + + diff --git a/SublimeText2.PackageControl/tools/ChocolateyInstall.ps1 b/SublimeText2.PackageControl/tools/ChocolateyInstall.ps1 new file mode 100644 index 0000000..f14b834 --- /dev/null +++ b/SublimeText2.PackageControl/tools/ChocolateyInstall.ps1 @@ -0,0 +1,19 @@ +function Get-CurrentDirectory +{ + $thisName = $MyInvocation.MyCommand.Name + [IO.Path]::GetDirectoryName((Get-Content function:$thisName).File) +} + +try { + $package = 'SublimeText2.PackageControl' + + $current = Get-CurrentDirectory + . (Join-Path $current 'SublimeHelpers.ps1') + + Install-SublimePackageControl + + Write-ChocolateySuccess $package +} catch { + Write-ChocolateyFailure $package "$($_.Exception.Message)" + throw +} diff --git a/SublimeText2.PowershellAlias/SublimeText2.PowershellAlias.nuspec b/SublimeText2.PowershellAlias/SublimeText2.PowershellAlias.nuspec new file mode 100644 index 0000000..8e1d285 --- /dev/null +++ b/SublimeText2.PowershellAlias/SublimeText2.PowershellAlias.nuspec @@ -0,0 +1,21 @@ + + + + SublimeText2.PowershellAlias + Sublime Text 2 Powershell subl Alias + 0.1.0 + Jon Skinner + Ethan J Brown + A Powershell 'subl' alias to easily launch Sublime Text 2 from the command line. Sublime Text 2 is a sophisticated text editor for code, html and prose. + Assumes Sublime Text 2 is already installed to the default location on disk. + + http://www.sublimetext.com/2 + sublime text editor powershell + http://www.sublimetext.com/eula + false + https://github.com/Iristyle/ChocolateyPackages/raw/master/SublimeText2.app/Sublime_Text.png + + + + + diff --git a/SublimeText2.PowershellAlias/tools/ChocolateyInstall.ps1 b/SublimeText2.PowershellAlias/tools/ChocolateyInstall.ps1 new file mode 100644 index 0000000..16a3841 --- /dev/null +++ b/SublimeText2.PowershellAlias/tools/ChocolateyInstall.ps1 @@ -0,0 +1,21 @@ +try { + $package = 'SublimeText2.PowershellAlias' + + $sublDefined = Test-Path function:subl + $profileExists = Test-Path $PROFILE + $sublInProfile = $profileExists -and (((Get-Content $PROFILE) -match '^function\s+subl\s+').Count -gt 0) + + # add subl alias to powershell profile + if (!$sublDefined -and !$sublInProfile) + { + New-Item (Split-Path $PROFILE) -Type Directory -ErrorAction SilentlyContinue + 'function subl { &"${Env:ProgramFiles}\Sublime Text 2\sublime_text.exe" $args }' | + Out-File -FilePath $PROFILE -Append -Encoding UTF8 + Write-Host 'Added subl alias to Powershell profile to launch Sublime Text 2!' + } + + Write-ChocolateySuccess $package +} catch { + Write-ChocolateyFailure $package "$($_.Exception.Message)" + throw +} diff --git a/SublimeText2.app/SublimeText2.app.nuspec b/SublimeText2.app/SublimeText2.app.nuspec index ee4203b..9bf4804 100644 --- a/SublimeText2.app/SublimeText2.app.nuspec +++ b/SublimeText2.app/SublimeText2.app.nuspec @@ -3,11 +3,16 @@ SublimeText2.app Sublime Text 2 - 2.0.1.2217 + 2.0.1.22171 Jon Skinner Ethan J Brown Sublime Text 2 is a sophisticated text editor for code, html and prose. You'll love the slick user interface and extraordinary features. Includes Package Control. - Sublime Text 2 is a sophisticated text editor for code, html and prose. You'll love the slick user interface and extraordinary features. Sublime Text may be downloaded and evaluated for free, however a license must be purchased for continued use. + Includes Sublime Text 2 AND + + * Package Control + * subl alias for Powershell + + Sublime Text may be downloaded and evaluated for free, however a license must be purchased for continued use. This brings the Sublime Text full installation version to your system, which has a built-in auto-update mechanism. Furthermore, Sublime Package Control is included. Version 2.0.1 Release Date: 14 July 2012 @@ -115,5 +120,10 @@ http://www.sublimetext.com/eula false https://github.com/Iristyle/ChocolateyPackages/raw/master/SublimeText2.app/Sublime_Text.png + + + + + diff --git a/SublimeText2.app/tools/ChocolateyInstall.ps1 b/SublimeText2.app/tools/ChocolateyInstall.ps1 deleted file mode 100644 index feef69f..0000000 --- a/SublimeText2.app/tools/ChocolateyInstall.ps1 +++ /dev/null @@ -1,39 +0,0 @@ -try { - $package = 'SublimeText2' - #uses InnoSetup - http://unattended.sourceforge.net/InnoSetup_Switches_ExitCodes.html - Install-ChocolateyPackage 'Sublime Text 2.0.1 Setup' 'exe' '/VERYSILENT /NORESTART /TASKS="contextentry"' ` - 'http://c758482.r82.cf2.rackcdn.com/Sublime%20Text%202.0.1%20Setup.exe' ` - 'http://c758482.r82.cf2.rackcdn.com/Sublime%20Text%202.0.1%20x64%20Setup.exe' - - # install package control - $installPath = Join-Path $Env:ProgramFiles 'Sublime Text 2' - $sublimeDataPath = Join-Path ([Environment]::GetFolderPath('ApplicationData')) 'Sublime Text 2' - $packagesPath = Join-Path $sublimeDataPath 'Installed Packages' - if (!(Test-Path $packagesPath)) { New-Item $packagesPath -Type Directory } - $packageControl = Join-Path $packagesPath 'Package Control.sublime-package' - - if (!(Test-Path $packageControl)) - { - # http://wbond.net/sublime_packages/package_control/installation - $packageUrl = 'http://sublime.wbond.net/Package%20Control.sublime-package' - Get-ChocolateyWebFile -url $packageUrl -fileFullPath $packageControl - } - - $sublDefined = Test-Path function:subl - $profileExists = Test-Path $PROFILE - $sublInProfile = $profileExists -and (((Get-Content $PROFILE) -match '^function\s+subl\s+').Count -gt 0) - - # add subl alias to powershell profile - if (!$sublDefined -and !$sublInProfile) - { - New-Item (Split-Path $PROFILE) -Type Directory -ErrorAction SilentlyContinue - 'function subl { &"${Env:ProgramFiles}\Sublime Text 2\sublime_text.exe" $args }' | - Out-File -FilePath $PROFILE -Append -Encoding UTF8 - Write-Host 'Added subl alias to Powershell profile to launch Sublime Text 2!' - } - - Write-ChocolateySuccess $package -} catch { - Write-ChocolateyFailure $package "$($_.Exception.Message)" - throw -} diff --git a/core/SublimeHelpers.ps1 b/core/SublimeHelpers.ps1 index 39dfcca..bcfa23a 100644 --- a/core/SublimeHelpers.ps1 +++ b/core/SublimeHelpers.ps1 @@ -1,10 +1,17 @@ # uses functions in JsonHelpers.ps1 +function Get-SublimeInstallPath +{ + Join-Path $Env:ProgramFiles 'Sublime Text 2' +} + +function Get-SublimeSettingsPath +{ + Join-Path ([Environment]::GetFolderPath('ApplicationData')) 'Sublime Text 2' +} function Get-SublimePackagesPath { - $installPath = Join-Path $Env:ProgramFiles 'Sublime Text 2' - $settingsPath = Join-Path ([Environment]::GetFolderPath('ApplicationData')) 'Sublime Text 2' - $packagesPath = Join-Path $settingsPath 'Packages' + $packagesPath = Join-Path (Get-SublimeSettingsPath) 'Packages' if (!(Test-Path $packagesPath)) { New-Item $packagesPath -Type Directory } return $packagesPath @@ -17,6 +24,45 @@ function Get-SublimeUserPath return $path } +function Install-SublimePackagesFromCache +{ + [CmdletBinding()] + param( + [Parameter(Mandatory = $true)] + [string] + $Directory + ) + + $packagesPath = Get-SublimePackagesPath + Get-ChildItem $Directory | + ? { $_.PsIsContainer } | + % { @{Path = $_.FullName; Destination = Join-Path $packagesPath $_.Name }} | + ? { + $exists = Test-Path $_.Destination + if ($exists) { Write-Host "[ ] Skipping existing $($_.Destination)" } + return !$exists + } | + % { + Write-Host "[+] Copying cached package $($_.Destination)" + Copy-Item @_ -Recurse + } +} + +function Install-SublimePackageControl +{ + # install package control + $packagesPath = Join-Path (Get-SublimeSettingsPath) 'Installed Packages' + if (!(Test-Path $packagesPath)) { New-Item $packagesPath -Type Directory } + $packageControl = Join-Path $packagesPath 'Package Control.sublime-package' + + if (!(Test-Path $packageControl)) + { + # http://wbond.net/sublime_packages/package_control/installation + $packageUrl = 'http://sublime.wbond.net/Package%20Control.sublime-package' + Get-ChocolateyWebFile -url $packageUrl -fileFullPath $packageControl + } +} + function Merge-PackageControlSettings { [CmdletBinding()]