This extension generates Universal Unique Identifier (UUID) values and will either insert them into the current active editor, or place them on the clipboard.
One useful case for this extension is to create UUIDs for configuring new profiles for Windows Terminal.
This extension supports creating a new version 4 UUID and then either adding it to the current location in the active editor, or placing it on the clipboard.
The Insert new UUID function is available from the editor context menu, or as a keyboard binding. By default, the keyboard binding is
The other way to run the commands is from the command palette by pressing (
Through configuration settings, it is possible to wrap the created UUID with braces or quotes when it is created, for example:
This extension works as expected when inserting a new UUID into the active text editor. It will insert the UUID at the location of the caret in the current active editor, replace any existing text selection if there is one, and generate multiple UUIDs and insert them all when a multi-cursor selection is active.
The generated UUIDs are type 4, variation 1, which means unique based on random numbers. The extension can also generate a nil UUID, where all the digits are 0.
See the release notes for more information.
Known Limitations and Issues
This extension generates UUIDs that are version 4, variation 1 according to the specification RFC4122 section 4.4. Version 4 UUIDs are generated with random numbers as generated by VS Code and modified by a portion of the current timestamp to add another random element. This cannot guarantee uniqueness to the same degree as something tied to hardware identifiers such as MAC address, but it is statistically unlikely that any two UUIDs would be identical.
This extension can also be used to produce a 'nil' UUID, one where all the values are zero. See RFC4122 section 4.1.7