Editing the default phrases file for espanso in Sublime Text 4.
If you are not already using a text expander application then I highly recommend that you start. It will save you hundreds, if not thousands, of keystrokes every month.
As the name suggests, a text expander application is a utility that runs in the background and looks out for you typing predefined phrases which it then replaces with usually a longer text version.
For example, when I type --@e, my text expander replaces this with my full email address: gareth@garethjmsaunders.co.uk, saving me 25 keystrokes.
I imagine like many involved in web development, I rely heavily on a number of version control applications: I use Dropbox, Subversion (SVN) and Git.
For years I’ve used the TortoiseSVN client for Windows. It integrates with the Windows Explorer shell making it quick and easy to manage your version controlled code within Explorer.
I like that I don’t need a separate full-blown application that acts as an interface between the code on my PC and the SVN repository; I like that I don’t need to use a command prompt; but I love that TortoiseSVN adds overlay icons to tell me the state of each file (is it up to date, changed, added, etc.?).
These folders are all up to date, and in sync with the SVN repository.
Recently I’ve started using Git at work and so I’ve also installed TortoiseGit which does something similar.
This is the Bootstrap repo cloned to my PC.
And of course Dropbox does the same: it shows you which files have been synchronised with the cloud, and which are in the process of uploading.
My Dropbox folders are up-to-date, synchronized successfully with the Cloud
The problem
The problem, though, is that each of these applications uses multiple overlay icons but Windows only uses the first 15.
TortoiseSVN and TortoiseGit both use the same nine icons:
TortoiseSVN and TortoiseGit both use nine icons.
Dropbox uses eight icon overlays. If you have OneDrive installed (which you will if you use Windows 8 or above) then it uses three. And Windows itself uses a few to indicate offline files or enhanced storage.
That’s 22 icon overlays, and like I said: Windows only uses the first 15.
So, inevitably you end up with some icons missing, and depending on which these are it can make life just that little bit harder when trying to figure out quickly whether a file is in sync or not, or whether it’s not even been added.
That means you need to make a choice about which icons you want to use and which you don’t.
What Microsoft should do…
This functionality was introduced in Windows 95, to still limit this value to 15 icons when we now have a 64-bit operating system and literally gigabytes of RAM and terrabytes of hard disc scpace seem mad.
Microsoft should now either
increase the limit from 15 to, say, 256 or 1024 or whatever multiple of eight they choose, or
provide a set of standard overlay icons (that can be updated as part of the current Windows theme) for the most common overlay icons (e.g. normal, read only, added, modified, deleted, ignored, conflicted, locked, question mark) that any application can hook into.
How to fix it
Anyway, the most straight-forward way to fix this is by editing the Windows Registry.
The icon overlays can be found in the following key:
Computer \ HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Explorer \ ShellIconOverlayIdentifiers
It turns out you can safely rename the folders which will reorder the icons. The folders are just containers for the real information contained within them.
1. Backup
Export (backup) the ShellIconOverlayIdentifiers folder in its entirety, in case you need to restore it later.
2. Prioritise which icons you need
My current preference is for the following:
1TortoiseNormal
2TortoiseModified
3TortoiseConflict
6TortoiseDeleted
7TortoiseAdded
8TortoiseIgnored
9TortoiseUnversioned
DropboxExt1 (green Synced)
DropboxExt2 (blue In progress)
DropboxExt5 (red Sync problem)
DropboxExt7 (grey Folder not synchronizing)
EnhancedStorageShell
SkyDrivePro1 (ErrorConflict)
SkyDrivePro2 (SyncInProgress)
SkyDrivePro3 (InSync)
You can use whatever naming convention you prefer. I rename the original folder names with a number prefix and an underscore, e.g. 01_1TortoiseNormal. Folders that I want to drop to the bottom I prefix with a simple x, e.g. x5TortoiseReadOnly.
UPDATE: Some users are reporting that they prefix with a space as this appears to be the trick that OneDrive/SkyDrive has used.
In regedit it looks like this, with the unprioritized icons dropping to the bottom of the list.
List of registry keys
3. Restart Explorer
Close any Windows Explorer windows.
Press Ctrl+Shift+Esc to open Task Manager.
Look for Windows Explorer listed under “Background processes”.
Right-click it and select “Restart”.
Your taskbar will disappear a couple of times as the Explorer process is restarted, but you should now see all the overlay icons you want within your folders.
(Currently I’m having issues with OneDrive — formerly SkyDrive — but as I don’t rely on it for too much I’m not that bothered, to be honest.)
Update
“Gijssays” posted a comment below in January 2016 that reads:
QUOTE
There is an even more permanent solution to this problem:
Go to the registry key ShellIconOverlayIdentifiers
Right click > Permissions… > Advanced
Now disable inheritance, take ownership of this key and check “Replace all child permission..”
Once you are the owner of the key you can permanently remove OneDrive / Dropbox or whatever keys you do not need.
To secure this key from future edits make it read-only for the SYSTEM user.
END QUOTE
I have not tried this solution but I wanted to surface it into the article in case it helps anyone.