IDEs vs editors

Started by
56 comments, last by jacmoe 8 years, 10 months ago

I'm primarily a Linux user who's been using vim for years, but when I started using Eclipse and then IntelliJ to develop for Android I realised how powerful an IDE can be. Fortunately most IDEs have decent vi emulation modes or plugins, otherwise I'm sure I'd find vim more productive overall. But for C++ I've come back to the vim fold, taking some time to study more of its features I was missing out on and getting used to the way it works with multiple "windows" (ie divisions within one GUI window), and especially setting up the youcompleteme plugin.

A lot of this is down to disappointment with XCode when I got a Mac. Most of the refactoring functionality isn't available for C++, I suppose it only works for Objective C or Swift. When using autocomplete on function calls it inserts arguments in non-valid C/C++ (Objective C again?) and has me fighting with it, although that could partly be down to a conflict with the XVim plugin. And there's no hint of being able to suggest corrections for errors like you get with the Java IDEs above.

A lot of this can be down to Java being more amenable than C++ to auto-detecting what you want to write, but I was wondering how MSVC compares. My experience of it is limited to checking whether some code I'd written on Linux would build with MSVC and run on Windows. That was before they freed up the full version, so I couldn't install a vi plugin and kept editing to a minimum. But I got the impression that, like XCode, it wasn't very flexible about coding style etc. Is it better than XCode for auto-completion and refactoring etc of C++? Does it only do those things as well as the Java IDEs if you're writing C#?

Vim's main weakness is its "QuickFix" list for jumping to compile-time errors; C++ can generate monster reports which are nigh impossible to follow in vim. But I only recently discovered the :copen command which I'm sure will help a lot. Having youcompleteme highlight most errors before I compile is a huge help too. But some errors can't easily be detected until the full build process due to template instantiation, and those tend to be the biggest monsters.

Advertisement

Every professional games job I've had has used Visual Studio and the Visual Assist (VAX) plugin for better C++ features. Visual Studio itself is ok at code completion, refactoring and exploration in C++, but it's amazing at it with VAX's help.

VAX has actually helped me get used to writing readable code with long, descriptive variable names, as it's very good at guessing what you're trying to type and autocompleting when prompted to. e.g. instead of DoComplexFrobnication2(), I can type barely enough to narrow down the ambiguity to that one name, such as: dofro2[enter].

I also feel lost without it now when trying to navigate code -- alt+G is go-to-symbol (similar to VS's default F12, but usually smarter), alt+O lets you open any file quickly (like "everything" below), alt+S lets you go to any symbol quickly, alt+R quickly renames symbols, "find references" lets you find who calls/uses which functions/variables, etc...

Occasionally I see coworkers using a vim plugin, but I'm personally not a vim user and just stick with the regular IDE + VAX functionality, plus usually one of the scroll bar plugins and a static code analysis plugin. VS has some fancy macro functionality that vim users would probably love, but I don't make much use of that either.

To enhance productivity in Windows itself, I recommend a console/shell wrapper like conemu and very highly recommend everything. I bind them to easy hotkeys like Win+~ and Ctrl+~ so that I can instantly get access to a shell or any file.

If you are using KDE, then I recommend KDevelop. That is simply the best IDE for C++ IMO.

Visual Studio 2013 has made a lot of improvements with regards to C++ so I am not as frustrated with it when working in Windows, even though I tend to favor QtCreator more due to a snazzier interface.

I haven't tried Visual Studio 2015 so I don't know if the trend towards better support for C++ continues..

The KDevelop team has shown the newest KDevelop running on Windows, and I really hope that it happens soon :)

It should have happened by March 2015 (now) but there are always delays in software-land..

When that happens, I think I've found the one IDE to rule them all (out).

I am an Emacs user myself, but switched to Sublime a while ago when I grew tired of being stuck in the configuration mire - I really wish VS had a sublime editor emulation mode..

Too many projects; too much time

Resharper for C++ just got released:

It should really give VAX a serious amount of competition from what I've heard/seen: https://www.jetbrains.com/resharper-cpp/?fromMenu

Still, KDevelop really has most of these features "out of the box"..

But since it is not available for Windows, that is a moot point, isn't it?

<edit>

If CLion was free, I'd probably use that. Despite my non-love for Java based IDEs..

If really is an awesome IDE.

</edit>

Too many projects; too much time

A lot of this is down to disappointment with XCode when I got a Mac. Most of the refactoring functionality isn't available for C++, I suppose it only works for Objective C or Swift. When using autocomplete on function calls it inserts arguments in non-valid C/C++ (Objective C again?) and has me fighting with it, although that could partly be down to a conflict with the XVim plugin. And there's no hint of being able to suggest corrections for errors like you get with the Java IDEs above.

XCode is not the most fabulous IDE, and especially not for C++. As you correctly surmise, most of the advanced functionality is only available for Objective-C and/or Swift.

I will mention that the same is true of Eclipse - although it has extensions providing support for C/C++, most of the advanced features such as refactoring and call-graph generation are only available for Java.

If you are developing in C++, then the gold standard is Visual Studio + plugins, without a doubt. If you aren't on Windows, then it's worth looking into QT Creator, as despite being a tad QT-centric, it is a very capable C++ IDE.

Personally, I've programmed in C++ long enough not to really need the IDE support anymore, and I'm just as inclined to use an editor like Sublime Text when working on Linux, rather than get used to an off-brand IDE. Your own mileage may vary considerably on this point.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

I've looked at KDevelop, QtCreator and Kate, but not used them very extensively. They're pretty good, I think I liked KDevelop best, but ultimately I prefer vim and editing CMakeLists.txt by hand (I used to use automake/autoconf but they're very inefficient). I like the way they're based around the embeddable text editing component, kate, which saves them a lot of reinventing of the wheel (including vi emulation). But I was quite surprised, given that, how many differences there were between them in areas such as quirks in the vi emulation. It's as if they're all using different versions of the kate library, which shouldn't happen with Linux, where shared libraries really are shared.

@jacmoe, QtCreator is available for Windows, so you might want to try that, but I don't know whether some of the features besides text editing are different from KDevelop's and that's what you miss.

Code::Blocks is supposed to be good too, but AFAIK it has no credible vi emulation, so it isn't worth investigating for me.

I am using QtCreator on Windows. smile.png

It is great, but I wish it had better CMake support.

It does have VIM emu mode, but I haven't tried it myself.

I don't use KDevelop projects on Linux, but instead work with the CMake scripts directly. Not surprisingly, KDevelop's CMake support is top-notch.

What I miss from KDevelop is the excellent CMake support as QtCreator often fails to deliver 'intelli-sense' when it's not using qmake projects..

Too many projects; too much time

But since it is not available for Windows, that is a moot point, isn't it?

That may only be a short-lived problem...

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

That may only be a short-lived problem...

Yes. I want that! biggrin.png
I saw that, and it is why I said that they have it in the works.
However, the winkde project seems to be pretty dead..
But, KDevelop on Windows would really be a thing of great enjoyment.tongue.png

Too many projects; too much time

For me the big win of an IDE is the integration. I've really tried with alternatives, but the integrated debugging features in MSVS just win hands-down, and nothing I've seen comes close in terms of providing a smooth and satisfying workflow.

Code editing features are just the icing on the cake. Unfortunately a lot of people, when dismissing IDEs, focus excessively on these and can seem to ignore the "I" in "IDE". That aside, the autocomplete in VS 2013 is really quite good these days, and the formatting options can be tuned to support most common styles.

Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls.

This topic is closed to new replies.

Advertisement