
- GIT CORE.EDITOR SUBLIME TEXT WINDOWS INSTALL
- GIT CORE.EDITOR SUBLIME TEXT WINDOWS UPDATE
- GIT CORE.EDITOR SUBLIME TEXT WINDOWS WINDOWS
It would also allow users to at least read wsl files, even if they cannot re-save them.īy automatially checking on a per-file basis, and applying the atomic_save preference.

And in one stroke prevent such 'too-easy' corruption. For example make it opened as 'read-only'.

Depending on how sublime devs may best prefer to accomodate such situation, it could be dealt with in a number of possible ways:īy refusing to re-save the file. At least (if anything else), to detect that it has actually opened a file with those extended WSL attributes. So lets ask for a second if sublime could be improved in this regard.

GIT CORE.EDITOR SUBLIME TEXT WINDOWS UPDATE
And that was on the latest official creators update (downloaded just a few days ago). Not having learned about such hidden idisychrosies and behaviours beforehand. Merely because of re-saving 1 single text file, that was required by wsl. In the end I had to re-install my entire wsl environment from scratch. Somehow the bjorked metadata or attributes remain persistent or cached somewhere else and are not forgotten. Even by deleting and re-creating the file from scratch in wsl. In a way that the resulting 'input/output' filesystem error cannot seem to be fixed. I say that because re-saving a WSL file from sublime ends up trashing that file path and filename in the lxss folder. Even if it was only opened by accident (user didn't know / had forgot / or got confused / didnt check it was located under lxss folder). Then it could behave in some responsible fashion regarding wsl files. If it could be smart enough detect the file has wsl extended attributes (on open).
GIT CORE.EDITOR SUBLIME TEXT WINDOWS WINDOWS
Especially if it does not provide windows clipboard support (as suggested by tutorial on that topic).Īnyhow coming back to Sublime text for windows.
GIT CORE.EDITOR SUBLIME TEXT WINDOWS INSTALL
Or we could go to some great effort to install Sublime inside wsl and run it through a local X-server. And constantly switching, when our main editor is sublime for everything else. But that is not very productive for multi-file projects. We could be using a text based editor such as nano or vi. Well it isn't really common for people to need all of their windows apps to read-write files inside this wsl folder. Microsoft's stated reason for this is that most Windows applications don't understand Linux-style metadata and so tend to corrupt the files. Try to open the same file from a new session of Bash on WSL in nano.Open any file from * C:\Users\USERNAME\AppData\Local\lxss* folder in the Windows version of Sublime, make any change and save.Sublime removes extended attributes on save of WSL fileswin Steps to reproduce Sublime retains extended attributes when editing WSL files, making them visible from within Bash on WSL Actual behavior More on file system handling in WSL is in this blog post Expected behavior Is there a way to enable/add such a mode to Sublime so that we could safely edit all those WSL files in our favourite editor? bak, and creating a new one, haven't investigated), but rather to edit the file "in place". One other workaround: I was able to get my Windows editor to stop making a backup of the file (probably moving the original to. However, there seems to be a solution mentioned here microsoft/WSL#659 (comment) Or git config -global core.editor '"/Applications/Sublime Text.Update: given that now native NTFS files can also have extended attributes, it would be great if Sublime could retain them everywhere, not just inside the lxss folder Summaryįiles in the Windows Subsystem for Linux (WSL), located in * C:\Users\USERNAME\AppData\Local\lxss* have extended attributes that make editing them directly from Windows very tricky - if I simply open and save such a file with the Windows version of Sublime Text, these attributes disappear and the file can't be edited in any new Bash in WSL session. Git config -global core.editor "subl -n -w" MacOS, Sublime Text 3 ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" ~/bin/subl MacOS, Atom git config -global core.editor "atom -wait" MacOS, TextEdit git config -global core.editor "open -W -n" Then run: git config -global core.editor "code -wait" Select Shell Command: Install 'Code' command in path from the Command Palette.

Windows, Notepad++ git config -global core.editor "'C:/Program Files/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin" Windows, Sublime Text 3 git config -global core.editor "'c:/program files/sublime text 3/subl.exe' -w" Windows, Atom git config -global core.editor "atom -new-window -foreground -wait" git config -global core.editor "code -wait" Make sure you selected ‘Add to PATH’ during the installation. Write commit message, save and close file. Set up an editor and check it by making a commit: git commit -allow-empty The main command is: git config -global core.editor "path to your editor with params"
