Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>SyncWriteNew to Visual Studio Code? Get it now.
SyncWrite

SyncWrite

Alvin Bellero

|
3 installs
| (0) | Free
| Sponsor
Edit multiple files simultaneously with intelligent value-based synchronization
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

SyncWrite — VSCode Extension

Seamlessly synchronize JSON values across multiple files for consistent configuration management!

✨ Features

  • JSON File Synchronization: Sync JSON values across multiple files on save automatically. 🔄
  • Intelligent Merging: Preserve existing structure while updating shared values. 🧠
  • Opened Files Only: Works exclusively with JSON files that are currently open in VS Code. 📁
  • Smart Value Matching: Only syncs values that exist in both source and target files. 🎯
  • Save-Triggered Sync: Synchronization happens automatically when you save a JSON file. ⚡
  • Visual Indicators: Status bar shows when sync is active. 📊
  • Command Palette Integration: Easy enable/disable controls. 🎛️
  • Error Handling: Silently skips files with invalid JSON content. 🛡️

📦 Installation

  1. Open Visual Studio Code.
  2. Go to the Extensions view by clicking on the Extensions icon in the Activity Bar on the side.
  3. Search for SyncWrite and click Install.

🛠️ Usage

  • Once installed, open multiple JSON files in VS Code.
  • Enable SyncWrite using the Command Palette (Ctrl+Shift+P / Cmd+Shift+P) and type "SyncWrite: Enable Sync".
  • Edit values in any JSON file and save (Ctrl+S / Cmd+S).
  • See the magic happens! Values automatically sync to other open JSON files that have matching keys. 🪄

⚙️ Configuration

You can customize the extension settings by adding the following configuration in your settings.json:

{
  "syncWrite.enabled": false // Enable/disable synchronization (default: false)
}

📋 Examples

JSON Value Synchronization

// File 1: config.json
{
  "name": "My App",
  "version": "1.0.0",
  "apiUrl": "https://api.example.com"
}

// File 2: package.json
{
  "name": "My App",
  "version": "1.0.0",
  "description": "My application"
}

// When you change "name" or "version" in one file and save, it updates in the other

Nested JSON Synchronization

// File 1: settings.json
{
  "database": {
    "host": "localhost",
    "port": 5432
  }
}

// File 2: config.json
{
  "database": {
    "host": "localhost",
    "port": 5432,
    "name": "myapp"
  }
}

// Changing "host" or "port" in one file syncs to the other

🔧 How It Works

  1. Save Detection: When you save a JSON file, SyncWrite detects the change
  2. Target Selection: Finds all other open JSON files
  3. Value Matching: Identifies keys that exist in both source and target files
  4. Smart Sync: Updates only matching values, preserving the target file's structure
  5. Error Handling: Skips files with invalid JSON or missing keys

🛠️ Development

Prerequisites

  • Node.js
  • VS Code
  • TypeScript

Setup

npm install
npm run compile

Testing

  1. Open this project in VS Code
  2. Press F5 to launch Extension Development Host
  3. Open multiple JSON files with similar content
  4. Enable SyncWrite and test value synchronization

Building

npm run compile

📄 License

This project is licensed under the MIT License. See the LICENSE file for details.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft