If you've been working with LaTeX for any amount of time, I'm sure you've picked up several little tricks and snippets of code that you want to reuse. For example, a particular way to set up a package like listings or hyperref just the way you like it. Or a little trick for modifying some aspect of the formatting (One of my personal favourites is this trick). Now, you don't want to keep going back to an old .tex file to try to find how to do something.
The question is: how do you keep track of all these snippets?

listingspackage for that:\lstinputlisting{\jobname.tex}. – TH. Apr 03 '11 at 08:51