{"schemaVersion":1,"contentVersion":"3.4.0","id":"intermediate.11","languages":{"javascript":{"id":"intermediate.11","title":"Search, change, inspect, repeat","moduleName":"Repeat, select and compose","tips":"","concept":"<p class=\"lead\">Keep exceptions while repeating a change to selected matches.</p><p><strong>Before this lesson:</strong> Search reuse; repeatable changes.</p><p>Search, make a change, use n to inspect the next match, then dot only where the same edit belongs. cgn includes selecting a search match in the change itself; dot can then seek and change the next match. Stop before exceptions. Neither a shorter route nor a successful dot proves that every match should change.</p><h3>Example</h3><p>If two current lines and an archive say pending, update the two current lines and leave the archive. Check each destination rather than blindly repeating across the file.</p><p>Use Reset to try again.</p>","teaches":["motion:gn"],"introduces":["search","n",".","gn","c"],"constraints":[],"drills":[{"task":"Change both current draft values to final, preserving the archived value.","hint":"Compare the complete target, including spaces, delimiters and protected lines. Undo is available.","mode":"jsx","start":"const first = \"draft\";\nconst second = \"draft\";\nconst archive = \"draft\";","startCursor":{"line":0,"ch":0},"paths":[{"keys":["/","draft","<CR>","c","g","n","final","<Esc>","."],"tier":"idiomatic","technique":"motion:gn","core":["motion:gn"],"note":"cgn includes selecting the match inside the change. Stop dot before the archived exception."}],"target":"const first = \"final\";\nconst second = \"final\";\nconst archive = \"draft\";","language":"javascript","evidence":"guided","canonicalKey":"intermediate.11#0","canonicalFingerprint":"1ahcepx"}]},"python":{"id":"intermediate.11","title":"Search, change, inspect, repeat","moduleName":"Repeat, select and compose","tips":"","concept":"<p class=\"lead\">Keep exceptions while repeating a change to selected matches.</p><p><strong>Before this lesson:</strong> Search reuse; repeatable changes.</p><p>Search, make a change, use n to inspect the next match, then dot only where the same edit belongs. cgn includes selecting a search match in the change itself; dot can then seek and change the next match. Stop before exceptions. Neither a shorter route nor a successful dot proves that every match should change.</p><h3>Example</h3><p>If two current lines and an archive say pending, update the two current lines and leave the archive. Check each destination rather than blindly repeating across the file.</p><p>Use Reset to try again.</p>","teaches":["motion:gn"],"introduces":["search","n",".","gn","c"],"constraints":[],"drills":[{"task":"Change both current draft values to final, preserving the archived value.","hint":"Compare the complete target, including spaces, delimiters and protected lines. Undo is available.","mode":"python","start":"first = \"draft\"\nsecond = \"draft\"\narchive = \"draft\"","startCursor":{"line":0,"ch":0},"paths":[{"keys":["/","draft","<CR>","c","g","n","final","<Esc>","."],"tier":"idiomatic","technique":"motion:gn","core":["motion:gn"],"note":"cgn includes selecting the match inside the change. Stop dot before the archived exception."}],"target":"first = \"final\"\nsecond = \"final\"\narchive = \"draft\"","language":"python","evidence":"guided","canonicalKey":"intermediate.11#0","canonicalFingerprint":"1ahcepx"}]},"text":{"id":"intermediate.11","title":"Search, change, inspect, repeat","moduleName":"Repeat, select and compose","tips":"","concept":"<p class=\"lead\">Keep exceptions while repeating a change to selected matches.</p><p><strong>Before this lesson:</strong> Search reuse; repeatable changes.</p><p>Search, make a change, use n to inspect the next match, then dot only where the same edit belongs. cgn includes selecting a search match in the change itself; dot can then seek and change the next match. Stop before exceptions. Neither a shorter route nor a successful dot proves that every match should change.</p><h3>Example</h3><p>If two current lines and an archive say pending, update the two current lines and leave the archive. Check each destination rather than blindly repeating across the file.</p><p>Use Reset to try again.</p>","teaches":["motion:gn"],"introduces":["search","n",".","gn","c"],"constraints":[],"drills":[{"task":"Change both current draft values to final, preserving the archived value.","hint":"Compare the complete target, including spaces, delimiters and protected lines. Undo is available.","mode":"text/plain","start":"First: draft\nSecond: draft\nArchive: draft","startCursor":{"line":0,"ch":0},"paths":[{"keys":["/","draft","<CR>","c","g","n","final","<Esc>","."],"tier":"idiomatic","technique":"motion:gn","core":["motion:gn"],"note":"cgn includes selecting the match inside the change. Stop dot before the archived exception."}],"target":"First: final\nSecond: final\nArchive: draft","language":"text","evidence":"guided","canonicalKey":"intermediate.11#0","canonicalFingerprint":"1ahcepx"}]}}}