From: Samir Benmendil Date: Fri, 19 Jun 2015 17:03:47 +0000 (+0100) Subject: vim: add ultisnips for rospy and roscfg X-Git-Url: https://git.rmz.io/dotfiles.git/commitdiff_plain/d6d5dc43533a68afecbcfbf6c93a4fce937d19ae?ds=inline vim: add ultisnips for rospy and roscfg --- 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