You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Recent Windows Insider builds break gvim.bat when launched from WSL2 (bug report). Even prior to this change, though, invoking gvim.bat correctly from within WSL2 was tricky and error-prone (here was my attempt).
Running the native Windows gVim from WSL is helpful for editing WSL files in a GUI editor without configuring x11 forwarding (WSL does not yet have any way to use native Windows graphics).
A native Bash launcher script provided as an optional component of the Windows installer would be helpful. Just like gvim.bat, it could have a hardcoded path to the Vim directory. Here is a script that I've written, which could be used as the basis for an "official" script.
The text was updated successfully, but these errors were encountered:
not sure I follow (and I did not understand the wsl2 bug report). Is there a reason, you cannot put $VIM in your $PATH and just call gvim.exe directly?
It lives in \Windows, which is always on the path, and has the Vim installation path hardcoded by the installer itself. This avoids needing to search through the Program Files directories for the latest Vim version. Note that $VIM is not set by default in either Windows or WSL.
The native Windows gvim.exe does not actually fork, so gvim.bat looks for the --nofork argument and, if it is not present, uses the start built-in (part of cmd.exe) to fork the process.
Recent Windows Insider builds break
gvim.bat
when launched from WSL2 (bug report). Even prior to this change, though, invokinggvim.bat
correctly from within WSL2 was tricky and error-prone (here was my attempt).Running the native Windows gVim from WSL is helpful for editing WSL files in a GUI editor without configuring x11 forwarding (WSL does not yet have any way to use native Windows graphics).
A native Bash launcher script provided as an optional component of the Windows installer would be helpful. Just like
gvim.bat
, it could have a hardcoded path to the Vim directory. Here is a script that I've written, which could be used as the basis for an "official" script.The text was updated successfully, but these errors were encountered: