Home

Awesome

This plugin activates itself for files that belong to some ROS package.

Features

Sets &makeprg to catkin_make, catkin build, or rosmake <package-name> so that the package, to which the file being edited belongs, could be built with :make.

Editor commands

Filetype support

Message, service, and action files

Launch files

Xacro files

Dynamic reconfigure files

Integration with other plugins

vim-ros integrates with several other plugins out of the box. This section lists the plugins and explains suggested configuration.

YouCompleteMe

YouCompleteMe is is a fast, as-you-type, fuzzy-search code completion engine for Vim.

vim-ros provides semantic completion for ROS filetypes via omni-complete functions. YouCompleteMe will automatically use them, however if you want the completion to be magically triggered as you type, you have to associate proper triggers with ROS filetypes in your .vimrc:

let g:ycm_semantic_triggers = {
\   'roslaunch' : ['="', '$(', '/'],
\   'rosmsg,rossrv,rosaction' : ['re!^', '/'],
\ }

UltiSnips

Syntastic

Installation

It is recommended to install vim-ros using vim-plug. The (somewhat dated) alternatives are Vundle or pathogen.

This plugin makes use of rospkg and (optionally) catkin-tools Python packages. Run the following command in your terminal to make sure that they are installed (replace vim with nvim if necessary):

vim -c "python3 import pip._internal; pip._internal.main(['install', 'rospkg', 'catkin-tools'])" -c "qall"

Options

Contributing

The plugin is written in Python and includes a shim to make interfacing with Vim as easy as it could possibly be. Therefore, extending the plugin does not require knowledge of the peculiarities of Vim Script. Contributions are welcome!

Acknowledgments

Inspired by the vim-rails plugin.

License

MIT License. Copyright (c) 2013-2024 Sergey Alexandrov.