elementary / elementary/code

Distinguish temporary and permanent comments

Open
#961 0 comments 0 reactions 0 assignees View on GitHub
Needs Design Priority: Wishlist
Dominant language
Vala
Stars
521
Forks
118
Avg merge
1d 8h
Merged PRs (30d)
14

Description

## Problem
Comments in code may serve more than one purpose:
- Informative comments in addition to the code
- Code commented out for development purposes

It would be useful to distinguish the two so that the latter can be quickly found and removed from a final PR.

At present, `M` places `//` at the start of the text (indented if required) and so it is indistinguishable from an informative comment.

## Proposal
When toggling comment on code lines with `M` the line is commented out with (e.g. `//~`) at the very start of the line. Informative comments can then use `//` or `/*`. Moreover a search for `//~` will find the temporarily commented out code quickly.

## Prior Art
Geany uses `//~` at the start of the line for toggled comments.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.