Skip to content
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

mini-fix #2989

Closed
wants to merge 9 commits into from
Closed

mini-fix #2989

wants to merge 9 commits into from

Conversation

ces42
Copy link
Contributor

@ces42 ces42 commented Aug 20, 2024

For some reason I don't understand my BufReadCmd makes my files lose syntax highlighting when calling edit %. This is triggered by inverse search when I have two windows of the same file open. This avoids it.

I don't 100% understand the code in vimtex#view#inverse_search (in particular I don't know what could cause an error in the try), so there might be a downside to doing this.

EDIT: aargh, wrong branch. Ignore this,

`hyperfine -n 15 "vi -u NONE -c 'source test.vim'"` gives `1.022 ± 0.004 s`
`hyperfine -n 15 "vi -u NONE -c 'source test.vim'"` gives `1.002 ± 0.005 s`
`hyperfine -n 15 "vi -u NONE -c 'source test.vim'"` gives `982.8 ± 8.2 ms`
`hyperfine -n 15 "vi -u NONE -c 'source test.vim'"` gives `911.0 ± 3.7 ms`
(also only one `texMathError` rule for un-matched `\end`s)

I had to create a separate group `texMathEnvBgnEnd2` which is a bit
jank.

`hyperfine -n 15 "vi -u NONE -c 'source test.vim'"` gives `856.8 ± 5.7 ms`
also try a bit harder to only create one big `texMathEnvBgnEnd` rule, and I got rid of `texMathEnvBgnEnd2`.
Unfortunately I had to restrict funcionality a bit, it is no longer
possible to specify predicates when using `new_env` with `{'math':
v:true}`

`hyperfine -n 15 "vi -u NONE -c 'source test.vim'"` gives `822.7 ± 6.3 ms`
@ces42 ces42 closed this Aug 20, 2024
@lervag
Copy link
Owner

lervag commented Aug 20, 2024

EDIT: aargh, wrong branch. Ignore this,

Will do; no problem! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants