tyrasd / overpass-turbo

A web based data mining tool for OpenStreetMap using the Overpass API.
https://overpass-turbo.eu
Other
891 stars 129 forks source link

Shortcut to comment/uncomment code in the editor #654

Open Krafpy opened 10 months ago

Krafpy commented 10 months ago

It doesn't look like there is any keyboard shortcut for commenting/uncommenting a line or block of code in the OverpassQL editor. Most IDEs use Ctrl-/ (or Cmd-/) to comment/uncomment parts of code. CodeMirror has a comment addon comment/comment.js (see https://codemirror.net/5/doc/manual.html#addons) which adds a toggleComment method to the CodeMirror instance.

I think this feature would be quite useful when learning/experimenting with the API and the language. I tried adding that feature myself on a local instance but it seems that the nodejs package used for CodeMirror doesn't implement any of the addons.