sparqlwikidata-query-service

How to comment/uncomment in bulk in wikidata's SPARQL gui by shortcut?


Wikidata provides a tool for query building.

https://query.wikidata.org/

But I cannot find any shortcut in the editor to comment/uncomment in bulk (that is, comment/uncomment multiple lines at the same time).


Solution

  • As of June 2018, the SPARQL query editor at https://query.wikidata.org/ lets you select several lines and type Ctrl+/ to bulk (un)comment. (This feature was not available when the original question and answer were written.)

    The SPARQL language does not have a "multi-line comment" indicator, only "the rest of this line is a comment" hash/octothorpe/pound ("#") indicator.

    Some text editors will let you add the same prefix to multiple lines with one command; this requires that you edit your query outside of most SPARQL endpoint webforms.