Skip to content
This repository has been archived by the owner on Jul 6, 2022. It is now read-only.

Folding multiline comment #22

Open
ghost opened this issue Aug 22, 2019 · 6 comments
Open

Folding multiline comment #22

ghost opened this issue Aug 22, 2019 · 6 comments
Assignees

Comments

@ghost
Copy link

ghost commented Aug 22, 2019

How to adding function to fold comment like this in .ahk
/*
comment 1
comment 2
...
*/

@thomastthai
Copy link

I have this on my system. Would you look at the pictures and let me know if that's what you meant?

image
image

@thomastthai
Copy link

I noticed my comments have the star preceding the in-between lines like ' * additional lines in between'. I'm going to look into this.

@thomastthai
Copy link

thomastthai commented May 18, 2020

Hi @fekfoq259! I got both cases working. I'm still learning Github and will look into how to do a pull request and submit it.

image

image

@AucaCoyan
Copy link

AucaCoyan commented Sep 14, 2020

I've just tried in my code, but apparently it doesn't have comment folding. Maybe it's an added functionality from other extension? (I don't have colored comments). I put my cursor right between of the /* and the 62 line but nothing appears, nor the shortcut Ctrl+Shift+ ' works.
image

@Hicsy
Copy link

Hicsy commented Sep 26, 2020

I've just tried in my code, but apparently it doesn't have comment folding. Maybe it's an added functionality from other extension? (I don't have colored comments). I put my cursor right between of the /* and the 62 line but nothing appears, nor the shortcut Ctrl+Shift+ ' works.

Gday mate,
VSCode automatically supports codefolding for anything indented.
With multiliner's you can indent your comments to fold as expected.

PS. If you look at styleguides from the likes of Google or Amazon, you will see their multiline comments often look like:

/*
 * My Function
 * TODO: Write Function
 */

They will line up nicely then, and also automation will pick them up better as a bonus 😇

@Hicsy
Copy link

Hicsy commented Sep 26, 2020

BTW
This repo looks a bit quiet, but I have proposed a PR for supporting ;region ... ;endregion comments on the forked version of this plugin, if that helps!

You can edit ahk.configuration.json to include this:

    "folding": {
      "markers": {
          "start": "^\\s*\\;\\s*region\\b",
          "end": "^\\s*\\;\\s*endregion\\b"
      }
    }

cheers!

@stef-levesque stef-levesque self-assigned this Feb 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants