Skip to content

Commit 7026bb8

Browse files
vvizzovim-scripts
authored andcommitted
Version 1.0
Tons of imrovements and bugfixes from last vim-online release. Finally stable 1.0 because of final Vim7. Enjoy!
0 parents  commit 7026bb8

File tree

19 files changed

+9749
-0
lines changed

19 files changed

+9749
-0
lines changed

README

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
This is a mirror of http://www.vim.org/scripts/script.php?script_id=1334
2+
3+
Requires Vim7.
4+
5+
VST is script which makes possible to export text files with simple markup to HTML or LaTeX format or S5 HTML presentation. Script doesn't require any external dependency and will work on any platform Vim7 is available. VST is implementation of reStructuredText.
6+
7+
Supported elements of inline markup:
8+
9+
- emphasised text (italic)
10+
- strongly emphasised text (bold)
11+
- hyperlinks (in various syntax forms)
12+
- custom decorations (among them: sub, sup, big, small)
13+
14+
Elements of documents structure:
15+
16+
- paragraphs
17+
- block quotes
18+
- ordered lists
19+
- unordered lists
20+
- option lists
21+
- footnotes
22+
- citations
23+
- images
24+
- preformatted text
25+
- colorized preformatted text (HTML export only)
26+
- tables
27+
- admonitions
28+
- table of contents
29+
30+
Also bunch of auxiliary commands which should ease writing of document and navigating (folding, text table of contents, lists or declared links, replacements)
31+
32+
Latest version of script:
33+
http://skawina.eu.org/mikolaj/vst.zip
34+
35+
Help file in text form:
36+
http://skawina.eu.org/mikolaj/vst.txt
37+
38+
Following versions of help file was produced without any modifications to HTML or LaTeX source:
39+
40+
HTML:
41+
http://skawina.eu.org/mikolaj/vst.html
42+
43+
LaTeX file exported from vst.txt:
44+
http://skawina.eu.org/mikolaj/vst.tex
45+
46+
PDF file produced from vst.tex:
47+
http://skawina.eu.org/mikolaj/vst.pdf
48+

