The latest version of latexindent.pl is available on github; once I've done some more testing, I'll release it to ctan. This latest version addresses your question, and some more things, too- let's go through them one by one (all of this is also covered in the documentation).
if-else-fi constructs
These can be controlled by using the constructIfElseFi field- any commands found within this field will make latexindent.pl look for \else and \fi commands.
constructIfElseFi:
ifnum: 1
ifodd: 1
You can, of course, add any other commands to this (I'll update defaultSettings.yaml with a more comprehensive list later today)
Sample before
\ifnum\radius>5
\ifnum\radius<16
\draw[decorate,...
\fi
\fi
Sample after
\ifnum\radius>5
\ifnum\radius<16
\draw[decorate,...
\fi
\fi
tikz paths spanning several lines
The new version of latexindent.pl contains switches to add indentation after \item commands
indentAfterItems:
itemize: 1
enumerate: 1
list: 1
and you can have any item names you like specified in
itemNames:
item: 1
myitem: 1
As such, you can trick latexindent.pl into thinking that the tikzpicture environment has item commands called path, node, draw, and anything else by using (for example) the following code in one of your mysettings.yaml files:
indentAfterItems:
tikzpicture: 1
itemNames:
path: 1
node: 0
draw: 1
Sample before
\begin{tikzpicture}
\path
<some complicated operations>
;
\node bunch of other code
<some complicated operations>
<some complicated operations>
\draw bunch of other code
<some complicated operations>
<some complicated operations>
\end{tikzpicture}
Sample after
\begin{tikzpicture}
\path
<some complicated operations>
;
\node bunch of other code
<some complicated operations>
<some complicated operations>
\draw bunch of other code
<some complicated operations>
<some complicated operations>
\end{tikzpicture}
Note that, because I had the node set to 0, latexindent.pl does not treat it like an item command- switch it to 1, and you obtain the following:
\begin{tikzpicture}
\path
<some complicated operations>
;
\node bunch of other code
<some complicated operations>
<some complicated operations>
\draw bunch of other code
<some complicated operations>
<some complicated operations>
\end{tikzpicture}
Alignment outside of environments
The 'brace matching' routine and the 'alignment' routine are pretty robust, but I don't want to make them fight for control- as such, to answer your last request I have added support for the following mark-up
\matrix{%
%* \begin{tabular}
1 & 2 & 3 & 4 \\
5 & & 6 & \\
%* \end{tabular}
}
You can use %* followed by as many spaces as you like (possibly none) together with any environment that you have specified in lookForAlignDelims. I appreciate that this solution isn't ideal, as it requires a bit of additional mark-up, but the alternative (a fight between brace matching and alignment) scares me.
latexindent, it's nice to have the support :) Bullets 1 and 3 are at the very top of my to do list- it's nice that someone thought of them independently :) Bullet 2 sounds tricky, but it would be a good challenge. I'll continue to develop the script, and post back with updates. For the moment, the answer is essentially: 'no, but I'm working on it :)';):)Good luck with the TL people!