Better Comment Toggle

by Gino Valente
5
4
3
2
1
Score: 40/100

Description

Category: Coding & Technical Tools

The Better Comment Toggle plugin improves comment management in Obsidian, offering enhanced functionality for toggling comments line-by-line or across selected ranges. It supports customizable start and end tokens, making it adaptable for various syntaxes, including code and math blocks. The plugin maintains proper indentation and allows users to style commented lines for better readability. Fully WYSIWYG, the plugin ensures that comments are visible exactly as they appear in the notes, without hidden metadata. Users can define their own comment styles, such as HTML or Obsidian-specific syntax, to suit their workflow.

Reviews

No reviews yet.

Stats

13
stars
5,195
downloads
2
forks
998
days
866
days
866
days
4
total PRs
1
open PRs
1
closed PRs
2
merged PRs
5
total issues
3
open issues
2
closed issues
0
commits

README file from

Github

Obsidian Better Comment Toggle

Improved comment toggling in Obsidian.

Features

  • Easily toggle comments line-by-line or over a selected range of lines
  • Configure the start and end tokens for toggled comments
  • Change the appearance of commented lines
  • Support for both code and math blocks (including custom languages)
  • Maintains indentation

Demos

Details

This plugin is purely WYSWIG. That is, there are no hidden HTML tags or other metadata embedded into your notes. The comments exist as you see them in the notes. Any additional styling (e.g. font color) is purely cosmetic and exists only in the editor.

The default comment style is set to HTML (<!-- -->), which is the syntax specified by CommonMark. However, you can configure this plugin to use Obsidian-style comments (%% %%), or even define your own!

Tips

It's recommended to replace the existing keybinding for Obsidian's comment toggling command with the one provided by this plugin:

  • ⌘+/ (Mac)
  • Ctrl+/ (Windows)

Support

This plugin is totally free to use! I have a lot of fun making stuff like this, so I never expect any type of financial compensation. But if you enjoy the plugin and are feeling generous, I certainly won't say no to a cup of coffee!

Similar Plugins

info
• Similar plugins are suggested based on the common tags between the plugins.