46 lines
1010 B
Markdown
46 lines
1010 B
Markdown
# commentcycle
|
|
|
|
A plugin for Sublime Text 3 that enables cycling between different comment types. Built to be used with draincleaner.
|
|
|
|
Created with ChatGPT.
|
|
|
|
**Disclaimer: barely tested so be aware of the fact there could be potential risks involved when using this software!**
|
|
|
|
|
|
## How to use
|
|
|
|
Add commentcycle.py and commentcycle.sublime-settings to the following path (can also be accessed by selecting Preferences > Browse Packages)
|
|
|
|
```text
|
|
~/.config/sublime-text-3/Packages/User
|
|
```
|
|
|
|
Edit commentcycle.sublime-settings to set whatever you want your alternative comment type to be.
|
|
|
|
```text
|
|
{
|
|
"Python": [
|
|
["#", ""],
|
|
["#¤", ""]
|
|
],
|
|
"JavaScript": [
|
|
["//", ""],
|
|
["/*", "*/"]
|
|
],
|
|
"Markdown": [
|
|
["<!--", "-->"],
|
|
["<!-- ¤", "-->"]
|
|
]
|
|
}
|
|
|
|
```
|
|
|
|
In Sublime Text select Preferences > Key Bindings. Then set custom keybinding to use to cycle between comment types. Add the setting below but change the "§" key to whatever you prefer:
|
|
```text
|
|
[
|
|
{ "keys": ["§"], "command": "commentcycle"},
|
|
|
|
]
|
|
|
|
```
|