Tapatalk

Completing HTML Tags / how to get out

Completing HTML Tags / how to get out

6
NewbieNewbie
6

    Feb 22, 2013#1

    Hopefully I can explain clearly what I'm looking for. I imagine this feature is in place already.

    When I type in something like <li>, UE automatically enters the closing tag </li>. Once I enter what goes in the tag, I have to hit the end key or the arrow keys to get past the closing tag.

    Is there a hotkey for getting to the end of your closing tag?

    6,685587
    Grand MasterGrand Master
    6,685587

      Feb 24, 2013#2

      There is no built-in key to set caret after an ending tag once the text between a tag is entered. There are only the arrow keys. Holding Ctrl key while pressing left/right arrow moves caret left/right by one word, but that is not really helpful in this case.

      However, it is quite simple to define a macro with a hotkey for this task. For example name the macro SetAfterEndTag and use one of the following macro codes:

      UnixReOff
      Find MatchCase ">"
      IfFound
      Key LEFT ARROW
      Key RIGHT ARROW
      EndIf


      UnixReOff
      Loop
      Find MatchCase ">"
      IfNotFound
      ExitLoop
      Else
      Key LEFT ARROW
      Key RIGHT ARROW
      IfCharIs "<"
      Else
      ExitLoop
      EndIf
      EndIf
      EndLoop


      The first macro above moves caret after first end tag.

      If there are often multiple consecutive end tags, the enhanced second macro could be used to set caret after all end tags without any other character between the ending tags. Of course the second macro works also for a single end tag.

      The macro should be saved into a macro file perhaps together with other macros which is configured for being automatically loaded at startup of UltraEdit so that it can be executed by hotkey at any time.