Registered Member
|
Helo everyone
Is there posible to align associative array structure or objects elements in php like this: http://vimcasts.org/episodes/aligning-t ... bular-vim/ Cheers |
Administrator
|
Can you please post an example of the desired text structure?
Kate should keep the current alignment when you move to the next line, which may help.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Global Moderator
|
(this is why I hate videos explaining how to do things: I don't want to watch a 5 minute video just to reply to this -- if it was in screenshots + text I could grasp the relevant information much more quickly)
You can write your own indenters for kate in JavaScript. There you can do anything you want with alignment. Greetings!
I'm working on the KDevelop IDE.
|
Registered Member
|
@bcooksley
Example 1. Oginal:
Example 2. Oginal:
@scummos I know I can do it in Javascript, but I hope, someone already wrote it. |
Administrator
|
If you do end up writing such a solution yourself, please do post it here so others can use it.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
I've written some code, but it work only in javascript console and only for equal char as delimiter. If anyone feels up to make plugin with this code (maby I, bun not now ) and add the ability to choose char of indent, welcome . The code:
|
Registered Member
|
The plugin:
Keyboar shortcut - Ctrl + Alt + Right Still align only to '=', so it will work for PHP's '=>' to. Take, test, use, copy, fix, whatever |
Administrator
|
Thanks for posting your solution to this - i've now marked it as solved (which should make it easier for future searchers to find).
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
Please, edit translations, if required, my english is a bit lame. Would great if someone with regexp skill, add option to autodetect character of align, like example ':' in javascripts objects, or something else.
|
Registered users: Bing [Bot], Google [Bot], Sogou [Bot]