Auto Save Instant

Never lose a change again! Ultra-fast auto-saving for VS Code with intelligent 100ms instant saves, interactive Quick Settings popup menu, and Git Safety Guard protection.
Overview
Auto Save Instant provides enterprise-grade auto-saving capabilities with Google Docs-style instant saves. Built for developers who can't afford to lose a single keystroke, it combines ultra-fast responsiveness with intelligent backup strategies, interactive status bar quick settings, and safety guardrails.
Key Benefits
- 🚀 Instant Response: Saves after just 100ms of typing inactivity (configurable)
- ⚙️ Interactive Quick Settings Menu: Click
Auto Save: ON in the status bar to adjust options with descriptive guides
- 🛡️ Git Safety Guard: Pauses auto-save during merge conflicts or rebase operations to protect code integrity
- 🔀 Save on Focus / Tab Change: Automatically saves dirty files when switching tabs or window focus
- 🎨 Format on Save Integration: Optionally runs Prettier/ESLint formatting right before saving
- 🛡️ Dual Protection: Primary instant saves + interval backup system
- ⚡ Zero Overhead: Modular enterprise architecture with smart debouncing
- 🎯 Smart Exclusions: Automatically skips git, node_modules, and temp files
How It Works
Auto Save Instant employs a sophisticated multi-layered protection system:
graph LR
A[User Types] --> B[100ms Debounce]
B --> C{Git Conflict / Rebase?}
C -- Yes --> D[Pause Auto-Save]
C -- No --> E[Primary Instant Save]
E --> F[Format Code optional]
F --> G[Status Bar Update]
H[Focus Change / Tab Switch] --> C
I[Interval Timer 30s] --> C
Features
Click Auto Save: ON in the status bar or trigger Auto Save: Quick Settings Menu (Ctrl+Shift+P) to open a rich interactive menu:
- Master Switch: Instantly toggle auto-save extension on/off
- Instant Save Toggle: Toggle 100ms typing-pause save
- Focus Change Toggle: Enable/disable saving on editor tab or window focus change
- Format on Save Toggle: Enable automatic code formatting before saving
- Git Safety Guard Toggle: Enable/disable protection against saving conflict markers
- Adjust Delays & Intervals: Change save delay (50ms - 5000ms) or interval frequency (5s - 300s) on the fly!
🛡️ Git Safety Guard Protection
Avoid corrupting merge markers or breaking git interactive rebases!
- Detects active
.git/MERGE_HEAD, REBASE_HEAD, or CHERRY_PICK_HEAD states.
- Scans files for active Git conflict markers (
<<<<<<<, =======, >>>>>>>).
- Automatically pauses auto-save until conflicts are resolved.
🚀 Ultra-Fast Auto-Save & Focus Save
- Instant Save: 100ms default pause delay (Google Docs style)
- Focus Change Save: Save modified files automatically whenever focus leaves the window or editor tab
Installation
Via VS Code Marketplace
- Open VS Code
- Navigate to Extensions (
Ctrl+Shift+X / Cmd+Shift+X)
- Search for "Auto Save Instant"
- Click Install
Via Command Line
code --install-extension AkilaWasalathilaka.auto-save-instant
Manual Installation
- Download the latest release
- Install via command line:
code --install-extension auto-save-instant-1.1.0.vsix
Configuration
Open VS Code Settings (Ctrl+, / Cmd+,) and search for AutoSave:
Core Settings
| Setting |
Type |
Default |
Description |
autoSave.enabled |
boolean |
true |
Master toggle for auto-save functionality |
autoSave.saveOnEdit |
boolean |
true |
Enable instant saves on file edits (Google Docs style) |
autoSave.saveOnFocusChange |
boolean |
false |
Save dirty files automatically when switching tabs/windows |
autoSave.formatOnSave |
boolean |
false |
Automatically run code formatting before auto-saving |
autoSave.gitSafetyGuard |
boolean |
true |
Pause auto-save during Git merge conflicts or rebase operations |
autoSave.intervalSave |
boolean |
true |
Enable interval-based backup saves |
Timing & Exclusion Configuration
| Setting |
Type |
Default |
Range |
Description |
autoSave.saveDelay |
number |
100 |
50-5000ms |
Delay after typing stops before saving |
autoSave.intervalSeconds |
number |
30 |
5-300s |
Backup save interval in seconds |
autoSave.showStatusBar |
boolean |
true |
N/A |
Display status bar button |
autoSave.excludePatterns |
array |
[...] |
N/A |
File patterns to exclude (e.g. **/.git/**, **/node_modules/**) |
Example Configuration
{
"autoSave.enabled": true,
"autoSave.saveOnEdit": true,
"autoSave.saveOnFocusChange": true,
"autoSave.formatOnSave": true,
"autoSave.gitSafetyGuard": true,
"autoSave.saveDelay": 100,
"autoSave.intervalSeconds": 30,
"autoSave.excludePatterns": [
"**/.git/**",
"**/node_modules/**",
"**/dist/**",
"**/*.tmp",
"**/*.log"
]
}
Commands
All commands are accessible via the VS Code Command Palette (Ctrl+Shift+P / Cmd+Shift+P):
| Command |
ID |
Description |
| Auto Save: Quick Settings Menu |
auto-save.openQuickMenu |
Open the interactive status bar Quick Settings menu |
| Auto Save: Toggle Auto Save |
auto-save.toggle |
Master toggle for auto-save functionality |
| Auto Save: Save All Files Now |
auto-save.saveAll |
Manually trigger save for all dirty files |
Use Cases
Development Workflows
- Long Coding Sessions: Never lose progress during extended development
- Code Reviews: Ensure all changes are captured before switching contexts
- Remote Development: Maintain file consistency across network connections
- Pair Programming: Automatic saves prevent conflicts during collaborative coding
Content Creation & Data Safety
- Documentation: Secure technical writing and markdown editing
- Configuration Files: Protect critical system and application configurations
- Data Processing: Safeguard scripts and data transformation workflows
Risk Mitigation
- System Crashes: Automatic recovery from unexpected shutdowns
- Power Outages: Protection against data loss during power failures
- Git Protection: Prevents saving half-merged conflict markers during Git rebases/merges
| Metric |
Auto Save Instant |
VS Code Built-in |
Traditional Auto-save |
| Response Time |
100ms |
1000ms+ |
5000ms+ |
| CPU Usage |
< 0.1% |
N/A |
0.5-2% |
| Memory Footprint |
< 5MB |
N/A |
10-20MB |
| Git Conflict Safety |
✅ Advanced |
❌ None |
❌ None |
| Quick Settings Menu |
✅ Interactive |
❌ None |
❌ None |
| Dual Protection |
✅ Yes |
❌ No |
❌ No |
Development
Building from Source
# Clone the repository
git clone https://github.com/akilaisadev/auto-save-extension.git
cd auto-save-extension
# Install dependencies
npm install
# Compile TypeScript
npm run compile
# Package VSIX
npx @vscode/vsce package
Project Structure
src/
├── extension.ts # Main extension entry point
├── types/
│ └── config.ts # Type definitions
├── core/
│ ├── autoSaveEngine.ts # Core save engine & event orchestration
│ ├── configManager.ts # VS Code configuration read/write
│ ├── gitGuard.ts # Git conflict & rebase detection guard
│ └── fileFilter.ts # File exclusion matcher
└── ui/
├── quickMenu.ts # Quick Settings status bar popup menu
└── statusBarManager.ts # Status bar item UI manager
Troubleshooting
Auto-save not triggering
Symptoms: Files are not being saved automatically despite enabled settings.
Solutions:
- Check that
autoSave.enabled is set to true
- Verify the file is not in an excluded pattern or containing active Git conflict markers (
<<<<<<<)
- Ensure VS Code has write permissions to the file
- Try toggling auto-save off and on again using the Quick Settings menu (
Auto Save: ON in status bar)
Performance tuning
Symptoms: VS Code feels busy on very large files.
Solutions:
- Increase
autoSave.saveDelay to 200-500ms in the Quick Settings menu
- Add problematic large log files to
autoSave.excludePatterns
Contributing
Contributions are welcome! Feel free to report issues, suggest features, or submit pull requests.
- Fork the repository (
https://github.com/akilaisadev/auto-save-extension)
- Create your feature branch (
git checkout -b feature/amazing-feature)
- Commit your changes (
git commit -m 'Add amazing feature')
- Push to the branch (
git push origin feature/amazing-feature)
- Open a Pull Request
License & Support
MIT License © Akila Wasalathilaka
Show Your Support
If Auto Save Instant has helped improve your workflow:
Made with ❤️ for the VS Code community
Never lose a keystroke again!