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

Improve highlight of commented code #2319

Merged
merged 2 commits into from
Feb 1, 2022
Merged

Improve highlight of commented code #2319

merged 2 commits into from
Feb 1, 2022

Conversation

julio-b
Copy link
Contributor

@julio-b julio-b commented Feb 1, 2022

First commit is a simple fix for \iffalse <commented-code>[\else <not-commented-code>]\fi command.
In the second commit i tried to add highlights for \iftrue <not-commented-code> [\else <commented code>]\fi command.
I've never used vim syntax before, so i'm not sure if this is the correct way to implement \iftrue.

I must admit that this pr is not very useful. But it allows you, for example, a quick switch draft mode by simply replacing \iftrue with \iffalse etc.
2022-02-01-210318_547x116_scrot
2022-02-01-210334_559x122_scrot

The contents after \else should not be highlighted as a comment
ref: lervag#1988
Highlight the \else section of \iftrue command as a comment
ref: lervag#1988
lervag added a commit that referenced this pull request Feb 1, 2022
lervag added a commit that referenced this pull request Feb 1, 2022
@lervag lervag merged commit 09ba976 into lervag:master Feb 1, 2022
@lervag
Copy link
Owner

lervag commented Feb 1, 2022

Thanks! I made a couple of minor adjustments myself, I hope you don't mind. I think you did a good implementation, but I want to keep it in my "style". And I used containedin to avoid the clusters.

@julio-b
Copy link
Contributor Author

julio-b commented Feb 1, 2022

Thank you! I don't mind at all, in fact your adjustments helped me to better understand the way that VimL combines regions with each other.
Thank you for this plugin!

@lervag
Copy link
Owner

lervag commented Feb 2, 2022

Great; glad to hear it :)

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.

None yet

2 participants