This plugin activates itself for files that belong to some ROS package.
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
.
:A
to alternate between different kinds of C/C++ files (.cpp, .cc, .h, .hh, .hpp, .impl) in the current package:Roscd
to cd to an arbitrary ROS package (with tab-completion):Rosed
/:TabRosed
/:SpRosed
/:VspRosed
to open arbitrary files (with tab-completion of both
package and filenames)gd
command<rosparam>
tags)$(find ...)
substitutiongf
command when the cursor is on a tag
$(find ...
patterngf
command (when the cursor is on a tag with 'filename'
attribute)vim-ros
integrates with several other plugins out of the box. This section
lists the plugins and explains suggested configuration.
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!^', '/'],
\ }
It is recommended to instal vim-ros
using vim-plug. The (somewhat dated)
alternatives are Vundle or pathogen.
Note that ROS still uses Python 2, therefore your Vim has to be compiled with
python2
support. The default Vim version on Ubuntu 16.04 and above comes with
python3
support. Luckily, you can simply install vim-nox-py2
package to get
a version compiled with python2
.
g:ros_make
[current|all] Controls which package to buildg:ros_build_system
[catkin|rosbuild|catkin-tools] Which build system to useg:ros_catkin_make_options
Additional options for catkin_make (i.e '-j4 -DCMAKE_BUILD_TYPE=Debug' ...)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!
Inspired by the vim-rails plugin.
MIT License. Copyright (c) 2013-2016 Sergey Alexandrov.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。