Search code examples
eclipsecoding-style

Multiline cursor with skipping lines


I know Toggle block selection but sometimes I want to skip a line.

int number1;
boolean exist1;
int number2;
boolean exist2;
int number3;
boolean exist3;

I want to change prefix of the number only. I can use replace but prefer something like multiline cursor. I need it like this:

int number1;
int number2;
int number3;
boolean exist1;
boolean exist2;
boolean exist3;

Solution

  • It's not possible to have multiple cursors in Eclipse.

    To rearrange lines move them with ALT + UP or ALT + DOWN. Eclipse's block selection mode is sufficient for most cases where you have to change block-arranged statements and you can easily change pre- or postfixes this way.

    A handy extension is "AnyEdit" that allows sorting or converting all selected lines.