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
Some snippet plugins (namely ultisnips/snipmate) put the user into select mode when completing a snippet, which triggers the autocommand to switch foldmethod to expr and in turn causes the folding to update. This may cause text that is beeing edited to be folded, which prevents the user from naming the completed environment.
To reproduce, install Latex-Box, ultisnips and vim-snippets, then open a new tex document, containing only a \documentclass{...} command, enter "begin" and complete the snippet.
\documentclass{...}
begin$% $ is the cursor, complete snippet here
I have solved the problem by changing LatexBox_FoldLevel to always return 0 for the current environment (LatexBox_GetCurrentEnvironment), I'm not sure though if that is the way to go, but I don't know vimscript and this is the best I could do.
The text was updated successfully, but these errors were encountered:
Interesting. I'll see what I can do. In the mean time, I can recommend the relatively new option to manually update the folds. See the docs for g:LatexBox_fold_automatic.
Some snippet plugins (namely ultisnips/snipmate) put the user into select mode when completing a snippet, which triggers the autocommand to switch
foldmethod
toexpr
and in turn causes the folding to update. This may cause text that is beeing edited to be folded, which prevents the user from naming the completed environment.To reproduce, install Latex-Box, ultisnips and vim-snippets, then open a new tex document, containing only a \documentclass{...} command, enter "begin" and complete the snippet.
I have solved the problem by changing LatexBox_FoldLevel to always return 0 for the current environment (LatexBox_GetCurrentEnvironment), I'm not sure though if that is the way to go, but I don't know vimscript and this is the best I could do.
The text was updated successfully, but these errors were encountered: