I have noticed that editing Ant script (*.ant or *.xml) has different behaviour than editing plain *.xml file. I know that when the xml file is recognized as ant script IDEA leverages some additional nice editing features. But there are some drawbacks.
I use a "Select word at Caret" (CtrlW) feature a lot. You may know that when you press CtrlW multiple times the selection grows following the logical text scructure. I mean I use it a LOT. This is actually one of the features I love the most in IDEA editor.
Now back to the problem. Lets say we have the following piece of xml:
1) You edit the plain xml file and you have caret positioned in the mytask word. Pressing Ctrl+W will select the mytask, pressing next time the "mytask", next time name="mytask" etc.
2) Same as 1) but edit Ant file. Pressing Ctrl+W will select the mytask, pressing next time the whole line! This is a problem. It should behave like in plain xml.
3) You edit the plain xml file and you have the caret positioned in the row 1 (where the mytask is) and column 1 (so that the TAB character is to the right of the cursor). Pressing Ctrl+W selects the whole block of the target tag.
4) Same as 3) but edit Ant file. Pressing Ctrl+W selects the whole file! Again a big problem. To get the same selection as in 3) the caret position must be column 5 (immediately to the left of the "
But now the fileset tag is red and IDEA is complaining: "Nested element 'fileset' is not allowed here". What should I do?
Using IDEA 7.0.2, built in Ant 1.7.0.