-
-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closing latex environments #41
Comments
So far after some playing I was able to figure out that the following sequence does the job: let b:endwise_words = '\\begin{\zs[a-zA-Z0-9*]*\ze}' " ignored
let b:endwise_pattern = '\\begin{\zs[a-zA-Z0-9*]*\ze}'
let b:endwise_addition = '\\end{&}'
let b:endwise_syngroups = 'texBeginEndName' But it doesn't prevent endwise to add the ending even if it already exists. For now I don't know how it works and how it can be fixed. |
Nevertheless, this could for better or worse be included in the standard plugin. |
Where did |
It's from vim's tex syntax file. " Vim syntax file |
That's a curious inconsistency with both 7.3.000 and 7.4.000 but doesn't appear to be relevant. |
The example given by @maxfl doesn't seem to work for me. This would be very cool to have working somehow in any case. |
I can confirm @maxfl example works and the problem with preventing extra endings exists. There's two factors affecting this. Firstly, Secondly, in Latex's syntax highlighting, Another minor issue is that the |
This has been working for me: autocmd FileType tex
\ let b:endwise_addition = '\="\\end" . matchstr(submatch(0), "{.\\{-}}")' |
\ let b:endwise_words = 'begin' |
\ let b:endwise_pattern = '\\begin{.\{-}}' |
\ let b:endwise_syngroups = 'texSection,texBeginEnd,texBeginEndName,texStatement' Edit: you can do \begin{env*} now too. |
Thanks @elliotpatros! That works for me :) |
I was trying to add latex environment to endwise by adding the following code:
to ftplugin/tex.vim and it fails.
I guess I completely do not understand how configuration is supposed to be done. The idea is to close the following block:
The block may be indented. Is it possible to add the latex support to the endwise?
Thanks!
The text was updated successfully, but these errors were encountered: