There is VIM script that provide highlighting for Teraterm -- Teraterm MACRO syntax .... The 'break' command can also be used to escape from a loop before its condition triggers.
www.softpanorama.org