For that, I have tried out several tools. I even use WP CodeBox to use the snippets and upload them to WP CodeBox’s cloud service. BUT! I don’t really like to be fragmented into too many tools and apps. Even I like to try out new tools.
So, as I’m also studying programming, and creating WordPress plugins and stuff as well, I use Github to keep my projects, codes and version control organized. GitHub has a feature Gists, to keep your snippets in your GitHub account, and have them if they are needed. So I decided after many tryouts, to keep my snippets in my Github account as well.
Unfortunately, Github’s Gists are not the perfect tool to store your snippets. It is not organizable, tagable or searchable. BUT there is a tool called Lepton. This is an open-source, cross-platform snippet manager tool. You can connect your GitHub account to it, and you can reach your snippets via the application.
It has a clear interface and of course a dark mode as well that I like to work with. So this tool loads all your gists, and by that, you can edit them, add a name to them, and even tag them as well. Like that, you can have everything organized. Also, the tool recognizes the language your snippet was written in. So it is really handy. And you can search them as well.
As a Linux user, it was important to have an app that can be installed on Linux. since Lepton is a cross-platform tool and also has a free version, it was the best choice. I have tried many of its alternatives as well, but Lepton was the winner for me. So if you are searching for a tool like that. You should go with Lepton.
You can visit their website here: https://hackjutsu.com/Lepton/
Hope it helps you as well.