Commits

awsum  committed ec95a18

more sublime

  • Participants
  • Parent commits 6a1df3b

Comments (0)

Files changed (96)

 bin/subl
 bin/pypy*
 bin/go*
+
 *.sublime_session
+sublime-text-2/Backup/

File sublime-text-2/Packages/Default/Meta Info Summary.cache

Binary file modified.

File sublime-text-2/Packages/Default/Startup.cache

Binary file modified.

File sublime-text-2/Packages/Default/Syntax Summary.cache

Binary file modified.

File sublime-text-2/Packages/Hayaku - tools for writing CSS faster/.gitignore

+*.pyc
+*.pyo

File sublime-text-2/Packages/Hayaku - tools for writing CSS faster/CSS.sublime-settings

+{
+    "auto_complete": false,
+    "disable_tab_abbreviations": true
+}

File sublime-text-2/Packages/Hayaku - tools for writing CSS faster/Default (Linux).sublime-keymap

+[
+    // Main Hayaku context
+    {
+        "keys": ["tab"],
+        "command": "hayaku",
+        "context": [{"key": "hayaku_css_context"}]
+    }
+
+    // tab в конце строки переводит на новую строку
+    , {
+        "keys": ["tab"],
+        "command": "hayaku_add_line",
+        "context":[
+            { "key": "selector", "operator": "equal", "operand": "source.css" },
+            { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
+            { "key": "preceding_text", "operator": "regex_contains", "operand": ";$", "match_all": true },
+            { "key": "following_text", "operator": "regex_contains", "operand": "^\\}|$", "match_all": true }
+        ]
+    }
+
+    // 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": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
+            { "key": "selector", "operator": "equal", "operand": "source.css - meta.selector.css", "match_all": true },
+            { "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", "match_all": true }]
+    }
+
+    // Command for inserting CSS code block
+    , {
+        "keys":    ["ctrl+enter"],
+        "command":  "hayaku_add_code_block",
+        "context": [{"key": "hayaku_add_code_block"}]
+    }
+]

File sublime-text-2/Packages/Hayaku - tools for writing CSS faster/Default (OSX).sublime-keymap

+[
+    // Main Hayaku context
+    {
+        "keys": ["tab"],
+        "command": "hayaku",
+        "context": [{"key": "hayaku_css_context"}]
+    }
+
+    // tab в конце строки переводит на новую строку
+    , {
+        "keys": ["tab"],
+        "command": "hayaku_add_line",
+        "context":[
+            { "key": "selector", "operator": "equal", "operand": "source.css" },
+            { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
+            { "key": "preceding_text", "operator": "regex_contains", "operand": ";$", "match_all": true },
+            { "key": "following_text", "operator": "regex_contains", "operand": "^\\}|$", "match_all": true }
+        ]
+    }
+
+    // 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": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
+            { "key": "selector", "operator": "equal", "operand": "source.css - meta.selector.css", "match_all": true },
+            { "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", "match_all": true }]
+    }
+
+    // Command for inserting CSS code block
+    , {
+        "keys":    ["super+enter"],
+        "command":  "hayaku_add_code_block",
+        "context": [{"key": "hayaku_add_code_block"}]
+    }
+
+    // Command prototype for inserting right indent for code block by enter in braces
+    , {
+        "keys":    ["enter"],
+        "command":  "insert_snippet",
+        "args":    {"contents": "\n\t$1\n\t"},
+        "context": [
+            {"key": "preceding_text", "operator": "regex_match", "operand": ".*\\{$" },
+            {"key": "following_text", "operator": "regex_match", "operand": "^\\}" }
+        ]
+    }
+]

File sublime-text-2/Packages/Hayaku - tools for writing CSS faster/Default (Windows).sublime-keymap

+[
+    // Main Hayaku context
+    {
+        "keys": ["tab"],
+        "command": "hayaku",
+        "context": [{"key": "hayaku_css_context"}]
+    }
+
+    // tab в конце строки переводит на новую строку
+    , {
+        "keys": ["tab"],
+        "command": "hayaku_add_line",
+        "context":[
+            { "key": "selector", "operator": "equal", "operand": "source.css" },
+            { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
+            { "key": "preceding_text", "operator": "regex_contains", "operand": ";$", "match_all": true },
+            { "key": "following_text", "operator": "regex_contains", "operand": "^\\}|$", "match_all": true }
+        ]
+    }
+
+    // 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": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
+            { "key": "selector", "operator": "equal", "operand": "source.css - meta.selector.css", "match_all": true },
+            { "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", "match_all": true }]
+    }
+
+    // Command for inserting CSS code block
+    , {
+        "keys":    ["ctrl+enter"],
+        "command":  "hayaku_add_code_block",
+        "context": [{"key": "hayaku_add_code_block"}]
+    }
+]

