3 ms·
"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 follo
by edanm 14y ago
"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.