As some might know, i’m an Emacs user. I have yasnippets installed almost since i started using it.
YASnippet comes with a bunch of snippets, and there is also a separate package that adds a lot more. And it can also be extended with your own.
For organising, it’s also nice, as it groups snippets by major mode (ie. file type) so i have snippets for Python, HTML, ELisp, and more.
For documenting, the snippets can have some comments bundled with them, and if you name your snippets good, it’s easy to find them anyway.
As an added bonus snippets can have placeholders in them which you have to fill before inserting their contents. Thus, i just select the defprot snippet while coding in C, enter a value for name, and i have an #ifndef “protection” added, my cursor blinking where $0 is.
# -*- mode: snippet -*-
# name: Protect with ifdef
# key: defprot
# --
#ifndef ${1:name}
# define $1
$0
#endif /* $1 */