Some questions

Hi

Apologies if these have been asked before, I'm a newbie and I have been using PhpStorm for a couple of weeks and I have some questions:

Firstly, is there a sort option? In my previous editor (Ultraedit) I was able to take an array:

$myArray = array(
     'c' => 1,
     'a' => 1,
     'b' => 1,
);

highlight the content and sort it. This resulted in:

$myArray = array(
     'a' => 1,
     'b' => 1,
     'c' => 1,
);

Is this available in PS?

Secondly, is there a way to take a block of code and align on a particular character / string? In the example above it would be nice to align on the '=>'

Finally, I have been losing my caret and the only way to restore it is by closing the app and restarting. Not sure of the sequence of events leading up to this but it has happened more than once.

I'm running 2.1.2 on Windows7

Thanks in advance

Jon

1 comment
Comment actions Permalink

Unfortunately there's no built-in ability to sort lines and relevant plugin http://plugins.jetbrains.com/plugin/?idea&id=5919 is not yet supporting other IDEs but IDEA.

The array initialiser formatting option you interested is already implemented for upcoming PhpStorm 3.0 and will be available in first EAP.

No idea about the caret - may be some 3rd pary software is interfering?..

0

Please sign in to leave a comment.