finish
endif
augroup filetypedetect
+ autocmd! BufNewFile,BufRead *.launch setfiletype roslaunch
autocmd! BufNewFile,BufRead PKGBUILD* setfiletype PKGBUILD
augroup END
--- /dev/null
+
+" Use XML indentation rules
+
+if exists("b:did_indent")
+ finish
+endif
+
+" load the XML indent rules
+runtime! indent/xml.vim
+runtime! indent/yaml.vim
+
+" override the vim indent expression (we'll call it ourselves)
+setlocal indentexpr=GetRoslaunchIndent(v:lnum)
+
+" Only define the function once.
+if exists("*GetRoslaunchIndent")
+ finish
+endif
+
+" wiki-indent will return vim indent inside a <pre> block,
+" and return -1 if not inside a block to trigger auto-indent
+function GetRoslaunchIndent(lnum)
+ return -1
+ if searchpair('<rosparam>','','</rosparam>','bWnm') > 0
+ return GetYAMLIndent(lnum)
+ else
+ return -1
+ endif
+endfunc
+
+
--- /dev/null
+" Vim syntax file
+" Language: rosaction
+" Maintainer: Sergey Alexandrov <alexandrov88@gmail.com>
+" Filenames: *.action
+
+" Read the rosmsg syntax to start with
+if version < 600
+ so <sfile>:p:h/rosmsg.vim
+else
+ runtime! syntax/rosmsg.vim
+ unlet b:current_syntax
+endif
+
+syn match rosactionSeparator "^---$"
+
+hi def link rosactionSeparator Special
+
+let b:current_syntax = "rosaction"
--- /dev/null
+" Vim syntax file
+" Language: roslaunch XML
+" Maintainer: Jonathan Bohren
+" Latest Revision: 8 July 2013
+"
+" roslaunch xml syntax hilighting with inline yaml support
+"
+" Put the following in your .vimrc:
+" autocmd BufRead,BufNewFile *.launch setfiletype roslaunch
+
+if exists("b:current_syntax")
+ finish
+endif
+
+runtime syntax/xml.vim
+
+let s:current_syntax=b:current_syntax
+unlet b:current_syntax
+
+syntax include @YAML syntax/yaml.vim
+syntax region ymlSnipInline matchgroup=rosparamTag start="\m<.\{-}rosparam.\{-}>" end="\m</.\{-}rosparam.\{-}>" contains=@YAML containedin=xmlEntity
+hi link rosparamTag ModeMsg
+
+let b:current_syntax=s:current_syntax
--- /dev/null
+" Vim syntax file
+" Language: rosmsg
+" Maintainer: Sergey Alexandrov <alexandrov88@gmail.com>
+" Filenames: *.msg
+
+if exists("b:current_syntax")
+ finish
+endif
+
+syn keyword rosmsgBuiltInType bool
+syn keyword rosmsgBuiltInType int8
+syn keyword rosmsgBuiltInType uint8
+syn keyword rosmsgBuiltInType int16
+syn keyword rosmsgBuiltInType uint16
+syn keyword rosmsgBuiltInType int32
+syn keyword rosmsgBuiltInType uint32
+syn keyword rosmsgBuiltInType int64
+syn keyword rosmsgBuiltInType uint64
+syn keyword rosmsgBuiltInType float32
+syn keyword rosmsgBuiltInType float64
+syn keyword rosmsgBuiltInType string
+syn keyword rosmsgBuiltInType time
+syn keyword rosmsgBuiltInType duration
+syn keyword rosmsgBuiltInType Header
+
+syn match rosmsgType "\v^\h\w+(/\h\w+)=" nextgroup=rosmsgArray,rosmsgField,rosmsgConstant
+syn match rosmsgArray "\[\d*\]"
+syn match rosmsgField "\v\s+\h\w*(\w*\s*\=)@!"
+syn match rosmsgConstant "\v\s+\u[0-9A-Z_]*(\s*\=)@="
+syn match rosmsgComment "\v#.*$"
+
+hi def link rosmsgBuiltInType Keyword
+hi def link rosmsgType Type
+hi def link rosmsgArray Normal
+hi def link rosmsgField Identifier
+hi def link rosmsgConstant Constant
+hi def link rosmsgComment Comment
+
+let b:current_syntax = "rosmsg"
--- /dev/null
+" Vim syntax file
+" Language: rossrv
+" Maintainer: Sergey Alexandrov <alexandrov88@gmail.com>
+" Filenames: *.srv
+
+" Read the rosmsg syntax to start with
+if version < 600
+ so <sfile>:p:h/rosmsg.vim
+else
+ runtime! syntax/rosmsg.vim
+ unlet b:current_syntax
+endif
+
+syn match rossrvSeparator "^---$"
+
+hi def link rossrvSeparator Special
+
+let b:current_syntax = "rossrv"