You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In TeX, I'm using things like \left( x + 2 \right) often. I'm using UltiSnips to create the left-right pairs. I would like for delimitMate to ignore the \left( and not try to automatically close the parenthesis. From the tex syntax definition I discerned that things like \left( and \biggl( are in something like texMathDelimGroup or just texMathDelim. I tried this setting in my .vimrc:
let delimitMate_excluded_regions = "texMathDelim,texMathDelimGroup"
However, I'm still getting autoclosing when I type \left(.
BTW, I also have let delimitMate_smart_matchpairs = ''.
The text was updated successfully, but these errors were encountered:
Same issue. Trying to avoid autoclosing pairs for "String" and "Comment" syntax groups, as described in a doc. Unfortunately, it does not work, autoclosing behavior is still in action.
let delimitMate_excluded_regions = "Comment,String"
Then I check my highlight groups for "Comment" and "String". As I'm using "vim-dracula" theme, those syntax groups are linked to Dracula internal groups.
:hi String
String xxx links to DraculaYellow
:hi Comment
Comment xxx term=bold ctermfg=14 guifg=#80a0ff
links to DraculaComment
Then, I tweaked a config to refer those "Dracula" highlight groups instead. And it works!!!
let delimitMate_excluded_regions = "DraculaComment,DraculaYellow"
AFAIK, in Vim syntax group name (String, Comment) and highlight group are separate concepts. Syntax group indicates a particular token in a text, and can be linked to a highlight group to apply colours.
But turns out this plugin relies upon highlight groups rather than syntax group names. If you're not using any theme, String and Comment group names would work just fine. However, if they are linked by a theme plugin (my case), you have to use aforementioned workaround. Be aware, that this solution makes your vimrc more fragile by putting implicit extra dependency to your current vim theme.
In TeX, I'm using things like
\left( x + 2 \right)
often. I'm using UltiSnips to create the left-right pairs. I would like for delimitMate to ignore the\left(
and not try to automatically close the parenthesis. From the tex syntax definition I discerned that things like\left(
and\biggl(
are in something liketexMathDelimGroup
or justtexMathDelim
. I tried this setting in my .vimrc:However, I'm still getting autoclosing when I type
\left(
.BTW, I also have
let delimitMate_smart_matchpairs = ''
.The text was updated successfully, but these errors were encountered: