From d6d5dc43533a68afecbcfbf6c93a4fce937d19ae Mon Sep 17 00:00:00 2001 From: Samir Benmendil Date: Fri, 19 Jun 2015 18:03:47 +0100 Subject: [PATCH] vim: add ultisnips for rospy and roscfg --- vim/filetype.vim | 1 + vim/ultisnips/roscfg.snippets | 3 +++ vim/ultisnips/rospy.snippets | 19 +++++++++++++++++++ 3 files changed, 23 insertions(+) create mode 100644 vim/ultisnips/roscfg.snippets create mode 100644 vim/ultisnips/rospy.snippets diff --git a/vim/filetype.vim b/vim/filetype.vim index 9ba5826..9dfce86 100644 --- a/vim/filetype.vim +++ b/vim/filetype.vim @@ -7,6 +7,7 @@ augroup END augroup ft_ros autocmd! BufNewFile,BufRead */ros/*.py setfiletype python.rospy + autocmd! BufNewFile,BufRead */ros/*.cfg setfiletype python.roscfg autocmd! BufNewFile,BufRead */ros/*.cpp setfiletype cpp.roscpp autocmd! BufNewFile,BufRead */ros/*.h setfiletype cpp.roscpp autocmd! BufNewFile,BufRead */ros/*.cfg setfiletype python.roscfg diff --git a/vim/ultisnips/roscfg.snippets b/vim/ultisnips/roscfg.snippets new file mode 100644 index 0000000..4766e2d --- /dev/null +++ b/vim/ultisnips/roscfg.snippets @@ -0,0 +1,3 @@ +snippet add "Add a new reconfigure parameter" b +gen.add("${1:Name}", ${2:int_t}, ${3:0}, "${4:$1}", default=${5:None}, min=${6:None}, max=${7:None}) +endsnippet diff --git a/vim/ultisnips/rospy.snippets b/vim/ultisnips/rospy.snippets new file mode 100644 index 0000000..e303186 --- /dev/null +++ b/vim/ultisnips/rospy.snippets @@ -0,0 +1,19 @@ +snippet debug "Log Debug" b +rospy.logdebug(${0:"message"}) +endsnippet + +snippet info "Log Info" b +rospy.loginfo(${0:"message"}) +endsnippet + +snippet warn "Log Warning" b +rospy.logwarn(${0:"message"}) +endsnippet + +snippet err "Log Error" b +rospy.logerr(${0:"message"}) +endsnippet + +snippet fatal "Log Fatal" b +rospy.logfatal(${0:"message"}) +endsnippet -- 2.48.1