]> git.rmz.io Git - dotfiles.git/blob - vim/indent/roslaunch.vim
dwb: change ALL the things
[dotfiles.git] / vim / indent / roslaunch.vim
1
2 " Use XML indentation rules
3
4 if exists("b:did_indent")
5 finish
6 endif
7
8 " load the XML indent rules
9 runtime! indent/xml.vim
10 runtime! indent/yaml.vim
11
12 " override the vim indent expression (we'll call it ourselves)
13 setlocal indentexpr=GetRoslaunchIndent(v:lnum)
14
15 " Only define the function once.
16 if exists("*GetRoslaunchIndent")
17 finish
18 endif
19
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)
23 return -1
24 if searchpair('<rosparam>','','</rosparam>','bWnm') > 0
25 return GetYAMLIndent(lnum)
26 else
27 return -1
28 endif
29 endfunc
30
31