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

Julia2MATLAB

SamuelSmthSmth

|
1 install
| (0) | Free
Convert between Julia and MATLAB code with right-click convenience
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Julia ↔ MATLAB Converter VS Code Extension

🚀 Professional VS Code extension for seamless Julia ↔ MATLAB code conversion with live preview and right-click convenience.

✨ Features

🖱️ Right-Click Conversion

  • Right-click any .jl file → "Convert to MATLAB"
  • Right-click any .m file → "Convert to Julia"
  • Works in both file explorer and editor

⚡ Command Palette Integration

  • Julia↔MATLAB: Convert to MATLAB - Convert current Julia file
  • Julia↔MATLAB: Convert to Julia - Convert current MATLAB file
  • Julia↔MATLAB: Show Live Preview - Open live preview panel
  • Julia↔MATLAB: Open Converter Panel - Open converter sidebar

👁️ Live Preview

  • Real-time conversion preview as you type
  • Side-by-side comparison
  • Syntax highlighting for both languages
  • Auto-updates when switching files

📋 Converter Panel

  • Dedicated sidebar with conversion tools
  • Quick convert buttons
  • Batch conversion options
  • Settings access

⚙️ Smart Features

  • Auto-detection of file types
  • Configurable output file naming
  • Safe operations (never overwrites originals)
  • Professional error handling

🛠️ Installation

Method 1: Development Installation

  1. Clone or copy the extension folder:

    cd vscode-extension
    
  2. Install dependencies:

    npm install
    
  3. Compile TypeScript:

    npm run compile
    
  4. Install in VS Code:

    • Open VS Code
    • Press Ctrl+Shift+P (or Cmd+Shift+P on Mac)
    • Type "Extensions: Install from VSIX"
    • Navigate to the extension folder and select the generated .vsix file

Method 2: Development Mode

  1. Open in VS Code:

    code vscode-extension
    
  2. Run in Extension Development Host:

    • Press F5 to launch a new Extension Development Host window
    • The extension will be loaded automatically

🚀 Usage

Quick Conversion

  1. Right-click method:

    • Open any .jl or .m file
    • Right-click in the editor or file explorer
    • Select "Convert to MATLAB" or "Convert to Julia"
  2. Command palette method:

    • Open a Julia or MATLAB file
    • Press Ctrl+Shift+P
    • Type "Julia" and select your conversion command

Live Preview

  1. Automatic preview:

    • Open any .jl or .m file
    • The live preview panel opens automatically
    • See real-time conversion as you edit
  2. Manual preview:

    • Use command palette: "Julia↔MATLAB: Show Live Preview"
    • Or click the preview icon in the editor title bar

Converter Panel

  1. Open the panel:

    • Click the Julia↔MATLAB icon in the activity bar
    • Or use command palette: "Julia↔MATLAB: Open Converter Panel"
  2. Use quick actions:

    • Expand "Quick Convert" for single file conversion
    • Expand "Batch Convert" for multiple files
    • Click "Live Preview" for instant preview
    • Access "Settings" for configuration

⚙️ Configuration

Access settings via:

  • Converter panel → Settings
  • VS Code Settings → Extensions → Julia↔MATLAB Converter

Available Settings:

  • juliaMatlab.autoPreview (default: true)

    • Automatically show preview when opening Julia/MATLAB files
  • juliaMatlab.outputSuffix (default: "_converted")

    • Suffix added to converted file names
  • juliaMatlab.enableSyntaxHighlighting (default: true)

    • Enable syntax highlighting in preview panels

🎯 Supported File Types

  • Julia files: .jl
  • MATLAB files: .m

🔧 Requirements

  • VS Code 1.74.0 or higher
  • Python 3.7+ (for conversion backend)
  • Julia ↔ MATLAB Converter CLI (included)

🐛 Troubleshooting

Common Issues

"No Python found"

  • Ensure Python is installed and in PATH
  • Update conversionService.ts with correct Python path

"CLI not found"

  • Verify the CLI script path in conversionService.ts
  • Ensure jm_cli.py is accessible

"Conversion failed"

  • Check that the source file is valid Julia/MATLAB code
  • Verify file permissions
  • Check VS Code output panel for detailed errors

Debugging

  1. Enable developer tools:

    • Help → Toggle Developer Tools
    • Check Console for errors
  2. Check extension host:

    • View → Output → Extension Host

🎨 Customization

Custom Keybindings

Add to your keybindings.json:

[
  {
    "key": "ctrl+shift+j",
    "command": "juliaMatlab.convertToJulia",
    "when": "resourceExtname == .m"
  },
  {
    "key": "ctrl+shift+m", 
    "command": "juliaMatlab.convertToMatlab",
    "when": "resourceExtname == .jl"
  },
  {
    "key": "ctrl+shift+p",
    "command": "juliaMatlab.showPreview",
    "when": "resourceExtname == .jl || resourceExtname == .m"
  }
]

Custom Themes

The extension respects VS Code themes and uses appropriate colors for:

  • Julia syntax (purple theme)
  • MATLAB syntax (blue theme)
  • Preview panels
  • Status indicators

📈 Features Roadmap

  • ✅ Right-click conversion
  • ✅ Live preview
  • ✅ Command palette integration
  • ✅ Converter sidebar panel
  • 🔄 Batch conversion UI
  • 🔄 Syntax highlighting in preview
  • 🔄 Diff view for conversions
  • 🔄 Conversion history
  • 🔄 Custom conversion templates

🤝 Contributing

This extension is part of the Julia2MATLAB project. Contributions welcome!

📄 License

MIT License - see project root for details.


🎯 Perfect for: Scientific computing, algorithm porting, code migration, and multi-language workflows!

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