SlickEdit Product Discussion > SlickEdit®

auto-completing current XML element

<< < (2/2)

ronburk:
Got it! For my future edification, when I'll note doubt stumble over this or something similar again:

a) I found that xml.e has the code for special XML handling.

b) I found that xml_slash() is the guy who has the smarts.

c) Debugging statements tracked it down to not getting past this statement:


   if (p_window_state:=='I' ||
      p_SyntaxIndent<0 || p_indent_style!=INDENT_SMART||
       _prev_char()!='<') {
      keyin(key);
      return;
   }

So, getting the auto closing tag completion requires having, not completion options, but syntax indenting options set just so. Tracing those variables back to dialog boxes showed me that I needed to go to Tools|Options|File Extension Setup...

and go to the Indent tab, and set "Indent Style" to "Syntax indent", and make sure the "Syntax expansion" box was checked.

It will not work to have "Indent Style" set to "Auto". This was and remains unintuitive to me. In fact, I don't really see what "Indent Style" has to do with auto-completing a closing XML tag.

In any case, I'm very happy to have the auto-completion for end tags working, and will remain so until I rediscover what it was that made me unwilling to have "Indent Style" set to "Syntax indent" for XML files :-)

Navigation

[0] Message Index

[*] Previous page

Go to full version