julia-vim icon indicating copy to clipboard operation
julia-vim copied to clipboard

Multiline comments

Open gustaphe opened this issue 4 years ago • 2 comments

Proper highlighting etc. of comments like these:

x=2
#=
comment explaining the code
more comments
=#
y=2x

gustaphe avatar Feb 28 '21 09:02 gustaphe

The syntax highlighting part already works well, as far as I can tell. As for the comments variable, see #198 and comments therein. Also, I think that the vast majority of the code out there uses single-line comments, e.g.

x = 2
# comment explaining the code
# more comments
y = 2x

Could you explain what's your use case, i.e. why you'd need this?

carlobaldassi avatar Feb 28 '21 10:02 carlobaldassi

Huh, I really thought highlighting was one of the reasons I had that in my setup.

The other reason is a FoldIsCommented() function, which uses &comments to figure out whether to mark a fold as fully commented out. From my understanding, &comments is supposed to be a complete list of ways to start comment lines, while &commentstring is the default, the one that is inserted by plugins etc.

Is there any reason to not include the multiline version in &comments?

gustaphe avatar Feb 28 '21 13:02 gustaphe