How do you make multiple cursors that are at the exact locations you need?
That's something that a macro is useful for. His macro is less useful because for some reason he did his search outside of the macro. Maybe the search is not for "def", but for "def prefix", so ctrl+d is not applicable to form the multiple cursors.
It could be nice if you could record your movements to form the "next" cursor and immediately see all future generated cursors given that movement (similarly to the "recursive draw" web app). Then you could perhaps truncate the infinite list of cursors at some finite point somehow, and then operate your multiple cursor operations.
"How do you make multiple cursors that are at the exact locations you need?"
There are a few simple tricks.
In this case, I hit "ctrl-d", which does the following:
1. If nothing is selected, it will select the word the cursor is on.
2. If something is selected, it will select the next match of this word, using another cursor.
In other words, I'll put my cursor on "def", hit ctrl-d, and "def" will be selected. Hit ctrl-d again, and the next "def" will be selected. Etc. Technically, in Sublime Text, every search makes a multiple cursor. I could hit alt-f3 (IIRC) to select all matches of "def", and they'd all be multi-selected.
But like I said, in this case it's really easy.
There are more advanced tricks - what if the word "def" appears inside the text? Well, you can select not only the def, but also the whitespace before the def, and it will selected the next "def" which is at that exact indentation. And like I mentioned in another comment, I even wrote a plugin to make multi-selections more easily, by splitting on a certain character. So that a list like this: (int a, int b, char c) can easily be split into 3 selections, around the comma.
That's something that a macro is useful for. His macro is less useful because for some reason he did his search outside of the macro. Maybe the search is not for "def", but for "def prefix", so ctrl+d is not applicable to form the multiple cursors.
It could be nice if you could record your movements to form the "next" cursor and immediately see all future generated cursors given that movement (similarly to the "recursive draw" web app). Then you could perhaps truncate the infinite list of cursors at some finite point somehow, and then operate your multiple cursor operations.