1 vpaste is a pastebin that uses Vim for syntax highlighting.
9 Source code is available in git and [gitweb](/git/?p=vpaste)
11 git clone git://pileus.org/vpaste
15 vpaste allows pastes to be embedded in external websites:
17 <script type="text/javascript" src="http://vpaste.net/embed.js?ft=sh">
20 echo Hello, World > test.txt
23 This can be done by including code in the script tag itself, as in the above
24 example, or by linking to an existing paste:
26 <script type="text/javascript" src="http://vpaste.net/embed.js?vpaste"></script>
28 A third way to use the embedding script is to include it once, possibly in the
29 in the header, and then call the `format_code('pre','vpaste')` function later
30 on to perform syntax highlighting on all the `<pre class="vpaste">` tags.
32 In this case, slightly more care must be taken to properly escape HTML
33 characters scuh as `<` and `>`.
35 <pre class="vpaste" title="ft=c">
36 #include <stdio.h>
38 int main(int argc, char **argv)
40 printf("hello, world");
45 <script type="text/javascript">format_code('pre', 'vpaste');</script>