Sublime Forum

Current changes under WSL don't show in Sublime Merge

#1

Category should be Sublime Merge, I couldn’t select it from the dropdown.

I am using WSL on Windows as my development environment. All Git repository files are stored within the WSL filesystem which I access in Windows at \wsl.localhost\Ubuntu. If I open a Git repository under Ubuntu in Sublime Merge, all of the Git history, previous changes, commit comments, etc. all show up fine. But no current changes do. Merge just sits there saying “Loading changes…” forever, making it impossible for me to do any staging, committing, etc.

Any ideas what I can do differently to get this to work?

This seems like a bug to me. How should I report it?

Thanks!

0 Likes

#2

WSL doesn’t support filesystem change notifications, which Sublime Merge and Sublime Text rely on.

0 Likes

#3

If your Windows 10 is relatively up to date (previously this was only possible on Windows 11 but recently it was brought to Windows 10 too) you can install Sublime Text and/or Sublime Merge directly in WSL and run them there, where both will be able to see file system changes.

0 Likes

#4

You are suggesting that there is nothing that can be down to fix this until WSL supports these filesystem change notifications?

0 Likes

#5

I am on Windows 11. I have been using Merged installed directly in WSL for about a month now as a workaround, but the GUI is just not nearly as pleasant to use.

0 Likes

#6

I don’t know if Win11 will let you do this, but WSL1 does support file change notifications and I’ve been using it for years without issue. It’s fine for command line operations, but obviously not going to help if you need Linux GUI apps.

0 Likes

#7

WSL 1 or 2 don’t support file notifications between Windows and Linux. File notifications work on both OSs individually.

0 Likes

#8

This is still my biggest issue with/request for Sublime Merge. Is there really no way currently to fix it? How does VS Code run just fine in Windows connected to WSL?

1 Like

#9

Could someone at Sublime look at VS Code does this and emulate it in Sublime Merge? Even the GitLens extension running in VS Code, which is running in Windows but connected to WSL, shows changes made to files in WSL just fine.

0 Likes

#10

I believe that VSC does this by implementing a custom server task that runs separately inside of WSL and communicates with the running VSC instance to tell it what’s going on.

You can get around this particular problem by running Sublime Merge directly inside of WSL though.

0 Likes

#11

I think you are right about that. And yes, I know that I can (see my 2/15 post above). That’s what I am doing, but the GUI isn’t nearly as nice to use. And perhaps if something similar to VS Code’s server were implemented for Merge, then Merge could also work over SSH connections, as VS Code does. I think VS Code may use the same server for WSL and SSH connections.

0 Likes

#12

Just out of curiosity (since I use Sublime and Merge both natively and in WSL), what changes in the UI for you that makes it not pleasant to use? Related to Linux windows behaving differently as far as window management is concerned?

0 Likes

#13

What I currently do is run a rsync script inside my VM (or in your case WSL) and sync in the changes from the host. That way, all changes are happening locally and gets copied to the vm.

1 Like

#14

I may implement that as a workaround. Could work for a separate host over SSH as well. Thanks for the suggestion!

0 Likes

#15

Largely the same things I see with any GUI running out of WSL. Windows scaling doesn’t get applied, snapping doesn’t work, resizing the window is often painful, no button to minimize (can click on the Taskbar icon), etc. Here is how the two look side by side on my monitor (4k, 175% scaling):

0 Likes

#16

Yep. Because WSL is using Linux. If you are familiar with Linux, you can probably configure the desktop/window manager (this is the one that controls the UI in Linux) inside WSL.

This is why I opted to “push in” the files to the VM instead of working inside WSL. I’d rather dual boot if I really want to use Linux as my dev env instead.

0 Likes

#17

I agree that Windows could be a lot smarter about how it merges these windows.

For what it’s worth, you can tweak the buttons that appear in the window caption (which solves one of the annoyances, but certainly not most of them).

tmartin:PCTERM:~> gsettings get org.gnome.desktop.wm.preferences button-layout
'appmenu:close'
tmartin:PCTERM:~> gsettings set org.gnome.desktop.wm.preferences button-layout ":minimize,maximize,close"
tmartin:PCTERM:~> gsettings get org.gnome.desktop.wm.preferences button-layout
':minimize,maximize,close'
0 Likes