Skip to content

Commit

Permalink
Add eb word selection trick to the tutor (helix-editor#5247)
Browse files Browse the repository at this point in the history
  • Loading branch information
matklad authored and Frederik Vestre committed Feb 6, 2023
1 parent 2d7023c commit 8e74f53
Showing 1 changed file with 28 additions and 6 deletions.
34 changes: 28 additions & 6 deletions runtime/tutor
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ _________________________________________________________________


=================================================================
= 3.2 MORE ON MOTIONS =
= 3.2 MORE MOTIONS =
=================================================================

As you saw, typing w moves the cursor forward until the start
Expand All @@ -253,6 +253,19 @@ _________________________________________________________________
e - Move forward to the end of the current word.
b - Move backward to the beginning of the current word.

To select the word under cursor, combine e and b.

1. Move the cursor to the line marked '-->' below.
2. Move to a 'd' letter.
3. Type e to select a half of the word.
4. Type b to select the rest.

--> The Middle Kingdom.

=================================================================
= 3.3 WORDS AND words =
=================================================================

The w,e,b motions also have counterparts - W,E,B - which
traverse WORDS instead of words. WORDS are only separated by
whitespace, whereas words can be separated by other characters
Expand All @@ -262,8 +275,17 @@ _________________________________________________________________












=================================================================
= 3.3 THE CHANGE COMMAND =
= 3.4 THE CHANGE COMMAND =
=================================================================

Type c to change the current selection.
Expand All @@ -285,7 +307,7 @@ _________________________________________________________________


=================================================================
= 3.4 COUNTS WITH MOTIONS =
= 3.5 COUNTS WITH MOTIONS =
=================================================================

Type a number before a motion to repeat it that many times.
Expand All @@ -307,7 +329,7 @@ _________________________________________________________________


=================================================================
= 3.5 SELECT / EXTEND MODE =
= 3.6 SELECT / EXTEND MODE =
=================================================================

Type v to enter Select mode.
Expand All @@ -329,7 +351,7 @@ _________________________________________________________________


=================================================================
= 3.6 SELECTING LINES =
= 3.7 SELECTING LINES =
=================================================================

Type x to select a whole line. Type x again to select the next.
Expand All @@ -351,7 +373,7 @@ _________________________________________________________________
subsequent lines. X on an empty line does nothing.

=================================================================
= 3.7 COLLAPSING SELECTIONS =
= 3.8 COLLAPSING SELECTIONS =
=================================================================

Type ; to collapse selections to single cursors.
Expand Down

0 comments on commit 8e74f53

Please sign in to comment.