ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
I know that you specifically leave out vim and emacs in your consideration here, but I have to say, a well-tuned VIM install will do just about anything that you want.
I have a few plugins of choice for VIM:
NerdTree: (mine is bound to <leader> n). Brings up a split pane with your current working directory contents. Navigating using the same VIM keys, and allows you to change directory, files, move, copy, and most other filesystem operations.
Ctags: Most people who use UNIX are probably versed with Ctags, but it bears repeating. Generates a list of "tags" such as functions, classes, and variables. This can then be accessed in a split-pane on VIM. Python and C(++) compatible.
The benefit of using VIM, in my opinion, is that I am frequently connecting to my robot over an ssh connection, and often don't want a full-blown IDE. When I am working in a terminal, I can open Vim right there, without switching back to an IDE. Vim is also common (in one form or another) on many, many systems (except for Ubuntu by default, for some reason). Vim provides me the power of an IDE without the weight of something like Eclipse.
Also, if the whole texty-console thing scares you (or learning vim, for that matter), solutions like MacVIM and GVIM provide a nice GUI interface, and use many of the system commands for copy, paste, etc.
2 | No.2 Revision |
I know that you specifically leave out vim and emacs in your consideration here, but I have to say, a well-tuned VIM install will do just about anything that you want.
I have a few plugins of choice for VIM:
NerdTree: (mine is bound to <leader> n). Brings up a split pane with your current working directory contents. Navigating using the same VIM keys, and allows you to change directory, files, move, copy, and most other filesystem operations.
Ctags: Most people who use UNIX are probably versed with Ctags, but it bears repeating. Generates a list of "tags" such as functions, classes, and variables. This can then be accessed in a split-pane on VIM. Python and C(++) compatible.
Yankring: Provides a buffer of previously copied text. Wonderful for keeping track of multiple copy-pastes as well as delete history.
The benefit of using VIM, in my opinion, is that I am frequently connecting to my robot over an ssh connection, and often don't want a full-blown IDE. When I am working in a terminal, I can open Vim right there, without switching back to an IDE. Vim is also common (in one form or another) on many, many systems (except for Ubuntu by default, for some reason). Vim provides me the power of an IDE without the weight of something like Eclipse.
Also, if the whole texty-console thing scares you (or learning vim, for that matter), solutions like MacVIM and GVIM provide a nice GUI interface, and use many of the system commands for copy, paste, etc.
3 | Added a bit on generating ROS tags for Vim. |
I know that you specifically leave out vim and emacs in your consideration here, but I have to say, a well-tuned VIM install will do just about anything that you want.
I have a few plugins of choice for VIM:
NerdTree: Brings up a split pane with your current working directory contents. Navigating using the same VIM keys, and allows you to change directory, files, move, copy, and most other filesystem operations.
Ctags: Most people who use UNIX are probably versed with Ctags, but it bears repeating. Generates a list of "tags" such as functions, classes, and variables. This can then be accessed in a split-pane on VIM. Python and C(++) compatible.
Yankring: Provides a buffer of previously copied text. Wonderful for keeping track of multiple copy-pastes as well as delete history.
The benefit of using VIM, in my opinion, is that I am frequently connecting to my robot over an ssh connection, and often don't want a full-blown IDE. When I am working in a terminal, I can open Vim right there, without switching back to an IDE. Vim is also common (in one form or another) on many, many systems (except for Ubuntu by default, for some reason). Vim provides me the power of an IDE without the weight of something like Eclipse.
Also, if the whole texty-console thing scares you (or learning vim, for that matter), solutions like MacVIM and GVIM provide a nice GUI interface, and use many of the system commands for copy, paste, etc.
EDIT: Adding ROS tags to your OmniCppComplete
To use OmniCppComplete with ROS, you have to generate a set of tags for the ROS stacks. There are probably better ways of doing this, but I was successful with find and grep.
First, generate a list of files that you want to generate tags from:
find /opt/ros/diamondback/stacks | grep -E '*/include/*/.*\.(h|hpp)' > /tmp/ros.filelist
Then use ctags to generate a tags database from this list:
ctags --sort=foldcase --c++-kinds=+p --fields=+iaS --extra=+q -f /tmp/ros.tags -L /tmp/ros.filelist
Once you have done this, you can move your tags file into your ~/.vim directory
mv /tmp/ros.filelist ~/.vim/tags/ros
And edit your ~/.vimrc file accordingly
set tags+=~/.vim/tags/ros
" OmniCppComplete settings to be tweaked
let OmniCpp_NamespaceSearch=1
let OmniCpp_GlobalScopeSearch=1
let OmniCpp_ShowAccess=1
let OmniCpp_MayCompleteDot=1
let OmniCpp_MayCompleteArrow=1
let OmniCpp_MayCompleteScope=1
let OmniCpp_DefaultNamespaces=["std","_GLIBCXX_STD"]
" Hotkey to generate tags for you current project
map <F5> :!/usr/bin/ctags -R --c++-kinds=+p --fields=+iaS --extra=+q .<cr>
Hope this helps.
4 | Just saw the other question, better to answer there. |
I know that you specifically leave out vim and emacs in your consideration here, but I have to say, a well-tuned VIM install will do just about anything that you want.
I have a few plugins of choice for VIM:
NerdTree: Brings up a split pane with your current working directory contents. Navigating using the same VIM keys, and allows you to change directory, files, move, copy, and most other filesystem operations.
Ctags: Most people who use UNIX are probably versed with Ctags, but it bears repeating. Generates a list of "tags" such as functions, classes, and variables. This can then be accessed in a split-pane on VIM. Python and C(++) compatible.
Yankring: Provides a buffer of previously copied text. Wonderful for keeping track of multiple copy-pastes as well as delete history.
The benefit of using VIM, in my opinion, is that I am frequently connecting to my robot over an ssh connection, and often don't want a full-blown IDE. When I am working in a terminal, I can open Vim right there, without switching back to an IDE. Vim is also common (in one form or another) on many, many systems (except for Ubuntu by default, for some reason). Vim provides me the power of an IDE without the weight of something like Eclipse.
Also, if the whole texty-console thing scares you (or learning vim, for that matter), solutions like MacVIM and GVIM provide a nice GUI interface, and use many of the system commands for copy, paste, etc.
EDIT: Adding ROS tags to your OmniCppComplete
To use OmniCppComplete with ROS, you have to generate a set of tags for the ROS stacks. There are probably better ways of doing this, but I was successful with find and grep.
First, generate a list of files that you want to generate tags from:
find /opt/ros/diamondback/stacks | grep -E '*/include/*/.*\.(h|hpp)' > /tmp/ros.filelist
Then use ctags to generate a tags database from this list:
ctags --sort=foldcase --c++-kinds=+p --fields=+iaS --extra=+q -f /tmp/ros.tags -L /tmp/ros.filelist
Once you have done this, you can move your tags file into your ~/.vim directory
mv /tmp/ros.filelist ~/.vim/tags/ros
And edit your ~/.vimrc file accordingly
set tags+=~/.vim/tags/ros
" OmniCppComplete settings to be tweaked
let OmniCpp_NamespaceSearch=1
let OmniCpp_GlobalScopeSearch=1
let OmniCpp_ShowAccess=1
let OmniCpp_MayCompleteDot=1
let OmniCpp_MayCompleteArrow=1
let OmniCpp_MayCompleteScope=1
let OmniCpp_DefaultNamespaces=["std","_GLIBCXX_STD"]
" Hotkey to generate tags for you current project
map <F5> :!/usr/bin/ctags -R --c++-kinds=+p --fields=+iaS --extra=+q .<cr>
Hope this helps.
OmniCppComplete Answers: Vim Code Complete Under ROS