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

C/C++ files: sexy comment across //-style commented lines #296

Open
bartgol opened this issue May 3, 2017 · 5 comments · May be fixed by #301
Open

C/C++ files: sexy comment across //-style commented lines #296

bartgol opened this issue May 3, 2017 · 5 comments · May be fixed by #301
Labels

Comments

@bartgol
Copy link

bartgol commented May 3, 2017

Currently, when I try to use the 'sexy' comment style on a piece of code like this


// My comment
some_code_here;

I end up with the following

/*
*// My comment
*some_code_here
*/

Which is not working, since *// closes the commented section. I was wondering if it's possible to insert a space after each * in the commented secion, so to avoid the formation of */ constructs, which for the compiler mean the end of the commented section.

@bartgol bartgol changed the title Sexy comment across //-stype commented lines Sexy comment across //-style commented lines May 3, 2017
@bartgol bartgol changed the title Sexy comment across //-style commented lines C/C++ files: sexy comment across //-style commented lines May 3, 2017
@alerque
Copy link
Member

alerque commented May 4, 2017

That's probably a good idea. Anybody want to tackle this?

@alerque alerque added the bug label May 4, 2017
@Skian12 Skian12 linked a pull request Jun 6, 2017 that will close this issue
@bartgol
Copy link
Author

bartgol commented Mar 23, 2018

Not sure if this option was there from the beginning, but I found out that using
let g:NERDSpaceDelims = 1
solves the issue, so I'm going to close this.

@bartgol bartgol closed this as completed Mar 23, 2018
@alerque
Copy link
Member

alerque commented Jun 19, 2018

I see how that option mitigates this problem for your use case, but I think it would be nice if we had a proper fix as well. This probably needs to do some kind of search looking for end-tag conflicts and handle them in the same way that nested comments get re-written as alternative tokens.

I'm going to re-open this issue to keep track of it long term and to signal that we're still looking for a proper solution. That way it stays on the radar of things that could use fixing.

@alerque alerque reopened this Jun 19, 2018
@Ryuno-Ki
Copy link

@alerque Maybe it makes sense to create a new label to indicate, that you would accept PRs. Something like „PR wanted” or so.

@alerque
Copy link
Member

alerque commented Jul 2, 2018

@Ryuno-Ki Please don't repeat the same comment more than one place. See here for my response.

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

Successfully merging a pull request may close this issue.

3 participants