nerdcommenter icon indicating copy to clipboard operation
nerdcommenter copied to clipboard

Uncommenting indented code is broken for vim9script

Open noscript opened this issue 2 years ago • 5 comments

Commenting Vim9 code works, but uncommenting it does nothing. Only happens for indented code.

https://user-images.githubusercontent.com/717109/176473289-1353d1f2-2b55-4105-a358-ec705a1e01df.mp4

noscript avatar Jun 29 '22 15:06 noscript

What is the declared ft for vim9script?

Does it allow mixing and mating of old style vimL comments in the same file?

alerque avatar Jun 29 '22 17:06 alerque

What is the declared ft for vim9script?

vim

Does it allow mixing and mating of old style vimL comments in the same file?

If the first line is vim9script then only new style is allowed.

noscript avatar Jun 30 '22 08:06 noscript

Are you kidding me? VIM is using the same filetype for it's old vimscript and new vim9script languages that are completely different languages with incompatible SYNTAX?

alerque avatar Jun 30 '22 08:06 alerque

Is there some other vim setting that gets set reliably that we could use to trigger different rules? How do VIM syntax highlighters handle this?

alerque avatar Jun 30 '22 08:06 alerque

They can be distinguished by commentstring. New style is #%s, old one is "%s.

noscript avatar Jun 30 '22 08:06 noscript