Skip to content

Latest commit

 

History

History
87 lines (62 loc) · 3.02 KB

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

File metadata and controls

87 lines (62 loc) · 3.02 KB

Top => IntelliJ on Windows/Linux

IntelliJ IDEA on Windows/Linux: Find in path

Practice keyboard shortcuts to find and replace text in various scopes.

When JetBrains products refer to a "path" in this context, they mean a search path. You can search for objects in a Project, Module, Directory, or Scope. In this case scope means a set of objects that have something in common, such as "all open files" or "everything pertaining to test".

Kata: Find text in project

Key sequences to practice:

  • (Ctrl + Shift + F) - Find in path
  • (F3), (Shift + F3) - go to next/previous occurrence
  • (Alt + P) - choose "project" as the search path

Steps

  1. Press (Ctrl + Shift +F) to open the "find in path" dialog.
  2. Press (Alt + P) to choose "Project" as the search path.
  3. Enter "method1" as the text to search for.
  4. Press (Enter)
  5. Press (F3) to move the cursor to the next occurrence of the text, "method1".
  6. Press (F3) several more times.
  7. Press (Shift + F3) several times to navigate backward to each occurrence of "method1".
  8. Repeat until bored.

Kata: Find text in module

Key sequences to practice:

  • (Ctrl + Shift + F) - Find in path
  • (F3), (Shift + F3) - go to next/previous occurrence
  • (Alt + M) - choose "module" as the search path

Steps

  1. Press (Ctrl + Shift + F)to open the "find in path" dialog.
  2. Press (Alt + M) to choose "Module" as the search path.
  3. Enter "method1" as the text to search for.
  4. Press (Enter)
  5. Press (F3) to move the cursor to the next occurrence of the test, "method1".
  6. Press (F3) several more times.
  7. Press (Shift + F3) several times to navigate backward to each occurrence of "method1".
  8. Repeat until bored.

Kata: Find text in directory

Key sequences to practice:

  • (Ctrl + Shift + F) - Find in path
  • (F3), (Shift + F3) - go to next/previous occurrence
  • (Alt + D) - choose "directory" as the search path

Steps

  1. Press (Ctrl + Shift + F) to open the "find in path" dialog.
  2. Press (Alt + D) to choose "Directory" as the search path.
  3. Enter "method1" as the text to search for.
  4. Press (Enter)
  5. Press (F3) to move the cursor to the next occurrence of the test, "method1".
  6. Press (F3) several more times.
  7. Press (Shift + F3) several times to navigate backward to each occurrence of "method1".
  8. Repeat until bored.

Kata: Find text in open files

Key sequences to practice:

  • (Ctrl + Shift + F) - Find in path
  • (F3), (Shift + F3) - go to next/previous occurrence
  • (Alt + S) - choose "scope" as the search path

Steps

  1. Open two or more Java source files, including LongConditional.java.
  2. Press (Ctrl + Shift + F) to open the "find in path" dialog.
  3. Press (Alt + S) to choose "Scope" as the search path.
  4. Choose "Open Files" from the scope drop-down list.
  5. Enter "method1" as the text to search for.
  6. Press (Enter)
  7. Press (F3) to move the cursor to the next occurrence of the test, "method1".
  8. Press (F3) several more times.
  9. Press (Shift + F3) several times to navigate backward to each occurrence of "method1".
  10. Repeat until bored.