Leave and return deliberately
The technique
G is a jump, so Vim remembers where you were. Ctrl-o returns there, to the same column.
Keys in this lesson
- Ctrl-o
- Back to where you were before a jump.
- Ctrl-i
- Forward again.
- ma
- Set mark a here.
- `a
- Return to mark a, to the exact column.
Before this lesson: Buffer destinations.
More about this lesson
Go somewhere else in the file and come back, using the jump list or a mark.
Vim remembers big jumps such as G, a search or * in the jump list. Ctrl-o goes back to where you were and Ctrl-i goes forward again. ma sets a mark called a, and a backtick followed by a brings you back to that exact column. When a task asks you to come back, you have to make the trip out first.
Example
From a note near the top, G takes you to the end and Ctrl-o brings you back. ma, G, then backtick-a does the same with a mark you set yourself.
Use Start over to try again.
Guides on this topic
Exercise 1 of 1
0keys
par 9The drawer should show the same note as checkout. Copy checkout's translation key into the empty t("").
Make it look like this
// Notes in the cart drawer and at checkout. The texts come from the translations. import { t } from "../i18n"; import { Note } from "../ui/Note"; export function DrawerNotes() { return <div className="drawer-notes"><Note tone="info" text={t("checkout.free_shipping_over_50")} /></div>; } export function CheckoutNotes({ order }) { const title = t("checkout.notes_title"); const tone = order.placedAt.getMonth() === 11 ? "warning" : "info"; return <Note tone={tone} title={title} text={t("checkout.free_shipping_over_50")} />; } export default DrawerNotes;