1
1
Fork 0
AtomicKotlinCourse/Programming Basics/Repetition with while/Exercise 4/task.md

1.3 KiB

Mastering the IDE: Moving the Caret

You can move the caret a word at a time. The same works for selecting text:

Operation Shortcut Description
Move to Next Word &shortcut:EditorNextWord; Move the caret to the next word.
Move to Previous Word &shortcut:EditorPreviousWord; Move the caret to the previous word.
Move to Next Word with Selection &shortcut:EditorNextWordWithSelection; Move the caret to the next word, selecting it.
Move to Previous Word with Selection &shortcut:EditorPreviousWordWithSelection; Move the caret to the previous word, selecting it.

Select getFooResult() by moving the caret over words and extract it into a val foo by hand. Next we'll discuss how to extract a variable automatically.