nuxt / devtools

Unleash Nuxt Developer Experience
https://devtools.nuxt.com
MIT License
2.85k stars 153 forks source link

fix: Inspecting a component opens code in vi instead of IDE (vscode) on WSL2 #576

Closed urbgimtam closed 5 months ago

urbgimtam commented 7 months ago

🐛 The bug

When triggering a "Open in editor" action, the active terminal will open the vi editor, instead of the current IDE (in this case, vscode).
This is happening on:

🛠ī¸ To reproduce

(cannot reproduce in stackblitz)

🌈 Expected behavior

Open component file in the IDE.

ℹī¸ Additional context

OS: Windows 11, running WSL2 with Ubuntu 20 IDE: VScode

urbgimtam commented 5 months ago

Figured out how to solve this, putting this here to help whoever may need too:

On your linux terminal, edit the default .bashrc configuration: code ~/.bashrc

In the end of the file, add the line: export EDITOR="code";

Save the file, close the editor and end the terminal session. Should be working on the next session.