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

Single line comment support for html, xml #8

Closed
EMPAT94 opened this issue Mar 25, 2021 · 6 comments
Closed

Single line comment support for html, xml #8

EMPAT94 opened this issue Mar 25, 2021 · 6 comments
Labels
enhancement New feature or request

Comments

@EMPAT94
Copy link
Contributor

EMPAT94 commented Mar 25, 2021

Hello!

Would love if support for html, xml single line comments was present, like so -

<!-- Comment goes here -->

<a href="#"> link </a>    <!-- uncommented tag --> 

<!-- <a href="#"> link </a> -->    <!-- commented tag --> 

Thanks!

@gennaro-tedesco
Copy link
Owner

I see, so essentially we want to use the block comment characters at the beginning and end of the line, wrapping the text inside, if I understand correctly.

@gennaro-tedesco
Copy link
Owner

I have created pull request #9 to address this issue. At a first glance it seems to me that the change is trivial, one can simply toggle block mode on single lines too, see here.

I am trying to mock the vim.api for testing, however this seems to be slightly non-trivial. Below you can find a gif of the expected behaviour on single lines for html files:

Screen-Recording-2021-03-25-at-1

Please check that it works as expected on standard html files (both for single and for block comments again).

@EMPAT94
Copy link
Contributor Author

EMPAT94 commented Mar 26, 2021

Hello mate,

I checked the single-wrap branch on an html file. Works just fine, for both single and block comments.

It doesn't work for xml files though. Perhaps we can add them to the config before merge? Their comment scheme is same as html.

Thanks!

@gennaro-tedesco
Copy link
Owner

I added xml configurations in ccd5a17

If all good, I will merge.

@EMPAT94
Copy link
Contributor Author

EMPAT94 commented Mar 26, 2021

Yep. all good! Can merge. Thank you!

@gennaro-tedesco
Copy link
Owner

Merged. Please PlugUpdate to see all new changes.

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

No branches or pull requests

2 participants