3

I'm working on a project in C++ with and the ROS Catkin compiler system (Ubuntu). Its my first real project with ROS and I would to keep the setup simple (as the code itself will be hard enough).

Preferably I would like to just use Sublime to edit the code, but it has no c++ intellisense (already found a linter and formater plugin). I also tried Eclipse, but there the intellisense seems to not work unless I set up a whole project.

Does anyone know a simple setup for c++ intellisense on Ubuntu (using Sublime/Eclipse or something else)? I'd really love to have it as it allows to naturally explore new libraries without the need to open the documentation for. ever. new. class.

Cœur
  • 37,241
  • 25
  • 195
  • 267
Gregor A. Lamche
  • 402
  • 2
  • 5
  • 18
  • Not free (30 days evaluation): CLion from Jetbrains works with CMake. see also http://stackoverflow.com/questions/33172132/setting-up-ros-package-in-clion – stefaanv May 12 '17 at 08:01
  • Tried CLion a month ago and was not impressed. In any case the evaluation period expired 8 days ago. >.> Thanks anyway. – Gregor A. Lamche May 12 '17 at 08:09
  • 1
    Hey, shameless plug here, but do give a try to EasyClangComplete within Sublime Text 3. I have written this plugin to work with cmake out of the box. There is a very small change you need to make to run it with ROS: you need to set the cmake prefix path correctly and then everything works out of the box. I use it every day with ROS and implemented it so that it can be used in that way. – niosus Apr 18 '18 at 22:24

1 Answers1

1

This is the plugin I use for atom text: https://atom.io/packages/autocomplete-clang I believe it exists for sublime as well: https://packagecontrol.io/packages/ClangAutoComplete

Eclipse has a C++ IDE version, so use that if you want to use eclipse: http://www.eclipse.org/downloads/packages/eclipse-ide-cc-developers/keplersr2

And also, if you don't mind IDEs you should check out QTCreator and Kdevel, the first I've noticed to be one of the most used IDEs for people that don't just use vim or emacs. Kdevel I've used a bit and it has some interesting features, though some things might be lacking. In both cases there are some speed problems with autocompletion (wait times of 100-500ms) and code highlighting (sometimes it breaks a bit and highlights the wrong line or doesn't highlight at all, but that's very rare)

Another alternative that people might mention is CLion, which is from Jetbrains, but its closed-source, not well supported and whilst it might look nicer than QTcreator it has more or less the same features but is much more resource-heavy and laggy, so I'd pass on that.

Also, most of the "old guard" seem to swear by vim and/or emcas and if you have a lot of time on your hands you could check out a guide for setting up one of those as a C++ text editor, they both have very mature plugin systems and whilst they might be harder to get into they might also give you more freedom and more interesting plugins.

George
  • 3,521
  • 4
  • 30
  • 75