Vue scss comment bug
Hey. Looks like I cought bug in vue file in style region. Look at the gif please. Thanks.

Could you please send me more information about the syntax styles at the respective cursor positions?
Please see :h tcomment-debug.
Commenting is correct:
But uncommenting is not:
The code is. I think the issue is lang="scss"
<style lang="scss">
.player {
min-width: 44px;
background-color: #FF0000;
}
</style>
As I said before I would need further information as described in :h tcomment-debug.
Hi @tomtom - I followed the instructions on your doc.
1. Make sure 'filetype' is set correctly.
2. Place the cursor at an appropriate position -- e.g. the first non-blank
character of a line of code.
3. Call |tcomment#debug#CollectInfo()|.
4. File an issue on github and post the output of `:call
tcomment#debug#CollectInfo()`. The output will also be copied to the
clipboard.
- I placed the cursor at line 381
- Then executed
:call tcomment#debug#CollectInfo() - See the output in the screenshot below.
Below is the 2 debug output from previous comment.
Before commenting
TCOMMENT: &ft = vue => vue
TCOMMENT: stx = cssMediaProp => cssMediaProp
TCOMMENT: ct = {'_args': {'beg': 381, 'fallbackFiletype': '', 'end': 381, 'filetype': 'vue', 'comment_mode': ''}, 'commentstring': '/* %s */', 'mode': '', 'filetype': 'css'}
Before Uncommenting
TCOMMENT: &ft = vue => vue
TCOMMENT: stx = sassCssComment => sassCssComment
TCOMMENT: ct = {'_args': {'beg': 381, 'fallbackFiletype': '', 'end': 381, 'filetype': 'vue', 'comment_mode': ''}, 'commentstring': '<!--%s-->', 'mode': '', 'whitespace': 'both'}
Please let me know if I miss something.
I wonder how does tcomment_vim detect the language of the code because typically in a single .vue file it has 3 languages.
<script>
// js code
</script>
<template>
// html code
</template>
<style>
// css code
</style>
Does the tlib_vim do the detection?
Hi @tomtom, is the information above not enough? Please let me know. Thanks.
The language is detected on basis of the style that is used for highlighting. In almost all languages, the prefix of the style name is the language that should be used for commenting. For some syntax plugins, this doesn't work but im most of these cases we can derive the comment style from the style name nevertheless.
You might want to check the closed issues if there is another syntax plugin for vue for which this problem was already solved.
Could you please also tell me how the code in the initial post should actually be commented. Would it suffice to match the sassCssComment style to the css filetype?