SNPS Utilities is a versatile extension for Visual Studio Code that enhances productivity with a range of useful tools. This extension currently includes features for adding/opening Jira task links and managing time stamps.
Key Features
Add Jira Link: Insert a Jira task link at the current cursor position with a single shortcut, enhancing team collaboration.
Open Jira Link: Quickly navigate from a Jira task reference in code comments to the corresponding Jira page.
Insert Time Formatting: Insert the current time using a flexible and customizable format defined by you.
Configuration
The extension provides the following customizable settings:
jiraRegex:
Default: P10004450-\d{5,}$
Description: Regular expression to match Jira issue keys.
replaceFormat:
Description: Replace format for the Jira issue link. Supports variables: jiraKey, jiraLink. Future support: jiraTitle.
Install the Extension: Search for "snps utilities" in the VSCode Extensions Marketplace and click on Install.
Configure Settings (Optional): To optimize your experience, you can customize the following settings in your workspace settings:
Jira Issue Key Matching: Configure the com.snps.utilities.jiraRegex setting to match the pattern of your Jira issue keys.
Jira Issue Link Replacement: Set the com.snps.utilities.replaceFormat to control how Jira issue links appear in your code.
Jira Issue Link Generation: Modify the com.snps.utilities.linkFormat to adjust the base URL for Jira issue links.
Time Format: Customize the com.snps.utilities.timeFormat to change the format of inserted timestamps. Default: YY-MM-DD hh:mm:ss. Placeholders include YY for year, MM for month, DD for day, hh for hour, mm for minute, and ss for second.
Using the Features:
Insert Current Time: Press Ctrl+Shift+T (or your custom shortcut) to insert the current time in the configured format.
Add Jira Link: Press Ctrl+Shift+L (or your custom shortcut), enter the task number, then hit Enter.
Open Jira Link: Place the cursor on a Jira task reference and use the context menu or your defined shortcut.
Customization
You can customize the default shortcuts by modifying your keybindings.json file.