Mission 23 / 52• Search

Search

Search in Vim is a movement command. Pressing `/` followed by your search term jumps you straight to the next occurrence.

Search commands

  • /patternsearch forward for pattern and press Enter
  • ?patternsearch backward for pattern and press Enter
1
const primaryColor = "#10b981";
2
const secondaryColor = "#6366f1";
3
const activeColor = primaryColor;

Type `/primary` and press Enter to instantly transport your cursor to `primaryColor`.

Now it's your turn!

0 / 4 tasks complete0.0s / 25s par0 / 41 par

Practice this lesson's commands. Each task checks your technique and the result, not just your cursor position. Take your time.

Task 1: Find primary on the second line using forward search /primary.

Show hint

Type /primary and press Enter.

1
const primary = 1;
2
const secondary = primary;
3
render(primary);
jkscroll•ggGtop/bottom•Tabnext example•Enterstart•qstop•Ctrl+kCtrl+jprev/next