TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: I wrote a tool that generate VS Code code snippets

1 pointsby djydeover 4 years ago

1 comment

djydeover 4 years ago
<a href="https:&#x2F;&#x2F;github.com&#x2F;djyde&#x2F;snp" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;djyde&#x2F;snp</a><p>When I found myself repeat typing some codes over and over again, I started to use code snippet help me generate these codes. It saved me so much time.<p>But VS Code snippet syntax [1] is hard to write and maintain. So I find some code snippet manager applications, but they are all just help me copy and paste. However, the IDE native code snippet can do a lot more than just generate codes.<p>So I wrote a command line tool that generates the VS Code snippet file. It looks up all the `.snp` files (which is a file contains the snippet code) in current working directory and generate the code-snippets file to VS Code snippets folder. You don&#x27;t have to do anything in VS Code and it just work.<p>You could see how do I use this tool to manage my snippets: <a href="https:&#x2F;&#x2F;github.com&#x2F;djyde&#x2F;snippets" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;djyde&#x2F;snippets</a><p>(P.S. This is my first time writing Go code. I first write this tool in Node.js in 30 mins. Then I want to make it a single executable file. So I rewrite it in Go. It cost me 2 hours :P)<p>- [1] <a href="https:&#x2F;&#x2F;code.visualstudio.com&#x2F;docs&#x2F;editor&#x2F;userdefinedsnippets" rel="nofollow">https:&#x2F;&#x2F;code.visualstudio.com&#x2F;docs&#x2F;editor&#x2F;userdefinedsnippet...</a>