@@ -0,0 +1,233 @@
1+ _ _ __ __
2+ | | | | _ \ \ / /
3+ | |_| | ___ | | (_) \ \/ /
4+ | _ | / _ \ | | _ ) (
5+ | | | | | __/ | | | | / /\ \
6+ |_| |_| \___| |_| |_| /_/ \_\
7+
8+ A post-modern modal text editor.
9+_________________________________________________________________
10+
11+ Welcome to the Helix editor! Helix is different from editors
12+ you might be used to in that it is modal, meaning that it has
13+ different modes for editing text. The primary modes you will
14+ use are Normal mode and Insert mode. While in Normal mode, the
15+ keys you press won't actually type text. Instead, they will
16+ perform various actions with the text. This allows for more
17+ efficient editing. This tutor will teach you how you can make
18+ use of Helix's modal editing features. To begin, ensure your
19+ caps-lock key is not pressed and hold the j key until you reach
20+ the first lesson.
21+
22+
23+
24+=================================================================
25+= BASIC CURSOR MOVEMENT =
26+=================================================================
27+
28+ ↑
29+ k * h is on the left
30+ ← h l → * l is on the right
31+ j * j looks like a down arrow
32+ ↓
33+
34+ The cursor can be moved using the h, j, k, l keys, as shown
35+ above. The cursor/arrow keys will also work, but it is faster
36+ to use the hjkl keys as they are closer to the other keys you
37+ will be using. Try moving around to get a feel for hjkl.
38+ Once you're ready, hold j to continue to the next lesson.
39+
40+
41+
42+
43+
44+
45+
46+
47+=================================================================
48+= EXITING HELIX =
49+=================================================================
50+
51+ 1. Press the : key to enter command mode. Your cursor will
52+ move to the bottom of the screen.
53+ 2. Type q or quit and press <ENTER> to exit Helix.
54+
55+ Note: The quit command will fail if there are unsaved changes.
56+ To force quit and DISCARD these changes, use q! or quit!.
57+ You will learn how to save files later.
58+
59+ To exit command mode without entering a command, press <ESC>.
60+
61+ Now, move on to the next lesson.
62+
63+
64+
65+
66+
67+
68+
69+
70+=================================================================
71+= DELETION =
72+=================================================================
73+
74+ Press the d key to delete the character under the cursor.
75+
76+ 1. Move the cursor to the line below marked -->.
77+ 2. Move the cursor to each extra character, and press d to
78+ delete it.
79+
80+ --> Thhiss senttencee haass exxtra charracterss.
81+
82+ Once the sentence is correct, move on to the next lesson.
83+
84+
85+
86+
87+
88+
89+
90+
91+
92+
93+=================================================================
94+= INSERT MODE =
95+=================================================================
96+
97+ Press the i key to enter Insert mode.
98+
99+ 1. Move the cursor to the line below marked -->.
100+ 2. Move to a place in the line which is missing text and press
101+ i to enter Insert mode. Keys you press will now type text.
102+ 3. Enter the missing text.
103+ 4. Press <ESC> to exit Insert mode and return to Normal mode.
104+ 5. Repeat until the line matches the line below it.
105+
106+ --> Th stce misg so.
107+ This sentence is missing some text.
108+
109+ Note: If you want to move the cursor while in Insert mode,
110+ you may use the arrow keys instead of exiting and
111+ reentering Insert mode.
112+ Note: The status bar will display your current mode.
113+ Notice that when you press i, 'NOR' changes to 'INS'.
114+
115+
116+=================================================================
117+= MORE ON INSERT MODE =
118+=================================================================
119+
120+ As you saw, you can press i to enter Insert mode at the current
121+ position of the cursor. There are a few other ways you can
122+ enter Insert mode at different locations.
123+
124+ Common examples of insertion commands include:
125+ i - Insert before the selection.
126+ a - Insert after the selection. (a means "append")
127+ I - Insert at the start of the line.
128+ A - Insert at the end of the line.
129+
130+ 1. Move to anywhere in the line below marked -->.
131+ 2. Press A (<SHIFT> + a), your cursor will move to the end of
132+ the line and you will be able to type.
133+ 3. Type the text necessary to match the line below.
134+
135+ --> This sentence is miss
136+ This sentence is missing some text.
137+
138+
139+=================================================================
140+= SAVING A FILE =
141+=================================================================
142+
143+ Use :w/:write to save a file.
144+
145+ 1. Exit Helix using :q! as explained before, or open a new
146+ terminal.
147+ 2. Open a file in Helix by running: hx FILENAME
148+ 3. Make some edits to the file.
149+ 4. Press the : key to enter command mode.
150+ 5. Type w or write, and press <ENTER> to save the file.
151+
152+ You can also use wq or write-quit to save and exit.
153+
154+ Note: You can optionally enter a filepath after the w/write
155+ command in order to save to that path.
156+ Note: If there are any unsaved changes to a file, a plus [+]
157+ will appear next to the file name in the status bar.
158+
159+
160+
161+
162+=================================================================
163+= RECAP =
164+=================================================================
165+
166+ * Use the h,j,k,l keys to move the cursor.
167+
168+ * Press : to enter command mode.
169+ * The q/quit and q!/quit! commands will exit Helix. The
170+ former fails when there are unsaved changes. The latter
171+ discards them.
172+ * The w/write command will save the file.
173+ * The wq/write-quit command will do both.
174+
175+ * Press d to delete the character at the cursor.
176+
177+ * Press i to enter Insert mode and type text. Press <ESC> to
178+ return to Normal mode.
179+
180+
181+
182+
183+
184+
185+=================================================================
186+= MOTIONS AND SELECTIONS =
187+=================================================================
188+
189+ Press w to select forward until the next word.
190+
191+ The d key doesn't actually delete the character at the cursor,
192+ it deletes all selected text. Your cursor is like a
193+ single-character selection.
194+
195+ 1. Move the cursor to the line below marked -->.
196+ 2. Move to the beginning of a word that needs to be deleted.
197+ 3. Press w to select until the beginning of the next word.
198+ 4. Press d to delete the selection.
199+ 5. Repeat for all extra words in the line.
200+
201+ --> This sentence pencil has vacuum extra words in the it.
202+
203+
204+
205+
206+
207+
208+=================================================================
209+= MORE ON MOTIONS =
210+=================================================================
211+
212+ As you saw, pressing w moves the cursor forward until the start
213+ of the next word, selecting the text traversed. This is useful
214+ for moving around text and for selecting text to operate on.
215+
216+ Some common motions include:
217+ w - Move forward to before the beginning of the next word.
218+ e - Move forward to the end of the current word.
219+ b - Move backward to the beginning of the current word.
220+
221+ The w,e,b motions also have counterparts - W,E,B - which
222+ traverse WORDS instead of words. WORDS are only separated by
223+ whitespace, whereas words can be separated by other characters
224+ in addition to whitespace.
225+
226+ All of these motions select the text they traverse.
227+
228+
229+
230+
231+=================================================================
232+ This tutorial is still a work-in-progress.
233+ More sections are planned.