Emacs plugin for storing written code as template -


for example, standard libraries in c/c++ used often, , it's inefficient go web browser, search code example how use library component, copy source code , modify suit need; few month later, need use library component again forgot how use it, , have repeat whole process again!

this process not productive me because after learn first time, not need study same thing again; part of can recall how use it. want written code or example code copied web site stored later reference , modification.

emacs macro option, think have type whole source code make desired template. if found written code, , want store code segment future reference? macro won't productive because have type whole thing.

is there emacs plugin doing this?

i wouldn't recommend snippets task described.

snippets meant repeated often. can't have lot of them.

what need use rarely, can have lot of. i'm using org-mode task. org-mode can:

  1. organize knowledge language/library etc.
  2. include small code snippets directly via babel.
  3. attach number of files heading.

this way overview/description via headings, , actual code via code blocks / attachments.

another advantage can grep org-file / attachments. other advantages timestamps, todos , kinds of export org-mode provides.

upd

just give sample of can (open in in emacs, otherwise looks ugly): https://gist.github.com/abo-abo/6040382/raw/1be55e30a9ed8d81cc1b2b752b7d498d05e72978/hyper.org


Comments