{"schemaVersion":1,"contentVersion":"3.4.0","id":"foundation.11","languages":{"javascript":{"id":"foundation.11","title":"Inspect and reuse a search","moduleName":"Search and apply","tips":"","concept":"<p class=\"lead\">Repeat or reverse a search and distinguish whole-word matching.</p><p><strong>Before this lesson:</strong> Search for a destination.</p><p>n repeats the direction of your last search; N reverses it. After ?, n still searches backward. * searches forward for the whole word under the cursor; # searches backward. /cat may match catalog; * from cat skips catalog. Inspect each destination before editing an exception.</p><div class=\"pkeys\"><kbd>n</kbd> <kbd>N</kbd> <kbd>*</kbd> <kbd>#</kbd></div><h3>Example</h3><p>With three separate “ready” lines, /ready then Enter reaches the first next occurrence and n the following one. N returns to the previous match. Search movement does not itself modify any text.</p><h4>Worked text</h4><pre class=\"lesson-example\">const first = \"ready\";\nconst second = \"ready\";\nconst third = \"ready\";</pre><p>Use Reset to try again.</p>","teaches":["search:n","search:*"],"introduces":["n","N","*","#"],"constraints":[],"drills":[{"task":"Search forward for the status, then continue past the longer word to the second exact status. Finish on line 3, column 17, without changing the text.","hint":"This is a movement task. Keep the text unchanged and check the requested cursor destination.","mode":"jsx","start":"const first = \"ready\";\nconst similar = \"readyish\";\nconst second = \"ready\";\nconst third = \"ready\";","startCursor":{"line":0,"ch":15},"paths":[{"keys":["/","ready","<CR>","n"],"tier":"idiomatic","technique":"search:n","core":["search:n"],"note":"n follows the last search direction. Whole-word search skips the longer lookalike; substring search does not."}],"kind":"navigate","land":{"line":2,"ch":16},"language":"javascript","evidence":"guided","canonicalKey":"foundation.11#0","canonicalFingerprint":"zraztm"},{"task":"Search backward, then continue backward to the longer lookalike on the Similar line. Finish on line 2, column 18, without changing the text.","hint":"This is a movement task. Keep the text unchanged and check the requested cursor destination.","mode":"jsx","start":"const first = \"ready\";\nconst similar = \"readyish\";\nconst second = \"ready\";\nconst third = \"ready\";","startCursor":{"line":3,"ch":0},"paths":[{"keys":["?","ready","<CR>","n"],"tier":"idiomatic","technique":"search:n","core":["search:n"],"note":"n follows the last search direction. Whole-word search skips the longer lookalike; substring search does not."}],"kind":"navigate","land":{"line":1,"ch":17},"language":"javascript","evidence":"guided","canonicalKey":"foundation.11#1","canonicalFingerprint":"zr7abc"},{"task":"Use whole-word search from the first status, then continue to the third status, skipping the longer word. Finish on line 4, column 16, without changing the text.","hint":"This is a movement task. Keep the text unchanged and check the requested cursor destination.","mode":"jsx","start":"const first = \"ready\";\nconst similar = \"readyish\";\nconst second = \"ready\";\nconst third = \"ready\";","startCursor":{"line":0,"ch":15},"paths":[{"keys":["*","n"],"tier":"idiomatic","technique":"search:n","core":["search:n"],"note":"n follows the last search direction. Whole-word search skips the longer lookalike; substring search does not."}],"kind":"navigate","land":{"line":3,"ch":15},"language":"javascript","evidence":"guided","canonicalKey":"foundation.11#2","canonicalFingerprint":"zr8qew"}]},"python":{"id":"foundation.11","title":"Inspect and reuse a search","moduleName":"Search and apply","tips":"","concept":"<p class=\"lead\">Repeat or reverse a search and distinguish whole-word matching.</p><p><strong>Before this lesson:</strong> Search for a destination.</p><p>n repeats the direction of your last search; N reverses it. After ?, n still searches backward. * searches forward for the whole word under the cursor; # searches backward. /cat may match catalog; * from cat skips catalog. Inspect each destination before editing an exception.</p><div class=\"pkeys\"><kbd>n</kbd> <kbd>N</kbd> <kbd>*</kbd> <kbd>#</kbd></div><h3>Example</h3><p>With three separate “ready” lines, /ready then Enter reaches the first next occurrence and n the following one. N returns to the previous match. Search movement does not itself modify any text.</p><h4>Worked text</h4><pre class=\"lesson-example\">first = \"ready\"\nsecond = \"ready\"\nthird = \"ready\"</pre><p>Use Reset to try again.</p>","teaches":["search:n","search:*"],"introduces":["n","N","*","#"],"constraints":[],"drills":[{"task":"Search forward for the status, then continue past the longer word to the second exact status. Finish on line 3, column 11, without changing the text.","hint":"This is a movement task. Keep the text unchanged and check the requested cursor destination.","mode":"python","start":"first = \"ready\"\nsimilar = \"readyish\"\nsecond = \"ready\"\nthird = \"ready\"","startCursor":{"line":0,"ch":9},"paths":[{"keys":["/","ready","<CR>","n"],"tier":"idiomatic","technique":"search:n","core":["search:n"],"note":"n follows the last search direction. Whole-word search skips the longer lookalike; substring search does not."}],"kind":"navigate","land":{"line":2,"ch":10},"language":"python","evidence":"guided","canonicalKey":"foundation.11#0","canonicalFingerprint":"zraztm"},{"task":"Search backward, then continue backward to the longer lookalike on the Similar line. Finish on line 2, column 12, without changing the text.","hint":"This is a movement task. Keep the text unchanged and check the requested cursor destination.","mode":"python","start":"first = \"ready\"\nsimilar = \"readyish\"\nsecond = \"ready\"\nthird = \"ready\"","startCursor":{"line":3,"ch":0},"paths":[{"keys":["?","ready","<CR>","n"],"tier":"idiomatic","technique":"search:n","core":["search:n"],"note":"n follows the last search direction. Whole-word search skips the longer lookalike; substring search does not."}],"kind":"navigate","land":{"line":1,"ch":11},"language":"python","evidence":"guided","canonicalKey":"foundation.11#1","canonicalFingerprint":"zr7abc"},{"task":"Use whole-word search from the first status, then continue to the third status, skipping the longer word. Finish on line 4, column 10, without changing the text.","hint":"This is a movement task. Keep the text unchanged and check the requested cursor destination.","mode":"python","start":"first = \"ready\"\nsimilar = \"readyish\"\nsecond = \"ready\"\nthird = \"ready\"","startCursor":{"line":0,"ch":9},"paths":[{"keys":["*","n"],"tier":"idiomatic","technique":"search:n","core":["search:n"],"note":"n follows the last search direction. Whole-word search skips the longer lookalike; substring search does not."}],"kind":"navigate","land":{"line":3,"ch":9},"language":"python","evidence":"guided","canonicalKey":"foundation.11#2","canonicalFingerprint":"zr8qew"}]},"text":{"id":"foundation.11","title":"Inspect and reuse a search","moduleName":"Search and apply","tips":"","concept":"<p class=\"lead\">Repeat or reverse a search and distinguish whole-word matching.</p><p><strong>Before this lesson:</strong> Search for a destination.</p><p>n repeats the direction of your last search; N reverses it. After ?, n still searches backward. * searches forward for the whole word under the cursor; # searches backward. /cat may match catalog; * from cat skips catalog. Inspect each destination before editing an exception.</p><div class=\"pkeys\"><kbd>n</kbd> <kbd>N</kbd> <kbd>*</kbd> <kbd>#</kbd></div><h3>Example</h3><p>With three separate “ready” lines, /ready then Enter reaches the first next occurrence and n the following one. N returns to the previous match. Search movement does not itself modify any text.</p><h4>Worked text</h4><pre class=\"lesson-example\">First: ready\nSecond: ready\nThird: ready</pre><p>Use Reset to try again.</p>","teaches":["search:n","search:*"],"introduces":["n","N","*","#"],"constraints":[],"drills":[{"task":"Search forward for the status, then continue past the longer word to the second exact status. Finish on line 3, column 9, without changing the text.","hint":"This is a movement task. Keep the text unchanged and check the requested cursor destination.","mode":"text/plain","start":"First: ready\nSimilar: readyish\nSecond: ready\nThird: ready","startCursor":{"line":0,"ch":7},"paths":[{"keys":["/","ready","<CR>","n"],"tier":"idiomatic","technique":"search:n","core":["search:n"],"note":"n follows the last search direction. Whole-word search skips the longer lookalike; substring search does not."}],"kind":"navigate","land":{"line":2,"ch":8},"language":"text","evidence":"guided","canonicalKey":"foundation.11#0","canonicalFingerprint":"zraztm"},{"task":"Search backward, then continue backward to the longer lookalike on the Similar line. Finish on line 2, column 10, without changing the text.","hint":"This is a movement task. Keep the text unchanged and check the requested cursor destination.","mode":"text/plain","start":"First: ready\nSimilar: readyish\nSecond: ready\nThird: ready","startCursor":{"line":3,"ch":0},"paths":[{"keys":["?","ready","<CR>","n"],"tier":"idiomatic","technique":"search:n","core":["search:n"],"note":"n follows the last search direction. Whole-word search skips the longer lookalike; substring search does not."}],"kind":"navigate","land":{"line":1,"ch":9},"language":"text","evidence":"guided","canonicalKey":"foundation.11#1","canonicalFingerprint":"zr7abc"},{"task":"Use whole-word search from the first status, then continue to the third status, skipping the longer word. Finish on line 4, column 8, without changing the text.","hint":"This is a movement task. Keep the text unchanged and check the requested cursor destination.","mode":"text/plain","start":"First: ready\nSimilar: readyish\nSecond: ready\nThird: ready","startCursor":{"line":0,"ch":7},"paths":[{"keys":["*","n"],"tier":"idiomatic","technique":"search:n","core":["search:n"],"note":"n follows the last search direction. Whole-word search skips the longer lookalike; substring search does not."}],"kind":"navigate","land":{"line":3,"ch":7},"language":"text","evidence":"guided","canonicalKey":"foundation.11#2","canonicalFingerprint":"zr8qew"}]}}}