Skip to content

Latest commit

 

History

History
51 lines (34 loc) · 1.6 KB

ij-win-lin-find-in-file.md

File metadata and controls

51 lines (34 loc) · 1.6 KB

Top => IntelliJ on Windows/Linux

IntelliJ IDEA on Windows/Linux: Find in file

Practice keyboard shortcuts to find and replace text in a single file.

Kata: Find occurrences of text in the current file

Key sequences to practice:

  • (Ctrl + F) - open the "find in file" dialog
  • (F3) - move cursor to next occurrence of found text
  • (Shift + F3) - move cursor to previous occurrence of found text

Steps

  1. Open the file src/main/java/com/neopragma/idekatas/LongConditional.java
  2. Press (Ctrl + F) to open the "find" dialog.
  3. Enter "result" as the text to search for.
  4. Press (Enter)
  5. Press (F3) to move the cursor to the next occurrence of the test, "result".
  6. Press (F3) several more times.
  7. Press (Shift + F3) several times to navigate backward to each occurrence of "result".
  8. Repeat until bored.

Kata: Replace occurrences of text in the current file

Key sequences to practice:

  • (Ctrl + R) - replace selected text in the current file
  • replace individual occurrences of the text
  • replace all occurrences of the text
  • (Ctrl + Z) - undo the last change

Steps

  1. Open the file src/main/java/com/neopragma/idekatas/LongConditional.java
  2. Press (Ctrl + R) to open the "replace" dialog.
  3. In the find field, type "intArg".
  4. In the replace field, type "range".
  5. Click the Replace button three or four times and observe the effects.
  6. Type (Ctrl + Z) repeatedly to reverse the changes you just made.
  7. Click the Replace All button and observe the effects.
  8. Type (Ctrl + Z) to reverse the changes.
  9. Repeat until bored.
  10. Press Esc to dismiss the "replace" dialog.