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
The auto-complete parenthesis function is nice, but it fails in very typical cases of use, demonstrated below:
% Simple example
\footnote{BEFORE first second third AFTER}
% Real life example
@article{abcd,
title={The chronicles of ABBA and Beegees -- A bibliography},
author={A. B. Charles},
journal={Phys. Rev. B}
}
In the first example, the first word's parenthesis was set correctly but the second was not. Pressing the { key replacedsecond instead of putting parenthesis around it.
Note also a second { key later, the second word stored in the buffer came back out.
In the second, more relevant example, is in .bib files.
As you may know, it is not uncommon to have to "protect" capitalized words in the bibliography fields, more commonly in the 'title' field. In the case where you have two or more words to protect, the parser is just unable to recognize the context that it is still within braces (the outermost one from title={...).
Then, one would have to put the braces around the words manually.
(Yes, one can always protect the whole title, like
title={{The chronicles of ABBA and Beegees -- A bibliography}},
but I don't do that, and I don't believe that it's good practice either way).
Expected behavior
For the auto-complete parenthesis to be more context-aware -- for it to be more aware that it is still encapsulated in braces in (at least) the two examples above; instead of just checking if the nearest brace behind the cursor is a closing one or not (I'm guessing this is the approach now..)
The text was updated successfully, but these errors were encountered:
Environment
Actual behavior
The auto-complete parenthesis function is nice, but it fails in very typical cases of use, demonstrated below:
In the first example, the
first
word's parenthesis was set correctly but thesecond
was not. Pressing the { key replacedsecond
instead of putting parenthesis around it.Note also a second { key later, the
second
word stored in the buffer came back out.In the second, more relevant example, is in
.bib
files.As you may know, it is not uncommon to have to "protect" capitalized words in the bibliography fields, more commonly in the 'title' field. In the case where you have two or more words to protect, the parser is just unable to recognize the context that it is still within braces (the outermost one from
title={...
).Then, one would have to put the braces around the words manually.
(Yes, one can always protect the whole title, like
but I don't do that, and I don't believe that it's good practice either way).
Expected behavior
For the auto-complete parenthesis to be more context-aware -- for it to be more aware that it is still encapsulated in braces in (at least) the two examples above; instead of just checking if the nearest brace behind the cursor is a closing one or not (I'm guessing this is the approach now..)
The text was updated successfully, but these errors were encountered: