Wednesday, December 7, 2022

automatic C // comments

Vim automatically continues comments to the next line.  I think this is coming from c.vim.  When using // comments, it'll automatically create the second line as:

some-code // my comment
                     // <ready to add next comment>

I found this article:

https://vim.fandom.com/wiki/Disable_automatic_comment_insertion

While it explains what adding f:// back in does, my testing doesn't seem to support my understanding and the article doesn't explain other possible options besides 'f'.  What it does seem to do is disable all auto // comments.

I _think_ what I'd like is if a line begins (other than whitespace) with a  // comment, then continue creating comments on the subsequent lines, but if a comment is preceded by code, do not auto-indent with // on the next line.

Is that possible?  Am I making sense outside my own head?

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/489f9282-eb51-4966-be31-774c3997c0d8n%40googlegroups.com.

No comments:

Post a Comment