diff --git a/Snippets/Mouse Bindings/Simple Mouse Binding.sublime-snippet b/Snippets/Mouse Bindings/Simple Mouse Binding.sublime-snippet
new file mode 100644
index 00000000..28dfa12d
--- /dev/null
+++ b/Snippets/Mouse Bindings/Simple Mouse Binding.sublime-snippet
@@ -0,0 +1,11 @@
+
+
+ k
+ Creates a Mouse binding
+ source.sublimemousemap
+
\ No newline at end of file
diff --git a/Support/Comments.tmPreferences b/Support/Comments.tmPreferences
index 387e7846..d96f83a0 100644
--- a/Support/Comments.tmPreferences
+++ b/Support/Comments.tmPreferences
@@ -5,7 +5,7 @@
name
Comments
scope
- source.sublime-settings, source.sublimemacro, source.sublimekeymap
+ source.sublime-settings, source.sublimemacro, source.sublimekeymap, source.sublimemousemap
settings
shellVariables
diff --git a/Syntax Definitions/Sublime Mouse Map.YAML-tmLanguage b/Syntax Definitions/Sublime Mouse Map.YAML-tmLanguage
new file mode 100644
index 00000000..8148402c
--- /dev/null
+++ b/Syntax Definitions/Sublime Mouse Map.YAML-tmLanguage
@@ -0,0 +1,93 @@
+# [PackageDev] target_format: plist, ext: tmLanguage
+name: Sublime Text Mouse Map
+scopeName: source.sublimemousemap
+fileTypes: [sublime-mousemap]
+uuid: 4df15ed4-7b42-41e2-849d-14347b8a3816
+
+patterns:
+- include: '#multiLineComment'
+
+- include: '#lineComment'
+
+- contentName: meta.mousebinding.collection.sublimemousemap
+ begin: (^\[)
+ end: (^\])
+ patterns:
+ - include: '#multiLineComment'
+ - include: '#lineComment'
+ - include: '#button'
+ - include: '#modifier'
+ - include: '#mainKeys'
+ - include: '#supportKeys'
+ - include: '#string'
+ - include: '#numericPrimitives'
+
+repository:
+ multiLineComment:
+ name: comment.block.sublimemousemap
+ begin: /\*
+ end: \*/
+
+ lineComment:
+ name: comment.line.double-slash.sublimemousemap
+ match: //.*?$
+
+ button:
+ match: |
+ (?x)
+ "(button)":
+ \s*
+ "(?:(button[1-5]|scroll_(?:down|up))|(\w*))"
+ captures:
+ '1': {name: keyword.other.sublimemousemap}
+ '2': {name: support.function.button.mouse.sublimemousemap}
+ '3': {name: string.double.quote.button.mouse.sublimemousemap}
+
+ modifier:
+ begin: '"(modifiers)":\s*\['
+ beginCaptures:
+ '1': {name: keyword.other.sublimemousemap}
+ end: \]
+ patterns:
+ - contentName: meta.key.sequence.sublimemousemap
+ begin: (")
+ beginCaptures:
+ '1': {name: punctuation.mousebinding.definition.key.sequence.start.sublimemousemap}
+ end: (")
+ endCaptures:
+ '1': {name: punctuation.mousebinding.definition.key.sequence.end.sublimemousemap}
+ patterns:
+ - match: (shift|ctrl|alt|super|button[1-5])
+ captures:
+ '1': {name: support.function.modifier.key.sublimemousemap}
+ - match: (\w+)
+ captures:
+ '1': {name: invalid.illegal.modifier.key.sublimemousemap}
+ - include: '#multiLineComment'
+ - include: '#lineComment'
+
+ mainKeys:
+ match: '"(command|args|press_command|press_args|button|count)":'
+ captures:
+ '1': {name: keyword.other.sublimemousemap}
+
+ supportKeys:
+ match: '"([A-z]+?)":'
+ captures:
+ '1': {name: support.function.sublimemousemap}
+
+ string:
+ contentName: string.double.quote.sublimemousemap
+ begin: '"'
+ end: '"'
+ patterns:
+ - name: constant.character.escape.sublimemousemap
+ match: \\.
+ - include: source.sublimesnippetraw
+
+ numericPrimitives:
+ patterns:
+ - name: constant.numeric.boolean.sublimemousemap
+ match: \b(?:true|false)\b
+ - name: constant.numeric.sublimemousemap
+ match: \d+(?:\.\d+)?
diff --git a/Syntax Definitions/Sublime Mouse Map.tmLanguage b/Syntax Definitions/Sublime Mouse Map.tmLanguage
new file mode 100644
index 00000000..8b023d99
--- /dev/null
+++ b/Syntax Definitions/Sublime Mouse Map.tmLanguage
@@ -0,0 +1,259 @@
+
+
+
+
+ fileTypes
+
+ sublime-mousemap
+
+ name
+ Sublime Text Mouse Map
+ patterns
+
+
+ include
+ #multiLineComment
+
+
+ include
+ #lineComment
+
+
+ begin
+ (^\[)
+ contentName
+ meta.mousebinding.collection.sublimemousemap
+ end
+ (^\])
+ patterns
+
+
+ include
+ #multiLineComment
+
+
+ include
+ #lineComment
+
+
+ include
+ #button
+
+
+ include
+ #modifier
+
+
+ include
+ #mainKeys
+
+
+ include
+ #supportKeys
+
+
+ include
+ #string
+
+
+ include
+ #numericPrimitives
+
+
+
+
+ repository
+
+ button
+
+ captures
+
+ 1
+
+ name
+ keyword.other.sublimemousemap
+
+ 2
+
+ name
+ support.function.button.mouse.sublimemousemap
+
+ 3
+
+ name
+ string.double.quote.button.mouse.sublimemousemap
+
+
+ match
+ (?x)
+ "(button)":
+ \s*
+ "(?:(button[1-5]|scroll_(?:down|up))|(\w*))"
+
+
+ lineComment
+
+ match
+ //.*?$
+ name
+ comment.line.double-slash.sublimemousemap
+
+ mainKeys
+
+ captures
+
+ 1
+
+ name
+ keyword.other.sublimemousemap
+
+
+ match
+ "(command|args|press_command|press_args|button|count)":
+
+ modifier
+
+ begin
+ "(modifiers)":\s*\[
+ beginCaptures
+
+ 1
+
+ name
+ keyword.other.sublimemousemap
+
+
+ end
+ \]
+ patterns
+
+
+ begin
+ (")
+ beginCaptures
+
+ 1
+
+ name
+ punctuation.mousebinding.definition.key.sequence.start.sublimemousemap
+
+
+ contentName
+ meta.key.sequence.sublimemousemap
+ end
+ (")
+ endCaptures
+
+ 1
+
+ name
+ punctuation.mousebinding.definition.key.sequence.end.sublimemousemap
+
+
+ patterns
+
+
+ captures
+
+ 1
+
+ name
+ support.function.modifier.key.sublimemousemap
+
+
+ match
+ (shift|ctrl|alt|super|button[1-5])
+
+
+ captures
+
+ 1
+
+ name
+ invalid.illegal.modifier.key.sublimemousemap
+
+
+ match
+ (\w+)
+
+
+
+
+ include
+ #multiLineComment
+
+
+ include
+ #lineComment
+
+
+
+ multiLineComment
+
+ begin
+ /\*
+ end
+ \*/
+ name
+ comment.block.sublimemousemap
+
+ numericPrimitives
+
+ patterns
+
+
+ match
+ \b(?:true|false)\b
+ name
+ constant.numeric.boolean.sublimemousemap
+
+
+ match
+ \d+(?:\.\d+)?
+ name
+ constant.numeric.sublimemousemap
+
+
+
+ string
+
+ begin
+ "
+ contentName
+ string.double.quote.sublimemousemap
+ end
+ "
+ patterns
+
+
+ match
+ \\.
+ name
+ constant.character.escape.sublimemousemap
+
+
+ include
+ source.sublimesnippetraw
+
+
+
+ supportKeys
+
+ captures
+
+ 1
+
+ name
+ support.function.sublimemousemap
+
+
+ match
+ "([A-z]+?)":
+
+
+ scopeName
+ source.sublimemousemap
+ uuid
+ 4df15ed4-7b42-41e2-849d-14347b8a3816
+
+