sublime_alignment icon indicating copy to clipboard operation
sublime_alignment copied to clipboard

Alignment of => in PHP arrays not working

Open lingo opened this issue 12 years ago • 7 comments

Hi there, I tried to create PHP.sublime-settings in the user directory, and fiddled around with alignment_chars and alignment_prefix_chars, but I keep finding that the Alignment plugin will separate the = and > when aligning php arrays of key => value.

Is this something I'm doing wrong with the settings, or is it something hard-coded?

lingo avatar Oct 29 '12 14:10 lingo

Works for me, here's my config:

    "alignment_chars": ["=", ",", ":"],

    "alignment_space_chars": ["="],

    "alignment_prefix_chars": [
        "+", "-", "&", "|", "<", ">", "!", "~", "%", "/", "*", "."
    ]

Geczy avatar Nov 28 '12 01:11 Geczy

I can confirm. Alignment is not working at all in PHP for me. (Windows 7 64 bit)

niquedegraaff avatar Feb 11 '13 16:02 niquedegraaff

Try the Abacus plugin for now, it seems to work for me (ST3). You'll have to add "=>" to the settings, though.

eblanshey avatar Aug 02 '13 18:08 eblanshey

Not working for me either. It's a shame because Alignment works great on everything else I throw at it. I'm trying Valign by dizzywhip for now. It seems to be working well.

Boduje avatar Aug 12 '14 01:08 Boduje

Just wanted to mention... I've switched to AlignTab, which I find works REALLY well for everything I throw at it. Not trying to troll or take away from @wbond's great work, but I find AlignTab to be much better for my workflow and use cases (Objective-C's goofy colon centered alignment). HTH!

vanrijn avatar Aug 12 '14 16:08 vanrijn

Thanks for this @vanrijn . That plugin provides examples and better documentation, so it's clearer that it does what I want.

Relequestual avatar Jan 22 '16 14:01 Relequestual

I go to this page because the shortcut command Ctrl + Alt + A sometimes it works, sometimes it doesn't, just like this last 2 days. I go to @vanrijn suggestion to using AltTab, and it's working perfectly, but I still miss my shortcuts. Right-clicking and choose a 'divider' (?) is too much to my liking.

nd3w avatar Aug 23 '16 02:08 nd3w