How to select every other line with multiple cursors in Sublime Text

sublimetextsublimetext2

In Sublime Text 2, is it possible to instantly select every other (or odd/even) line and place multiple cursors on those lines?

Thanks.

Best Answer

  1. Find: Ctrl+F
  2. If regular expressions are not already enabled, enable them: Alt+R
  3. Type in the expression .*\n.*\n
  4. Find all: Alt+Enter
  5. Press left arrow to get rid of the selections, leaving just the cursors:
  6. You now have a cursor at the start of every odd-numbered line. If you wanted even-numbered lines, press down:
  7. Depending on the file, there might be one cursor missing right down the bottom of the file. Using the mouse (damn!) scroll to the bottom, hold down Ctrl, and click where the missing cursor should be to add it in.