Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Path SwitcherNew to Visual Studio Code? Get it now.
Path Switcher

Path Switcher

Fatony Ahmad Fauzi

|
1 install
| (1) | Free
Toggle relative <-> absolute JS paths easily in VS Code
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

🪄 Path Switcher

Path Switcher adalah ekstensi Visual Studio Code yang memudahkan kamu mengubah semua path di file (HTML, CSS, JS, gambar, dll) antara relative path ↔️ absolute path hanya dengan satu kombinasi tombol.


✨ Fitur

  • 🔁 Toggle otomatis antara path relative ↔️ absolute
  • 💡 Mendukung path di:
    • <script src="...">
    • <link href="...">
    • <img src="https://github.com/fatonyahmadfauzi/Path-Switcher/raw/HEAD/...">
    • url("...") dalam CSS
  • ⚡ Dapat dijalankan lewat shortcut keyboard
  • 🧭 Mengubah semua path di satu file sekaligus (bukan hanya satu baris)

🧩 Instalasi

  1. Unduh atau clone repository ini:
    git clone https://github.com/kianoland/path-switcher
    cd path-switcher
    npm install
    
  2. Jalankan di mode pengembang: Buka folder di VS Code Tekan F5 → akan membuka jendela baru Extension Development Host

⌨️ Shortcut & Command

Gunakan perintah dan shortcut berikut untuk menjalankan ekstensi:

Fungsi Command ID Tombol
Toggle Relative ↔️ Absolute path-switcher.togglePath Ctrl + Alt + P
Ubah semua ke Absolute path-switcher.toAbsolute Ctrl + Alt + A
Ubah semua ke Relative path-switcher.toRelative Ctrl + Alt + R

🧠 Contoh

Lihat bagaimana Path Switcher mengubah path Anda secara instan.

Sebelum:

<script src="js/meta-update.js"></script>
<link rel="stylesheet" href="css/style.css" />
<img src="https://github.com/fatonyahmadfauzi/Path-Switcher/raw/HEAD/assets/logo.png" />

Setelah (Absolute):

<script src="/js/meta-update.js"></script>
<link rel="stylesheet" href="/css/style.css" />
<img src="https://github.com/fatonyahmadfauzi/Path-Switcher/raw/HEAD/assets/logo.png" />

Setelah (Relative):

<script src="js/meta-update.js"></script>
<link rel="stylesheet" href="css/style.css" />
<img src="https://github.com/fatonyahmadfauzi/Path-Switcher/raw/HEAD/assets/logo.png" />

🛠️ Pengembangan Lokal

Kompilasi TypeScript:

npm run compile

Linting:

npm run lint

Jalankan tes:

npm test

🧾 Lisensi

MIT © Fatony Ahmad Fauzi

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