VISUAL STUDIO CODE · ОСНОВЫ · LESSON 12

Search in one file

Find and replace · about 10 minutes

Learning with progressRead the summary for free. To save the work, log in to the account.
STEP 1

Find the word in the file.

Open the file and press Ctrl+F, on Mac - Cmd+F. Give me your word. The editor will show you where it appears in this file.

✦ A search in a single file is different from a search in an entire folder.

STEP 2

Replace carefully.

With Ctrl+H or Cmd+Option+F, open the replacement. First look at the places found, then change the word. Don't replace everything blindly.

Replacement
Find it.old-wordCheck.placeReplaceword

✦ After replacement, check the lines and save the file.

TRY IT YOURSELF

Practice

Write the word «кот» twice in one file. Find it in this file and replace one entry with «пёс». Save the result.