adventuregamestudio / ags

AGS editor and engine source code
Other
708 stars 159 forks source link

Editor: adds toggle line comments in script editor #2467

Closed ericoporto closed 4 months ago

ericoporto commented 4 months ago

Two modes of comment/uncomment are supported through Editor Preferences (default addsSpace is false):

I am trying to remake #1575 in a way that is acceptable, as this is a feature I constantly miss. The method I prefer to use for myself when coding is the one that adds a space.

I used Shift + Ctrl + Q for the shortcut, if a different one is preferred please tell me.

ivan-mogilko commented 4 months ago

I apologize for reviewing this late, I've got very distracted on the last two weeks.

I don't usually use such feature in text editors, so cannot judge on the idea itself. But it seems to work as stated, and the new code is contained in a single function, so should not conflict with anything and will be easy to fix if something wrong is found. So I think it's fine.

The only suggestion i have is to group "toggle comments" menu item with "toggle breakpoint" (place them close together), because both relate to changes in current script, while "Switch to Matching Script or Header" is a unique kind of action. EDIT: ok, that's easy enough to do myself.

ivan-mogilko commented 4 months ago

Did a small addition: ad31da24686e6f78360a8a6bc827b5b914d4f089 for consistency