File sublime-text-2/Packages/Hayaku - tools for writing CSS faster/LESS.sublime-settings

+{
+    "auto_complete": false,
+    "disable_tab_abbreviations": true
+}

File sublime-text-2/Packages/Hayaku - tools for writing CSS faster/LICENSE

+(The MIT License)
+
+Copyright (c) 2012 Roman Komarov <kizmarh@yandex.ru>, Sergey Mezentsev <thebits@yandex.ru>
+
+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.

File sublime-text-2/Packages/Hayaku - tools for writing CSS faster/Preferences.sublime-settings

+// To use any of those settings, copy and uncoment the ones you want to
+// "User/Preferences.sublime-settings", which overrides the settings in here.
+// The changes here would be reset on plug-in update.
+{
+    // The default CSS syntax
+    "hayaku_CSS_syntax_autoguess": [
+        "    selector {              ",
+        "        property: value;    ",
+        "    }                       "
+    ]
+
+// Unused settings, work in progress
+
+// Code Style
+
+    // "hayaku_CSS_colors_case":          "initial", // Can be "lowercase", "uppercase", and "initial"
+    // "hayaku_CSS_colors_no_shorthands":  false,    // Would expand `#333` to `#333333` when `true`
+    // "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_use_double_quotes":     true,     // Use `"` when `true` and `'` when `false`
+
+    // "hayaku_CSS_default_unit":         "px",      // `w10` -> `width: 10px`
+    // "hayaku_CSS_default_unit_decimal": "em"       // `w.5` -> `width: 10em`
+}

File sublime-text-2/Packages/Hayaku - tools for writing CSS faster/README.md

