]> git.lizzy.rs Git - micro.git/blobdiff - runtime/syntax/keymap.yaml
Merge branch 'python-highlight-zero' of https://github.com/a11ce/micro into a11ce...
[micro.git] / runtime / syntax / keymap.yaml
index c5282a3a25ed5dec85e7874d67937f9262fc4ac4..317a1eea97b7fa404fab15f577fd06f09e3f11b6 100644 (file)
@@ -1,14 +1,27 @@
 filetype: keymap
 
-detect: 
+detect:
     filename: "\\.(k|key)?map$|Xmodmap$"
 
 rules:
     - statement: "\\b(add|clear|compose|keycode|keymaps|keysym|remove|string)\\b"
-    - identifier: "\\b(control|alt|shift)\\b"
+    - statement: "\\b(control|alt|shift)\\b"
     - constant.number: "\\b[0-9]+\\b"
-    - symbol: "="
-    - constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'"
-    - comment: "^!.*$"
-    - indent-char.whitespace: "[[:space:]]+$"
-    - indent-char: "   + +| +  +"
+    - special: "="
+    - constant.string:
+        start: "\""
+        end: "\""
+        skip: "\\\\."
+        rules:
+            - constant.specialChar: "\\\\."
+    - constant.string:
+        start: "'"
+        end: "'"
+        skip: "\\\\."
+        rules:
+            - constant.specialChar: "\\\\."
+    - comment:
+        start: "^!"
+        end: "$"
+        rules: []
+