preservim / nerdcommenter

Vim plugin for intensely nerdy commenting powers
Creative Commons Zero v1.0 Universal
4.98k stars 447 forks source link

comment of 'c' #460

Closed hyaray closed 3 years ago

hyaray commented 3 years ago

I don't know the diff of 'left' and 'leftAlt', is it should be the str below? \ 'c': { 'left': '//', 'leftAlt': '/', 'rightAlt': '/' },

alerque commented 3 years ago

I have no idea what you are getting at here. For every language there is a primary (left, optionally right) plus sometimes an alternate (left, optionally right) set of comment markers. Often one of these is for inline comments and another for segment or block comments.

C uses // on the left of any line to comment to the end of the line and /* to open a comment segment that must be closed with */. Hence the current definition.

I have no idea why you are suggesting something that is not a valid comment delimiter here.

cassanof commented 3 years ago

I think that hes referencing that NERDCommenter comments c codes with / / instead of // I was looking for a solution too, because i prefer commenting with //

alerque commented 3 years ago

I think that hes referencing that NERDCommenter comments c codes with / / instead of // I was looking for a solution too, because i prefer commenting with //

Switch to the alternate style. That's why there are alternates.