Advertisement
mehigh

ZenCoding Sublime-Keymap

Jul 1st, 2011
476
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 8.25 KB | None | 0 0
  1. [
  2.   {
  3.     "args": {},
  4.     "command": "zen_as_you_type",
  5.     "context": [
  6.       {
  7.         "key": "selector",
  8.         "match_all": true,
  9.         "operand": "text.html, source.css, text.xml",
  10.         "operator": "equal"
  11.       }
  12.     ],
  13.     "keys": [
  14.       "ctrl+alt+enter"
  15.     ]
  16.   },
  17.   {
  18.     "args": {},
  19.     "command": "zen_css_mnemonic",
  20.     "context": [
  21.       {
  22.         "key": "selector",
  23.         "match_all": true,
  24.         "operand": "source.css",
  25.         "operator": "equal"
  26.       }
  27.     ],
  28.     "keys": [
  29.       "f1"
  30.     ]
  31.   },
  32.   {
  33.     //"argr_comment": "TODO",
  34.     "args": {
  35.       "0": "prop_value"
  36.     },
  37.     "command": "zen_css_mnemonic",
  38.     "context": [
  39.       {
  40.         "key": "selector",
  41.         "match_all": true,
  42.         "operand": "meta.property-value.css",
  43.         "operator": "equal"
  44.       }
  45.     ],
  46.     "keys": [
  47.       "f1"
  48.     ]
  49.   },
  50.   {
  51.     "args": {
  52.       "contents": " id=\"$1\""
  53.     },
  54.     "command": "insert_snippet",
  55.     "context": [
  56.       {
  57.         "key": "selector",
  58.         "match_all": true,
  59.         "operand": "text.html meta.tag -string -punctuation.definition.tag.begin.html -meta.scope.between-tag-pair.html",
  60.         "operator": "equal"
  61.       }
  62.     ],
  63.     "keys": [
  64.       "#"
  65.     ]
  66.   },
  67.   {
  68.     "args": {
  69.       "contents": " class=\"$1\""
  70.     },
  71.     "command": "insert_snippet",
  72.     "context": [
  73.       {
  74.         "key": "selector",
  75.         "match_all": true,
  76.         "operand": "text.html meta.tag -string -punctuation.definition.tag.begin.html -meta.scope.between-tag-pair.html",
  77.         "operator": "equal"
  78.       }
  79.     ],
  80.     "keys": [
  81.       "."
  82.     ]
  83.   },
  84.   {
  85.     "args": {
  86.       "contents": "id=\"$1\""
  87.     },
  88.     "command": "insert_snippet",
  89.     "context": [
  90.       {
  91.         "key": "selector",
  92.         "match_all": true,
  93.         "operand": "text.html meta.tag -string -punctuation.definition.tag.begin.html -meta.scope.between-tag-pair.html",
  94.         "operator": "equal"
  95.       },
  96.       {
  97.         "key": "preceding_text",
  98.         "match_all": true,
  99.         "operand": "\\s$",
  100.         "operator": "regex_contains"
  101.       }
  102.     ],
  103.     "keys": [
  104.       "#"
  105.     ]
  106.   },
  107.   {
  108.     "args": {
  109.       "contents": "class=\"$1\""
  110.     },
  111.     "command": "insert_snippet",
  112.     "context": [
  113.       {
  114.         "key": "selector",
  115.         "match_all": true,
  116.         "operand": "text.html meta.tag -string -punctuation.definition.tag.begin.html -meta.scope.between-tag-pair.html",
  117.         "operator": "equal"
  118.       },
  119.       {
  120.         "key": "preceding_text",
  121.         "match_all": true,
  122.         "operand": "\\s$",
  123.         "operator": "regex_contains"
  124.       }
  125.     ],
  126.     "keys": [
  127.       "."
  128.     ]
  129.   },
  130.   {
  131.     //"argr_comment": "TODO",
  132.     "args": {
  133.       "0": "$2"
  134.     },
  135.     "command": "set_html_syntax_and_insert_skel",
  136.     "context": [],
  137.     //"keyr_comment": "TODO",
  138.     "keys": [
  139.       "/html:/",
  140.       "/\\w+/",
  141.       "tab"
  142.     ]
  143.   },
  144.   {
  145.     //"argr_comment": "TODO",
  146.     "args": {
  147.       "0": "next_edit_point"
  148.     },
  149.     "command": "zen_action",
  150.     "context": [
  151.       {
  152.         "key": "selector",
  153.         "match_all": true,
  154.         "operand": "text.html, text.xml",
  155.         "operator": "equal"
  156.       }
  157.     ],
  158.     "keys": [
  159.       "ctrl+shift+period"
  160.     ]
  161.   },
  162.   {
  163.     //"argr_comment": "TODO",
  164.     "args": {
  165.       "0": "prev_edit_point"
  166.     },
  167.     "command": "zen_action",
  168.     "context": [
  169.       {
  170.         "key": "selector",
  171.         "match_all": true,
  172.         "operand": "text.html, text.xml",
  173.         "operator": "equal"
  174.       }
  175.     ],
  176.     "keys": [
  177.       "ctrl+shift+comma"
  178.     ]
  179.   },
  180.   {
  181.     //"argr_comment": "TODO",
  182.     "args": {
  183.       "0": "merge_lines"
  184.     },
  185.     "command": "zen_action",
  186.     "context": [
  187.       {
  188.         "key": "selector",
  189.         "match_all": true,
  190.         "operand": "text.html, text.xml",
  191.         "operator": "equal"
  192.       }
  193.     ],
  194.     "keys": [
  195.       "ctrl+j"
  196.     ]
  197.   },
  198.   {
  199.     //"argr_comment": "TODO",
  200.     "args": {
  201.       "0": "split_join_tag"
  202.     },
  203.     "command": "zen_action",
  204.     "context": [
  205.       {
  206.         "key": "selector",
  207.         "match_all": true,
  208.         "operand": "text.html, text.xml",
  209.         "operator": "equal"
  210.       },
  211.       {
  212.         "key": "selection_empty",
  213.         "match_all": true,
  214.         "operand": true,
  215.         "operator": "equal"
  216.       }
  217.     ],
  218.     "keys": [
  219.       "ctrl+shift+l"
  220.     ]
  221.   },
  222.   {
  223.     //"argr_comment": "TODO",
  224.     "args": {
  225.       "0": "go_to_matching_pair"
  226.     },
  227.     "command": "zen_action",
  228.     "context": [
  229.       {
  230.         "key": "selector",
  231.         "match_all": true,
  232.         "operand": "text.html, text.xml",
  233.         "operator": "equal"
  234.       }
  235.     ],
  236.     "keys": [
  237.       "ctrl+alt+n"
  238.     ]
  239.   },
  240.   {
  241.     //"argr_comment": "TODO",
  242.     "args": {
  243.       "0": "update_image_size"
  244.     },
  245.     "command": "zen_action",
  246.     "context": [
  247.       {
  248.         "key": "selector",
  249.         "match_all": true,
  250.         "operand": "text.html",
  251.         "operator": "equal"
  252.       }
  253.     ],
  254.     "keys": [
  255.       "ctrl+shift+i"
  256.     ]
  257.   },
  258.   {
  259.     //"argr_comment": "TODO",
  260.     "args": {
  261.       "0": "match_pair"
  262.     },
  263.     "command": "zen_action",
  264.     "context": [
  265.       {
  266.         "key": "selector",
  267.         "match_all": true,
  268.         "operand": "text.html, text.xml",
  269.         "operator": "equal"
  270.       }
  271.     ],
  272.     "keys": [
  273.       "ctrl+shift+n"
  274.     ]
  275.   },
  276.   {
  277.     //"argr_comment": "TODO",
  278.     "args": {
  279.       "0": "go_to_matching_pair"
  280.     },
  281.     "command": "zen_action",
  282.     "context": [
  283.       {
  284.         "key": "selector",
  285.         "match_all": true,
  286.         "operand": "string",
  287.         "operator": "equal"
  288.       }
  289.     ],
  290.     "keys": [
  291.       "ctrl+alt+n"
  292.     ]
  293.   },
  294.   {
  295.     //"argr_comment": "TODO",
  296.     "args": {
  297.       "0": "match_pair"
  298.     },
  299.     "command": "zen_action",
  300.     "context": [
  301.       {
  302.         "key": "preceding_text",
  303.         "match_all": true,
  304.         "operand": "<",
  305.         "operator": "regex_contains"
  306.       },
  307.       {
  308.         "key": "selector",
  309.         "match_all": true,
  310.         "operand": "string",
  311.         "operator": "equal"
  312.       }
  313.     ],
  314.     "keys": [
  315.       "ctrl+shift+n"
  316.     ]
  317.   },
  318.   {
  319.     //"argr_comment": "TODO",
  320.     "args": {
  321.       "0": "$1"
  322.     },
  323.     "command": "expand_css_value_abbr",
  324.     "context": [
  325.       {
  326.         "key": "selector",
  327.         "match_all": true,
  328.         "operand": "meta.property-list.css meta.property-value.css",
  329.         "operator": "equal"
  330.       },
  331.       {
  332.         "key": "following_text",
  333.         "match_all": true,
  334.         "operand": "^[ ]+;",
  335.         "operator": "regex_contains"
  336.       }
  337.     ],
  338.     //"keyr_comment": "TODO",
  339.     "keys": [
  340.       "/[a-z]+/",
  341.       "tab"
  342.     ]
  343.   },
  344.   {
  345.     //"argr_comment": "TODO",
  346.     "args": {
  347.       "0": "$1"
  348.     },
  349.     "command": "expand_css_value_abbr",
  350.     "context": [
  351.       {
  352.         "key": "selector",
  353.         "match_all": true,
  354.         "operand": "meta.property-list.css meta.property-value.css",
  355.         "operator": "equal"
  356.       },
  357.       {
  358.         "key": "following_text",
  359.         "match_all": true,
  360.         "operand": "^;$",
  361.         "operator": "not_regex_contains"
  362.       }
  363.     ],
  364.     //"keyr_comment": "TODO",
  365.     "keys": [
  366.       "/[a-z]+/",
  367.       "tab"
  368.     ]
  369.   },
  370.   {
  371.     //"argr_comment": "TODO",
  372.     "args": {
  373.       "contents": "expand_abbreviation"
  374.     },
  375.     // "command": "insert_snippet",
  376.     "command": "zen_action",
  377.     "context": [
  378.        {
  379.          "key": "is_zen",
  380.          "operand": true,
  381.          "operator": "equal"
  382.        },
  383.       {
  384.         "key": "selection_empty",
  385.         "match_all": true,
  386.         "operand": true,
  387.         "operator": "equal"
  388.       },
  389.       {
  390.         "key": "num_selections",
  391.         "operand": 1,
  392.         "operator": "equal"
  393.       },
  394.       {
  395.         "key": "selector",
  396.         "match_all": true,
  397.         "operand": "text.xml - meta.tag, text.html - source - meta.tag, punctuation.definition.tag.begin, meta.scope.between-tag-pair.html, source.css, source.js",
  398.         "operator": "equal"
  399.       }
  400.     ],
  401.     "keys": [
  402.       "tab"
  403.     ]
  404.   }
  405. ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement