Hello to everyone.
I’ve only been using Kakoune for 1 full day.
I code in php and quite often it is necessary to convert the associative array into an array with values.
Fake example
array(
‘form’ => $form->createView(),
‘publication’ => $npwPublication,
‘pressForm’ => $pressForm->createView(),
)
Result should be
array(
$form->createView(),
$npwPublication,
$pressForm->createView(),
)
So i jumped to first line, gi to first char (because code is indented),
grab 3 lines with shift+x,
then split selection into lines with alt+s,
then select from end to dollar sign with alt+f and $ as my wanted stop character.
And finally, y to copy
Is there an easier way to select this?
But what I have the biggest problem with is how to move the copied lines to another place.
When I move the cursor down I have 3 of them and when I align the first one in final place in file, the other 2 are overlap another code so I cannot paste selection content without mixing with the rest.
So I figured I’d reduce the selection (with space) to one and it would be much easier for me to hit my target line. But when I do that, the paste command only returns 1 line out of the 3 I copied.
I tried to copy these lines to another buffer, but the effect is the same.
Can you suggest something?
Thanks in advance and have a nice day