Top => IntelliJ on Windows/Linux
There is nothing to be gained by having separate kata to practice renaming files, directories, packages, etc. because the keystrokes are the same.
Key sequences to practice
- (Ctrl + Right Arrow) - Move forward through text one token at a time
- (Ctrl + Left Arrow) - Move backward through text one token at a time
- (Shift + F6) - Rename (remapped as described above)
- (Ctrl + Z) - Undo
Keystrokes without explanations
- Open the Java source file, LongConditional.java.
- Repeat the following keyboard inputs until the sequence becomes fluid.
hold (Ctrl)
(Right Arrow)
(Right Arrow)
(Right Arrow)
release (Ctrl)
(Shift + F6)
theNumber
(Enter)
And then to revert:
- Press (Ctrl + Z) repeatedly until all changes have been reversed.
Walkthrough of steps with explanations
- Open the Java source file, LongConditional.java.
- Hold (Ctrl) and press (Right Arrow) repeatedly to skip foward through the text until the caret lands on "intArg".
- Press (Shift + F6) to activate the Rename feature.
- Type "theNumber".
- Press (Enter) to complete the refactoring.
- Press (Ctrl + Z) to undo the refactoring.
- Repeat until bored.