Publish: 2019-03-26 | Modify: 2019-03-26
Do you have the need to save code snippets for future reference? Should you create a file and paste the code into it? Or use a note-taking tool to save them? Different people have different methods of managing code snippets, but Xiaoz believes that professional tasks should be left to professional tools. Github can be used to host code, and Github Gist can be used to save code snippets. However, the functionality provided by Github Gist is limited. Here, Xiaoz recommends a third-party open-source client called Lepton for more convenient management of code snippets.
Lepton's main features include:
To install Lepton, you can go to Lepton/releases to download the latest version. Lepton is a client based on Github Gist, so you need to authorize with your Github account when using it.
When creating a new code snippet, it is recommended to follow the format [title] description #tag1 #tag2
. This way, you can add descriptions and keywords to the project for easy searching later.
You can use the shortcut Shift + Space
to search and quickly find the code snippets you need.
If you have trouble accessing Github Gist due to slow or blocked access in China, you can configure a proxy in ~/.leptonrc
with the following content:
"proxy": {
"enable": true,
"address": "socks://localhost:1080"
}
Please note that the path for Windows is C:\Users\username\.leptonrc
. If the file doesn't exist, please create it yourself. For more information, refer to the official documentation: https://github.com/hackjutsu/Lepton/wiki/FAQ
Finally, if you have a better code snippet tool, feel free to leave a comment and recommend it.
Lepton project address: https://github.com/hackjutsu/Lepton
I come from China and I am a freelancer. I specialize in Linux operations, PHP, Golang, and front-end development. I have developed open-source projects such as Zdir, ImgURL, CCAA, and OneNav.