Frage

I migrated from NetBeans to PhpStorm. How can I change multiple line duplication and movement method in PhpStorm to NetBeans method? (PhpStorm requires full selection of lines to move or dublicate)

update: Consider two following line"

   lin1 --------------
   lin2 ++++++++++++++

if you completely select both line and press ctrl+d : in NetBeans you will get:

lin1 --------------
lin2 ++++++++++++++
lin1 --------------
lin2 ++++++++++++++

in PhpStorm you will get:

  lin1 --------------
  lin2 ++++++++++++++lin1 --------------
  lin2 ++++++++++++++

now consider two following line ({}=selection bound)

   lin1 ---------{-----
   lin2 +++++++++}+++++

if you partially select both line and press ctrl+d : in NetBeans you will get:

   lin1 ---------{-----
   lin2 +++++++++}+++++
   lin1 ---------{-----
   lin2 +++++++++}+++++

in PhpStorm you will get:

   lin1 ---------{-----
   lin2 +++++++++-----
   lin2 +++++++++}+++++

In NetBeans ctrl+e will delete multiple line but ctrl+y will not act on multiple line.

War es hilfreich?

Lösung

Ctrl+D is mapped to the 'Duplicate Line or Block' action that does exactly what you've mentioned (copy selected text right after selection end).

What you need to do is to reassign the shortcut to the 'Duplicate Lines' action that provides the desired behavior.

Denis

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top