Feedback (SUGGESTION) Fold Selection

Discussion in 'GameMaker Studio 2 Community Tech Support' started by Biosyn, Jun 17, 2019.

  1. Biosyn

    Biosyn Member

    Joined:
    Oct 17, 2017
    Posts:
    39
    Quick suggestion.

    In current GMS version, we can highlight lines of code, right click, then select "Comment Selection".

    May I suggest having a similar option to fold the code? I know we can use snippets, but I think being able to highlight and press a key combo to fold the code inside a region without cut and paste would be much more convenient.

    Not sure what others think, but I think it would make organizing code more convenient and faster.

    Thanks.
     
    stainedofmind likes this.
  2. EvanSki

    EvanSki King of Raccoons

    Joined:
    Apr 17, 2018
    Posts:
    580
    I mean we already have #region
     
  3. Biosyn

    Biosyn Member

    Joined:
    Oct 17, 2017
    Posts:
    39
    To further clarify, my suggestion deals with reorganizing code already written.

    Yes, you could simply use #region/#endregion with snippets from the get go. But if one wants to rearrange already existing code while ensuring the code is folded, possibly under new headings, you need to keep cutting and pasting it in a new region . It'd be more convenient to simply highlight and shortcut key it.

    I mean I wouldn't have even brought up this suggestion had I not learned about the very convenient Comment Selection feature (Ctrl+K).
     
    nacho_chicken likes this.
  4. Nocturne

    Nocturne Friendly Tyrant Forum Staff Admin

    Joined:
    Apr 13, 2016
    Posts:
    6,890
    File a bug report with the suggestion and it'll be considered, and link to this topic please. Tbh, I like the idea of simply selecting a whole section of text and then RMB > Make Region and BAM! - Section is now in between region/endregion tags.
     
  5. Biosyn

    Biosyn Member

    Joined:
    Oct 17, 2017
    Posts:
    39
    ^ Done and done.

    Just to add, it'd be even better if the folded selection could automatically collapse and position the cursor at the "header" of the region so users can simply put in a description right on the spot.
     
    Nocturne likes this.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice