Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to comment on a single line inside a vue file #3717

Open
ladyruo opened this issue Apr 3, 2024 · 1 comment
Open

Unable to comment on a single line inside a vue file #3717

ladyruo opened this issue Apr 3, 2024 · 1 comment

Comments

@ladyruo
Copy link

ladyruo commented Apr 3, 2024

VS Code Version:Version: 1.87.2 (user setup)
Commit: microsoft/vscode@863d258
Date: 2024-03-08T15:20:17.278Z
Electron: 27.3.2
ElectronBuildId: 26836302
Chromium: 118.0.5993.159
Node.js: 18.17.1
V8: 11.8.172.18-electron.0

OS Version: Windows_NT x64 10.0.19045

Steps to Reproduce:

When I first opened vscode, I couldn't comment on a single line in the .vue file, I disabled all the plugins and it still didn't work, and I made sure my shortcuts were correct.
I don't have any problem with single line comments in .html, when I comment a line of code in .html and then go back to .vue, the single line comments in the .vue file work again!

@ladyruo
Copy link
Author

ladyruo commented Apr 3, 2024

I have a Vue file like this, cmd+/ does nothing if I'm in an html or css region

<template>
    <div>
        <h1>{{ message }}</h1>
        <button @click="changeMessage">Change Message</button>
    </div>
</template>

<script>
export default {
    data() {
        return {
            message: 'Hello, Vue!'
        }
    },
    methods: {
        changeMessage() {
            this.message = 'Message changed!'
        }
    }
}
</script>

<style scoped>
h1 {
    color: #42b983;
}
</style>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant