Muliple line move and duplicate in PhpStorm
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.
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
精彩评论