Dev Code Memory
Dev Code Memory
Dev Code Memory is a Visual Studio Code extension designed to help developers save, organize, and quickly insert code snippets. It is particularly useful for those who work with multiple programming languages and need a reliable way to manage their code fragments.
Benefits
Dev Code Memory offers several key benefits to enhance productivity and streamline code management:
- Robust Local Storage: Snippets are stored in a JSON file with concurrency lock and a .tmp fallback to ensure data integrity.
- Safe Storage: Uses VS Code's global storage to avoid permission issues.
- Smart Save: Automatically suggests names for snippets based on content, such as the first HTML tag or function name.
- Language Detection: Prompts for language identification if the document is plain text.
- Overwrite Protection: Confirms before overwriting existing snippets with the same name and language.
- Language-Aware Insertion: Filters snippets by the current language for quick access.
- Export/Import: Supports exporting and importing snippets in JSON format, with normalization and merging by ID or language::name.
- Highlight Modes: Four different modes for highlighting matches, including exact, partial, whole word case-insensitive, and exact case-insensitive.
- Robust Replace: Allows replacing text or HTML/XML tag names.
- Block and Tag Selection: Commands to select blocks and tags, and navigate to matching pairs.
- Delete Snippet: Includes a confirmation dialog to prevent accidental deletions.
Use Cases
Dev Code Memory is ideal for developers who:
- Work with multiple programming languages.
- Need to manage and reuse code snippets efficiently.
- Require a robust system to organize and retrieve code fragments quickly.
- Prefer local storage for their snippets to ensure data privacy and security.
Installation
To install Dev Code Memory, follow these steps:
- Open Visual Studio Code.
- Go to the Extensions view by clicking on the Extensions icon in the Activity Bar on the side of the window or pressing
Ctrl+Shift+X. - Search for Dev Code Memory.
- Click the Install button to install the extension.
- Reload Visual Studio Code to activate the extension.
Alternatively, you can install the extension from a VSIX file:
- Generate the VSIX file using the command
npx vsce package. - In Visual Studio Code, go to the Extensions view and click on the three-dot menu in the top right corner.
- Select Install from VSIX and choose the generated VSIX file.
Usage
Dev Code Memory provides several commands to manage your code snippets:
- Save Snippet: Select the code you want to save, press
Ctrl+Alt+D(orCmd+Alt+Don macOS), name the snippet, and choose a category. - Insert Snippet: Press
Ctrl+Alt+P(orCmd+Alt+Pon macOS) to open a list of snippets filtered by the current language or all languages. - Delete Snippet: Press
Ctrl+Alt+K(orCmd+Alt+Backspaceon macOS) to select and confirm the deletion of a snippet. - Highlight Matches: Select text and use the Highlight Matches command to highlight matches in four different modes.
- Replace Matches: Select text or tag names and use the Replace Matches command to replace them.
- Select Block/Tag: Place the cursor within a block or tag and use the Select Block/Tag command to select the entire block or tag.
- Goto Matching: Place the cursor on or before a bracket or tag and use the Goto Matching command to navigate to the matching pair.
Import/Export
You can export and import your snippets using the following commands:
- Export Collection (JSON): Press
Ctrl+Shift+P(orCmd+Shift+Pon macOS) and type Export Collection (JSON) to export your snippets to a JSON file. - Import Collection (JSON): Press
Ctrl+Shift+P(orCmd+Shift+Pon macOS) and type Import Collection (JSON) to import snippets from a JSON file.
The exported JSON file is an array of documents with the following fields:id,name,category,language,content, andcreatedAt. During import, the extension normalizes and merges snippets by ID or language::name if the ID is missing.
Example Snippet
Here is an example of a snippet in JSON format:
{"id":"a1b2c3d4","name":"HelloWorldJS","category":"JavaScript","language":"javascript","content":"console.log('Hello, world!');","createdAt":"2025-09-15T12:34:56.789Z"}Requirements
- Visual Studio Code version 1.103.0 or higher.
Privacy and Data
All snippets are stored locally in asnippets.jsonfile within the global storage directory of Visual Studio Code. The extension does not send your data to external servers.
Known Issues
- Cloud synchronization is not yet available.
- Importing invalid JSON or unexpected schema is rejected, and duplicates are merged by ID or language::name.
- Concurrency is managed using a .tmp safe-write fallback.
Roadmap
The planned features for future versions include:
- Cloud synchronization
- Team sharing
- Advanced tag search and multi-channel navigation
Release Notes
- Version 0.0.1: Initial release with basic snippet management.
- Version 0.0.4: Enterprise Refactor (Bulletproof) with new features such as Delete Snippet with confirmation, global storage, and robust highlight and replace functionalities.
License
Dev Code Memory is proprietary software. All rights reserved. Unauthorized copying, modification, redistribution, or commercial use is strictly prohibited without prior written permission from Sebastian Pi1eiro Madero (SerenoDevs).
This content is either user submitted or generated using AI technology (including, but not limited to, Google Gemini API, Llama, Grok, and Mistral), based on automated research and analysis of public data sources from search engines like DuckDuckGo, Google Search, and SearXNG, and directly from the tool's own website and with minimal to no human editing/review. THEJO AI is not affiliated with or endorsed by the AI tools or services mentioned. This is provided for informational and reference purposes only, is not an endorsement or official advice, and may contain inaccuracies or biases. Please verify details with original sources.
Comments
Please log in to post a comment.