forked from acrollet/jsvi
-
Notifications
You must be signed in to change notification settings - Fork 2
/
example.html
83 lines (67 loc) · 3.71 KB
/
example.html
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<?xml version="1.0" encoding="utf-8" ?>
<html lang="en">
<head>
<script src="vi.js"></script>
<link rel="stylesheet" href="vi.css" type="text/css" />
</head>
<body><form>
<textarea name="body" onfocus="jsvi.editor(this);"><i>jsvi</i> is a vi-clone written in pure javascript and should work
in any modern web-browser. <i>jsvi</i> is © 2006-2008 Internet Connection,
and is available under the terms of the GNU General Public License
version 3 or (at your option) any later version.
Internet Connection has been providing high-quality web and email
hosting since 1994, and we have a unique developer-centric offering
that can help you build web applications faster.
Our support staff is made up of knowledgeable UNIX users and
administrators that are very comfortable with Internet technologies.
We can help you with any application you may want to use- including
those that you are developing yourself.
If you don't know vi, you can use the arrow-keys as well to scroll
around this document.
<i>jsvi</i> has a finger-feel of vi, supports many ed/ex commands, is
unicode-aware, supports real-time, check-as-you-type spell checking, a small
subset of HTML for useful for physical markup of text, and host clipboard
integration.
Regarding vi compatibility, <i>jsvi</i> supports almost all vi-keys, and
almost all ed/ex (:) commands including <b>:ha</b>rdcopy, and <b>:g//m0</b> but
noticeably missing are <b>:i</b> and commands that work similar to it, as
well as certain register operations.
Regarding vim compatibility, <i>jsvi</i> supports vim's VISUAL and VISUAL-LINE
modes for selections, and has support for a few of vim's motion commands, but
for the most part, <i>jsvi</i> is a clone of vi and not vim.
It is <b>not</b> based on the so-called "Rich Editor" that is
built into modern Firefox builds, and MSIE, and as a result, works
reliably on Safari and Opera.
Some keys, are trapped by your browser, and as a result, simply will not
function- these keys probably work in another web-browser.
There <i>are</i> inttentional misspellingss in this document;
you can double-click on a misspelling to see suggestions.
<i>jsvi</i> supports automatic hyperlinks; simply double-click on
a URL to open it in a new window: http://internetconnection.net/
If you don't know vi, you can start making changes to this document
by entering <b>-- INSERT --</b> mode, with:
i insert before the current character
a append (insert) after the current character
o insert after the current line
O insert before the current line
I insert at the beginning of the current line
A insert at the end of the current line
You can return to command mode by pressing <b>Esc</b>ape, or if you
do not have an <b>Esc</b>ape key, holding down <b>Ctrl</b> and
pressing <b>[</b>.
<i>jsvi</i> is is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
<i>jsvi</i> is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
</textarea> <- That's a text area. Give it focus... or <a href="" onclick="jsvi.editor(document.forms[0].elements.body);return false;">launch vi</a>
</form>
</body>
</html>