https://github.com/ctf0/vscode-auto-comment-next-line
https://github.com/ctf0/vscode-auto-comment-next-line
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ctf0/vscode-auto-comment-next-line
- Owner: ctf0
- License: mit
- Created: 2019-12-16T15:01:02.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-11-28T09:19:39.000Z (over 1 year ago)
- Last Synced: 2025-06-28T06:44:54.598Z (about 1 year ago)
- Language: JavaScript
- Size: 23.4 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
i've tried every possible ext that add this feature but sadly all have its own issues, so without any hacks or workarounds, here's what we do
- check if pressed key is "enter".
- check if previous line started with a comment char.
- execute the `editor.action.commentLine` command.
## Config
- single line comment chars list
- until https://github.com/microsoft/vscode/issues/580 is solved, we have to use the manual way :disappointed:
```json
"autoCommentNextLine.list": [
{
"char": "//",
"languages": [
"php",
"javascript",
"jsonc"
]
},
{
"char": "#",
"languages": [
"python"
]
}
]
```