Sublime Forum

Windows Subsystem for Linux Mode

#1

WSL Mode

It would be wonderful is Sublime Text 3 had a WSL (Windows Subsystem for Linux) mode in order to trick plugins into supplying linux commands to wsl.exe. This would be helpful as WSL needs a linux path and not a Windows path ("/mnt/c/Users/" vs “C:\Users” style). This would also allow development environment isolation and better testing of code written on windows for linux servers.

The Sublime Text 3 settings already contain settings for OSX and Linux terminals. These features should be allowed on Windows as well.

Note this is just a conversation starter on the idea and is in no way an encouraged implementation. The problems this feature could solve:

  • Wide selection of tools for use in debugging and for plugins, as the platform would no longer rely on software availability for Windows
  • Extra Linux/OSX Sublime Text features could become available (such as launching a terminal on startup).
  • Development environment isolation (allows for testing Windows, Linux)

Just as a sample, here is a configuration I use for building Python using the WSL, it would be nice not to have to do this and it would allow for plugins to work for Linux on Windows:

{ "selector": "source.python", "shell_cmd": "bash -c \"wslpath '$file' | xargs python -u\"", }

1 Like

Build via WSL bash.exe