Skip to content

Instantly share code, notes, and snippets.

@Naereen
Last active February 6, 2016 00:28
Show Gist options
  • Save Naereen/90be74c38197a6ff02fa to your computer and use it in GitHub Desktop.
Save Naereen/90be74c38197a6ff02fa to your computer and use it in GitHub Desktop.
Custom brackets for LaTeX+ for the BracketHighlighter Sublime Text 3 plugin
{
// Custom brackets for LaTeX+ for the BracketHighlighter Sublime Text 3 plugin
// Needs the LaTeX+ plugin from https://github.com/randy3k/Latex-Plus/
// And the BracketHighlighter plugin from https://github.com/facelessuser/BracketHighlighter
// Based on this page https://github.com/randy3k/Latex-Plus/wiki/BracketHighlighter-settings
//
// HowTo use: save this to Packages/User/bh_core.sublime-settings
// (or Menu > Preferences > Package Settings > BracketHighlighter > Brackets Settings - User)
//
// FIXME reorder the objects in a more logical fashion
"user_brackets": [
{
"name": "latex_plus_left_right",
"open": "(\\\\left(?:[()\\[\\]]\\\\[{}]\\\\[a-zA-Z]+))",
"close": "(\\\\right(?:[()\\[\\]]\\\\[{}]\\\\[a-zA-Z]+))",
// These two lines could probably fails if copied/pasted (on Firefox)
// Cf. https://github.com/randy3k/LaTeX-Plus/issues/36
"style": "default",
"enabled": true,
"find_in_sub_search": "true",
"scope_exclude": [
"comment"
],
"scopes": [
"meta.function.environment.math.latex"
]
},
{
"close": "(\\\\rangle)",
"enabled": true,
"find_in_sub_search": "true",
"name": "latex_plus_langle_rangle",
"open": "(\\\\langle)",
"scope_exclude": [
"comment"
],
"scopes": [
"meta.function.environment.math.latex"
],
"style": "default"
},
{
"close": "(\\\\end\\{\\s*(?:\\w*)\\*?\\s*\\})",
"enabled": true,
"find_in_sub_search": "true",
"name": "latex_plus_begin_end",
"open": "(\\\\begin\\{\\s*(?:\\w*)\\*?\\s*\\})",
"scope_exclude": [
"comment"
],
"style": "default"
},
{
"close": "((?<!\\\\)\\\\\\])",
"enabled": true,
"find_in_sub_search": "true",
"ignore_string_escape": true,
"name": "latex_plus_square",
"open": "((?<!\\\\)\\\\\\[)",
"scope_exclude": [
"comment"
],
"style": "square"
},
{
"close": "((?<!\\\\)\\\\\\})",
"enabled": true,
"find_in_sub_search": "true",
"ignore_string_escape": true,
"name": "latex_plus_curly",
"open": "((?<!\\\\)\\\\\\{)",
"scope_exclude": [
"comment"
],
"style": "curly"
},
{
"close": "((?<!\\\\)\\\\\\))",
"enabled": true,
"find_in_sub_search": "true",
"ignore_string_escape": true,
"name": "latex_plus_round",
"open": "((?<!\\\\)\\\\\\()",
"scope_exclude": [
"comment"
],
"style": "round"
}
],
"user_scope_brackets": [
{
"close": "((?<!\\\\)\\$)",
"enabled": true,
"name": "latex_plus_dollar",
"open": "((?<!\\\\)\\$)",
"scopes": [
"meta.function.environment.math.latex"
],
"style": "default",
"sub_bracket_search": "true"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment