tomtom / tcomment_vim

An extensible & universal comment vim-plugin that also handles embedded filetypes
http://www.vim.org/scripts/script.php?script_id=1173
GNU General Public License v3.0
1.4k stars 103 forks source link

Disable blockwise comment? #269

Closed semin-park closed 4 years ago

semin-park commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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