Shortcut key combo for commenting?


I was wondering if anyone knows if I can set a shortcut for commenting out a line (CMD+/) or if it might be something that you would like to see added to Xojo?

I can’t imagine it would be too hard.


There is, it’s CMD + ’
See menu Edit --> Comment. :wink:

Also works on multiple selected lines.
A single line of code doesn’t have be selected to comment out.
Same shortcut can be used to uncomment line(s).

Thanks, I totally missed that, I am used to CMD+/ from other editors.

If you’re on a Mac, you can remap it in the Keyboard System Preferences.

I couldn’t seem to get this to work. If I am not mistaken, the name of the menu item changes when you select commented code. Wouldn’t that also cause it to stop working if it was working in the first place?

This works fine by me.