Skip to content

Instantly share code, notes, and snippets.

@jbohren
Last active June 13, 2023 12:57
Show Gist options
  • Star 15 You must be signed in to star a gist
  • Fork 6 You must be signed in to fork a gist
  • Save jbohren/5964014 to your computer and use it in GitHub Desktop.
Save jbohren/5964014 to your computer and use it in GitHub Desktop.
" Vim syntax file
" Language: roslaunch XML
" Maintainer: Jonathan Bohren
" Latest Revision: 8 July 2013
"
" roslaunch xml syntax hilighting with inline yaml support
"
" Put this file in ~/.vim/syntax/roslaunch.vim
" 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
@zchen24
Copy link

zchen24 commented Jul 14, 2013

I like it. Can you create an emacs version ? LOL

@bunsenmcdubbs
Copy link

@khssnv
Copy link

khssnv commented Jun 16, 2017

Something wrong with "rosparam": https://cloud.mail.ru/public/BSiR/cRp7By5SA

@ConnorNovak
Copy link

Still works like a charm for me in 2019. Thanks, @jbohren, for an easy soln to a problem I didn't know I had.

@Mithrandir2k18
Copy link

@jbohren rosparam renders as if the whole line were a string. Could you have a look at it? Same issue as @khssnv

@anirudhkochhar
Copy link

@jbohren yup rosparam issue is still active

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment