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