Merge branch 'master' of http://repo.or.cz/r/msysgit into devel
[msysgit/historical-msysgit.git] / share / vim / vim58 / macros / html
blob1e9626e4511ef44bf679604e076712314965fa95
1 This message was posted in comp.editors.
2 A few irrelevant details in the text were deleted or replaced with [...]
4 From: ray@camco1.celestial.com (Ray A. Jones)
5 Newsgroups: comp.editors
6 Subject: Re: VI-like HTML-Editor
7 Date: 17 Feb 1996 01:42:30 GMT
8 Organization: Celestial Software
9 Lines: 232
11 : > I use vi for HTML editing and have 12 macros (one for each function key).
12 : > The 12th function key is a "macro switch" macro to change to a whole
13 : > different set of macros for those 12 function keys.
15 [...]
17 : > The href macro works like:
18 : >         This is a reference
19 : >                   ^- cursor
20 : > [press function key 5]
21 : >         This is a <A href="X$"><B>reference</B></A>
22 : >                            ^- cursor
23 : > with vi in the change word mode.  At that point, just type in the file name
25 I got buried in request for those macros, so yes, I will post them here.
28 Enclosed are the files
29 .exrc
30 .level1  same as .exrc
31 .level2
32 .level3
33 .level4
34 .level5
35 Unpack the files with either the "unshar" option of your E-mail reader or save
36 to a file and delete everything above and including the =====cut here=== line.
37 Then give the command;
38 sh filename
40 The file will complain about control characters in the file, but that is ok.
41 NOTE: you must move any current .exrc file to some other name, as this program
42 will not overwrite an existing .exrc file.
44 The macros are set up for "ansi" terminals, i.e., function keys 10 through12
45 are actual function key escape sequences.  All other key use the #1 throught
46 #9 formats.  If you are not using ansi terminals, let me know and I will
47 tell you how to change those.
49 You MUST move your current .exrc file to some other name prior to unpacking
50 these files - the unpacking process will not overwrite an existing file.
52 To move from one file to another (there are only 12 function keys and I
53 needed about 50), press function key 12 and it will print;
54 :so .level
55 at this point give a number (1-5) so the screen looks like;
56 :so .level2
57 and press [RETURN]  to load up the .level 2 file.
58 The first level (.exrc or level1) all work in the command mode and will do
59 the following
60 1       <H1>at begining of line with corresponding break at end </H1>
61 2       same for H2
62 3       same for H3
63 4       same for H4
64 5       href around current word, with cw (change word) active. Just type in
65         the file name or URL
66 6       mark a
67 7       mark b
68 8       embold a <B>word</B>
69 9       <P>
70 10      ispell spell check the current document (needs ispell)
71 11      header information at begining of file
72 12      level change.
74 INTERNET:  ray@Celestial.COM   Ray A. Jones; Celestial Systems, Inc.
75 URL: http://www.celestial.com  2835 82nd Ave. SE, Suite S-100
76                                Mercer Island, WA 98040; (206) 236-1676
77 The probability of one or more spelling errors in this missive approaches
78 unity.  If this bothers you, run it through your spell checker!
79 =================================cut here===================================
80 #! /bin/sh
81 # This is a shell archive.  Remove anything before this line, then unpack
82 # it by saving it into a file and typing "sh file".  To overwrite existing
83 # files, type "sh file -c".  You can also feed this as standard input via
84 # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
85 # will see the following message at the end:
86 #               "End of shell archive."
87 # Contents:  .exrc .level1 .level2 .level3 .level4 .level5
88 # Wrapped by ray@camco1 on Mon Feb 12 14:04:21 1996
89 PATH=/bin:/usr/bin:/usr/ucb ; export PATH
90 if test -f '.exrc' -a "${1}" != "-c" ; then
91   echo shar: Will not clobber existing file \"'.exrc'\"
92 else
93 echo shar: Extracting \"'.exrc'\" \(361 characters\)
94 sed "s/^X//" >'.exrc' <<'END_OF_FILE'
95 Xmap #1 I<H1>\eA</H1>\e
96 Xmap #2 I<H2>\eA</H2>\e
97 Xmap #3 I<H3>\eA</H3>\e
98 Xmap #4 I<H4>\eA</H4>\e
99 Xmap #5 i<A href="XX"><B>\eea</B></A>\ek/XX\rcw
100 Xmap #6 bma
101 Xmap #7 emb
102 Xmap #8 i<B>\ewea</B>\e
103 Xmap #9 A<P>\e
104 Xmap \e[W I<HTML>\r<HEAD>\r<TITLE></TITLE>\r</HEAD>\r\r<BODY>\r<H1></H1>\r<HR>
105 Xmap \e[V \e:w! /tmp/spellchk.tmp\r:!ispell /tmp/spellchk.tmp\r1GdG:0r /tmp/spellchk.tmp\r\rdG
106 Xmap \e[X :so .level
107 END_OF_FILE
108 echo shar: 17 control characters may be missing from \"'.exrc'\"
109 if test 361 -ne `wc -c <'.exrc'`; then
110     echo shar: \"'.exrc'\" unpacked with wrong size!
112 # end of '.exrc'
114 if test -f '.level1' -a "${1}" != "-c" ; then
115   echo shar: Will not clobber existing file \"'.level1'\"
116 else
117 echo shar: Extracting \"'.level1'\" \(361 characters\)
118 sed "s/^X//" >'.level1' <<'END_OF_FILE'
119 Xmap #1 I<H1>\eA</H1>\e
120 Xmap #2 I<H2>\eA</H2>\e
121 Xmap #3 I<H3>\eA</H3>\e
122 Xmap #4 I<H4>\eA</H4>\e
123 Xmap #5 i<A href="XX"><B>\eea</B></A>\ek/XX\rcw
124 Xmap #6 bma
125 Xmap #7 emb
126 Xmap #8 i<B>\ewea</B>\e
127 Xmap #9 A<P>\e
128 Xmap \e[W I<HTML>\r<HEAD>\r<TITLE></TITLE>\r</HEAD>\r\r<BODY>\r<H1></H1>\r<HR>
129 Xmap \e[V \e:w! /tmp/spellchk.tmp\r:!ispell /tmp/spellchk.tmp\r1GdG:0r /tmp/spellchk.tmp\r\rdG
130 Xmap \e[X :so .level
131 END_OF_FILE
132 echo shar: 17 control characters may be missing from \"'.level1'\"
133 if test 361 -ne `wc -c <'.level1'`; then
134     echo shar: \"'.level1'\" unpacked with wrong size!
136 # end of '.level1'
138 if test -f '.level2' -a "${1}" != "-c" ; then
139   echo shar: Will not clobber existing file \"'.level2'\"
140 else
141 echo shar: Extracting \"'.level2'\" \(530 characters\)
142 sed "s/^X//" >'.level2' <<'END_OF_FILE'
143 Xmap #1 o<FORM METHOD="POST" ACTION="XX">\r</FORM>\eO    \e
144 Xmap #2 `ii<INPUT SIZE=5 NAME="XX">
145 Xmap #3 `ii<INPUT TYPE="radio" NAME="XX" VALUE="XX">
146 Xmap #4 `ii<INPUT TYPE="checkbox" NAME="XX" VALUE="XX">
147 Xmap #5 `ii<INPUT TYPE="menu" NAME="XX" VALUE="XX">
148 Xmap #6 `ii<INPUT TYPE="radio" NAME="XX" VALUE="Yes"> Yes <INPUT TYPE="radio" NAME="XX" VALUE="No"> No <P>\e
149 Xmap #7 `ii<TEXTAREA NAME="XX" ROWS=3 COLS=48></TEXTAREA><P>\e
150 Xmap #8 `ii<INPUT TYPE="submit" VALUE=" Send ">
151 Xmap #9 `ii<INPUT TYPE="reset" VALUE=" Clear ">
152 Xmap \e[X :so .level
153 END_OF_FILE
154 echo shar: 5 control characters may be missing from \"'.level2'\"
155 if test 530 -ne `wc -c <'.level2'`; then
156     echo shar: \"'.level2'\" unpacked with wrong size!
158 # end of '.level2'
160 if test -f '.level3' -a "${1}" != "-c" ; then
161   shar: Will not clobber existing file \"'.level3'\"
162 else
163 echo shar: Extracting \"'.level3'\" \(373 characters\)
164 sed "s/^X//" >'.level3' <<'END_OF_FILE'
165 Xmap #1 'aI<UL>\r<UL>\eO    <LI>
166 Xmap #2 'aI<DL>\r<DL>\eO    <DT>
167 Xmap #3 'aI<MENU>\r<MENU>\eO    <LI>
168 Xmap #4 'aI<DIR>\r<DIR>\eO    <LI>
169 Xmap #5 o<LI> \e
170 Xmap #6 i<IMG SRC="">\ehi
171 Xmap #7 i<IMG ALIGN="" SRC="">\ehi
172 Xmap #8 i<A NAME = "XX">\eea</A>\ek/XX\rcw
173 Xmap #9 i<A href = "XX"><B>\eea</B></A>\ek/XX\rcw
174 Xmap \e[W i\r\eea\r\eb:.w! /tmp/x\r:!define `cat /tmp/x`>/tmp/xy\r:r /tmp/xy\r\r
175 Xmap \e[X :so .level
176 END_OF_FILE
177 echo shar: 15 control characters may be missing from \"'.level3'\"
178 if test 373 -ne `wc -c <'.level3'`; then
179     echo shar: \"'.level3'\" unpacked with wrong size!
181 # end of '.level3'
183 if test -f '.level4' -a "${1}" != "-c" ; then
184   echo shar: Will not clobber existing file \"'.level4'\"
185 else
186 echo shar: Extracting \"'.level4'\" \(530 characters\)
187 sed "s/^X//" >'.level4' <<'END_OF_FILE'
188 Xmap #1 o<FORM METHOD="POST" ACTION="XX">\r</FORM>\eO    \e
189 Xmap #2 `ii<INPUT SIZE=5 NAME="XX">
190 Xmap #3 `ii<INPUT TYPE="radio" NAME="XX" VALUE="XX">
191 Xmap #4 `ii<INPUT TYPE="checkbox" NAME="XX" VALUE="XX">
192 Xmap #5 `ii<INPUT TYPE="menu" NAME="XX" VALUE="XX">
193 Xmap #6 `ii<INPUT TYPE="radio" NAME="XX" VALUE="Yes"> Yes <INPUT TYPE="radio" NAME="XX" VALUE="No"> No <P>\e
194 Xmap #7 `ii<TEXTAREA NAME="XX" ROWS=3 COLS=48></TEXTAREA><P>\e
195 Xmap #8 `ii<INPUT TYPE="submit" VALUE=" Send ">
196 Xmap #9 `ii<INPUT TYPE="reset" VALUE=" Clear ">
197 Xmap \e[X :so .level
198 END_OF_FILE
199 echo shar: 5 control characters may be missing from \"'.level4'\"
200 if test 530 -ne `wc -c <'.level4'`; then
201     echo shar: \"'.level4'\" unpacked with wrong size!
203 # end of '.level4'
205 if test -f '.level5' -a "${1}" != "-c" ; then
206   echo shar: Will not clobber existing file \"'.level5'\"
207 else
208 echo shar: Extracting \"'.level5'\" \(288 characters\)
209 sed "s/^X//" >'.level5' <<'END_OF_FILE'
210 Xmap #1 'aI<UL>\r<UL>\eO    <LI>
211 Xmap #2 'aI<DL>\r<DL>\eO    <DT>
212 Xmap #3 'aI<MENU>\r<MENU>\eO    <LI>
213 Xmap #4 'aI<DIR>\r<DIR>\eO    <LI>
214 Xmap #5 o<LI> \e
215 Xmap #6 i<IMG SRC="">\ehi
216 Xmap #7 i<IMG ALIGN="" SRC="">\ehi
217 Xmap \e[W i\r\eea\r\eb:.w! /tmp/x\r:!define `cat /tmp/x`>/tmp/xy\r:r /tmp/xy\r\r
218 Xmap \e[X :so .level
219 END_OF_FILE
220 echo shar: 11 control characters may be missing from \"'.level5'\"
221 if test 288 -ne `wc -c <'.level5'`; then
222     echo shar: \"'.level5'\" unpacked with wrong size!
224 # end of '.level5'
226 echo shar: End of shell archive.
227 exit 0