For example, to convert this
$example = array(
'First' => 'This,
'Second' => 'is',
'Third' => 'an',
'Fourth'=> 'example',
'Fifth' => '.',
);
into this
$example = array(
'First' => 'This',
'Second' => 'is',
'Third' => 'an',
'Fourth' => 'example',
'Fifth' => '.',
);
without having to indent each => 'whatever',
each time.
Is this possible to do in vi?
As a complement to Ingo's answer, here is how you do it with Tabular:
There are two Vim plugins for that, Align and Tabular. With Align, select the lines and execute
Tabular is a more recent alternative to the venerable Align, but both offer similar functionality. Pick according to your preferences.