Skip to content

Latest commit

 

History

History
87 lines (62 loc) · 2.69 KB

ij-osx-find-in-path.md

File metadata and controls

87 lines (62 loc) · 2.69 KB

Top => IntelliJ on OS X

IntelliJ IDEA on Mac OS X: 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:

  • ⌘⇧F (Command + Shift + F) - open "find in path" dialog
  • ⌘G, ⌘⇧G (Command + G), (Command + Shift + G) - go to next and previous occurrences
  • ⌥P (Option + P) - choose "project" as the search path

Steps

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

Kata: Find text in module

Key sequences to practice:

  • ⌘⇧F
  • ⌘G, ⌘⇧G
  • ⌥M

Steps

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

Kata: Find text in directory

Key sequences to practice:

  • ⌘⇧F
  • ⌘G, ⌘⇧G
  • ⌥D

Steps

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

Kata: Find text in open files

Key sequences to practice:

  • ⌘⇧F
  • ⌘G, ⌘⇧G
  • ⌥S

Steps

  1. Open two or more Java source files, including LongConditional.java.
  2. Press ⌘⇧F to open the "find in path" dialog.
  3. Press ⌥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 ⌘G to move the cursor to the next occurrence of the test, "method1".
  8. Press ⌘G several more times.
  9. Press ⌘⇧G several times to navigate backward to each occurrence of "method1".
  10. Repeat until bored.