Chapter 7 - Finding/Buffer
Even though this is a very short chapter, I thought it valuable as it helps to introduce the next chapter on multi-cursors a little bit better.
Find word and add to buffer ctrl+F3
Let’s open WOTW.md
by pressing ctrl + shift + n and look for the word “Martians” in the first sentence.
Select this word by pressing ctrl + w, then press ctrl + F3 once. Now the word “Martians” has been added to our Find Buffer. We can easily find the next occurrence of this word by pressing F3.
Find next/previous occurrence from buffer F3 / shift +F3
See what happens when you keep on pressing F3. If all goes well, your cursor should start iterating through all occurrences of the selected word. Conversely, using shift + F3 allows you to backtrack through the usages (aka. “find previous”)
Now open War.java
, position your cursor on 13:33
(line number 13, character number 13) using ctrl + g. Next, select
the .
and press ctrl + F3.
Exercise: Find the next .
.