vhda / verilog_systemverilog.vim

Verilog/SystemVerilog Syntax and Omni-completion
366 stars 89 forks source link

Add commentstring for vim commentary #234

Closed mpkopec closed 8 months ago

mpkopec commented 8 months ago

Hi! I (and probably not only I) use vim-commentary by T. Pope to comment stuff out in the code, this plugin relies on the commentstring setting, which is local to buffer, and in my opinion should be defined withing the Verilog syntax definition, but I am a complete noob in VimScript and plugin writing. Could you guide me on where would be the best place to put a definition as in my vimrc in this plugin? I would like to submit a PR, but have no idea, where to put it not to mess anything up in the grand scheme of things.

Thanks a lot!

vhda commented 8 months ago

Hi @mpkopec, Unfortunately that option only supports a single format of comments. Given that its default is "/*%s*/" and that this is a valid comment format in Verilog/SystemVerilog, then it makes little sense for me to change this centrally (even though // is also my preferred comment format). There is also this issue in vim-commentary that appears to point this as being a limitation in that plugin https://github.com/tpope/vim-commentary/issues/44. All together, at this point I'd say that this is really a matter of personal preference and that you are using the correct approach to configure it according to yours. Would you agree? Kind regards, Vitor

mpkopec commented 8 months ago

Thanks a lot for the reply. Indeed, it seems, that putting it inside the plugin and not leaving it up to the user is not optimal. Thanks a lot!

vhda commented 8 months ago

Thanks for understanding and please don't hesitate in proposing more changes.