+# Hayaku
+
+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)
+        - [Importance modifier](#importance-modifier)
+        - [Some default values](#some-default-values)
+    - [Postexpands](#postexpands)
+        - [Simple property postexpands](#simple-property-postexpands)
+        - [Postexpands for units](#postexpands-for-units)
+        - [Postexpands for colors](#postexpands-for-colors)
+    - [Creating new CSS rule blocks](#creating-new-css-rule-blocks)
+    - [Inline comments](#inline-comments)
+    <br/><br/>
+
+3. [Settings and Preferences](#settings-and-preferences)
+    - [Autoguessing the code style](#autoguessing-the-code-style)
+    - [Single code style](#single-code-style)
+    - [Prefixes options](#prefixes-options)
+    - [The aligning for the prefixes](#the-aligning-for-the-prefixes)
+    - [Using only specific prefixes](#using-only-specific-prefixes)
+    <br/><br/>
+
+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, 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 (probably won't be required)
+
+#### 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
+```
+
+
+# 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;`
+
+
+
+### 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.
+
+### Some 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).
+
+## 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.
+
+## 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).
+
+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.
+
+## 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!
+
+# 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).

File sublime-text-2/Packages/Hayaku - tools for writing CSS faster/SCSS.sublime-settings

+{
+    "auto_complete": false,
+    "disable_tab_abbreviations": true
+}

File sublime-text-2/Packages/Hayaku - tools for writing CSS faster/Sass.sublime-settings

+// To use any of those settings, copy and uncoment the ones you want to
+// "User/Preferences.sublime-settings", which overrides the settings in here.
+// The changes here would be reset on plug-in update.
+{
+    // The default Sass syntax
+    "hayaku_CSS_syntax_autoguess": [
+        "    selector             ",
+        "      property: value    "
+    ],
+
+    "auto_complete": false,
+    "disable_tab_abbreviations": true
+
+}

File sublime-text-2/Packages/Hayaku - tools for writing CSS faster/Stylus.sublime-settings

+// To use any of those settings, copy and uncoment the ones you want to
+// "User/Preferences.sublime-settings", which overrides the settings in here.
+// The changes here would be reset on plug-in update.
+{
+    // The default Stylus syntax
+    "hayaku_CSS_syntax_autoguess": [
+        "    selector             ",
+        "      property: value    "
+    ],
+
+    "auto_complete": false,
+    "disable_tab_abbreviations": true
+
+}

File sublime-text-2/Packages/Hayaku - tools for writing CSS faster/add_code_block.py

+#!/usr/bin/python
+import re
+import sublime
+import sublime_plugin
+
+from hayaku import get_hayaku_options
+
+__all__ = [
+    'HayakuAddCodeBlockContext',
+    'HayakuAddCodeBlockCommand',
+]
+
+REGEX_WHITESPACES = re.compile(r'^\s*$')
+
+# Context
+class HayakuAddCodeBlockContext(sublime_plugin.EventListener):
+    def on_query_context(self, view, key, *args):
+        if key != "hayaku_add_code_block":
+            return None
+
+        regions = view.sel()
+        # Multiple blocks inserting doesn't make sense
+        if len(regions) > 1:
+            return None
+
+        region = regions[0]
+
+        # TODO: understand selection, but don't replace it on code block inserting
+        if not region.empty():
+            return None
+
+        # Looking for the scope
+        # TODO: Ensure it would be nice in preprocessors etc.
+        if not view.score_selector(region.begin(),'source.css, source.stylus, source.sass, source.scss'):
+            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()))
+
+        # 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
+
+# Command
+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:
+            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()))
+
+            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_before = ""
+                end_before = ""
+
+            result = ''.join([
+                  start_before
+                , opening_brace
+                , start_after
+                , "$0"
+                , end_before
+                , closing_brace
+                , end_after
+            ])
+        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})

File sublime-text-2/Packages/Hayaku - tools for writing CSS faster/add_code_block.pyc

Binary file added.

File sublime-text-2/Packages/Hayaku - tools for writing CSS faster/contexts.py

+#!/usr/bin/python
+import re
+import sublime
+import sublime_plugin
+
+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
+        if re.search('[;\s\/\+]$',left_part) is not None:
+            return None
+        # Simple check if the right part is ok
+        # Need to be enhanced to allow one-line coding and comments
+        if re.search('^[^\s\}]',right_part) is not None:
+            return None
+
+        return True

File sublime-text-2/Packages/Hayaku - tools for writing CSS faster/contexts.pyc

Binary file added.

File sublime-text-2/Packages/Hayaku - tools for writing CSS faster/core/CSS-dict.json

+[
+    {"_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": "<common>",
+        "values": [ "inherit" ],
+        "_comment": [
+            "Common values, that any single property can have",
+            "Must have lesser priority than any other value"
+        ]
+    },{
+        "name": "<dimension>",
+        "values": [ "<number>", "<length>", "<percentage>" ]
+    },{
+        "name": "<length>",
+        "values": [
+            ".em", ".ex", ".vw", ".vh", ".vmin", ".vmax", ".ch", ".rem",
+            ".px", ".cm", ".mm", ".in", ".pt", ".pc"
+        ]
+    },{
+        "name": "<percentage>",
+        "values": [ ".%" ]
+    },{
+        "name": "<angle>",
+        "values": [ ".deg", ".grad", ".rad", ".turn" ]
+    },{
+        "name": "<time>",
+        "values": [ ".s", ".ms" ]
+    },{
+        "name": "<url>",
+        "values": [ "url()" ]
+    },{
+        "name": "<attr>",
+        "values": [ "attr()" ]
+    },{
+        "name": "<image>",
+        "values": [ "linear-gradient()", "repeating-linear-gradient()", "radial-gradient()", "repeating-radial-gradient()" ],
+        "prefixes": [ "webkit", "moz", "ms", "o" ]
+    },{
+        "name": "<timing-function>",
+        "values": [ "ease", "linear", "ease-in", "ease-out", "ease-in-out", "cubic-bezier()" ]
+
+
+
+    },{
+        "name": "position",
+        "values": [ "static", "relative", "absolute", "fixed" ]
+    },{
+        "name": [ "top", "right", "bottom", "left" ],
+        "values": [ "auto", "<dimension>" ],
+        "default": "100%"
+    },{
+        "name": "z-index",
+        "values": [ "auto", "<integer>" ]
+
+
+
+    },{
+        "name": "float",
+        "values": [ "left", "right", "none" ]
+    },{
+        "name": "clear",
+        "values": [ "none", "left", "right", "both" ]
+    },{
+        "name": "display",
+        "values": [ "inline", "block", "inline-block", "list-item", "none", "table", "inline-table", "table-row-group", "table-header-group", "table-footer-group", "table-row", "table-cell", "table-column", "table-caption", "table-column-group", "run-in", "compact", "flexbox", "inline-flexbox" ]
+    },{
+        "name": "visibility",
+        "values": [ "visible", "hidden", "collapse" ]
+    },{
+        "name": [ "overflow" ],
+        "values": [ "visible", "hidden", "scroll", "auto" ]
+    },{
+        "name": [ "overflow-x", "overflow-y" ],
+        "values": [ "<overflow>" ],
+        "prefixes": [ "ms" ]
+    },{
+        "name": "clip",
+        "values": [ "auto", "rect()" ]
+    },{
+        "name": "box-sizing",
+        "values": [ "content-box", "border-box" ],
+        "prefixes": [ "webkit", "moz" ]
+    },{
+        "name": "-moz-box-sizing",
+        "values": [ "<box-sizing>", "padding-box" ]
+    },{
+        "name": "flex-direction",
+        "values": [ "lr", "rl", "tb", "bt", "inline", "inline-reverse", "block", "block-reverse" ]
+    },{
+        "name": "flex-order",
+        "values": [ "<integer>" ]
+    },{
+        "name": "flex-pack",
+        "values": [ "start", "end", "center", "justify" ]
+    },{
+        "name": "flex-align",
+        "values": [ "auto", "baseline" ]
+    },{
+        "name": "pointer-events",
+        "values": [ "none", "all" ]
+
+
+
+    },{
+        "name": [ "margin", "margin-top", "margin-right", "margin-bottom", "margin-left" ],
+        "values": [ "auto", "<dimension>" ]
+    },{
+        "name": "padding, padding-top, padding-right, padding-bottom, padding-left",
+        "values": [ "<dimension>" ]
+    },{
+        "name": "width, height, min-width, min-height",
+        "values": [ "auto", "<dimension>" ],
+        "default": "100%"
+    },{
+        "name": "max-height, max-width",
+        "values": [ "none", "<dimension>" ],
+        "default": "100%"
+
+
+
+    },{
+        "name": "outline-color",
+        "values": [ "invert", "<color>" ]
+    },{
+        "name": "outline-style",
+        "values": [ "<border-style>" ]
+    },{
+        "name": "outline-width",
+        "values": [ "<border-width>" ]
+    },{
+        "name": "outline-offset",
+        "values": [ "<length>" ]
+    },{
+        "name": "outline",
+        "values": [ "<outline-color>", "<_outline-style>", "<outline-width>" ]
+    },{
+        "name": "border-collapse",
+        "values": [ "collapse", "separate" ]
+    },{
+        "name": "border-spacing",
+        "values": [ "<length>" ]
+    },{
+        "name": [ "border-color", "border-top-color", "border-right-color", "border-bottom-color", "border-left-color" ],
+        "values": [ "<color>" ]
+    },{
+        "name": [ "border-style", "border-top-style", "border-right-style", "border-bottom-style", "border-left-style" ],
+        "values": [ "none", "hidden", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset" ]
+    },{
+        "name": [ "border-width", "border-top-width", "border-right-width", "border-bottom-width", "border-left-width" ],
+        "values": [ "thin", "medium", "thick", "<length>" ]
+    },{
+        "name": [ "border", "border-top", "border-right", "border-bottom", "border-left" ],
+        "values": [ "<border-color>", "<_border-style>", "<border-width>" ],
+        "default": "1px solid"
+    },{
+        "name": [ "border-radius", "border-top-right-radius", "border-top-left-radius", "border-bottom-left-radius", "border-bottom-right-radius" ],
+        "values": [ "<length>" ],
+        "prefixes": [ "webkit" ]
+    },{
+        "name": "<border-image-source>",
+        "values": [ "<url>", "none" ],
+        "prefixes": [ "webkit", "moz", "o" ]
+    },{
+        "name": "<border-image-slice>",
+        "values": [ "<number>", "<percentage>", "fill" ],
+        "prefixes": [ "webkit", "moz", "o" ]
+    },{
+        "name": "<border-image-width>",
+        "values": [ "<border-width>" ],
+        "prefixes": [ "webkit", "moz", "o" ]
+    },{
+        "name": "<border-image-outset>",
+        "values": [ "<length>", "<number>" ],
+        "prefixes": [ "webkit", "moz", "o" ]
+    },{
+        "name": "<border-image-repeat>",
+        "values": [ "stretch", "repeat", "round" ],
+        "prefixes": [ "webkit", "moz", "o" ]
+    },{
+        "name": "border-image",
+        "values": [ "<border-image-source>", "<border-image-slice>", "<border-image-width>", "<border-image-outset>", "<border-image-repeat>" ],
+        "prefixes": [ "webkit", "moz", "o" ]
+    },{
+        "name": "background-attachment",
+        "values": [ "scroll", "fixed", "local" ]
+    },{
+        "name": "background-color",
+        "values": [ "<color>" ]
+    },{
+        "name": "background-image",
+        "values": [ "<url>", "none", "<image>" ]
+    },{
+        "name": "background-position-x",
+        "values": [ "left", "center", "right", "<dimension>" ],
+        "prefixes": [ "ms" ]
+    },{
+        "name": "background-position-y",
+        "values": [ "top", "center", "bottom", "<dimension>" ],
+        "prefixes": [ "ms" ]
+    },{
+        "name": "background-position",
+        "values": [ "<background-position-x>", "<background-position-y>" ]
+    },{
+        "name": "background-repeat",
+        "values": [ "repeat", "repeat-x", "repeat-y", "no-repeat", "space", "round" ]
+    },{
+        "name": [ "background-clip", "background-origin" ],
+        "values": [ "border-box", "padding-box", "content-box" ],
+        "prefixes": [ "o" ]
+    },{
+        "name": "background-size",
+        "values": [ "auto", "contain", "cover", "<dimension>" ],
+        "prefixes": [ "webkit", "o" ]
+    },{
+        "name": "background",
+        "values": [ "<_background-attachment>", "<background-color>", "<background-image>", "<_background-position>", "<_background-repeat>", "none" ]
+    },{
+        "name": "box-decoration-break",
+        "values": [ "slice", "clone" ]
+    },{
+        "name": "box-shadow",
+        "values": [ "inset", "<length>", "<color>" ],
+        "prefixes": [ "webkit" ]
+    },{
+        "name": "color",
+        "values": [ "<color_values>" ],
+        "default": "#FFF"
+
+
+
+    },{
+        "name": "table-layout",
+        "values": [ "auto", "fixed" ]
+    },{
+        "name": "caption-side",
+        "values": [ "top", "bottom" ]
+    },{
+        "name": "empty-cells",
+        "values": [ "show", "hide" ]
+    },{
+        "name": "list-style-image",
+        "values": [ "none", "<url>" ]
+    },{
+        "name": "list-style-position",
+        "values": [ "inside", "outside" ]
+    },{
+        "name": "list-style-type",
+        "values": [ "disc", "circle", "square", "decimal", "decimal-leading-zero", "lower-roman", "upper-roman", "lower-greek", "lower-latin", "upper-latin", "armenian", "georgian", "lower-alpha", "upper-alpha", "none" ]
+    },{
+        "name": "list-style",
+        "values": [ "<list-style-image>", "<list-style-position>", "<list-style-type>" ]
+    },{
+        "name": "quotes",
+        "values": [ "none" ]
+    },{
+        "name": "content",
+        "values": [ "normal", "none", "open-quote", "close-quote", "no-open-quote", "no-close-quote", "icon", "<attr>", "<string>", "<url>", "<counter>" ],
+        "default": "\"\""
+    },{
+        "name": [ "counter-increment", "counter-reset" ],
+        "values": [ "none" ]
+
+
+
+    },{
+        "name": "vertical-align",
+        "values": [ "baseline", "sub", "super", "top", "text-top", "middle", "bottom", "text-bottom", "<dimension>" ]
+    },{
+        "name": "text-align",
+        "values": [ "left", "right", "center", "justify", "start", "end" ]
+    },{
+        "name": "text-align-last",
+        "values": [ "<text-align>", "auto" ],
+        "prefixes": [ "ms" ]
+    },{
+        "name": "text-decoration",
+        "values": [ "none", "underline", "overline", "line-through" ]
+    },{
+        "name": "text-emphasis-color",
+        "values": [ "<color>" ]
+    },{
+        "name": "text-emphasis-style",
+        "values": [ "none", "filled", "open", "dot", "circle", "double-circle", "triangle", "sesame" ]
+    },{
+        "name": "text-emphasis-position",
+        "values": [ "above", "below", "right", "left" ]
+    },{
+        "name": "text-emphasis",
+        "values": [ "<text-emphasis-color>", "<text-emphasis-style>", "<text-emphasis-position>" ]
+    },{
+        "name": "text-indent",
+        "values": [ "<dimension>", "each-line", "hanging" ]
+    },{
+        "name": "text-justify",
+        "values": [ "auto", "inter-word", "inter-ideograph", "inter-cluster", "distribute", "distribute-all-lines", "distribute-center-last", "kashida", "newspaper", "tibetan" ],
+        "prefixes": [ "ms" ]
+    },{
+        "name": "text-outline",
+        "values": [ "none" ]
+    },{
+        "name": "text-transform",
+        "values": [ "capitalize", "uppercase", "lowercase", "none", "fullwidth" ]
+    },{
+        "name": "text-wrap",
+        "values": [ "none", "normal", "unrestricted", "avoid" ]
+    },{
+        "name": "text-overflow",
+        "values": [ "ellipsis", "clip" ],
+        "prefixes": [ "ms" ]
+    },{
+        "name": "text-shadow",
+        "values": [ "<length>", "none" ]
+    },{
+        "name": "line-height",
+        "values": [ "normal", "<number>", "<dimension>" ]
+    },{
+        "name": "white-space",
+        "values": [ "normal", "pre", "nowrap", "pre-wrap", "pre-line" ]
+    },{
+        "name": "word-spacing",
+        "values": [ "normal", "<length>" ]
+    },{
+        "name": "word-wrap",
+        "values": [ "normal", "break-word" ],
+        "prefixes": [ "ms" ]
+    },{
+        "name": "word-break",
+        "values": [ "normal", "keep-all", "break-all" ],
+        "prefixes": [ "ms" ]
+    },{
+        "name": "hyphens",
+        "values": [ "none", "manual", "auto" ],
+        "prefixes": [ "webkit", "moz" ]
+    },{
+        "name": "letter-spacing",
+        "values": [ "normal", "<length>" ]
+    },{
+        "name": "font-family",
+        "values": [ "serif", "sans-serif", "cursive", "fantasy", "monospace", "<family-name>" ]
+    },{
+        "name": "font-size",
+        "values": [ "larger", "smaller", "xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large", "<dimension>" ]
+    },{
+        "name": "font-style",
+        "values": [ "normal", "italic", "oblique" ]
+    },{
+        "name": "font-variant",
+        "values": [ "normal", "small-caps" ]
+    },{
+        "name": "font-weight",
+        "values": [ "normal", "bold", "bolder", "lighter", "100", "200", "300", "400", "500", "600", "700", "800", "900" ]
+    },{
+        "name": "font-size-adjust",
+        "values": [ "none" ]
+    },{
+        "name": "font-stretch",
+        "values": [ "normal", "ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded" ]
+    },{
+        "name": "font",
+        "values": [ "<font_values>" ]
+    },{
+        "name": "tab-size",
+        "values": [ "<integer>" ],
+        "prefixes": [ "moz", "o" ]
+    },{
+        "name": "writing-mode",
+        "values": [ "lr-tb", "rl-tb", "tb-rl", "bt-rl", "tb-lr", "bt-lr", "lr-bt", "rl-bt", "lr", "rl", "tb" ],
+        "prefixes": [ "moz", "o" ],
+        "no-unprefixed-property": true
+
+
+
+    },{
+        "name": "opacity",
+        "values": [ "<alphavalue>" ]
+    },{
+        "name": "interpolation-mode",
+        "values": [ "bicubic", "nearest-neighbor" ],
+        "prefixes": [ "ms" ],
+        "no-unprefixed-property": true
+    },{
+        "name": "resize",
+        "values": [ "none", "both", "horizontal", "vertical" ]
+    },{
+        "name": "cursor",
+        "values": [ "auto", "none", "alias", "all-scroll", "cell", "col-resize", "context-menu", "copy", "crosshair", "default", "e-resize", "ew-resize", "help", "move", "n-resize", "ne-resize", "nesw-resize", "no-drop", "not-allowed", "ns-resize", "nw-resize", "nwse-resize", "pointer", "progress", "row-resize", "s-resize", "se-resize", "sw-resize", "text", "vertical-text", "w-resize", "wait", "<url>" ]
+    },{
+        "name": [ "nav-index", "nav-up", "nav-right", "nav-down", "nav-left" ],
+        "values": [ "auto" ]
+    },{
+        "name": [ "transition-delay", "transition-duration" ],
+        "values": [ "<time>" ],
+        "prefixes": [ "webkit", "moz", "ms", "o" ]
+    },{
+        "name": "transition-property",
+        "values": [ "none", "all", "<properties>" ],
+        "prefixes": [ "webkit", "moz", "ms", "o" ]
+    },{
+        "name": "transition-timing-function",
+        "values": [ "<timing-function>" ],
+        "prefixes": [ "webkit", "moz", "ms", "o" ]
+    },{
+        "name": "transition",
+        "values": [ "<transition-property>", "<transition-duration>", "<transition-delay>", "<transition-timing-function>" ],
+        "prefixes": [ "webkit", "moz", "ms", "o" ]
+    },{
+        "name": "transform",
+        "values": [ "none", "matrix()", "matrix3d()", "perspective()", "rotate()", "rotateX()", "rotateY()", "rotateZ()", "scale()", "scaleX()", "scaleY()", "scaleZ()", "skew()", "skewX()", "skewY()", "translate()", "translateX()", "translateY()", "translateZ()", "translate3d()" ],
+        "prefixes": [ "webkit", "moz", "ms", "o" ]
+    },{
+        "name": "transform-origin",
+        "values": [ "top", "center", "bottom", "left", "center", "right", "<percentage>", "<length>" ],
+        "prefixes": [ "webkit", "moz", "ms", "o" ]
+    },{
+        "name": "animation-name",
+        "values": [ "none", "<properties>" ],
+        "prefixes": [ "webkit", "moz", "ms", "o" ]
+    },{
+        "name": [ "animation-duration", "animation-delay" ],
+        "values": [ "<time>" ],
+        "prefixes": [ "webkit", "moz", "ms", "o" ]
+    },{
+        "name": "animation-timing-function",
+        "values": [ "<timing-function>" ],
+        "prefixes": [ "webkit", "moz", "ms", "o" ]
+    },{
+        "name": "animation-iteration-count",
+        "values": [ "infinite", "<number>" ],
+        "prefixes": [ "webkit", "moz", "ms", "o" ]
+    },{
+        "name": "animation-direction",
+        "values": [ "normal", "alternate" ],
+        "prefixes": [ "webkit", "moz", "ms", "o" ]
+    },{
+        "name": "animation",
+        "values": [ "<animation-name>", "<animation-duration>", "<animation-timing-function>", "<animation-delay>", "<animation-iteration-count>", "<animation-direction>" ],
+        "prefixes": [ "webkit", "moz", "ms", "o" ]
+    },{
+        "name": "animation-play-state",
+        "values": [ "running", "paused" ],
+        "prefixes": [ "webkit", "moz", "ms", "o" ]
+    },{
+        "name": "filter",
+        "_comment": "conflicts with font-style etc.",
+        "_values": [ "none", "grayscale()", "sepia()", "saturate()", "hue-rotate()", "invert()", "opacity()", "brightness()", "contrast()", "blur()", "drop-shadow()", "custom()" ]
+
+
+
+    },{
+        "name": "unicode-bidi",
+        "values": [ "normal", "embed", "bidi-override" ]
+    },{
+        "name": "direction",
+        "values": [ "ltr", "rtl" ]
+    },{
+        "name": "column-width",
+        "values": [ "<length>", "auto" ]
+    },{
+        "name": "column-count",
+        "values": [ "<integer>", "auto" ]
+    },{
+        "name": "columns",
+        "values": [ "<columns-width>", "<columns-count>" ],
+        "prefixes": [ "webkit", "moz" ]
+    },{
+        "name": "column-gap",
+        "values": [ "<length>", "normal" ],
+        "prefixes": [ "webkit", "moz" ]
+    },{
+        "name": "column-rule-color",
+        "values": [ "<color>" ],
+        "prefixes": [ "webkit", "moz" ]
+    },{
+        "name": "column-rule-style",
+        "values": [ "<border-style>" ],
+        "prefixes": [ "webkit", "moz" ]
+    },{
+        "name": "column-rule-width",
+        "values": [ "<border-width>" ],
+        "prefixes": [ "webkit", "moz" ]
+    },{
+        "name": "column-rule",
+        "values": [ "<column-rule-width>", "<column-rule-style>", "<column-rule-color>" ],
+        "prefixes": [ "webkit", "moz" ]
+    },{
+        "name": [ "break-before", "break-after" ],
+        "values": [ "auto", "always", "avoid", "left", "right", "page", "column", "avoid-page", "avoid-column" ]
+    },{
+        "name": "break-inside",
+        "values": [ "auto", "avoid", "avoid-page", "avoid-column" ]
+    },{
+        "name": "column-span",
+        "values": [ "none", "all" ]
+    },{
+        "name": "column-fill",
+        "values": [ "auto", "balance" ]
+    },{
+        "name": "orphans",
+        "values": [ "<integer>" ]
+    },{
+        "name": "widows",
+        "values": [ "<integer>" ]
+
+
+
+    },{
+        "name": "zoom",
+        "values": [ "auto", "<integer>" ]
+    },{
+        "name": "behavior",
+        "values": [ "none", "<url>" ]
+    }
+]

File sublime-text-2/Packages/Hayaku - tools for writing CSS faster/core/CSS-dict_snippets.json

+{
+    "<length>": {
+        ".": "em"
+        },
+    "<percentage>": {
+        "percentage": "%"
+        },
+    "<image>": {
+        "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}]"
+        }
+}

File sublime-text-2/Packages/Hayaku - tools for writing CSS faster/core/__init__.py

Empty file added.

File sublime-text-2/Packages/Hayaku - tools for writing CSS faster/core/__init__.pyc

Binary file added.

File sublime-text-2/Packages/Hayaku - tools for writing CSS faster/core/css_dict_driver.py

+# -*- coding: utf-8 -*-
+# (c) 2012 Sergey Mezentsev
+import json
+import string
+import os
+
+from itertools import chain, product
+
+JSON_CSS_DICT_FILENAME = 'CSS-dict.json'
+
+# парсер формата файла с css-правилами
+
+def file_path(filename):
+    filepath = os.path.join('.', filename)
+    return filepath if os.path.exists(filepath) else os.path.join('.', 'core', filename)
+
+def parse_dict_json(raw_dict):
+    result_dict = {}
+
+    valuable = (i for i in raw_dict if 'name' in i and 'values' in i)
+
+    for i in valuable:
+        name, values, default = i['name'], i['values'], i.get('default')
+        names = name if isinstance(name, list) else map(string.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
+
+CSS_DICT = parse_dict_json(json.load(open(file_path(JSON_CSS_DICT_FILENAME))))
+
+def css_defaults(name):
+    """Находит первое значение по-умолчанию
+    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']:
+        ret = css_defaults(v)
+        if ret is not None:
+            return ret
+
+def css_flat(name, values=None):
+    """Все значения у свойства (по порядку)
+    left -> [u'auto', u'<dimension>', u'<number>', u'<length>', 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'<percentage>', 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)
+    return values
+
+def css_flat_list(name):
+    """Возвращает список кортежей (свойство, возможное значение)
+    left -> [(left, auto), (left, <integer>), (left, .px)...]
+    """
+    return list(product((name,), css_flat(name)))
+
+FLAT_CSS = list(chain.from_iterable(map(css_flat_list, CSS_DICT)))

File sublime-text-2/Packages/Hayaku - tools for writing CSS faster/core/css_dict_driver.pyc

Binary file added.

File sublime-text-2/Packages/Hayaku - tools for writing CSS faster/core/css_dict_test.py

+# -*- coding: utf-8 -*-
+import unittest
+
+from css_dict_driver import expand_values, parse_dict, FILE_DATA
+
+class CssDictTests(unittest.TestCase):
+
+    def test_0(self):
+        pd = parse_dict(FILE_DATA)
+        self.assertEqual(expand_values(pd, pd.keys())['caption-side'], set(['top', 'bottom']))
+
+    def test_1(self):
+        pd = parse_dict(FILE_DATA)
+        self.assertEqual(expand_values(pd, pd.keys())['width'], set([
+            'auto', '<dimension>', "['100%']",
+            '<number>', '<length>', '<percentage>',
+            '.em', '.ex', '.vw', '.vh', '.vm', '.ch', '.rem',
+            '.px', '.cm', '.mm', '.in', '.pt', '.pc', '.%',
+            ]))
+
+
+if __name__ == '__main__':
+    unittest.main()

File sublime-text-2/Packages/Hayaku - tools for writing CSS faster/core/formatter.py

+# -*- coding: utf-8 -*-
+import re
+
+TEST_NAME = re.compile(r'.*\stest_([:\w]+)\s.*')
+TEST_RESULTS = re.compile(r".*'(.*)'.*'(.*)'.*")
+
+tests = []
+with open('test_data.py') as f:
+    for i, l in enumerate(f):
+        tests.append((l, i+1))
+
+with open('test.txt') as text:
+    with open('readable.txt', 'w') as out:
+        for line in text:
+            if line.startswith('FAIL:') or line.startswith('AssertionError:'):
+                res = TEST_NAME.search(line)
+                if res is not None:
+                    test_name = res.group(1)
+                    pat = '"{0}"'.format(test_name)
+                    line_n = 0
+                    for te, line_num in tests:
+                        if pat in te:
+                            line_n = line_num
+                            break
+                    out.write('{0} (line {1})\n'.format(test_name, line_n))
+                res = TEST_RESULTS.search(line)
+                if res is not None:
+                    out.write('  {0}\n'.format(res.group(1)))
+                    out.write('  {0}\n\n'.format(res.group(2)))
+            
+            if line.startswith('Ran') or line.startswith('FAILED'):
+                out.write(line)

File sublime-text-2/Packages/Hayaku - tools for writing CSS faster/core/hayaku_test.py

+# -*- coding: utf-8 -*-
+#*_*#
+import unittest
+
+from probe import extract