{"schemaVersion":1,"contentVersion":"3.4.0","id":"foundation.7","languages":{"javascript":{"id":"foundation.7","title":"Compose an edit","moduleName":"Editing foundations","tips":"","concept":"<p class=\"lead\">Combine an operator with a familiar motion; distinguish delete, change and copy.</p><p><strong>Before this lesson:</strong> Choose where typing begins.</p><p>An operator asks what to do; a motion says how far. d deletes and stays in Normal; c changes and enters Insert; y copies without removing. de deletes through a word end. cw at a word start changes that word. Doubled dd, cc and yy act on a whole line. p puts copied text after the cursor, or below the current line for a linewise copy.</p><div class=\"pkeys\"><kbd>d</kbd> <kbd>c</kbd> <kbd>y</kbd> <kbd>dd</kbd> <kbd>cc</kbd> <kbd>yy</kbd> <kbd>p</kbd></div><h3>Example</h3><p>From p in “pack bags”, cw then “carry” then Esc gives “carry bags”. dw would remove the word and following gap. yy then p duplicates a complete line; the original stays.</p><h4>Worked text</h4><pre class=\"lesson-example\">const message = \"pack bags\";</pre><h4>After the edit</h4><pre class=\"lesson-example\">const message = \"carry bags\";</pre><p>Use Reset to try again.</p>","teaches":["operator-motion","linewise","put"],"introduces":["d","c","y","p","dd","cc","yy","linewise"],"constraints":[],"drills":[{"task":"Remove “Draft ”, including its following space.","hint":"Compare the desired result with the starting text. Preserve the surrounding text.","mode":"jsx","start":"const message = \"Draft short report\";","startCursor":{"line":0,"ch":17},"paths":[{"keys":["d","w"],"tier":"idiomatic","technique":"operator-motion","core":["operator-motion"],"note":"Choose the intended boundary, make the change and finish in Normal mode."}],"target":"const message = \"short report\";","language":"javascript","evidence":"guided","canonicalKey":"foundation.7#0","canonicalFingerprint":"1yw6bts"},{"task":"Replace Draft with Final, keeping its following space.","hint":"Compare the desired result with the starting text. Preserve the surrounding text.","mode":"jsx","start":"const message = \"Draft short report\";","startCursor":{"line":0,"ch":17},"paths":[{"keys":["c","w","Final","<Esc>"],"tier":"idiomatic","technique":"operator-motion","core":["operator-motion"],"note":"Choose the intended boundary, make the change and finish in Normal mode."}],"target":"const message = \"Final short report\";","language":"javascript","evidence":"guided","canonicalKey":"foundation.7#1","canonicalFingerprint":"zdrxho"},{"task":"Duplicate the Review line immediately below itself.","hint":"Compare the desired result with the starting text. Preserve the surrounding text.","mode":"jsx","start":"// Review\n// Publish","startCursor":{"line":0,"ch":0},"paths":[{"keys":["y","y","p"],"tier":"idiomatic","technique":"put","core":["put"],"note":"Choose the intended boundary, make the change and finish in Normal mode."}],"target":"// Review\n// Review\n// Publish","language":"javascript","evidence":"guided","canonicalKey":"foundation.7#2","canonicalFingerprint":"4zqpth"}]},"python":{"id":"foundation.7","title":"Compose an edit","moduleName":"Editing foundations","tips":"","concept":"<p class=\"lead\">Combine an operator with a familiar motion; distinguish delete, change and copy.</p><p><strong>Before this lesson:</strong> Choose where typing begins.</p><p>An operator asks what to do; a motion says how far. d deletes and stays in Normal; c changes and enters Insert; y copies without removing. de deletes through a word end. cw at a word start changes that word. Doubled dd, cc and yy act on a whole line. p puts copied text after the cursor, or below the current line for a linewise copy.</p><div class=\"pkeys\"><kbd>d</kbd> <kbd>c</kbd> <kbd>y</kbd> <kbd>dd</kbd> <kbd>cc</kbd> <kbd>yy</kbd> <kbd>p</kbd></div><h3>Example</h3><p>From p in “pack bags”, cw then “carry” then Esc gives “carry bags”. dw would remove the word and following gap. yy then p duplicates a complete line; the original stays.</p><h4>Worked text</h4><pre class=\"lesson-example\">message = \"pack bags\"</pre><h4>After the edit</h4><pre class=\"lesson-example\">message = \"carry bags\"</pre><p>Use Reset to try again.</p>","teaches":["operator-motion","linewise","put"],"introduces":["d","c","y","p","dd","cc","yy","linewise"],"constraints":[],"drills":[{"task":"Remove “Draft ”, including its following space.","hint":"Compare the desired result with the starting text. Preserve the surrounding text.","mode":"python","start":"message = \"Draft short report\"","startCursor":{"line":0,"ch":11},"paths":[{"keys":["d","w"],"tier":"idiomatic","technique":"operator-motion","core":["operator-motion"],"note":"Choose the intended boundary, make the change and finish in Normal mode."}],"target":"message = \"short report\"","language":"python","evidence":"guided","canonicalKey":"foundation.7#0","canonicalFingerprint":"1yw6bts"},{"task":"Replace Draft with Final, keeping its following space.","hint":"Compare the desired result with the starting text. Preserve the surrounding text.","mode":"python","start":"message = \"Draft short report\"","startCursor":{"line":0,"ch":11},"paths":[{"keys":["c","w","Final","<Esc>"],"tier":"idiomatic","technique":"operator-motion","core":["operator-motion"],"note":"Choose the intended boundary, make the change and finish in Normal mode."}],"target":"message = \"Final short report\"","language":"python","evidence":"guided","canonicalKey":"foundation.7#1","canonicalFingerprint":"zdrxho"},{"task":"Duplicate the Review line immediately below itself.","hint":"Compare the desired result with the starting text. Preserve the surrounding text.","mode":"python","start":"# Review\n# Publish","startCursor":{"line":0,"ch":0},"paths":[{"keys":["y","y","p"],"tier":"idiomatic","technique":"put","core":["put"],"note":"Choose the intended boundary, make the change and finish in Normal mode."}],"target":"# Review\n# Review\n# Publish","language":"python","evidence":"guided","canonicalKey":"foundation.7#2","canonicalFingerprint":"4zqpth"}]},"text":{"id":"foundation.7","title":"Compose an edit","moduleName":"Editing foundations","tips":"","concept":"<p class=\"lead\">Combine an operator with a familiar motion; distinguish delete, change and copy.</p><p><strong>Before this lesson:</strong> Choose where typing begins.</p><p>An operator asks what to do; a motion says how far. d deletes and stays in Normal; c changes and enters Insert; y copies without removing. de deletes through a word end. cw at a word start changes that word. Doubled dd, cc and yy act on a whole line. p puts copied text after the cursor, or below the current line for a linewise copy.</p><div class=\"pkeys\"><kbd>d</kbd> <kbd>c</kbd> <kbd>y</kbd> <kbd>dd</kbd> <kbd>cc</kbd> <kbd>yy</kbd> <kbd>p</kbd></div><h3>Example</h3><p>From p in “pack bags”, cw then “carry” then Esc gives “carry bags”. dw would remove the word and following gap. yy then p duplicates a complete line; the original stays.</p><h4>Worked text</h4><pre class=\"lesson-example\">Message: pack bags</pre><h4>After the edit</h4><pre class=\"lesson-example\">Message: carry bags</pre><p>Use Reset to try again.</p>","teaches":["operator-motion","linewise","put"],"introduces":["d","c","y","p","dd","cc","yy","linewise"],"constraints":[],"drills":[{"task":"Remove “Draft ”, including its following space.","hint":"Compare the desired result with the starting text. Preserve the surrounding text.","mode":"text/plain","start":"Message: Draft short report","startCursor":{"line":0,"ch":9},"paths":[{"keys":["d","w"],"tier":"idiomatic","technique":"operator-motion","core":["operator-motion"],"note":"Choose the intended boundary, make the change and finish in Normal mode."}],"target":"Message: short report","language":"text","evidence":"guided","canonicalKey":"foundation.7#0","canonicalFingerprint":"1yw6bts"},{"task":"Replace Draft with Final, keeping its following space.","hint":"Compare the desired result with the starting text. Preserve the surrounding text.","mode":"text/plain","start":"Message: Draft short report","startCursor":{"line":0,"ch":9},"paths":[{"keys":["c","w","Final","<Esc>"],"tier":"idiomatic","technique":"operator-motion","core":["operator-motion"],"note":"Choose the intended boundary, make the change and finish in Normal mode."}],"target":"Message: Final short report","language":"text","evidence":"guided","canonicalKey":"foundation.7#1","canonicalFingerprint":"zdrxho"},{"task":"Duplicate the Review line immediately below itself.","hint":"Compare the desired result with the starting text. Preserve the surrounding text.","mode":"text/plain","start":"Review\nPublish","startCursor":{"line":0,"ch":0},"paths":[{"keys":["y","y","p"],"tier":"idiomatic","technique":"put","core":["put"],"note":"Choose the intended boundary, make the change and finish in Normal mode."}],"target":"Review\nReview\nPublish","language":"text","evidence":"guided","canonicalKey":"foundation.7#2","canonicalFingerprint":"4zqpth"}]}}}