Maxime Fabre
Maxime Fabre

Reputation: 2252

Split selection into lines in PHPStorm

In Sublime I was quite fond of the "Split selection into lines" shortcut (super+shift+l). However I cannot find an equivalent of that in PHP Storm 8, I've found a "Split into lines" function in the Edit menu but feeding it either \n or \r doesn't seem to work. Does that function exist in PS ?

Upvotes: 13

Views: 6263

Answers (4)

Drarok
Drarok

Reputation: 3809

There is a "Split Selection into Lines" action in the Extra Actions plugin.

Compatible with: Compatible with: IntelliJ IDEA PhpStorm WebStorm PyCharm RubyMine AppCode CLion GoLand DataGrip Rider MPS Android Studio

Upvotes: 6

Arian Acosta
Arian Acosta

Reputation: 6817

By default on PHPStorm 10+, you can toggle the Column Selection Mode with:

CMD + SHIFT + 8

Of course, you can configure any stroke you like. I like to keep the original one and add the one that matches Sublime which is CMD + SHIFT + L. Here is how:

How to configure column selection mode stroke in PHPStorm

Upvotes: 15

Tieme
Tieme

Reputation: 65369

Another option would be to use column selection mode:

https://stackoverflow.com/a/30031481/672989

Upvotes: 10

LazyOne
LazyOne

Reputation: 165088

If I have a 200 line selection I don't want to have to create a cursor at the end of every line.

You do not have to "create a cursor at the end of every line" -- just create cursor on the beginning of each line (on Windows it would be Alt+Mouse drag Down/Up) and then just press End button. This is not that straightforward as separate dedicated action .. but still does the same job and pretty easy to execute.


In any case: there is no such exact action currently available in PhpStorm, unfortunately.

Please follow this ticket (star/vote/comment) to get notified on progress: http://youtrack.jetbrains.com/issue/IDEA-122181

Upvotes: 3

Related Questions