]> git.rmz.io Git - dotfiles.git/commitdiff
vim: add ultisnips for rospy and roscfg
authorSamir Benmendil <me@rmz.io>
Fri, 19 Jun 2015 17:03:47 +0000 (18:03 +0100)
committerSamir Benmendil <me@rmz.io>
Fri, 19 Jun 2015 17:03:47 +0000 (18:03 +0100)
vim/filetype.vim
vim/ultisnips/roscfg.snippets [new file with mode: 0644]
vim/ultisnips/rospy.snippets [new file with mode: 0644]

index 9ba5826be12f0d6f00b57f9fcc75897ce695c015..9dfce86d9ec7372580cbce1f5f86efd3279375ed 100644 (file)
@@ -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 (file)
index 0000000..4766e2d
--- /dev/null
@@ -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 (file)
index 0000000..e303186
--- /dev/null
@@ -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