Skip to the content.

Chapter 7 - Finding/Buffer

Back to outline

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 Mac + G

Let’s open WOTW.md by pressing Mac + O and look for the word “Martians” in the first sentence.

Select this word by pressing Macshift + , then press Mac + G once. Now the word “Martians” has been added to our Find Buffer. We can easily find the next occurrence of this word by pressing Mac + G.

Find next/previous occurrence from buffer Mac kbd>⌘</kbd> + G / kbd>⌘</kbd> + shift + G

See what happens when you keep on pressing Mac + G. If all goes well, your cursor should start iterating through all occurrences of the selected word. Conversely, using Mackbd>⌘</kbd> + shift + G 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 Mac + G. Next, select the . and press Mac + G.

Exercise: Find the next ..


Next Chapter

Back to outline