2 " Use XML indentation rules
4 if exists("b:did_indent")
8 " load the XML indent rules
9 runtime! indent/xml.vim
10 runtime! indent/yaml.vim
12 " override the vim indent expression (we'll call it ourselves)
13 setlocal indentexpr=GetRoslaunchIndent(v:lnum)
15 " Only define the function once.
16 if exists("*GetRoslaunchIndent")
20 " wiki-indent will return vim indent inside a <pre> block,
21 " and return -1 if not inside a block to trigger auto-indent
22 function GetRoslaunchIndent(lnum)
24 if searchpair('<rosparam>','','</rosparam>','bWnm') > 0
25 return GetYAMLIndent(lnum)