-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support custom formats #32
Comments
I've actually been considering a change - hopefully without breaking existing versions (would definitely be a new major version) - that could accommodate this, but instead of just custom formats it would be an array of all formats, to which custom formats could be added or even replace standard formats (empty/undefined array would default to the default list today). |
This sounds really good! |
This would be really useful for writing WiX code. We like to use all uppercase GUID to be compliant with Windows Installer guidelines (I know WiX will convert but 3.x has issues with GUIDs not containing hyphens it seems) |
There's already an option to use uppercase GUIDs. WiX - on which I was one of the early devs - was one of the reasons I made this, though I recommend using auto-GUID'ing as much as possible - works when you have an obvious automatic key path or specify a key path in a directory that is calculable at build time. You'll get a stable, consistent GUID and if you ever change directory paths it'll change like it should. You don't want shared components spanning different directories. See https://devblogs.microsoft.com/setup which used to be my blog. There are all kinds of problems that will occur in different scenarios if you share component GUIDs across different file or registry paths. |
Thanks. I found this after posting. Auto guid is the way to go but I don't think it works in merge modules which is where we are at for historical reasons. Next step wixlib
Get Outlook for Android<https://aka.ms/AAb9ysg>
…________________________________
From: Heath Stewart ***@***.***>
Sent: Thursday, June 3, 2021 5:27:40 PM
To: heaths/vscode-guid ***@***.***>
Cc: Miles Davies ***@***.***>; Comment ***@***.***>
Subject: Re: [heaths/vscode-guid] Support custom formats (#32)
There's already an option<https://hes32-ctp.trendmicro.com:443/wis/clicktime/v1/query?url=https%3a%2f%2fgithub.com%2fheaths%2fvscode%2dguid%23options&umid=4b1ba823-de06-43dd-8967-f9c07b756b2f&auth=b6f66d00f8195cc5198eee21f0dbabe6af0a3180-5b6ce73afc22e676408f051ba8160a32690c98d6> to use uppercase GUIDs. WiX - on which I was one of the early devs - was one of the reasons I made this, though I recommend using auto-GUID'ing as much as possible - works when you have an obvious automatic key path or specify a key path in a directory that is calculable at build time. You'll get a stable, consistent GUID and if you ever change directory paths it'll change like it should. You don't want shared components spanning different directories. See https://devblogs.microsoft.com/setup which used to be my blog. There are all kinds of problems that will occur in different scenarios if you share component GUIDs across diffe rent file or registry paths.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<https://hes32-ctp.trendmicro.com:443/wis/clicktime/v1/query?url=https%3a%2f%2fgithub.com%2fheaths%2fvscode%2dguid%2fissues%2f32%23issuecomment%2d854006077&umid=4b1ba823-de06-43dd-8967-f9c07b756b2f&auth=b6f66d00f8195cc5198eee21f0dbabe6af0a3180-e3d5265c86c82a99126fa70e89764e95d0e6c01a>, or unsubscribe<https://hes32-ctp.trendmicro.com:443/wis/clicktime/v1/query?url=https%3a%2f%2fgithub.com%2fnotifications%2funsubscribe%2dauth%2fAES6T5DUZNGTMAQ2S2PM6ITTQ6UPZANCNFSM4NL56RKQ&umid=4b1ba823-de06-43dd-8967-f9c07b756b2f&auth=b6f66d00f8195cc5198eee21f0dbabe6af0a3180-2f31466e1c1d01828ec7c7b63cf5116e54988f73>.
|
If you want to insert custom formats, version 1.9.0 now supports more specific customizations for the insertGuid.pasteAutomatically format, including newline characters and individual sections of a GUID. |
And you'll be able to define an array of all desirable formats with PR #89. I've been wanting to do this for a while, and @merlinz01's recent changes in PR #85 pushed me to start on that. I'll have a migration path and will eventually remove those three options. For now, they'll just be deprecated and will only show up if you've overridden them, but my plan is to migrate user's settings at the time the extension is activated the first time. I'm contemplating doing that in a preview release first and maybe adding a once-an-upgrade notification system to ask those who "dare" to try the preview to get feedback. My only concern is that it will then be harder to easily switch formats; however, certainly more versatile e.g., want to group upper- and lowercase common variants? {
"insertGuid.formats": [
"{d}",
"{b}",
"{D}",
"{B}",
]
} |
Hello.
It would be nice if I could set up a custom format so that I can insert something like this directly:
Guid.Parse("2470d04f-d482-4964-ac15-443a54a620f0")
This could be defined in settings as a list of strings with a placeholder that will be replaced via the GUID.
The text was updated successfully, but these errors were encountered: