2026-02-21 20:29:16 +01:00
2026-02-21 20:11:45 +01:00
2026-02-21 20:11:45 +01:00
2026-02-21 19:09:08 +00:00
2026-02-21 20:29:16 +01:00

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)

~/.config/sublime-text-3/Packages/User

Edit commentcycle.sublime-settings to set whatever you want your alternative comment type to be.

{
	"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:

[
	{ "keys": ["§"], "command": "commentcycle"},

]

Description
Cycle between regular and prefixed comments
Readme Unlicense 26 KiB
Languages
Python 100%