yari: Edit in your Editor doesn't work on Windows
I followed the https://github.com/hamishwillee/content/blob/main/README.md setup instructions, and modified for windows. I.e. set env variable and then restart:
setx EDITOR code
The command prompt shows this warning when the button is pressed (after a “trying to open” message in the browser):
I also tried using Notepad++ (ie setx EDITOR "C:\Program Files\Notepad++\notepad++.exe"
. In this case the page opened in immediately in my default browser.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 17 (15 by maintainers)
Commits related to this issue
- Fixes #2142 by upgrading open-editor dependency — committed to SphinxKnight/yari by SphinxKnight 4 years ago
- Fixes #2142 by upgrading open-editor dependency — committed to SphinxKnight/yari by SphinxKnight 4 years ago
- Fixes #2142 by upgrading open-editor dependency — committed to SphinxKnight/yari by SphinxKnight 4 years ago
- Fixes #2142 by upgrading open-editor dependency — committed to SphinxKnight/yari by SphinxKnight 4 years ago
- Fixes #2142 by upgrading open-editor dependency — committed to SphinxKnight/yari by SphinxKnight 4 years ago
- Fixing #2142 with updated dependency — committed to SphinxKnight/yari by SphinxKnight 4 years ago
- Fixing #2142 with updated dependency — committed to SphinxKnight/yari by SphinxKnight 4 years ago
- Fixing #2142 with updated dependency — committed to SphinxKnight/yari by SphinxKnight 4 years ago
- Fixing #2142 with updated dependency — committed to SphinxKnight/yari by SphinxKnight 4 years ago
@caugner I personally still use Notepad++ most of the time. Of course you’re probably right more generally.
What “bugs” me about this is that “we say you can set a preferred editor”, but what we mean is that “you can set VSCode”. If we’re only going to support VS code we should probably put the env file into the source code and be done with it.
@peterbe The option
EDITOR=code
in my .env file now works on the main branch to open VSCode.Explicitly setting the path to notepad++ or code no longer opens the file in the browser, but it doesn’t open the editor either. It appears to be trying to find the executable but not succeeding (i.e. you get the “Trying to open” message.
@SphinxKnight Thanks for your help on this too. I didn’t try the patch because the official branch is getting closer.