-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Open in editor" button doesn't work in Win 10 with VSCode if installation path contains spaces #821
Comments
I think it needs to be |
@beastdestroyer , thanks for the answer. I have tried this solution.
But got the same error |
@testgit-1 I think it's also due to
If adding that doesn't work, then I'm stumped because the only problem I could see was the paths issue. I'm not exactly a hardcore configuration dude myself so yeah xD |
Had same issue on windows 10, I actually had to rename the folder and then edited my PATH env variables to have the new non spaced version and all worked out. Couldn't figure out any other way. Hope this helps. |
@brianguber If that was the case, you could add |
Can I see this problem solved in my lifetime? |
try "C:\Users\WHO\AppData\Local\Programs\Microsoft\ VS\ Code\Code.exe" |
What should be changed? In the code? Or in environment variables? |
Try this: Go to your Windows Environment Variables and put a new variable EDITOR with that Path: C:\Users\User\AppData\Local\Programs\MicrosoftVSCode\Code.exe (Or change it that in a way, that it points on your Code.exe file). By default the "\Microsoft VS Code\" Folder has Spaces. Change that to "\MicrosoftVSCode\". That fixed it for me. |
We're having a similar issue in a couple of macs. One of them opens sublime (even though VSCODE is the default editor for .vue files) and other does nothing at all. I think there should either be a specific mention in the README on how to set this up or provide an option in the settings where something can be done about it. This is a great extension and your hard work is appreciated though! Thank you! |
Just to clarify it for me though. The same project does not have that setup and I've been able to open in editor since I can remember (even in multiple projects) what am I missing? |
@Codermar The devtools can't open your editor without the setup above. Part of it such as setting up the |
I finally got it working using the const openInEditor = require('launch-editor-middleware');
module.exports = {
devServer: {
setup (app) {
app.use('/__open-in-editor', openInEditor('code'))
}
}
} |
Thanks @didierdemoniere I confirm it worked for me too. |
@didierdemoniere I didn't succeed.. (இωஇ ) |
@kiccer what Vue.js version are you using? It worked for me with a Vue.js v2 project. |
@d9beuD |
@kiccer when you type |
I tried it myself and solved it! @d9beuD // 在编辑器中打开
var openInEditor = require('launch-editor-middleware')
app.use('/__open-in-editor', openInEditor('code')) |
Works for me: |
it worked for me too |
Have others encountered this problem? I submitted a PR but it was not merged. So I published the modified version to const launchMiddleware = require('@catnap/launch-editor-middleware')
module.exports = {
devServer: {
setup (app) {
app.use('/__open-in-editor', launchMiddleware())
}
}
} |
I also encountered this problem and used this method to solve it |
Version
4.1.5
Browser and OS info
Chrome 70 / Windows 10
Steps to reproduce
What is expected?
Open component in default editor (vs code)
What is actually happening?
Got this error
I think the problem is in default VS Code path with spaces "C:\Users\User\AppData\Local\Programs\Microsoft VS Code"
I am trying to set EDITOR variable in .env file
VUE_APP_EDITOR=/c/Users/User/AppData/Local/Programs/Microsoft VS Code/Code.exe
Or use vue.config.js
But the problem still remains
The text was updated successfully, but these errors were encountered: