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

Disable blockwise comment? #269

Closed
semin-park opened this issue Jun 13, 2020 · 2 comments
Closed

Disable blockwise comment? #269

semin-park opened this issue Jun 13, 2020 · 2 comments

Comments

@semin-park
Copy link

Thank you for this great feature!

I have a quick question about how to disable blockwise comments.

All C/C++ codes are using linewise comments (//), but for some reason, .cu and .cuh files (CUDA files) are commented using blockwise comments (/* ... */).

How would I be able to disable this behaviour and force to use linewise (//) comment for CUDA files as well?

@tomtom
Copy link
Owner

tomtom commented Jun 14, 2020

Put this into autoload/tcomment/types/semin-park.vim:

call tcomment#DefineType('cuda', tcomment#GetLineC('// %s'))

If this works for you, I'll add it to the default definitions.

@semin-park
Copy link
Author

That worked like a charm! It seems like DefineType is now deprecated so I changed it to #type#Define, but anyway it works fine :)

tomtom added a commit that referenced this issue Jun 18, 2020
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

No branches or pull requests

2 participants