loading...
Cover image for Bookmarking code snippets with Codelets

Bookmarking code snippets with Codelets

ama profile image Adrian Matei Updated on ・2 min read

Remember how I manage my dev bookmarks to save time and nerves? Well, many times I find myself bookmarking links just for some pieces of code that I find in the link. I would then add the code snippets the bookmark's description and the rest is not that relevant. Or there are times when I know I have this piece of code some "old" project and I really need to dig some time to get it...

Well, to make my life easier in these cases I came up with a special type a bookmark, I call it a codelet. In a codelet you save one or more code snippets, add a title and tags to it and optionally a source URL for your inspiration and comments about the snippets. It's similar to Github's gists, but I think is user friendlier and belongs to my dev bookmarks.

Save codelets

Bookmarklet

The easiest way to add a new codelet is by using a +Codelet bookmarklet when you are browsing the web :

Codelet popup bookmarklet

The search at the end of the demo is configured in AlfredApp with a custom query - https://www.bookmarks.dev/search?q={query}&sd=my-codelets

IntelliJ Plugin

If you use IntelliJ products I have developed a plugin to make it ease from IDE:

Save to Bookmarks.dev showcase

The plugin is available to download and install in
JetBrain Plugins Repository and the source code is available on Github

For everything else

When you are using code snippets from some place else, you can use the + > Codelet option in the menu bar:

Save codelet from menu bar


Search codelets on bookmarks.dev

To search for codelets just select My Codelets option in the search bar:

Search codelets from searchbar

or use a custom query on AlfredApp as mentioned above if you are on MacOS.

Next steps

I have a couple of ideas in mind how will I extend this functionality. Among others:

  • add the possibility to make the codelets public, thus searchable, so that others can get inspired too
  • extend the Save to Bookmarks.dev chrome extension to easily save code snippets when surfing the web
  • create IDE plugins (JetBrains and Visual Studio Code) to save code snippets in My Codelets on bookmarks.dev

What do you think? Is it something you might use? I hope you can give it a try and leave your feedback in the comments bellow. Thanks

Posted on Apr 15 by:

ama profile

Adrian Matei

@ama

Collector of dev bookmarks at bookmarks.dev

Discussion

markdown guide