{"schemaVersion":1,"contentVersion":"3.4.0","id":"intro.1","languages":{"javascript":{"id":"intro.1","title":"Modes, movement and a first edit","moduleName":"Your first good edit","tips":"","concept":"<p class=\"lead\">In Normal mode, keys move the cursor or change text. Press <kbd>i</kbd> to start typing in Insert mode, and <kbd>Esc</kbd> to go back to Normal mode.</p><p><kbd>h</kbd> moves left, <kbd>j</kbd> down, <kbd>k</kbd> up and <kbd>l</kbd> right. The cursor and the mode label show where you are.</p><p>Make your text match the result shown, then go back to Normal mode. <kbd>u</kbd> undoes the last edit, <kbd>Ctrl-r</kbd> redoes it, and Start over puts back the starting text.</p>","teaches":["hjkl","insert","char-delete","textobject"],"introduces":[],"constraints":[],"drills":[{"task":"When the request fails, the error is created but never thrown. In Normal mode, press l to move right onto <code>new</code>. That's where <code>throw</code> goes.","hint":"In Normal mode, l moves one character to the right. The text doesn't change.","mode":"text/plain","start":"// Loads the orders shown on the account page.\nexport async function loadOrders(status) {\n  const response = await fetch(`/api/orders?status=${status}`, {\n    credentials: \"omit\",\n  });\n  if (!response.ok) new Error(\"Couldn't load your orders\");\n  const result = await response.json();\n  return result.orderss;\n}","startCursor":{"line":5,"ch":16},"paths":[{"keys":["l","l","l","l"],"tier":"idiomatic","technique":"motion:l","core":["motion:l","hjkl"],"note":"l moves one character right. Moving never changes the text."}],"target":"// Loads the orders shown on the account page.\nexport async function loadOrders(status) {\n  const response = await fetch(`/api/orders?status=${status}`, {\n    credentials: \"omit\",\n  });\n  if (!response.ok) new Error(\"Couldn't load your orders\");\n  const result = await response.json();\n  return result.orderss;\n}","kind":"navigate","land":{"line":5,"ch":20},"language":"javascript","canonicalKey":"intro.1#0","canonicalFingerprint":"1gx4zig"},{"task":"Now throw the error. Press k to go up onto <code>new</code>, then i, type <code>throw</code> and a space, then press Esc.","hint":"Get onto the word first. i starts typing before the cursor, and Esc takes you back to Normal mode.","mode":"text/plain","start":"// Loads the orders shown on the account page.\nexport async function loadOrders(status) {\n  const response = await fetch(`/api/orders?status=${status}`, {\n    credentials: \"omit\",\n  });\n  if (!response.ok) new Error(\"Couldn't load your orders\");\n  const result = await response.json();\n  return result.orderss;\n}","startCursor":{"line":6,"ch":20},"paths":[{"keys":["k","i","throw ","<Esc>"],"tier":"idiomatic","technique":"insert","core":["insert","hjkl"],"note":"The cursor keeps its column when you move up or down a line, so you land where the word goes. i types before the cursor."}],"target":"// Loads the orders shown on the account page.\nexport async function loadOrders(status) {\n  const response = await fetch(`/api/orders?status=${status}`, {\n    credentials: \"omit\",\n  });\n  if (!response.ok) throw new Error(\"Couldn't load your orders\");\n  const result = await response.json();\n  return result.orderss;\n}","language":"javascript","canonicalKey":"intro.1#1","canonicalFingerprint":"1quubpv"},{"task":"Fix the typo in <code>orderss</code>. Press $ to jump to the end of the line, h to step back onto the extra s, then x to delete it.","hint":"$ goes to the last character on the line. x deletes the character under the cursor. If something goes wrong, press u to undo.","mode":"text/plain","start":"// Loads the orders shown on the account page.\nexport async function loadOrders(status) {\n  const response = await fetch(`/api/orders?status=${status}`, {\n    credentials: \"omit\",\n  });\n  if (!response.ok) throw new Error(\"Couldn't load your orders\");\n  const result = await response.json();\n  return result.orderss;\n}","startCursor":{"line":7,"ch":2},"paths":[{"keys":["$","h","x"],"tier":"idiomatic","technique":"char-delete","core":["char-delete"],"note":"$ jumps to the end of the line, and x deletes the character under the cursor. You stay in Normal mode."}],"target":"// Loads the orders shown on the account page.\nexport async function loadOrders(status) {\n  const response = await fetch(`/api/orders?status=${status}`, {\n    credentials: \"omit\",\n  });\n  if (!response.ok) throw new Error(\"Couldn't load your orders\");\n  const result = await response.json();\n  return result.orders;\n}","language":"javascript","canonicalKey":"intro.1#2","canonicalFingerprint":"15x1fkm"},{"task":"The orders API needs the sign-in cookie. Press j to go down onto <code>omit</code>, then press ciw, type <code>include</code> and press Esc.","hint":"ciw changes the whole word under the cursor, wherever you are in it. Type the new word, then press Esc.","mode":"text/plain","start":"// Loads the orders shown on the account page.\nexport async function loadOrders(status) {\n  const response = await fetch(`/api/orders?status=${status}`, {\n    credentials: \"omit\",\n  });\n  if (!response.ok) throw new Error(\"Couldn't load your orders\");\n  const result = await response.json();\n  return result.orders;\n}","startCursor":{"line":2,"ch":19},"paths":[{"keys":["j","c","i","w","include","<Esc>"],"tier":"idiomatic","technique":"text object iw","core":["textobject:iw","hjkl"],"note":"ciw deletes the word under the cursor and starts Insert mode, so you only type the new word."}],"target":"// Loads the orders shown on the account page.\nexport async function loadOrders(status) {\n  const response = await fetch(`/api/orders?status=${status}`, {\n    credentials: \"include\",\n  });\n  if (!response.ok) throw new Error(\"Couldn't load your orders\");\n  const result = await response.json();\n  return result.orders;\n}","language":"javascript","canonicalKey":"intro.1#3","canonicalFingerprint":"1lbo1d2"}]},"python":{"id":"intro.1","title":"Modes, movement and a first edit","moduleName":"Your first good edit","tips":"","concept":"<p class=\"lead\">In Normal mode, keys move the cursor or change text. Press <kbd>i</kbd> to start typing in Insert mode, and <kbd>Esc</kbd> to go back to Normal mode.</p><p><kbd>h</kbd> moves left, <kbd>j</kbd> down, <kbd>k</kbd> up and <kbd>l</kbd> right. The cursor and the mode label show where you are.</p><p>Make your text match the result shown, then go back to Normal mode. <kbd>u</kbd> undoes the last edit, <kbd>Ctrl-r</kbd> redoes it, and Start over puts back the starting text.</p>","teaches":["hjkl","insert","char-delete","textobject"],"introduces":[],"constraints":[],"drills":[{"task":"The error is raised when the request works, not when it fails. In Normal mode, press l to move right onto <code>response</code>. That's where <code>not</code> goes.","hint":"In Normal mode, l moves one character to the right. The text doesn't change.","mode":"text/plain","start":"# Loads the orders shown on the account page.\ndef load_orders(session):\n    params = {\"status\": \"open\"}\n    response = session.get(\"/api/orders\", params=params)\n    if response.ok:\n        raise RuntimeError(\"Couldn't load your orders\")\n    orders = response.json()[\"orders\"]\n    return orderss","startCursor":{"line":4,"ch":4},"paths":[{"keys":["l","l","l"],"tier":"idiomatic","technique":"motion:l","core":["motion:l","hjkl"],"note":"l moves one character right. Moving never changes the text."}],"target":"# Loads the orders shown on the account page.\ndef load_orders(session):\n    params = {\"status\": \"open\"}\n    response = session.get(\"/api/orders\", params=params)\n    if response.ok:\n        raise RuntimeError(\"Couldn't load your orders\")\n    orders = response.json()[\"orders\"]\n    return orderss","kind":"navigate","land":{"line":4,"ch":7},"language":"python","canonicalKey":"intro.1#0","canonicalFingerprint":"1gx4zig"},{"task":"Now raise it only when the request fails. Press j to go down onto <code>response</code>, then i, type <code>not</code> and a space, then press Esc.","hint":"Get onto the word first. i starts typing before the cursor, and Esc takes you back to Normal mode.","mode":"text/plain","start":"# Loads the orders shown on the account page.\ndef load_orders(session):\n    params = {\"status\": \"open\"}\n    response = session.get(\"/api/orders\", params=params)\n    if response.ok:\n        raise RuntimeError(\"Couldn't load your orders\")\n    orders = response.json()[\"orders\"]\n    return orderss","startCursor":{"line":3,"ch":7},"paths":[{"keys":["j","i","not ","<Esc>"],"tier":"idiomatic","technique":"insert","core":["insert","hjkl"],"note":"The cursor keeps its column when you move up or down a line, so you land where the word goes. i types before the cursor."}],"target":"# Loads the orders shown on the account page.\ndef load_orders(session):\n    params = {\"status\": \"open\"}\n    response = session.get(\"/api/orders\", params=params)\n    if not response.ok:\n        raise RuntimeError(\"Couldn't load your orders\")\n    orders = response.json()[\"orders\"]\n    return orderss","language":"python","canonicalKey":"intro.1#1","canonicalFingerprint":"1quubpv"},{"task":"Fix the typo in <code>orderss</code>. Press $ to jump to the end of the line, then x to delete the extra s.","hint":"$ goes to the last character on the line. x deletes the character under the cursor. If something goes wrong, press u to undo.","mode":"text/plain","start":"# Loads the orders shown on the account page.\ndef load_orders(session):\n    params = {\"status\": \"open\"}\n    response = session.get(\"/api/orders\", params=params)\n    if not response.ok:\n        raise RuntimeError(\"Couldn't load your orders\")\n    orders = response.json()[\"orders\"]\n    return orderss","startCursor":{"line":7,"ch":4},"paths":[{"keys":["$","x"],"tier":"idiomatic","technique":"char-delete","core":["char-delete"],"note":"$ jumps to the end of the line, and x deletes the character under the cursor. You stay in Normal mode."}],"target":"# Loads the orders shown on the account page.\ndef load_orders(session):\n    params = {\"status\": \"open\"}\n    response = session.get(\"/api/orders\", params=params)\n    if not response.ok:\n        raise RuntimeError(\"Couldn't load your orders\")\n    orders = response.json()[\"orders\"]\n    return orders","language":"python","canonicalKey":"intro.1#2","canonicalFingerprint":"15x1fkm"},{"task":"The account page lists orders that are on their way. Press k to go up onto <code>open</code>, then press ciw, type <code>shipped</code> and press Esc.","hint":"ciw changes the whole word under the cursor, wherever you are in it. Type the new word, then press Esc.","mode":"text/plain","start":"# Loads the orders shown on the account page.\ndef load_orders(session):\n    params = {\"status\": \"open\"}\n    response = session.get(\"/api/orders\", params=params)\n    if not response.ok:\n        raise RuntimeError(\"Couldn't load your orders\")\n    orders = response.json()[\"orders\"]\n    return orders","startCursor":{"line":3,"ch":26},"paths":[{"keys":["k","c","i","w","shipped","<Esc>"],"tier":"idiomatic","technique":"text object iw","core":["textobject:iw","hjkl"],"note":"ciw deletes the word under the cursor and starts Insert mode, so you only type the new word."}],"target":"# Loads the orders shown on the account page.\ndef load_orders(session):\n    params = {\"status\": \"shipped\"}\n    response = session.get(\"/api/orders\", params=params)\n    if not response.ok:\n        raise RuntimeError(\"Couldn't load your orders\")\n    orders = response.json()[\"orders\"]\n    return orders","language":"python","canonicalKey":"intro.1#3","canonicalFingerprint":"1lbo1d2"}]},"text":{"id":"intro.1","title":"Modes, movement and a first edit","moduleName":"Your first good edit","tips":"","concept":"<p class=\"lead\">In Normal mode, keys move the cursor or change text. Press <kbd>i</kbd> to start typing in Insert mode, and <kbd>Esc</kbd> to go back to Normal mode.</p><p><kbd>h</kbd> moves left, <kbd>j</kbd> down, <kbd>k</kbd> up and <kbd>l</kbd> right. The cursor and the mode label show where you are.</p><p>Make your text match the result shown, then go back to Normal mode. <kbd>u</kbd> undoes the last edit, <kbd>Ctrl-r</kbd> redoes it, and Start over puts back the starting text.</p>","teaches":["hjkl","insert","char-delete","textobject"],"introduces":[],"constraints":[],"drills":[{"task":"A word is missing in the last line. In Normal mode, press l to move right onto <code>access</code>. That's where <code>need</code> goes.","hint":"In Normal mode, l moves one character to the right. The text doesn't change.","mode":"text/plain","start":"# Nightly price checkk\n\nThe job compares our prices with the supplier feed every night.\nIt posts each difference in the #pricing channel.\nIf the feed is late, it waits an hour and tries again.\nAsk Dana if you access to the supplier portal.","startCursor":{"line":5,"ch":12},"paths":[{"keys":["l","l","l","l"],"tier":"idiomatic","technique":"motion:l","core":["motion:l","hjkl"],"note":"l moves one character right. Moving never changes the text."}],"target":"# Nightly price checkk\n\nThe job compares our prices with the supplier feed every night.\nIt posts each difference in the #pricing channel.\nIf the feed is late, it waits an hour and tries again.\nAsk Dana if you access to the supplier portal.","kind":"navigate","land":{"line":5,"ch":16},"language":"text","canonicalKey":"intro.1#0","canonicalFingerprint":"1gx4zig"},{"task":"Now add the word. Press j to go down onto <code>access</code>, then i, type <code>need</code> and a space, then press Esc.","hint":"Get onto the word first. i starts typing before the cursor, and Esc takes you back to Normal mode.","mode":"text/plain","start":"# Nightly price checkk\n\nThe job compares our prices with the supplier feed every night.\nIt posts each difference in the #pricing channel.\nIf the feed is late, it waits an hour and tries again.\nAsk Dana if you access to the supplier portal.","startCursor":{"line":4,"ch":16},"paths":[{"keys":["j","i","need ","<Esc>"],"tier":"idiomatic","technique":"insert","core":["insert","hjkl"],"note":"The cursor keeps its column when you move up or down a line, so you land where the word goes. i types before the cursor."}],"target":"# Nightly price checkk\n\nThe job compares our prices with the supplier feed every night.\nIt posts each difference in the #pricing channel.\nIf the feed is late, it waits an hour and tries again.\nAsk Dana if you need access to the supplier portal.","language":"text","canonicalKey":"intro.1#1","canonicalFingerprint":"1quubpv"},{"task":"Fix the typo in the heading. Press $ to jump to the end of the line, then x to delete the extra k.","hint":"$ goes to the last character on the line. x deletes the character under the cursor. If something goes wrong, press u to undo.","mode":"text/plain","start":"# Nightly price checkk\n\nThe job compares our prices with the supplier feed every night.\nIt posts each difference in the #pricing channel.\nIf the feed is late, it waits an hour and tries again.\nAsk Dana if you need access to the supplier portal.","startCursor":{"line":0,"ch":0},"paths":[{"keys":["$","x"],"tier":"idiomatic","technique":"char-delete","core":["char-delete"],"note":"$ jumps to the end of the line, and x deletes the character under the cursor. You stay in Normal mode."}],"target":"# Nightly price check\n\nThe job compares our prices with the supplier feed every night.\nIt posts each difference in the #pricing channel.\nIf the feed is late, it waits an hour and tries again.\nAsk Dana if you need access to the supplier portal.","language":"text","canonicalKey":"intro.1#2","canonicalFingerprint":"15x1fkm"},{"task":"The <code>#pricing</code> channel was archived. Press j to go down onto <code>pricing</code>, then press ciw, type <code>alerts</code> and press Esc.","hint":"ciw changes the whole word under the cursor, wherever you are in it. Type the new word, then press Esc.","mode":"text/plain","start":"# Nightly price check\n\nThe job compares our prices with the supplier feed every night.\nIt posts each difference in the #pricing channel.\nIf the feed is late, it waits an hour and tries again.\nAsk Dana if you need access to the supplier portal.","startCursor":{"line":2,"ch":35},"paths":[{"keys":["j","c","i","w","alerts","<Esc>"],"tier":"idiomatic","technique":"text object iw","core":["textobject:iw","hjkl"],"note":"ciw deletes the word under the cursor and starts Insert mode, so you only type the new word."}],"target":"# Nightly price check\n\nThe job compares our prices with the supplier feed every night.\nIt posts each difference in the #alerts channel.\nIf the feed is late, it waits an hour and tries again.\nAsk Dana if you need access to the supplier portal.","language":"text","canonicalKey":"intro.1#3","canonicalFingerprint":"1lbo1d2"}]}},"concepts":{"javascript":{"lead":"In Normal mode, keys move the cursor or change text. Press <kbd>i</kbd> to start typing in Insert mode, and <kbd>Esc</kbd> to go back to Normal mode.","reminder":"","more":"<details class=\"lesson-more\"><summary>More about this lesson</summary><div class=\"lesson-more-body prose\"><p><kbd>h</kbd> moves left, <kbd>j</kbd> down, <kbd>k</kbd> up and <kbd>l</kbd> right. The cursor and the mode label show where you are.</p><p>Make your text match the result shown, then go back to Normal mode. <kbd>u</kbd> undoes the last edit, <kbd>Ctrl-r</kbd> redoes it, and Start over puts back the starting text.</p></div></details>"},"python":{"lead":"In Normal mode, keys move the cursor or change text. Press <kbd>i</kbd> to start typing in Insert mode, and <kbd>Esc</kbd> to go back to Normal mode.","reminder":"","more":"<details class=\"lesson-more\"><summary>More about this lesson</summary><div class=\"lesson-more-body prose\"><p><kbd>h</kbd> moves left, <kbd>j</kbd> down, <kbd>k</kbd> up and <kbd>l</kbd> right. The cursor and the mode label show where you are.</p><p>Make your text match the result shown, then go back to Normal mode. <kbd>u</kbd> undoes the last edit, <kbd>Ctrl-r</kbd> redoes it, and Start over puts back the starting text.</p></div></details>"},"text":{"lead":"In Normal mode, keys move the cursor or change text. Press <kbd>i</kbd> to start typing in Insert mode, and <kbd>Esc</kbd> to go back to Normal mode.","reminder":"","more":"<details class=\"lesson-more\"><summary>More about this lesson</summary><div class=\"lesson-more-body prose\"><p><kbd>h</kbd> moves left, <kbd>j</kbd> down, <kbd>k</kbd> up and <kbd>l</kbd> right. The cursor and the mode label show where you are.</p><p>Make your text match the result shown, then go back to Normal mode. <kbd>u</kbd> undoes the last edit, <kbd>Ctrl-r</kbd> redoes it, and Start over puts back the starting text.</p></div></details>"}}}