Files
2013-04-04 08:54:25 -04:00

93 lines
2.9 KiB
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[
// 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"}
]
}
]