Top => IntelliJ on Windows/Linux
Practice keyboard shortcuts to find and replace text in a single 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
- Open the file src/main/java/com/neopragma/idekatas/LongConditional.java
- Press (Ctrl + F) to open the "find" dialog.
- Enter "result" as the text to search for.
- Press (Enter)
- Press (F3) to move the cursor to the next occurrence of the test, "result".
- Press (F3) several more times.
- Press (Shift + F3) several times to navigate backward to each occurrence of "result".
- Repeat until bored.
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
- Open the file src/main/java/com/neopragma/idekatas/LongConditional.java
- Press (Ctrl + R) to open the "replace" dialog.
- In the find field, type "intArg".
- In the replace field, type "range".
- Click the Replace button three or four times and observe the effects.
- Type (Ctrl + Z) repeatedly to reverse the changes you just made.
- Click the Replace All button and observe the effects.
- Type (Ctrl + Z) to reverse the changes.
- Repeat until bored.
- Press Esc to dismiss the "replace" dialog.