org-mode capture template for code snippets
This code sets up three capture templates – for todos, media urls and code snippets (lines 4-7).
%?
sets the exit point for the template, %^g
prompts for a tag, %^{language}
prompts for the language of the snippet and the remainder is boilerplate to create an org-mode entry (*
) and an org-mode snippet (#+BEGIN_SRC\n\n#+END_SRC
).
http://orgmode.org/manual/Template-expansion.html#Template-expansion