Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 21st, 2012  |  syntax: VIM  |  size: 12.03 KB  |  hits: 35  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. command! Entities call Entities()<CR>
  2. function! Entities()
  3.   silent s/Á/\&Aacute;/e
  4.   silent s/á/\&aacute;/e
  5.   silent s/Â/\&Acirc;/e
  6.   silent s/â/\&acirc;/e
  7.   silent s/´/\&acute;/e
  8.   silent s/Æ/\&AElig;/e
  9.   silent s/æ/\&aelig;/e
  10.   silent s/À/\&Agrave;/e
  11.   silent s/à/\&agrave;/e
  12.   silent s//\&alefsym;/e
  13.   silent s/Α/\&Alpha;/e
  14.   silent s/α/\&alpha;/e
  15.   silent s//\&and;/e
  16.   silent s//\&ang;/e
  17.   "silent s/'/\&apos;/e
  18.   silent s/Å/\&Aring;/e
  19.   silent s/å/\&aring;/e
  20.   silent s//\&asymp;/e
  21.   silent s/Ã/\&Atilde;/e
  22.   silent s/ã/\&atilde;/e
  23.   silent s/Ä/\&Auml;/e
  24.   silent s/ä/\&auml;/e
  25.   silent s//\&bdquo;/e
  26.   silent s/Β/\&Beta;/e
  27.   silent s/β/\&beta;/e
  28.   silent s/¦/\&brvbar;/e
  29.   silent s//\&bull;/e
  30.   silent s//\&cap;/e
  31.   silent s/Ç/\&Ccedil;/e
  32.   silent s/ç/\&ccedil;/e
  33.   silent s/¸/\&cedil;/e
  34.   silent s/¢/\&cent;/e
  35.   silent s/Χ/\&Chi;/e
  36.   silent s/χ/\&chi;/e
  37.   silent s/ˆ/\&circ;/e
  38.   silent s//\&clubs;/e
  39.   silent s//\&cong;/e
  40.   silent s/©/\&copy;/e
  41.   silent s//\&crarr;/e
  42.   silent s//\&cup;/e
  43.   silent s/¤/\&curren;/e
  44.   silent s//\&dagger;/e
  45.   silent s//\&Dagger;/e
  46.   silent s//\&darr;/e
  47.   silent s//\&dArr;/e
  48.   silent s/°/\&deg;/e
  49.   silent s/Δ/\&Delta;/e
  50.   silent s/δ/\&delta;/e
  51.   silent s//\&diams;/e
  52.   silent s/÷/\&divide;/e
  53.   silent s/É/\&Eacute;/e
  54.   silent s/é/\&eacute;/e
  55.   silent s/Ê/\&Ecirc;/e
  56.   silent s/ê/\&ecirc;/e
  57.   silent s/È/\&Egrave;/e
  58.   silent s/è/\&egrave;/e
  59.   silent s//\&empty;/e
  60.   silent s/Ε/\&Epsilon;/e
  61.   silent s/ε/\&epsilon;/e
  62.   silent s//\&equiv;/e
  63.   silent s/Η/\&Eta;/e
  64.   silent s/η/\&eta;/e
  65.   silent s/Ð/\&ETH;/e
  66.   silent s/ð/\&eth;/e
  67.   silent s/Ë/\&Euml;/e
  68.   silent s/ë/\&euml;/e
  69.   silent s//\&euro;/e
  70.   silent s//\&exist;/e
  71.   silent s/ƒ/\&fnof;/e
  72.   silent s//\&forall;/e
  73.   silent s/½/\&frac12;/e
  74.   silent s/¼/\&frac14;/e
  75.   silent s/¾/\&frac34;/e
  76.   silent s/Γ/\&Gamma;/e
  77.   silent s/γ/\&gamma;/e
  78.   silent s//\&ge;/e
  79.   silent s//\&harr;/e
  80.   silent s//\&hArr;/e
  81.   silent s//\&hearts;/e
  82.   silent s//\&hellip;/e
  83.   silent s/Í/\&Iacute;/e
  84.   silent s/í/\&iacute;/e
  85.   silent s/Î/\&Icirc;/e
  86.   silent s/î/\&icirc;/e
  87.   silent s/¡/\&iexcl;/e
  88.   silent s/Ì/\&Igrave;/e
  89.   silent s/ì/\&igrave;/e
  90.   silent s//\&image;/e
  91.   silent s//\&infin;/e
  92.   silent s//\&int;/e
  93.   silent s/Ι/\&Iota;/e
  94.   silent s/ι/\&iota;/e
  95.   silent s/¿/\&iquest;/e
  96.   silent s//\&isin;/e
  97.   silent s/Ï/\&Iuml;/e
  98.   silent s/ï/\&iuml;/e
  99.   silent s/Κ/\&Kappa;/e
  100.   silent s/κ/\&kappa;/e
  101.   silent s/Λ/\&Lambda;/e
  102.   silent s/λ/\&lambda;/e
  103.   silent s/«/\&laquo;/e
  104.   silent s//\&larr;/e
  105.   silent s//\&lArr;/e
  106.   silent s//\&lceil;/e
  107.   silent s//\&ldquo;/e
  108.   silent s//\&le;/e
  109.   silent s//\&lfloor;/e
  110.   silent s//\&lowast;/e
  111.   silent s//\&loz;/e
  112.   silent s//\&lsaquo;/e
  113.   silent s//\&lsquo;/e
  114.   silent s/¯/\&macr;/e
  115.   silent s//\&mdash;/e
  116.   silent s/µ/\&micro;/e
  117.   silent s/·/\&middot;/e
  118.   silent s//\&minus;/e
  119.   silent s/Μ/\&Mu;/e
  120.   silent s/μ/\&mu;/e
  121.   silent s//\&nabla;/e
  122.   silent s//\&ndash;/e
  123.   silent s//\&ne;/e
  124.   silent s//\&ni;/e
  125.   silent s/¬/\&not;/e
  126.   silent s//\&notin;/e
  127.   silent s//\&nsub;/e
  128.   silent s/Ñ/\&Ntilde;/e
  129.   silent s/ñ/\&ntilde;/e
  130.   silent s/Ν/\&Nu;/e
  131.   silent s/ν/\&nu;/e
  132.   silent s/Ó/\&Oacute;/e
  133.   silent s/ó/\&oacute;/e
  134.   silent s/Ô/\&Ocirc;/e
  135.   silent s/ô/\&ocirc;/e
  136.   silent s/Œ/\&OElig;/e
  137.   silent s/œ/\&oelig;/e
  138.   silent s/Ò/\&Ograve;/e
  139.   silent s/ò/\&ograve;/e
  140.   silent s//\&oline;/e
  141.   silent s/Ω/\&Omega;/e
  142.   silent s/ω/\&omega;/e
  143.   silent s/Ο/\&Omicron;/e
  144.   silent s/ο/\&omicron;/e
  145.   silent s//\&oplus;/e
  146.   silent s//\&or;/e
  147.   silent s/ª/\&ordf;/e
  148.   silent s/º/\&ordm;/e
  149.   silent s/Ø/\&Oslash;/e
  150.   silent s/ø/\&oslash;/e
  151.   silent s/Õ/\&Otilde;/e
  152.   silent s/õ/\&otilde;/e
  153.   silent s//\&otimes;/e
  154.   silent s/Ö/\&Ouml;/e
  155.   silent s/ö/\&ouml;/e
  156.   silent s//\&para;/e
  157.   silent s//\&part;/e
  158.   silent s//\&permil;/e
  159.   silent s//\&perp;/e
  160.   silent s/Φ/\&Phi;/e
  161.   silent s/φ/\&phi;/e
  162.   silent s/Π/\&Pi;/e
  163.   silent s/π/\&pi;/e
  164.   silent s/ϖ/\&piv;/e
  165.   silent s/±/\&plusmn;/e
  166.   silent s/£/\&pound;/e
  167.   silent s//\&prime;/e
  168.   silent s//\&Prime;/e
  169.   silent s//\&prod;/e
  170.   silent s//\&prop;/e
  171.   silent s/Ψ/\&Psi;/e
  172.   silent s/ψ/\&psi;/e
  173.   "silent s/"/\&quot;/e
  174.   silent s//\&radic;/e
  175.   silent s/»/\&raquo;/e
  176.   silent s//\&rarr;/e
  177.   silent s//\&rArr;/e
  178.   silent s//\&rceil;/e
  179.   silent s//\&rdquo;/e
  180.   silent s//\&real;/e
  181.   silent s/®/\&reg;/e
  182.   silent s//\&rfloor;/e
  183.   silent s/Ρ/\&Rho;/e
  184.   silent s/ρ/\&rho;/e
  185.   silent s//\&rsaquo;/e
  186.   silent s//\&rsquo;/e
  187.   silent s//\&sbquo;/e
  188.   silent s/Š/\&Scaron;/e
  189.   silent s/š/\&scaron;/e
  190.   silent s//\&sdot;/e
  191.   silent s/§/\&sect;/e
  192.   silent s/Σ/\&Sigma;/e
  193.   silent s/σ/\&sigma;/e
  194.   silent s/ς/\&sigmaf;/e
  195.   silent s//\&sim;/e
  196.   silent s//\&spades;/e
  197.   silent s//\&sub;/e
  198.   silent s//\&sube;/e
  199.   silent s//\&sum;/e
  200.   silent s//\&sup;/e
  201.   silent s/¹/\&sup1;/e
  202.   silent s/²/\&sup2;/e
  203.   silent s/³/\&sup3;/e
  204.   silent s//\&supe;/e
  205.   silent s/ß/\&szlig;/e
  206.   silent s/Τ/\&Tau;/e
  207.   silent s/τ/\&tau;/e
  208.   silent s//\&there4;/e
  209.   silent s/Θ/\&Theta;/e
  210.   silent s/θ/\&theta;/e
  211.   silent s/ϑ/\&thetasym;/e
  212.   silent s/Þ/\&THORN;/e
  213.   silent s/þ/\&thorn;/e
  214.   silent s/˜/\&tilde;/e
  215.   silent s/×/\&times;/e
  216.   silent s//\&trade;/e
  217.   silent s/Ú/\&Uacute;/e
  218.   silent s/ú/\&uacute;/e
  219.   silent s//\&uarr;/e
  220.   silent s//\&uArr;/e
  221.   silent s/Û/\&Ucirc;/e
  222.   silent s/û/\&ucirc;/e
  223.   silent s/Ù/\&Ugrave;/e
  224.   silent s/ù/\&ugrave;/e
  225.   silent s/¨/\&uml;/e
  226.   silent s/ϒ/\&upsih;/e
  227.   silent s/Υ/\&Upsilon;/e
  228.   silent s/υ/\&upsilon;/e
  229.   silent s/Ü/\&Uuml;/e
  230.   silent s/ü/\&uuml;/e
  231.   silent s//\&weierp;/e
  232.   silent s/Ξ/\&Xi;/e
  233.   silent s/ξ/\&xi;/e
  234.   silent s/Ý/\&Yacute;/e
  235.   silent s/ý/\&yacute;/e
  236.   silent s/¥/\&yen;/e
  237.   silent s/ÿ/\&yuml;/e
  238.   silent s/Ÿ/\&Yuml;/e
  239.   silent s/Ζ/\&Zeta;/e
  240.   silent s/ζ/\&zeta;/e
  241. endfunction
  242.  
  243. command! ReverseEntities call ReverseEntities()<CR>
  244. function! ReverseEntities()
  245.   silent s/&Aacute;/Á/e
  246.   silent s/&aacute;/á/e
  247.   silent s/&Acirc;/Â/e
  248.   silent s/&acirc;/â/e
  249.   silent s/&acute;/´/e
  250.   silent s/&AElig;/Æ/e
  251.   silent s/&aelig;/æ/e
  252.   silent s/&Agrave;/À/e
  253.   silent s/&agrave;/à/e
  254.   silent s/&alefsym;//e
  255.   silent s/&Alpha;/Α/e
  256.   silent s/&alpha;/α/e
  257.   silent s/&and;//e
  258.   silent s/&ang;//e
  259.   "silent s/&apos;/'/e
  260.   silent s/&Aring;/Å/e
  261.   silent s/&aring;/å/e
  262.   silent s/&asymp;//e
  263.   silent s/&Atilde;/Ã/e
  264.   silent s/&atilde;/ã/e
  265.   silent s/&Auml;/Ä/e
  266.   silent s/&auml;/ä/e
  267.   silent s/&bdquo;//e
  268.   silent s/&Beta;/Β/e
  269.   silent s/&beta;/β/e
  270.   silent s/&brvbar;/¦/e
  271.   silent s/&bull;//e
  272.   silent s/&cap;//e
  273.   silent s/&Ccedil;/Ç/e
  274.   silent s/&ccedil;/ç/e
  275.   silent s/&cedil;/¸/e
  276.   silent s/&cent;/¢/e
  277.   silent s/&Chi;/Χ/e
  278.   silent s/&chi;/χ/e
  279.   silent s/&circ;/ˆ/e
  280.   silent s/&clubs;//e
  281.   silent s/&cong;//e
  282.   silent s/&copy;/©/e
  283.   silent s/&crarr;//e
  284.   silent s/&cup;//e
  285.   silent s/&curren;/¤/e
  286.   silent s/&dagger;//e
  287.   silent s/&Dagger;//e
  288.   silent s/&darr;//e
  289.   silent s/&dArr;//e
  290.   silent s/&deg;/°/e
  291.   silent s/&Delta;/Δ/e
  292.   silent s/&delta;/δ/e
  293.   silent s/&diams;//e
  294.   silent s/&divide;/÷/e
  295.   silent s/&Eacute;/É/e
  296.   silent s/&eacute;/é/e
  297.   silent s/&Ecirc;/Ê/e
  298.   silent s/&ecirc;/ê/e
  299.   silent s/&Egrave;/È/e
  300.   silent s/&egrave;/è/e
  301.   silent s/&empty;//e
  302.   silent s/&Epsilon;/Ε/e
  303.   silent s/&epsilon;/ε/e
  304.   silent s/&equiv;//e
  305.   silent s/&Eta;/Η/e
  306.   silent s/&eta;/η/e
  307.   silent s/&ETH;/Ð/e
  308.   silent s/&eth;/ð/e
  309.   silent s/&Euml;/Ë/e
  310.   silent s/&euml;/ë/e
  311.   silent s/&euro;//e
  312.   silent s/&exist;//e
  313.   silent s/&fnof;/ƒ/e
  314.   silent s/&forall;//e
  315.   silent s/&frac12;/½/e
  316.   silent s/&frac14;/¼/e
  317.   silent s/&frac34;/¾/e
  318.   silent s/&Gamma;/Γ/e
  319.   silent s/&gamma;/γ/e
  320.   silent s/&ge;//e
  321.   silent s/&harr;//e
  322.   silent s/&hArr;//e
  323.   silent s/&hearts;//e
  324.   silent s/&hellip;//e
  325.   silent s/&Iacute;/Í/e
  326.   silent s/&iacute;/í/e
  327.   silent s/&Icirc;/Î/e
  328.   silent s/&icirc;/î/e
  329.   silent s/&iexcl;/¡/e
  330.   silent s/&Igrave;/Ì/e
  331.   silent s/&igrave;/ì/e
  332.   silent s/&image;//e
  333.   silent s/&infin;//e
  334.   silent s/&int;//e
  335.   silent s/&Iota;/Ι/e
  336.   silent s/&iota;/ι/e
  337.   silent s/&iquest;/¿/e
  338.   silent s/&isin;//e
  339.   silent s/&Iuml;/Ï/e
  340.   silent s/&iuml;/ï/e
  341.   silent s/&Kappa;/Κ/e
  342.   silent s/&kappa;/κ/e
  343.   silent s/&Lambda;/Λ/e
  344.   silent s/&lambda;/λ/e
  345.   silent s/&laquo;/«/e
  346.   silent s/&larr;//e
  347.   silent s/&lArr;//e
  348.   silent s/&lceil;//e
  349.   silent s/&ldquo;//e
  350.   silent s/&le;//e
  351.   silent s/&lfloor;//e
  352.   silent s/&lowast;//e
  353.   silent s/&loz;//e
  354.   silent s/&lsaquo;//e
  355.   silent s/&lsquo;//e
  356.   silent s/&macr;/¯/e
  357.   silent s/&mdash;//e
  358.   silent s/&micro;/µ/e
  359.   silent s/&middot;/·/e
  360.   silent s/&minus;//e
  361.   silent s/&Mu;/Μ/e
  362.   silent s/&mu;/μ/e
  363.   silent s/&nabla;//e
  364.   silent s/&ndash;//e
  365.   silent s/&ne;//e
  366.   silent s/&ni;//e
  367.   silent s/&not;/¬/e
  368.   silent s/&notin;//e
  369.   silent s/&nsub;//e
  370.   silent s/&Ntilde;/Ñ/e
  371.   silent s/&ntilde;/ñ/e
  372.   silent s/&Nu;/Ν/e
  373.   silent s/&nu;/ν/e
  374.   silent s/&Oacute;/Ó/e
  375.   silent s/&oacute;/ó/e
  376.   silent s/&Ocirc;/Ô/e
  377.   silent s/&ocirc;/ô/e
  378.   silent s/&OElig;/Œ/e
  379.   silent s/&oelig;/œ/e
  380.   silent s/&Ograve;/Ò/e
  381.   silent s/&ograve;/ò/e
  382.   silent s/&oline;//e
  383.   silent s/&Omega;/Ω/e
  384.   silent s/&omega;/ω/e
  385.   silent s/&Omicron;/Ο/e
  386.   silent s/&omicron;/ο/e
  387.   silent s/&oplus;//e
  388.   silent s/&or;//e
  389.   silent s/&ordf;/ª/e
  390.   silent s/&ordm;/º/e
  391.   silent s/&Oslash;/Ø/e
  392.   silent s/&oslash;/ø/e
  393.   silent s/&Otilde;/Õ/e
  394.   silent s/&otilde;/õ/e
  395.   silent s/&otimes;//e
  396.   silent s/&Ouml;/Ö/e
  397.   silent s/&ouml;/ö/e
  398.   silent s/&para;//e
  399.   silent s/&part;//e
  400.   silent s/&permil;//e
  401.   silent s/&perp;//e
  402.   silent s/&Phi;/Φ/e
  403.   silent s/&phi;/φ/e
  404.   silent s/&Pi;/Π/e
  405.   silent s/&pi;/π/e
  406.   silent s/&piv;/ϖ/e
  407.   silent s/&plusmn;/±/e
  408.   silent s/&pound;/£/e
  409.   silent s/&prime;//e
  410.   silent s/&Prime;//e
  411.   silent s/&prod;//e
  412.   silent s/&prop;//e
  413.   silent s/&Psi;/Ψ/e
  414.   silent s/&psi;/ψ/e
  415.   silent s/&quot;/"/e
  416.   silent s/&radic;//e
  417.   silent s/&raquo;/»/e
  418.   silent s/&rarr;//e
  419.   silent s/&rArr;//e
  420.   silent s/&rceil;//e
  421.   silent s/&rdquo;//e
  422.   silent s/&real;//e
  423.   silent s/&reg;/®/e
  424.   silent s/&rfloor;//e
  425.   silent s/&Rho;/Ρ/e
  426.   silent s/&rho;/ρ/e
  427.   silent s/&rsaquo;//e
  428.   silent s/&rsquo;//e
  429.   silent s/&sbquo;//e
  430.   silent s/&Scaron;/Š/e
  431.   silent s/&scaron;/š/e
  432.   silent s/&sdot;//e
  433.   silent s/&sect;/§/e
  434.   silent s/&Sigma;/Σ/e
  435.   silent s/&sigma;/σ/e
  436.   silent s/&sigmaf;/ς/e
  437.   silent s/&sim;//e
  438.   silent s/&spades;//e
  439.   silent s/&sub;//e
  440.   silent s/&sube;//e
  441.   silent s/&sum;//e
  442.   silent s/&sup;//e
  443.   silent s/&sup1;/¹/e
  444.   silent s/&sup2;/²/e
  445.   silent s/&sup3;/³/e
  446.   silent s/&supe;//e
  447.   silent s/&szlig;/ß/e
  448.   silent s/&Tau;/Τ/e
  449.   silent s/&tau;/τ/e
  450.   silent s/&there4;//e
  451.   silent s/&Theta;/Θ/e
  452.   silent s/&theta;/θ/e
  453.   silent s/&thetasym;/ϑ/e
  454.   silent s/&THORN;/Þ/e
  455.   silent s/&thorn;/þ/e
  456.   silent s/&tilde;/˜/e
  457.   silent s/&times;/×/e
  458.   silent s/&trade;//e
  459.   silent s/&Uacute;/Ú/e
  460.   silent s/&uacute;/ú/e
  461.   silent s/&uarr;//e
  462.   silent s/&uArr;//e
  463.   silent s/&Ucirc;/Û/e
  464.   silent s/&ucirc;/û/e
  465.   silent s/&Ugrave;/Ù/e
  466.   silent s/&ugrave;/ù/e
  467.   silent s/&uml;/¨/e
  468.   silent s/&upsih;/ϒ/e
  469.   silent s/&Upsilon;/Υ/e
  470.   silent s/&upsilon;/υ/e
  471.   silent s/&Uuml;/Ü/e
  472.   silent s/&uuml;/ü/e
  473.   silent s/&weierp;//e
  474.   silent s/&Xi;/Ξ/e
  475.   silent s/&xi;/ξ/e
  476.   silent s/&Yacute;/Ý/e
  477.   silent s/&yacute;/ý/e
  478.   silent s/&yen;/¥/e
  479.   silent s/&yuml;/ÿ/e
  480.   silent s/&Yuml;/Ÿ/e
  481.   silent s/&Zeta;/Ζ/e
  482.   silent s/&zeta;/ζ/e
  483. endfunction