A Code Snippet Management Tool Based on Github Gist: Lepton

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:

  • Unlimited public/private snippets
  • Unlimited tags
  • Language grouping
  • Markdown support
  • Jupyter Notebook viewer support
  • macOS/Windows/Linux client
  • GitHub Enterprise support
  • Immersive mode
  • Customization
  • Dashboard
  • Search
  • Proxy
  • Free

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


Comments