Ctrl
⌘
G
selects all occurrences of a pattern in the current file on a Mac in Sublime Text 2. So, in your example, dropping your cursor on any instance of Hey
(not explicitly highlighting it) and invoking Ctrl
⌘
G
will select every instance of Hey
in your file. You can then delete all of them in one go and re-add a single instance.
A few things to note on Ctrl
⌘
G
that might save you some headaches in the future. By default, it is case-insensitive. You can change this by invoking the global find and replace tool with ⇧
⌘
F
and toggling the case-sensitivity button. It should respect whichever option you leave it on for all subsequent searches.
Also, if you were to actually highlight an occurrence of Hey
in your file and invoke Ctrl
⌘
G
, it would pattern match any sequence of characters containing those letters in that order — e.g., if they
were in your file, the hey
in it would be selected.