IntelliJ IDEA way of editing multiple lines

hdx picture hdx · Aug 11, 2009 · Viewed 82.8k times · Source

I've seen this done in TextMate and I was wondering if there's a way to do it in IDEA.

Say I have the following code:

 leaseLabel = "Lease";
 leaseLabelPlural = "Leases";
 portfolioLabel = "Portfolio";
 portfolioLabelPlural = "Portfolios";
 buildingLabel = "Building";

What is the best way to append '+ "foo"' to every line? Column mode won't work since the lines are not correctly aligned on the right side... unless there is an easy way to right justify the text :P

Answer

shobull picture shobull · Mar 20, 2014

Since Idea IntelliJ IDEA 13.1 there is possibility to edit multiple lines.

Use:

Alt + Shift + Mouse click

for selection. More about this new improvement in IntelliJ blogpost here. Very useful feature.