-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
8 changed files
with
204 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
After: | ||
After (Restore default options): | ||
call wordmotion#_default() | ||
|
||
Execute (Check mappings with prefix): | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,184 @@ | ||
# regular words | ||
|
||
Given (This is some text): | ||
This is some text | ||
|
||
# first word of line, start of word | ||
|
||
Do (dw at [T]his): | ||
dw | ||
|
||
Then (Assert that cursor is at [i]s): | ||
Assert 1, col('.') | ||
|
||
Expect (This deleted): | ||
is some text | ||
|
||
Do (cw at [T]his): | ||
cwThat\<Esc> | ||
|
||
Then (Assert that cursor is at Tha[t]): | ||
Assert 4, col('.') | ||
|
||
Expect (This changed to That): | ||
That is some text | ||
|
||
# first word of line, middle of word | ||
|
||
Do (dw at T[h]is): | ||
l | ||
dw | ||
|
||
Then (Assert that cursor is at [i]s): | ||
Assert 2, col('.') | ||
|
||
Expect (his deleted): | ||
Tis some text | ||
|
||
Do (cw at T[h]is): | ||
l | ||
cwThat\<Esc> | ||
|
||
Then (Assert that cursor is at TTha[t]): | ||
Assert 5, col('.') | ||
|
||
Expect (This changed to TThat): | ||
TThat is some text | ||
|
||
# first word of line, end of word | ||
|
||
Do (dw at Thi[s]): | ||
e | ||
dw | ||
|
||
Then (Assert that cursor is at [i]s): | ||
Assert 5, col('.') | ||
|
||
Expect (his deleted): | ||
Thiis some text | ||
|
||
Do (cw at Thi[s]): | ||
e | ||
cwThat\<Esc> | ||
|
||
Then (Assert that cursor is at ThiTha[t]): | ||
Assert 7, col('.') | ||
|
||
Expect (This changed to ThiThat): | ||
ThiThat is some text | ||
|
||
# middle of line, start of word | ||
|
||
Do (dw at [s]ome): | ||
2w | ||
dw | ||
|
||
Then (Assert that cursor is at [t]ext): | ||
Assert 9, col('.') | ||
|
||
Expect (some deleted): | ||
This is text | ||
|
||
Do (cw at [s]ome): | ||
2w | ||
cwother\<Esc> | ||
|
||
Then (Assert that cursor is at othe[r]): | ||
Assert 13, col('.') | ||
|
||
Expect (some changed to other): | ||
This is other text | ||
|
||
# middle of line, middle of word | ||
|
||
Do (dw at s[o]me): | ||
2wl | ||
dw | ||
|
||
Then (Assert that cursor is at [t]ext): | ||
Assert 10, col('.') | ||
|
||
Expect (some deleted): | ||
This is stext | ||
|
||
Do (cw at s[o]me): | ||
2wl | ||
cwother\<Esc> | ||
|
||
Then (Assert that cursor is at othe[r]): | ||
Assert 13, col('.') | ||
|
||
Expect (some changed to sother): | ||
This is sother text | ||
|
||
# middle of line, end of word | ||
|
||
Do (dw at som[e]): | ||
3e | ||
dw | ||
|
||
Then (Assert that cursor is at [t]ext): | ||
Assert 12, col('.') | ||
|
||
Expect (some deleted): | ||
This is somtext | ||
|
||
Do (cw at som[e]): | ||
3e | ||
cwother\<Esc> | ||
|
||
Then (Assert that cursor is at somothe[r]): | ||
Assert 15, col('.') | ||
|
||
Expect (some changed to somother): | ||
This is somother text | ||
|
||
# end of line, start of word | ||
|
||
Do (dw at [t]ext): | ||
3w | ||
dw | ||
|
||
Then (Assert that cursor is at some[_]): | ||
Assert 13, col('.') | ||
|
||
Expect (text deleted): | ||
This is some | ||
|
||
Do (cw at [t]ext): | ||
3w | ||
cwchange\<Esc> | ||
|
||
Then (Assert that cursor is at chang[e]): | ||
Assert 19, col('.') | ||
|
||
Expect (text changed to change): | ||
This is some change | ||
|
||
# end of line, middle of word | ||
|
||
Do (dw at t[e]xt): | ||
3wl | ||
dw | ||
|
||
Then (Assert that cursor is at _[t]): | ||
Assert 14, col('.') | ||
|
||
Expect (text deleted): | ||
This is some t | ||
|
||
Do (cw at t[e]xt): | ||
3wl | ||
cwchange\<Esc> | ||
|
||
Then (Assert that cursor is at tchang[e]): | ||
Assert 20, col('.') | ||
|
||
Expect (text changed to tchange): | ||
This is some tchange | ||
|
||
# single character words | ||
|
||
Given (a b c\nd e f): | ||
a b c | ||
d e f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
After: | ||
After (Restore default options): | ||
call wordmotion#_default() | ||
|
||
Execute (Check default mappings): | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
After: | ||
After (Restore default options): | ||
call wordmotion#_default() | ||
|
||
Given (Lorem ipsum deliminated by '_'): | ||
|