4 ms·
For C/C++/etc., there's all the suggestions you can eat on this page: http://tuhdo.github.io/c-ide.html http://tuhdo.github.io/c-ide.html For code completion,
by to3m 12y ago
For C/C++/etc., there's all the suggestions you can eat on this page: http://tuhdo.github.io/c-ide.html http://tuhdo.github.io/c-ide.html
For code completion, I had decent success with company-mode and its clang backend. This was a good return on time invested as it took all of about 5 minutes to set up and worked immediately on both Linux and Mac OS X (only requirement is clang-3.something, I think - apparently works on Windows too, albeit unsupported). Initially I found it a bit slow, but after switching off the while-you-type completions I became much happier.
More recently I've started using rtags (https://github.com/Andersbakken/rtags https://github.com/Andersbakken/rtags) for code browsing. This was a bit tricker to set up, as I had to build my own copy of clang and llvm (rtags needs a more recent copy than company-mode so the one from the Linux package manager wasn't good enough). Luckily this wasn't too hard - the official instructions are perfectly clear - and it was relatively plain sailing from then on.
Compared to Visual Studio or Xcode the results overall are inferior. The browsing or completion fails more often than VS/Xcode, even with system symbols, for reasons I have yet to investigate, and of course it's far from plug-and-play, particularly in terms of automatically getting the right header paths for the current project. But it's proving workable, and is a huge improvement over ctags, particularly for C++.
- tuhdo 12y agoAt least for C, with GNU Global I can jump around Linux Kernel effortlessly, while I put it into VS and VS just hanged. For C++, well hopefully we have some new language to replace it in the future. But at least for jumping to symbol definitions/references, it shouldn't be a problem with GNU Global. For code completion, you can still use `company-gtags` to get completion symbols in your project. It's really simple. I know it's not really intelligent (i.e. only show completion candidates in current namespace), but instead throw you everything, but it's practical enough.
- to3m 12y agoContext sensitivity is really important for C++, I've found, both for navigation and completion. C++ code uses struct/class members a lot, both functions and variables, and it's common for member functions to share names. That's how the virtual mechanism works, of course, and it's also commonly used to make classes useful as template parameters. (For a long time, this kept me using Visual Studio+Visual Assist - which is OK - and Xcode - which is... mostly bearable - in preference to emacs. Everybody's different, but personally I get more value from good quality code completion and navigation than I do from emacs-quality text editing. Particularly true when I can load files into emacs if I need to do anything particularly advanced (mainly keyboard macro stuff or fancy elisp search/replace). Fortunately rtags + company mode have shuffled the tradeoffs around a bit, so I'm pretty comfortable with using emacs all the time now.) Probably easier to get away without this stuff in C code, though personally I'd probably still get annoyed by the lack of intelligence in completing names of struct members.
- tuhdo 12y agoYou can have decent smart completion in C++ like this: http://tuhdo.github.io/static/c-ide/semantic-boost-demo.gif http://tuhdo.github.io/static/c-ide/semantic-boost-demo.gif Semantic is the equivalent to Intellisense in Visual Studio, though it's less smart on C++ code since C++ moves fast wiht its standard. > Probably easier to get away without this stuff in C code, though personally I'd probably still get annoyed by the lack of intelligence in completing names of struct members. Semantic or company-clang can give you code completion of struct members, and even nested struct.