Question: Is there a way to control the indentation + comment leader input, when adding a new line?
Details: I am trying to set
formatoptions-=cro when inserting a new line (in specific syntax region). I tried using the autocommands
InsertCharPre, but both are too generic for my use case and I cannot figure out how to only operate on entering an
<Enter> when in insert and
O when in normal mode.
InsertCharPre does not trigger on new line insertions, and
InsertEnter also triggers on typing
I.) What am I missing? Any pointers will be greatly appreciated. :)
Edit: I forgot to mention, that my intention is to dynamically add/suppress a comment-continuation insertion on new line insertions (depending on the syntax region).