VSCode SFTP Sync Plugin
A powerful VSCode extension that enables seamless file synchronization between your local workspace and remote servers using SFTP protocol.
Features
Server Management
- Support for multiple server configurations
- Default server setting
- Server selection for each operation
- Secure server credential management
File Operations
- Upload files/folders to remote server
- Download files/folders from remote server
- Automatic directory creation
- File ownership management
- Connection pool optimization
Exclusion Rules
- Configure file/folder exclusion rules
- Support for pattern-based exclusions
- Visual exclusion rule management
- Real-time exclusion rule updates
- Connection pooling for better performance
- Parallel file operations
- Progress tracking
- Speed monitoring
- Detailed operation logs
User Experience
- Detailed operation logs with timing and speed information
- Operation confirmation dialogs
- Visual feedback for all operations
- Multiple logging channels (Output, File, Console, Notification)
Installation
- Open VSCode
- Go to the Extensions view (Ctrl+Shift+X)
- Search for "Sync To Server"
- Click Install
Configuration
Server Configuration
- Open Command Palette (Ctrl+Shift+P)
- Type "Sync To Server: Server Manager"
- Fill in the server details:
- Server Name
- Host
- Port
- Username
- Password/Private Key
- Remote Path
- Server Group (optional)
- Server Owner User (optional)
Exclusion Rules
- Open Command Palette (Ctrl+Shift+P)
- Type "Sync To Server: Exclude Manager"
- Add or modify exclusion rules:
- Directory exclusions
- File pattern exclusions
- Real-time rule updates
Usage
Upload Files/Folders
- Right-click on a file/folder in the explorer
- Select "Upload to Server" or "Upload to Default Server"
- Choose target server (if not using default)
- Confirm the operation
- Monitor progress in the output panel
Download Files/Folders
- Right-click on a file/folder in the explorer
- Select "Download from Server" or "Download from Default Server"
- Choose source server (if not using default)
- Confirm the operation
- Monitor progress in the output panel
View Logs
- Output Panel: Real-time operation logs
- File Logs: Persistent operation history
- Console Logs: Debug information
- Notification Logs: Important operation status
Features in Detail
Connection Pool
- Automatic connection management
- Multiple concurrent connections
- Connection reuse
- Automatic reconnection
File Operations
- Automatic directory creation
- File ownership management
- Permission preservation
- Error handling and retry
- Upload/Download speed tracking
- Operation timing
- File size statistics
- Success/failure counts
Exclusion Rules
- Open Command Palette (Ctrl+Shift+P)
- Type "Sync To Server: Exclude Manager"
- Add or modify exclusion rules:
- Directory exclusions
- File pattern exclusions
- Real-time rule updates
Pattern Matching Examples
The plugin supports various pattern matching rules for file exclusions:
Basic Patterns
*.js - Matches all JavaScript files
- Examples: index.js, main.js, .js
test*.js - Matches all JS files starting with "test"
- Examples: test.js, testing.js, test123.js
*.test.js - Matches all files ending with .test.js
- Examples: user.test.js, auth.test.js
????.js - Matches JS files with exactly 4 characters in name
- Examples: test.js, main.js
- Does not match: index.js, a.js
Advanced Patterns
Complex Combinations
*.test.js|*.spec.js - Matches all test files
- Examples: user.test.js, auth.spec.js
temp*|*.tmp|*.temp - Matches all temporary files
- Examples: temp.txt, log.tmp, data.temp, temp123
.*.js|config*.json - Matches configuration files
- Examples: .eslintrc.js, config.json, config.dev.json
Patterns are automatically converted to regular expressions for matching:
* is converted to .*
? is converted to .
. is escaped to \.
Requirements
- VSCode 1.96.2 or higher
- Node.js 12.0.0 or higher
- SSH access to remote servers
Known Issues
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This extension is licensed under the MIT License - see the LICENSE file for details.
Support
If you encounter any issues or have suggestions, please open an issue in the GitHub repository.
| |