autoload/vst/default.css

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
body { background-color: #fff; margin: 0px 10%; min-width: 720px; font-family: Verdana, sans-serif;
2+
counter-reset: chapter section subsection subsubsection paragraph lchapter lsection lsubsection lsubsubsection lparagraph}
3+
div.footnote { border-left: 1px solid #000; margin-left: 0em; clear: both }
4+
div.ftext { position: relative; margin-left: 50px }
5+
div.fnumber { float: left; width: 40px; padding: 0em; margin-left: 0.5em; margin-top: 0em }
6+
div.fnumber a { margin: 0px; padding: 0px }
7+
div.ctext { position: relative; margin-left: 100px }
8+
div.cnumber { float: left; width: 90px; padding: 0em; margin-left: 0.5em; margin-top: 0em }
9+
div.cnumber a { margin: 0px; padding: 0px }
10+
div.tip { border: 2px solid #0d0; margin: 0.5em 2em 1em 2em; padding: 0em 1em }
11+
div.warning, div.caution, div.danger, div.error { border: 2px solid #f00; margin: 0.5em 2em 1em 2em; padding: 0em 1em }
12+
div.note, div.hint, div.important { border: 2px solid #000; margin: 0.5em 2em 1em 2em; padding: 0em 1em }
13+
div.figure { display: block; padding: 1em; width: 400px; clear: both}
14+
div.topic { margin: 2em }
15+
div.vstsidebar, div.sidebar { border: 2px solid #aaa; background-color: #ffffee; float: right; width: 40%; margin-left: 1em; margin-right: -1em; padding: 1em }
16+
span.strike { text-decoration: line-through }
17+
span.big { font-size: large }
18+
span.small { font-size: small }
19+
span.title { font-style: italic }
20+
span.toc { font-size: large; font-weight: 900 }
21+
span.notetitle { font-size: large; font-weight: 900; font-family: Verdana, sans-serif }
22+
p.notesubtitle { font-weight: 900; font-family: Verdana, sans-serif }
23+
p.attribution { font-style: italic; margin-left: 8em; text-indent: -1.4em }
24+
.vstright { float: right; margin: 1em }
25+
.vstleft { float: left; margin: 1em }
26+
.vstcenter { margin: 1em; margin-left: auto; margin-right: auto }
27+
blockquote.pull { font-size: large }
28+
p.rubric { font-size: large; margin-left: 2em }
29+
dd.normal { margin-bottom: 0.5em }
30+
dt.option { float: left; margin: 0em 0em 5px 2em; padding: 0px; font-family: monospace }
31+
dd.option { margin: 0px; padding: 0px; margin: 0em 0em 5px 10em; text-indent: 0.5em }
32+
dd.option > p { margin: 0px }
33+
dd.normal > p { margin: 0px }
34+
table { border-collapse: collapse; margin: 0.5em; margin-left: 0em; margin-right: 0em }
35+
thead, tfoot { text-align: center; font-weight: bold }
36+
td { border: 1px solid #000; padding: 0.25em; _top: 0%; vertical-align: top }
37+
td blockquote p{ margin: 0px; padding: 0px}
38+
td blockquote { margin: 0px; padding: 0px}
39+
table.vstbless td { border: 0px solid #000; padding: 0.25em; _top: 0%; vertical-align: top }
40+
td > p { margin: 0px }
41+
table.field { border: 0px solid #000; margin-left: 2em; padding: 0.25em; _top: 0%; vertical-align: top }
42+
td.fkey { font-weight: 900 }
43+
td.fval { border: 0px solid #000; padding: 0.25em; _top: 0%; vertical-align: top }
44+
td.fkey { font-weight: 900; border: 0px solid #000; padding: 0.25em; _top: 0%; vertical-align: top }
45+
td.fdkey { text-align: center; font-weight: 900 }
46+
td.fdval { text-align: center; font-style: italic }
47+
td.fakey { text-align: center; font-weight: 900 }
48+
td.faval { border: 0px solid #000; padding: 0.25em; _top: 0%; vertical-align: top }
49+
hr { width: 80%; margin: 1.5em auto }
50+
h1 { text-align: center; clear: both }
51+
h2, h3, h4, h5, h6 { text-align: left; margin-top: 1em; clear: both }
52+
h2 { counter-reset: section subsection subsubsection paragraph }
53+
h3 { counter-reset: subsection subsubsection paragraph }
54+
h4 { counter-reset: subsubsection paragraph }
55+
h5 { counter-reset: paragraph }
56+
h1 a { color: black }
57+
h2 a { color: black }
58+
h3 a { color: black }
59+
h4 a { color: black }
60+
h5 a { color: black }
61+
h6 a { color: black }
62+
p.subh1 { text-align: center; font-size: 120%; font-variant: small-caps }
63+
p.subh2, p.subh3, p.subh4, p.subh5, p.subh6 { text-align: left; font-size: 120%; font-variant: small-caps }
64+
h2:before { content: counter(chapter)" "; counter-increment: chapter }
65+
h3:before { content: counter(chapter)"."counter(section)" "; counter-increment: section }
66+
h4:before { content: counter(chapter)"."counter(section)"."counter(subsection)" "; counter-increment: subsection }
67+
h5:before { content: counter(chapter)"."counter(section)"."counter(subsection)"."counter(subsubsection)" "; counter-increment: subsubsection }
68+
h6:before { content: counter(chapter)"."counter(section)"."counter(subsection)"."counter(subsubsection)"."counter(paragraph)" "; counter-increment: paragraph}
69+
li.h1 { margin-left: 0em }
70+
li.h2 { margin-left: 1em; counter-reset: lsection lsubsection lsubsubsection lparagraph }
71+
li.h3 { margin-left: 2em; counter-reset: lsubsection lsubsubsection lparagraph }
72+
li.h4 { margin-left: 3em; counter-reset: lsubsubsection lparagraph }
73+
li.h5 { margin-left: 4em; counter-reset: lparagraph }
74+
li.h2:before { content: counter(lchapter)" "; counter-increment: lchapter }
75+
li.h3:before { content: counter(lchapter)"."counter(lsection)" "; counter-increment: lsection }
76+
li.h4:before { content: counter(lchapter)"."counter(lsection)"."counter(lsubsection)" "; counter-increment: lsubsection }
77+
li.h5:before { content: counter(lchapter)"."counter(lsection)"."counter(lsubsection)"."counter(lsubsubsection)" "; counter-increment: lsubsubsection }
78+
li.h6:before { content: counter(lchapter)"."counter(lsection)"."counter(lsubsection)"."counter(lsubsubsection)"."counter(lparagraph)" "; counter-increment: lparagraph}
79+
li.h6 { margin-left: 5em }
80+
ol, ul { margin-bottom: 0.5em; margin-top: 0.5em }
81+
ol.loweralpha { list-style-type: lower-alpha }
82+
ol.upperalpha { list-style-type: upper-alpha }
83+
ol.lowerroman { list-style-type: lower-roman }
84+
ol.upperroman { list-style-type: upper-roman }
85+
ol.decimal { list-style-type: decimal }
86+
ul.square { list-style-type: square }
87+
ul.circle { list-style-type: circle }
88+
ul.disc { list-style-type: disc }
89+
li > p { margin: 0em }
90+
img { border: 1px solid #000; padding: 0em; display: block; margin: 1em; margin-left: auto; margin-right: auto }
91+
img.inline { border: 1px solid #000; padding: 0em; margin: 0em; display: inline }
92+
pre { background-color: #eee; margin-left: 2em; clear: both; overflow: auto }
93+
div.unknown { font-family: monospace; background-color: #fff; margin: 1em; padding: 1em; clear: both; border: 3px solid red}
94+
pre.quoted { background-color: #eee; margin-left: 0em; clear: both; overflow: auto }
95+
pre.rawlatex { background-color: #ddd; border: 1px solid #000; padding: 0.1em; clear: both; overflow: auto }
96+
pre.address { font-family: Verdana, sans-serif; display: inline; margin: 0px; background-color: #fff; overflow: auto }
97+
span.target { text-decoration: underline }
98+
div.vstfooter hr { width: 100%; margin: 0px; margin-top: 0em }
99+
div.vstfooter p { margin: 0px }

autoload/vst/lightblue.css

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
/* Vim reStructured Text CSS */
2+
3+
body { background-color: #fff; margin: 0px 10%; width: 45em; font-family: Georgia, serif;}
4+
div.footnote { border-left: 1px solid silver; margin-left: 0em; clear: both }
5+
div.ftext { position: relative; margin-left: 50px }
6+
div.fnumber { float: left; width: 40px; padding: 0em; margin-left: 0.5em; margin-top: 0em }
7+
div.fnumber a { margin: 0px; padding: 0px }
8+
div.ctext { position: relative; margin-left: 100px }
9+
div.cnumber { float: left; width: 90px; padding: 0em; margin-left: 0.5em; margin-top: 0em }
10+
div.cnumber a { margin: 0px; padding: 0px }
11+
div.tip { border: 2px solid #0d0; margin: 0.5em 2em 1em 2em; padding: 0em 1em }
12+
div.warning, div.caution, div.danger, div.error { border: 2px solid #f00; margin: 0.5em 2em 1em 2em; padding: 0em 1em }
13+
div.note, div.hint, div.important { border: 2px solid silver; margin: 0.5em 2em 1em 2em; padding: 0em 1em }
14+
div.figure { display: block; padding: 1em; width: 400px; clear: both}
15+
div.topic { margin: 2em }
16+
div.vstsidebar, div.sidebar { border: 2px solid #aaa; background-color: #ffffee; float: right; width: 40%; margin-left: 1em; margin-right: -1em; padding: 1em }
17+
span.strike { text-decoration: line-through }
18+
span.big { font-size: large }
19+
span.small { font-size: small }
20+
span.title { font-style: italic }
21+
span.toc { font-size: large; font-weight: 900 }
22+
span.notetitle { font-size: large; font-weight: 900; font-family: Arial, sans-serif }
23+
p.notesubtitle { font-weight: 900; font-family: Arial, sans-serif }
24+
p.attribution { font-style: italic; margin-left: 8em; text-indent: -1.4em }
25+
.vstright { float: right; margin: 1em }
26+
.vstleft { float: left; margin: 1em }
27+
.vstcenter { margin: 1em; margin-left: auto; margin-right: auto }
28+
blockquote.pull { font-size: large }
29+
p.rubric { font-size: large; margin-left: 2em }
30+
dd.normal { margin-bottom: 0.5em }
31+
dt.option { float: left; margin: 0em 0em 5px 2em; padding: 0px; font-family: monospace }
32+
dd.option { margin: 0px; padding: 0px; margin: 0em 0em 5px 10em; text-indent: 0.5em }
33+
dd.option > p { margin: 0px }
34+
dd.normal > p { margin: 0px }
35+
table { border-collapse: collapse; border-top: 1px solid navy; border-bottom: 1px solid navy; margin: 0.5em; margin-left: 0em; margin-right: 0em }
36+
thead, tfoot { text-align: center; font-weight: bold }
37+
thead { font-family: Arial, sans-serif; border-bottom: 1px solid silver; }
38+
td { border: 0px solid #000; padding: 0.25em; _top: 0%; vertical-align: top }
39+
td blockquote p{ margin: 0px; padding: 0px}
40+
td blockquote { margin: 0px; padding: 0px}
41+
table.vstbless { border: 0px solid #000; }
42+
table.vstbless thead { border: 0px solid #000; }
43+
table.vstbless td { border: 0px solid #000; padding: 0.25em; _top: 0%; vertical-align: top }
44+
td > p { margin: 0px }
45+
table.field { border: 0px solid #000; margin-left: 2em; padding: 0.25em; _top: 0%; vertical-align: top }
46+
td.fkey { font-weight: 900 }
47+
td.fval { border: 0px solid #000; padding: 0.25em; _top: 0%; vertical-align: top }
48+
td.fkey { font-weight: 900; border: 0px solid #000; padding: 0.25em; _top: 0%; vertical-align: top }
49+
td.fdkey { text-align: center; font-weight: 900 }
50+
td.fdval { text-align: center; font-style: italic }
51+
td.fakey { text-align: center; font-weight: 900 }
52+
td.faval { border: 0px solid #000; padding: 0.25em; _top: 0%; vertical-align: top }
53+
hr { width: 80%; margin: 1.5em auto; border: 1px solid silver }
54+
h1 { border-bottom: 2px solid silver; text-align: center; clear: both }
55+
h2, h3, h4, h5, h6 { text-align: left; margin-top: 1em; clear: both; padding-top: 0.5em;}
56+
h2, h3 { border-bottom: 1px solid silver; }
57+
h1 a { color: dodgerblue4 }
58+
h2 a { color: dodgerblue4 }
59+
h3 a { color: dodgerblue4 }
60+
h4 a { color: dodgerblue4 }
61+
h5 a { color: dodgerblue4 }
62+
h6 a { color: dodgerblue4 }
63+
p.subh1 { text-align: center; font-size: 120%; font-variant: small-caps }
64+
p.subh2, p.subh3, p.subh4, p.subh5, p.subh6 { text-align: left; font-size: 120%; font-variant: small-caps }
65+
li.h1 { margin-left: 0em }
66+
li.h2 { margin-left: 1em;}
67+
li.h3 { margin-left: 2em;}
68+
li.h4 { margin-left: 3em;}
69+
li.h5 { margin-left: 4em;}
70+
li.h6 { margin-left: 5em }
71+
ol, ul { margin-bottom: 0.5em; margin-top: 0.5em }
72+
ol.loweralpha { list-style-type: lower-alpha }
73+
ol.upperalpha { list-style-type: upper-alpha }
74+
ol.lowerroman { list-style-type: lower-roman }
75+
ol.upperroman { list-style-type: upper-roman }
76+
ol.decimal { list-style-type: decimal }
77+
ul.square { list-style-type: square }
78+
ul.circle { list-style-type: circle }
79+
ul.disc { list-style-type: disc }
80+
li > p { margin: 0em }
81+
img { border: 1px solid #000; padding: 0em; display: block; margin: 1em; margin-left: auto; margin-right: auto }
82+
img.inline { border: 1px solid #000; padding: 0em; margin: 0em; display: inline }
83+
pre { background-color: #f9f9f9; margin-left: 2em; clear: both; overflow: auto }
84+
div.unknown { font-family: monospace; background-color: #fff; margin: 1em; padding: 1em; clear: both; border: 3px solid red}
85+
pre.quoted { background-color: #eee; margin-left: 0em; clear: both; overflow: auto }
86+
pre.rawlatex { background-color: #ddd; border: 1px solid #000; padding: 0.1em; clear: both; overflow: auto }
87+
pre.address { font-family: Georgia, serif; display: inline; margin: 0px; background-color: #fff; overflow: auto }
88+
span.target { text-decoration: underline }
89+
div.vstfooter hr { width: 100%; margin: 0px; margin-top: 0em }
90+
div.vstfooter p { margin: 0px }
91+
92+
/* Debug borders */
93+
p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
94+
/*
95+
border: 1px solid red;
96+
*/
97+
}
98+
99+
100+
a { color: dodgerblue4; }
101+
a:visited { color: fuchsia; }
102+
tt { color: dodgerblue4; }
103+
104+
h1, h2, h3, h4, h5, h6 {
105+
color: dodgerblue4;
106+
font-family: Arial, sans-serif;
107+
margin-top: 1.2em;
108+
margin-bottom: 0.5em;
109+
line-height: 1.3;
110+
}

autoload/vst/myhtmlvst.vim

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
" Author: Mikolaj Machowski
2+
" Example of macro for g:vst_html_post file
3+
call cursor(1,1)
4+
while search('^\s*{read\w\{-}:.\{-}}\s*$', 'W')
5+
let data = matchlist(getline('.'), '^\s*{read\(\w\{-}\):\(.\{-}\)}\s*$')
6+
silent s/.*//ge
7+
if data[1] == ''
8+
let output = readfile(data[2])
9+
else
10+
if data[1] == 'bang'
11+
let data[1] = ''
12+
endif
13+
let output = split(system(data[1].' '.data[2]), "\n")
14+
endif
15+
call map(output, "' '.v:val")
16+
let jout = "<pre>\n".join(output, "\n")."\n</pre>"
17+
put =jout
18+
endwhile

autoload/vst/s5ui/blank.gif

49 Bytes
Loading

autoload/vst/s5ui/framing.css

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/* The following styles size, place, and layer the slide components.
2+
Edit these if you want to change the overall slide layout.
3+
The commented lines can be uncommented (and modified, if necessary)
4+
to help you with the rearrangement process. */
5+
6+
/* target = 1024x768 */
7+
8+
div#header, div#footer, .slide {width: 100%; top: 0; left: 0;}
9+
div#header {top: 0; height: 3em; z-index: 1;}
10+
div#footer {top: auto; bottom: 0; height: 2.5em; z-index: 5;}
11+
.slide {top: 0; width: 92%; padding: 3.5em 4% 4%; z-index: 2; list-style: none;}
12+
div#controls {left: 50%; bottom: 0; width: 50%; z-index: 100;}
13+
div#controls form {position: absolute; bottom: 0; right: 0; width: 100%;
14+
margin: 0;}
15+
#currentSlide {position: absolute; width: 10%; left: 45%; bottom: 1em; z-index: 10;}
16+
html>body #currentSlide {position: fixed;}
17+
18+
/*
19+
div#header {background: #FCC;}
20+
div#footer {background: #CCF;}
21+
div#controls {background: #BBD;}
22+
div#currentSlide {background: #FFC;}
23+
*/

autoload/vst/s5ui/iepngfix.htc

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<public:component>
2+
<public:attach event="onpropertychange" onevent="doFix()" />
3+
4+
<script>
5+
6+
// IE5.5+ PNG Alpha Fix v1.0 by Angus Turnbull http://www.twinhelix.com
7+
// Free usage permitted as long as this notice remains intact.
8+
9+
// This must be a path to a blank image. That's all the configuration you need here.
10+
var blankImg = 'v11rc1/default/blank.gif';
11+
12+
var f = 'DXImageTransform.Microsoft.AlphaImageLoader';
13+
14+
function filt(s, m) {
15+
if (filters[f]) {
16+
filters[f].enabled = s ? true : false;
17+
if (s) with (filters[f]) { src = s; sizingMethod = m }
18+
} else if (s) style.filter = 'progid:'+f+'(src="'+s+'",sizingMethod="'+m+'")';
19+
}
20+
21+
function doFix() {
22+
if ((parseFloat(navigator.userAgent.match(/MSIE (\S+)/)[1]) < 5.5) ||
23+
(event && !/(background|src)/.test(event.propertyName))) return;
24+
25+
if (tagName == 'IMG') {
26+
if ((/\.png$/i).test(src)) {
27+
filt(src, 'image'); // was 'scale'
28+
src = blankImg;
29+
} else if (src.indexOf(blankImg) < 0) filt();
30+
} else if (style.backgroundImage) {
31+
if (style.backgroundImage.match(/^url[("']+(.*\.png)[)"']+$/i)) {
32+
var s = RegExp.$1;
33+
style.backgroundImage = '';
34+
filt(s, 'crop');
35+
} else filt();
36+
}
37+
}
38+
39+
doFix();
40+
41+
</script>
42+
</public:component>

autoload/vst/s5ui/opera.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/* DO NOT CHANGE THESE unless you really want to break Opera Show */
2+
.slide {
3+
visibility: visible !important;
4+
position: static !important;
5+
page-break-before: always;
6+
}
7+
#slide0 {page-break-before: avoid;}

autoload/vst/s5ui/outline.css

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/* don't change this unless you want the layout stuff to show up in the outline view! */
2+
3+
.layout div, #footer *, #controlForm * {display: none;}
4+
#footer, #controls, #controlForm, #navLinks, #toggle {
5+
display: block; visibility: visible; margin: 0; padding: 0;}
6+
#toggle {float: right; padding: 0.5em;}
7+
html>body #toggle {position: fixed; top: 0; right: 0;}
8+
9+
/* making the outline look pretty-ish */
10+
11+
#slide0 h1, #slide0 h2, #slide0 h3, #slide0 h4 {border: none; margin: 0;}
12+
#slide0 h1 {padding-top: 1.5em;}
13+
.slide h1 {margin: 1.5em 0 0; padding-top: 0.25em;
14+
border-top: 1px solid #888; border-bottom: 1px solid #AAA;}
15+
#toggle {border: 1px solid; border-width: 0 0 1px 1px; background: #FFF;}

0 commit comments

Comments
 (0)