-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexamples.html
More file actions
71 lines (71 loc) · 2.86 KB
/
examples.html
File metadata and controls
71 lines (71 loc) · 2.86 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ed(itor) manual: Examples</title>
<link rel="apple-touch-icon" sizes="180x180" href="assets/favicon/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="assets/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="assets/favicon/favicon-16x16.png">
<link rel="manifest" href="assets/favicon/site.webmanifest">
<link rel="stylesheet" href="base.css">
</head>
<body>
<div id="title">
<h2>ed(itor) manual</h2>
<br>
<h3>Examples</h3>
</div>
Note: you or any other person is represented with a '>' symbol<br>
And bot is represented with a '<' symbol.<br><br>
<h3>Simple examples:</h3><br>
<b>1. Creating and editing a blank file.</b><br>
> $ed filename<br>
< ✅<br>
<img src="assets/screenshots/blank-file.png" alt="blank file example"><br><br>
<b>2. Editing an already existing file.</b><br>
> $ed [insert attachment]<br>
< (size of attachment in bytes)<br>
<img src="assets/screenshots/existing-file.png" alt="existing file"><br><br>
<b>3. Appending data:</b><br>
> a<br>
Hello World!<br>
Goodbye, World!<br>
.<br>
< (nothing)<br>
<img src="assets/screenshots/appending.png" alt="appending"><br><br>
<b>4. Deleting lines:</b><br>
> 2,3d<br>
< (nothing)<br>
<img src="assets/screenshots/deleting.png" alt="appending"><br><br>
<b>5. Write (upload the whole file) and quit.</b><br>
> wq<br>
< (size of the new edited file in bytes) [attachment]<br>
<img src="assets/screenshots/write-quit.png" alt="write quit"><br><br>
<h3>Advanced examples:</h3><br>
<b>1. Creating a file named "sample.txt", with the contents of "Hello World!" and then quit.</b><br>
> $ed sample.txt<br>
< ✅<br>
> a<br>
"Hello World!"<br>
.<br>
wq<br>
< 13 [attachment]<br>
<img src="assets/screenshots/complex 1.png" alt="first complex example"><br><br>
<b>2. Find a line including "Hello" on them</b><br>
> $ed [<a href="assets/examples/test.txt">attachment</a>]<br>
< 200<br>
> g/Hello/p<br>
< [query result attachment]<br>
> q<br>
< ✅<br>
<img src="assets/screenshots/complex 2.png" alt="second complex example"><br><br>
<b>3. Replaces all lines that includes "Hello" to "Goodbye,"</b><br>
> $ed [<a href="assets/examples/test.txt">attachment</a>]<br>
< 200<br>
> r/Hello/Goodbye,<br>
< (last replaced line which is) Goodbye, Discord!<br>
> wq<br>
< (the new edited attachment size which is) 212 [edited attachment]<br>
<img src="assets/screenshots/complex 3.png" alt="third complex example"><br><br>
</body>