Files
neovim/runtime/tutor/en/vim-01-beginner.tutor.json
brianhuster 1255a8d88d refactor(tutor): reimplement interactive marks as extmark in Lua
Problem:
From https://matrix.to/#/!cylwlNXSwagQmZSkzs:matrix.org/$Ofj-TFIsEMbp0O9OhE8xuZSNi-nhRLtZTOgs6JRLNrs?via=matrix.org&via=gitter.im&via=mozilla.org

In lesson 2.6, users are asked to remove the second, forth and fifth
lines with `dd` command, then they are asked to undo twice to make the
text go back to original state. But after that, the mark ✗ appears
again, which confuses the user because they think they do something
wrong. This is a limitation with the current implementation, which is
based on line number only.

Solution:
Reimplement interactive marks as extmarks in Lua. This also make the
feature less fragile, as users can remove, add some arbitrary lines
without breaking the interactive marks.

Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
2025-07-18 10:04:20 +07:00

45 lines
1.8 KiB
JSON

{
"expect": {
"105": "The cow jumped over the moon.",
"127": "There is some text missing from this line.",
"128": "There is some text missing from this line.",
"147": "There is some text missing from this line.",
"148": "There is some text missing from this line.",
"149": "There is also some text missing here.",
"150": "There is also some text missing here.",
"218": "There are some words that don't belong in this sentence.",
"234": "Somebody typed the end of this line twice.",
"273": -1,
"292": "This line of words is cleaned up.",
"309": "1) Roses are red,",
"310": "",
"311": "3) Violets are blue,",
"312": "",
"313": "",
"314": "6) Sugar is sweet",
"315": "7) And so are you.",
"335": "Fix the errors on this line and replace them with undo.",
"381": -1,
"382": -1,
"383": -1,
"384": -1,
"400": "When this line was typed in, someone pressed some wrong keys!",
"401": "When this line was typed in, someone pressed some wrong keys!",
"421": "This line has a few words that need changing using the change operator.",
"422": "This line has a few words that need changing using the change operator.",
"442": "The end of this line needs to be corrected using the c$ command.",
"443": "The end of this line needs to be corrected using the c$ command.",
"506": -1,
"525": -1,
"548": "Usually the best time to see the flowers is in the spring.",
"743": -1,
"748": -1,
"764": "This line will allow you to practice appending text to a line.",
"765": "This line will allow you to practice appending text to a line.",
"785": "Adding 123 to 456 gives you 579.",
"786": "Adding 123 to 456 gives you 579.",
"812": "a) This is the first item.",
"813": "b) This is the second item."
}
}