Store your emacs config as an org file, and load code snippets based on tag matches.