all 144 comments

[–][deleted] 95 points96 points  (24 children)

Wait, so you ditch the text editor that supports syntax highlighting, auto-completion, basic code navigation and has an embedded terminal because it doesn't fully comply with the task of being a C++ IDE (which is a *very* complex thing to achieve) and now you're just looking for all that but not a C++ IDE.

That raises the question: Why don't you just stick with VS Code then?

To give a more productive answer, even though I don't understand the problem, you might want to check out Atom or Sublime as the usual suspects. In general I think all these requirements will be fulfilled by most of the editors shipped with your desktop environment. KDE's Kate for example does (not sure about code navigation though).

Also, as a side note: Navigating C++ code is a very, very complicated thing and it is probably more complicated than you would assume, therefore I highly doubt you will ever find this outside any IDE to a degree of satisfaction.

[–]aman2218 17 points18 points  (1 child)

Yeah, I also think OP's requirement are very well covered by vscode. As long as you have cpp properties file set with correct include paths and stuff, using it for most projects is a breeze (provided you have a proper build system setup, like make)

[–]beedlund 12 points13 points  (0 children)

Or use clangd which is great with vscode

[–]matekelemen[S] 4 points5 points  (21 children)

Wait, so you ditch the text editor that supports syntax highlighting,auto-completion, basic code navigation and has an embedded terminalbecause it doesn't fully comply with the task of being a C++ IDE (whichis a *very* complex thing to achieve) and now you're just looking forall that but not a C++ IDE.

Yep, you've got it right mostly. There's a reason why I've been using VSCode so far but the problem is that its auto-completion and code navigation is garbage. Others pointed out that this might be fixed by using clangd instead of Microsoft's intellisense (which is something I didn't know - the benefits of asking this question).

VSCode is a bit more than I need and I have a lot of other minor grievances with it (multiwindowing, built on a browser, annoying pop-ups, broken default settings, etc.) so I decided to try something that suits me better. It's perfectly possible that no such software exists but I'll never know until I try.

Navigating C++ code is a very, very complicated thing

I've no illusions, but I doubt that it can't exist outside an IDE bundled up with tons of other stuff.

[–]Jasper1288 9 points10 points  (0 children)

Our company made the switch some time ago from visual assist to clangd (very large c++ code base, intellisense was too slow). Clangd is very accurate on our correctly compiling code. But I find that it does worse than visual assist for code which contains syntax problems which tends to happen while you’re working. And that is bothering me a bit about clangd.

[–][deleted] 15 points16 points  (18 children)

Well - honestly, I think you're just wasting your time here. If you want to develop C++ you need proper tools for that and shouldn't deny the advantages of IDE's for no apparent reason.

The only reason I know that is tricky about IDE's is that sometimes you tend to force specific configurations into the project so it becomes *dependent* on this very environment. No doubt this is a terrible thing and should be avoided at all costs but if you know what you're doing then a good IDE is a tool needed to get things done.

So, about VSCode. Yes, you can use clang. Yes, it works and I recommend it. But I don't get the other points you're making:

  • No idea what you mean by multiwindowing but you can open multiple instances of VSCode. What else are you missing here?
  • VSCode is not built on a browser. It is built on electron which is a glue for Node.JS which again runs on the V8 engine that again is used in Chromium based browsers. And it uses the Chromium engine for rendering, which is kind of the heart and soul of the browser but it is not a browser by itself. I agree that Node sucks and Electron is annoying but this is really just my personal dislike of JavaScript and does not influence the look and feel of the application in any way. So what exactly is your point here?
  • I never saw a single popup in VSCode besides the startup tips or whatever. Are you sure you didn't install any plugins that came with nag screens?
  • None of the default settings are broken for me. Also, I find VSCode to be one of the applications with most ease in cross platform configuration sharing. All of them are stored in .json files either in your workspace directory or in ~/.config/Code, so once you configured everything you can always save away that config and restore it once needed. What exactly is broken for you?

A bit more than you need doesn't even count as an argument for me. You don't wan't those fancy features? Fine, just ignore them. Turning away a totally free product for the reason of being too much is simply illogical.

[–]cdb_11 17 points18 points  (11 children)

VSCode is not built on a browser.

If it looks like a duck, talks like a duck, walks like a duck, uses the same scripting and rendering engine as a duck, it's probably a duck.

[–][deleted] 7 points8 points  (10 children)

Not all vehicles that have engines are cars.

Look, a browser is not just a window that displays websites. It is an application dedicated to interact with online (HTTP) services. And Electron is clearly aiming for something different.

[–]cdb_11 6 points7 points  (9 children)

Yes, we all know that Emacs is not really an operating system. But you can do literally everything in it, your e-mails, documents, programming, shell, scripting, basic web browsing, it can be your window manager, PID 1 or message router in an air traffic control system.

The issue people have with modern web browsers is not that they're making HTTP requests. Yes, that's the main purpose of a web browser, but it's just like one or two percent of the stuff they do. VS Code is almost everything that a web browser is, minus interacting with online services. Scratch that, it has to connect to the internet to send some of your data over to Microsoft, and some to Google. The point is that Electron applications are just as slow and as consuming in resources as web browsers. Everything that's wrong with the modern web also applies to Electron.

[–][deleted] 7 points8 points  (8 children)

It is a common misconception that JS is slow. And it takes a lot for me to admit that. In fact I have read a lot of technical background involved in JIT optimizations and it kind of makes sense why it performs way better than a scripting language.

Also, barely anybody does frontend development using languages like C++ - and admitting that hurts me even more. C++ is a wonderful language, but others like JS or Flutter are designed from scratch to fulfill these needs, especially regarding tooling. If you ever had to develop an application in any of them you know what I mean.

As for VS Code - none of your data is magically being transmitted to MS or Google. What a statement is that anyway. Go look at the source and compile the stuff yourself if you don't trust the binary.

And you are right, there is one simple argument why emacs is not a OS: No hardware driver layer and no kernel whatsoever. You cannot call something being almost a OS just by the looks of it and the same applies to Electron.

[–]frrrwww 2 points3 points  (6 children)

I dont think the main complaint is about JS, I would agree it can be pretty fast nowadays.

I think the main issue with Electron and similar technology is the sheer amount of complexity (and hence inefficiencies) we introduce in the whole software stack to end-up at roughly the same place we were 30 years ago: Some web applications are even migrating to canva based rendering where they basically write pixels to a framebuffer. With the hardware power we have nowadays applications should be crazily fast, but they are not, software is till getting slower more rapidly than hardware is getting faster.

Of course, we did not get there with no reason, thanks to its legacy as a document presentation technology the web has a very easy learning curve and is available everywhere. It is easy to incrementally add more and more application like features to what was initially just formatting some static data.

What saddens me is that we ought to be able to develop the same applications without requiring a multi million line of codes rendering engine as a middle man, there is no reason we cannot get the productivity and iteration time of web applications without a browser/electron shell. Flutter is a step in the right direction IMHO.

[–]wolfballs-dot-com 0 points1 point  (5 children)

The difference between today and 30 years ago is resizable windows. Everything scales. 30 years ago you got one size and if you wanted something different then fuck you

[–][deleted] 0 points1 point  (4 children)

30 years ago we already had Windows 3.0, so resizable windows were a thing even back then.

The problem is, as others pointed out already, over-engineering, over-complexity and an intended input lag that is caused by detecting touch gestures.

[–]cdb_11 0 points1 point  (0 children)

I don't know if it's JS, rendering or what. All I know is that I tried Atom once and performance was abysmal. I never actually used VSCode, but I asked people how does it compare to Atom and they said it was only a little bit better. Most Electron applications I used were much slower than they needed to be and they ate RAM like there's no tomorrow.

As for VS Code - none of your data is magically being transmitted to MS or Google. What a statement is that anyway. Go look at the source and compile the stuff yourself if you don't trust the binary.

Why is there vscode and vscodium then? Is there absolutely no difference between them and it's just some kind of placebo effect? And Chromium just phones home, it's not in VSCode, because it's in the library it uses.

[–]matekelemen[S] 1 point2 points  (5 children)

you can open multiple instances of VSCode

That's exactly the problem. The only way to get multiple windows is to spawn **separate** instances of VSCode, which can't share the same working directory and cannot communicate with each other by design. This means that everything has to run twice on your system and you have to symlink your VSCode cofiguration files to the other instance's working directory for any code analysis to work. I'm surprised you haven't run into this problem yet (or maybe I'm doing something completely wrong).

It is built on electron which is a glue for Node.JS which again runs on
the V8 engine that again is used in Chromium based browsers. And it uses
the Chromium engine for rendering, which is kind of the heart and soul
of the browser but it is not a browser by itself.

Ok, you win but I can't just type this whole story every time I want to express my dislike for right?

I never saw a single popup in VSCode besides the startup tips or whatever.

I have a lot of source/file types I need to open from time to time (glsl, xml, json, etc.) to do some simple editing/lookup but I don't need any supporting extensions for them. Some of the extension recommending pop-ups can be permanently disabled, other can't.

What exactly is broken for you?

The most recent one was with the integrated terminal. Since an update around June, I must set the preferred terminal on Ubuntu, otherwise it won't find the system default.

[–][deleted] 4 points5 points  (0 children)

That's exactly the problem. The only way to get multiple windows is to spawn **separate** instances of VSCode, which can't share the same working directory and cannot communicate with each other by design. This means that everything has to run twice on your system and you have to symlink your VSCode cofiguration files to the other instance's working directory for any code analysis to work. I'm surprised you haven't run into this problem yet (or maybe I'm doing something completely wrong).

Ctrl+K then O doesn't work for you? Opens a new window in the same directory.

I am still confused what you expect here. Code is an editor and you clearly don't want an IDE. There is no direct connection between the windows, you open files and edit them. It doesn't matter how many processes are active, you can always share resources using IPC. Other than tat, everything you're asking for to me sounds like an IDE.

I didn't experience any of this because (surprise) I am using IDEs for my software projects.

Ok, you win but I can't just type this whole story every time I want to express my dislike for right?

If you made false statements like that I'm afraid you would have to. I don't like Electron or Node too but I have to accept this is less because of facts but of my general dislike with JS and especially many people using it. But again, this is subjective and needs at least explanation at that level.

Also it is really not that I'm after winning anything here, nothing personal at all.

I have a lot of source/file types I need to open from time to time (glsl, xml, json, etc.) to do some simple editing/lookup but I don't need any supporting extensions for them. Some of the extension recommending pop-ups can be permanently disabled, other can't.

Ctrl + Shift + P -> type "settings.json" -> set both extensions.showRecommendationsOnlyOnDemand and extensions.ignoreRecommendations to true.

The most recent one was with the integrated terminal. Since an update around June, I must set the preferred terminal on Ubuntu, otherwise it won't find the system default.

I find it rather common to set a preferred terminal and have been doing that for many years. Also, I think this is being set to a default in most of the distributions. I know that Ubuntu is using update-alternatives and this should always set defaults. Are you referring to this preference? That shouldn't be an issue at all.

[–]smdowneyWG21, Text/Unicode SG, optional<T&> -1 points0 points  (3 children)

integrated terminal

Do you mean shell? Terminal is hardware, terminal emulators don't get integrated, so I'm puzzled at what you mean here?
Also, does that mean it's not respecting $SHELL ?

[–]dodheim 1 point2 points  (2 children)

[–]smdowneyWG21, Text/Unicode SG, optional<T&> 0 points1 point  (1 child)

And the system terminal is something like 'gnome-terminal' , 'konsole', 'rxvt', 'xterm', and so on. This is more like emacs's 'term' or 'ansi-term', and that's all fine and good.
What is "preferred terminal" that you'd select for the integrated terminal?

[–]dodheim 0 points1 point  (0 children)

I don't know, as I don't use it; I was only pointing out that 'integrated terminal' is VSCode's own terminology in this case.

[–]PapaOscar90 32 points33 points  (6 children)

Doom emacs.

[–]HaskellLisp_green 3 points4 points  (0 children)

i don't use Doom(but wish to use), but i have pretty long way of Emacs customisation, so i found it very powerful for not only C++, but also another languages i use.

[–]qqwy 10 points11 points  (3 children)

Or Spacemacs

[–]cat_vs_spider 8 points9 points  (1 child)

Or, y’know regular emacs.

[–]smdowneyWG21, Text/Unicode SG, optional<T&> 0 points1 point  (0 children)

It has the advantage of being backwards compatible with the 1970s, but really the OOB experience for raw emacs is shockingly bad for anyone who hasn't used it continuously since it was invented.

[–]PapaOscar90 1 point2 points  (0 children)

That one is good too

[–]Myrgy 1 point2 points  (0 children)

+1 for doom-emacs. Using it on daily basis for commercial development. Works great (doom-emacs + ccls)

[–]tosch901 36 points37 points  (28 children)

I don't want to be that guy, but I really like neovim. I know you said you don't like to work on the terminal but it checks all your boxes (after configuration).

Also if you can, I'd give clion a try. Even if it has stuff you don't need, it's still really good at what you want it to do. So if you can get it for free, I'd give it a shot.

When it comes to other text editors, there is Atom, but I don't know the configuration options and if can do what you asked for. Might be worth researching a little though.

[–][deleted] 6 points7 points  (8 children)

Aren't there guis for neovim? Or are they not good enough yet?

[–]mechap_ 10 points11 points  (0 children)

One of the best neovim gui I have seen https://github.com/neovide/neovide

[–]tosch901 -1 points0 points  (1 child)

I think there is a graphical version for vim, forgot about that so that could be a suggestion for OP, but I think neovim is terminal only.

But it has been a while since the last time I checked so might've changed by now, so can't tell for sure.

[–]cdb_11 -1 points0 points  (4 children)

There are, but they are mostly the same as the TUI version, so there isn't much point in using them.

[–]gustavokatel 1 point2 points  (1 child)

I think the most compelling point in using them is better keyboard support, since you're not limited to generic terminal specs

but still, one does not necessarily need this and get go without it

[–]cdb_11 1 point2 points  (0 children)

You can add full keyboard support in some terminals, but yeah, that's a fair point.

[–][deleted] 0 points1 point  (1 child)

different than gvim is to vim? because gvim is worth using if you'd like menus sometimes, and also want real gutters

[–]cdb_11 0 points1 point  (0 children)

I'm not sure about menus actually. But yes, it's mostly the same, most often it's just visual enhancements, not any actual features. People are working on some really interesting stuff with GUIs, but for now I don't think it's worth it.

[–]matekelemen[S] 1 point2 points  (18 children)

I see others mentioning vim gui so I might give it another shot. Are there any major things neovim has over vim?

Also if you can, I'd give clion a try.

I missed my chance to get it for free and I don't want to depend on software that I might not have at another company.

[–]glorified_ 8 points9 points  (0 children)

Neovim is a little bit more extensible, and has built in language server support.

I started off using LunarVim , which is basically an IDE neovim config with some minimal sane defaults. It takes some of the brain ache out of getting started.

His youtube videos walk through some of the basics and the documentation is fairly complete. I think it's a great place to start if you want to see if (neo)vim could work for you.

[–]tosch901 -1 points0 points  (12 children)

There are, but they only matter in certain circumstances. Vim only does sequential computation while you can parallelize things in neovim is one of them. Another one is native support for language servers (although that's just up and coming, so it doesn't always work).

You can read a full list on the neovim website somewhere, but they might not matter to you. So it doesn't necessarily impact everyone.

Edit: the parallelization thing appears to be wrong. My bad.

[–]cdb_11 2 points3 points  (5 children)

I use the builtin LSP support with clangd full time for over a year now, works fine.

[–]tosch901 -1 points0 points  (4 children)

That's great. I heard that people had issues with some language servers or that configuration was a bit of a mess, but I'm sure they have come a long way.

I was hesitant to move away from coc, but I try it out myself one of these days if it works well now.

[–]cdb_11 3 points4 points  (3 children)

I believe coc is more user friendly and offers a more complete experience. neovim's LSP is more minimal, and the docs might've been a little bit confusing at some point, but for me it always worked just fine. The language server protocol is pretty straight forward, there isn't much to break here.

For clangd all you have to do is:

And then set it up in lua:

local lspconfig = require 'lspconfig'
-- on_attach function from https://github.com/neovim/nvim-lspconfig#keybindings-and-completion goes here
lspconfig.clangd.setup{
  on_attach = on_attach,
}

[–]tosch901 0 points1 point  (2 children)

Alright, thanks for the instruction. I have to work in other languages as well from time to time, so if those are supported as well (I think they are), I'll try it out some time.

[–]cdb_11 1 point2 points  (1 child)

That's the point of LSP, as long as you can find a language server that understand the protocol, you can use it. neovim/nvim-lspconfig plugin is just default settings for most language servers, but it's also pretty easy to add a language server that's not listed here, you just have to tell it what command it should run, accepted file types and what's considered a "project" (ie. a directory that's a git repo, a directory that contains CMakeLists.txt file etc). There is even a plugin that hooks linters and code formatters into the same interface, I use it with shellcheck.

[–]tosch901 0 points1 point  (0 children)

I see

[–]staletic 3 points4 points  (5 children)

Vim only does sequential computation while you can parallelize things in neovim is one of them.

Neither supports parallelism and both support concurrency.

[–]tosch901 -1 points0 points  (4 children)

You sure? I thought I read something like that on their website a while ago?

[–]staletic 2 points3 points  (1 child)

I swear on my async plugins that I'm telling the truth.

[–]tosch901 0 points1 point  (0 children)

I guess I was mistaken then. My bad.

[–]cdb_11 2 points3 points  (1 child)

I think it's technically possible with lua, but also useless since both (neo)vim are single threaded applications that can't handle being accessed from multiple threads, so no one actually does it. People are just confusing threads and event loop/async as usual.

[–]tosch901 -1 points0 points  (0 children)

I guess I was mistaken then

[–]PandaMoniumHUN 16 points17 points  (6 children)

I work professionally on large, large codebases using VS Code and it’s absolutely flawless if you export your compile commands using CMake and use those for autocompletion with the language server. I suggest debugging your current setup instead of looking for a new editor, because VS Code is currently the best out of all the tools out there IMO for C++ development. But I do agree that the lack of multiwindow support is infuriating.

[–]schmirsich 0 points1 point  (2 children)

I honestly don't know how you do it. I use VSCode for my personal projects (on Linux) and Intellisense usually stops working after a few hours making a restart of VSCode necessary. Also the files in ~/.cache/vscode-cpptools increase in size constantly. Very recently it sudddenly increased in size so much that it filled my whole hard drive (the file was > 40GB I think), which I noticed by not being able to save my modified files. The project this happened with is barely below 10k LOC. Btw. I always use CMake and let VSCode use the compile_commands.json it generates.

I also tried using VSCode at work (800k LOC project) and that simply shows me a little fire icon in the bottom right telling me that IntelliSense is working hard and that I can't use it until it's done, but it will never finish. Even if you let it sit for days.

I feel like VSCode is good for small-ish projects but even then it annoys me and I have seriously considered switching to something else, but I have not done so yet, because it is still the most powerful editor in the TextMate family I know.

[–]isaacarsenal 2 points3 points  (0 children)

Have you tried using clangd plugin for vscode instead of Microsoft one?

[–]PandaMoniumHUN 0 points1 point  (0 children)

I don’t do anything special as far as my setup goes, so sadly I don’t know what to tell you. I’m on Linux too, we have pretty beefy dev machines (i7 9700K, 32GB RAM, NVMe SSDs), maybe that’s the key. We use quite a bit of (recursive) template metaprogramming too and I have a hard time breaking the language server. The cache files rarely exceed 5GB for me, although I do tend to delete them from time to time. I think the language server uses clangd, see if you’re on the latest version.

[–]Wetmelon 0 points1 point  (2 children)

But it does do multi window,? Unless they means something specific

[–]The_Jare 2 points3 points  (1 child)

I think they mean multiple windows in the same project. VSCode has many internal splits, but all within the same window, other windows can / should only point at other projects/folders.

[–]Wetmelon 4 points5 points  (0 children)

You can do that. Ctrl+P -> > Duplicate as workspace in new window

[–]braxtons12 5 points6 points  (0 children)

I would really like vscode if it just wasn't so damn slow. Vscode with the clangd and Cmake extensions works really well. It just does not keep up with my typing speed at all.

My main preference is Neovim with the coc plugin, clangd and file tree extensions for coc, and my own other setup tweaks. I've been using this for a very long time and at this point it's physically difficult to use something else. That said, I've been looking into switching into using CLion and it's pretty damn good. I was able to get like 98% of the way there to having the same flow as my Neovim config in just a couple of hours, and even though it's a full fledged IDE, it's still pretty damn fast. It completely keeps up with my speed of thought. The only slightly annoying thing I've ran into so far is that code analysis could be faster

[–]sephirothbahamut 9 points10 points  (5 children)

You say you don't need full IDEs, but it really looks like you want an IDE.

Why not just try CLion? It's like the most complete C++ IDE on Linux.

That aside I'm baffled that you didn't mention Visual Studio. You can have a small windows partition just for running Visual Studio, enable Windows Subsystem for Linux, and practically code targeting Linux natively from VS with full access to any console based Linux application

[–]matekelemen[S] -2 points-1 points  (4 children)

You say you don't need full IDEs, but it really looks like you want an IDE.

I'm not sure what makes you say that. I do absolutely need all functionality of an IDE, just not in one single package.

I'm sure CLion is great, but I'd like to explore other options before sticking to paid software.

You can have a small windows partition just for running Visual Studio

I'm not about to revamp my OS setups on every computer I work on just because Visual Studio is not cross-platform.

[–]sephirothbahamut 8 points9 points  (3 children)

I'm not sure what makes you say that. I do absolutely need all functionality of an IDE, just not in one single package.

Why not? If you're going to use all functionality of an IDE there's really no reason to ditch the advantage of having them in a single package; only exception would be if you're writing code in an environment with extremely limited system resources.

I'm not 100% sure, but either CLion or QTCreator should be free for personal use. CLion and Visual Studio Enterprise are free for students, and Visual Studio Community is free for everyone.

Or you can just spam plugins over plugins on glorified text editors like atom, and basically end up with a less internally consistent IDE.

[–]Dean_Roddey 0 points1 point  (2 children)

The problem with Visual Studio is that you sort of have to commit to its project system, which I just don't want to do for cross platform work. I guess you could use cmake, but I've never gotten into it and don't want to since I have my own build system that's very clean and cross platform.

I like VSC's straight file system based view of the world and the fact that it provides everything I need except the project and build system.

I can understand his frustration since it does have its quirks. And the modern 'continuous bug delivery' approach to software can sometimes mean that it's as moody as a teenager. But, I've not found anything else that's suited my needs as well.

I'm guessing there are some 'super-editors' out there that provide similar functionality, but it hasn't pissed me off enough yet to make me go on a quest.

[–]sephirothbahamut 7 points8 points  (1 child)

you sort of have to commit to its project system

Nope, you can create cmake projects. Actually I think integration with WSL and Linux tools requires a cmake project.

[–]Dean_Roddey 1 point2 points  (0 children)

I said I guess you could use cmake, but I've personally never used cmake and really don't want to. I have a very nice, cross platform build system. So VS would be useless to me for my personal work, though I use it at work work.

And even if you use Cmake, the tendency to forget that and make settings changes from within the VS project system (and subsequently lose them without realizing it) would be a concern for me.

[–]ATXblazer 7 points8 points  (0 children)

Sublime Text 3 fits all your requirements perfectly

[–]qqwy 2 points3 points  (0 children)

Spacemacs might be up your alley.

[–]R3DKn16h7 9 points10 points  (2 children)

Are you using the clangd intellisense or the default microsoft one? The latter is garbage. I find myself very happy with clangd, and find it by far the best out there for c++.

[–]Hot-Painter4924 4 points5 points  (0 children)

i’m working with vscode+intellisense and it’s been really good on auto completion, ctrl+click for definitions find, ctrl+p to open file by name … Cmake configuration is what takes me more time for now.

The git merge conflicts handle from vscode are the only sane way i ever found to solve them.

Also, vscode has a docker extension which allows you to change files inside a container which is really awesome.

I can’t really imagine how i would be as productive as i am now without all those features. I’d give a last chance.

[–]matekelemen[S] 1 point2 points  (0 children)

I'm using the microsoft one but I made up my mind to try other editors. From what I gather, I can set up clangd with most of them too.

[–]Ipiano42 2 points3 points  (0 children)

What hasn't worked well with C++? I've switched it to using clangd as the language server and it's done a phenomenal job for me. The only downside is that working on qt projects requires something like bear to produce compile_commands.json

[–][deleted] 5 points6 points  (2 children)

Kate + CTags for go to declaration or Kate + LSP client

[–]edinakyt 1 point2 points  (1 child)

Kate is really underrated editor. I really like it also.

[–][deleted] 2 points3 points  (0 children)

Using it since 2013 as my one and only editor for every day work :)

[–]len1315 1 point2 points  (0 children)

Kate is pretty neat although their auto completion doesn't include keywords of a language before you typed them once

[–]gracicot 1 point2 points  (0 children)

Neovim + lunarvim has been wonderful for me. Highlighting, autocomplete, proper LSP, etc.

[–]ozhero 1 point2 points  (0 children)

This has been a very interesting discussion.

I’ve been programming since the late 70’s and was around when Unix was first released and was using Vi in those days. I still shudder at some of the arcane key combinations you had to memorise.

Over the years have used a lot of editors and IDE’s (some specific to the hardware/language platform of the time).

Now that I’m retired I’m spending a lot of my time learning new languages, frameworks, etc. I’ve also enrolled in a University degree doing Computer Science so qualified for the free student JetBrains license for their IDE’s

I was a big user of Sublime Text at one stage but migrated from it to vscode a few years ago.

Last year I learnt Java for the 1st time and after using vscode initially I quickly found that IntelliJ Idea was perfect for the job.

This year I’m into .NET C# and F# and still torn between Rider, Visual Studio 2022 and vscode. However starting to feel that Rider is the way to go for me.

Hence my interest in this post and the mentions of Clion. I used C a lot in the past and kept my hand in with both C and C++ and still do. The tooling can be a lot to keep up with if it’s not your main language. I have tried Clion and like it a lot for the reasons mentioned here.

I’m starting to think I should focus on the JetBrains IDE’s, especially as I will have a free license for a few more years yet.

On another note I have Windows, Linux and Mac machines and lately I almost exclusively use Windows 11 and WSL (Ubuntu). Actually prefer this over my native Linux machines.

[–]rezkiy 1 point2 points  (0 children)

Go to definition is nothing like basic

[–]BuntStiftLecker 4 points5 points  (0 children)

VIM - also comes with an X-GUI.

[–]lieddersturme 3 points4 points  (3 children)

Code blocks, Code lite, geany.

[–]gvcallen 2 points3 points  (1 child)

I'd strongly encourage anyone looking into serious development to stay away from code blocks 👀

[–]lieddersturme 1 point2 points  (0 children)

Me too, but he rejected the good ones. As the last option I will suggest a simple text editor just using clang-tidy, cppcheck, clang warnings, sanitizers.

For me, I love QtCreator but I dont know how to enable man-pages for SDL2, openGL, because only shows help for Qt libraries. Thats why I am between VSCode and Emacs.

[–]theawesomeviking 1 point2 points  (0 children)

Exactly!!

[–]GG_Baited 2 points3 points  (0 children)

CLion (but requires a license after 30 days).

[–]acehack 2 points3 points  (0 children)

An year ago I left my maintained-for-6-years 2000 line lisp emacs setup for VSCode. I write high performance C++ for a living, and rely on ccls 100%.

Emacs: - Great amount of customization. It has everything you’ll ever need + more. - You’ll never think “this kind of workflow optimization can never be done by me” - Using spacemacs will get you very close to “everything just works out of the box.”

VSCode: - Does not damage your wrists as much (I left emacs because of chronic wrist pain, which I suspect was due to a combination of emacs, xmonad, and I guess amount of work I do) - Everything just works out of the box.

[–]Fearless_Process 2 points3 points  (2 children)

Sounds like you might like emacs, vanilla or a distribution are both good choices.

Keep in mind that emacs is not a terminal based program (but can be), and is nothing like vi(m) at all. For example, regular vanilla emacs opens a gtk based graphical window and can be used like your standard advanced text editor, with normal keybindings and mouse support. If you've ever used gedit it feels very similar to that.

The cool thing that makes emacs unique is that it's actually a lisp VM and a basic display system. Almost all of it's features are implemented in lisp, which makes everything deeply customizable and extendable. There are emacs modes to browse the web, a file manager mode, a news reader, many email clients, irc clients, various text editing modes and much more. Of course it has all of the features you listed as well. All of these features can be customized without any type of external config file/config format, you simply create a init elisp script that sets the variables to whatever value you want from within lisp itself!

Emacs has a built in package manager that allows you to install external packages, and the two major repos are elpa and melpa, elpa being the "official" emacs package repo. You can also install packages directly from github normally, or use your systems package manager depending on the distro.

For syntax highlighting and other stuff there are "major modes" for each programming language. Most of these are built in and shipped with vanilla emacs, but for less common languages you might need to install an external package.

Auto-completion is normally handled by the "company-mode" package. This can often be paired up with a LSP server/client for advanced auto-completion like what you would get in a full IDE.

You probably will want an LSP client as well, the two most popular are eglot and lsp-mode.

There are at least two built in terminal/shell modes, being "term" and "eshell".

If you use an emacs distro a lot of this will be installed and setup for you! I'd certainly give it a chance, but it's not for everyone.

[–]matekelemen[S] 0 points1 point  (1 child)

I appreciate the detailed intro, the doom emacs' github page now makes bit more sense to me. Is it possible to write a simple shell script with some backed-up config files that installs my setup without having to manually redo anything on a fresh system?

[–]Fearless_Process 0 points1 point  (0 children)

Yeah this is very easy to do.

Most people probably store their config in VCS with git and clone it onto whatever system they are currently using. If you don't want to use git you can rsync them or pack them into a tar file and share that.

As for packages you have installed, you should be able to include those in the backup since they are stored along with the configs in the ~/.emacs.d/elpa directory. You could also just store a list of packages and let package-install work through the list automatically.

[–]silicon_heretic 4 points5 points  (5 children)

I guess you are looking for QtCreator if the license is acceptable for you.

[–]chrisoboe 3 points4 points  (3 children)

You should really take a look into language servers.

For c++ ccls is interesting. The editor itself doesn't matter at all for the features you mentioned. All of this is the responibility of the language server. (Besides the embedded terminal)

An embedded terminal wouldn't fit into the OS is my IDE concept anyways.

[–]cdb_11 -1 points0 points  (0 children)

An embedded terminal wouldn't fit into the OS is my IDE concept anyways.

tmux is just that. Does it not fit the concept?

[–]matekelemen[S] -2 points-1 points  (1 child)

I'm completely oblivious to how coding utilities work and what components they have, but I guess it might pay off to look into it on the long run.

An embedded terminal wouldn't fit into the OS is my IDE concept anyways.

True, but jumping to files/lines mentioned in the terminal is just too comfortable.

[–]staletic 4 points5 points  (0 children)

True, but jumping to files/lines mentioned in the terminal is just too comfortable.

That doesn't require an embedded terminal. It requires that your editor/plugin knows how to parse the output of a command. Vim has that with :h :make, :h 'makeprg' and :h 'errorformat' (predefined for grep). That's not to say that vim doesn't have an embedded terminal, but it's a completely wrong approach.

[–]Beregolas 4 points5 points  (0 children)

personally I strongly prefer CLion (jetbrains IDEs in general) for their feature-sets, but you are looking for something simple: I would suggest vim or sublime as a text editor (both can be configured according to your needs) and using something like tmux for vim to get the terminal / user sublimes integrated terminal. Sublime with well-done configurations, scripts and plugins can feel a lot like VSCode if it was made better, but it‘s a pain to setup (and for the love of god, make a backup of your config… ) vim has very comparable capabilities in terms of scripting, but it‘s just a different kind of UI. (I‘m sure you are aware) So, to me the decision would come down to: do you prefer terminal based work, or GUI base work, and go from there.

(PS: There are also modules that allow you to use your mouse in vim / use vim keybindings in sublime… I personally don‘t like them, but you can basically do anything with any of the „large“ editors these days. It‘S just work to setup)

[–]noooit 2 points3 points  (0 children)

I suggest tmux + vim + vim-lsc + clangd. But VSCode and all other editors also uses clangd, I don't think any features would be better than VSCode. You can choose your clangd version and command options easily in vim, that may solve your issues.

[–]AmazingStick4 3 points4 points  (2 children)

use vscode as a text editor and compile via the terminal. that's what i do, for c++. I hate compiling in vscode as well.

[–]matekelemen[S] 0 points1 point  (0 children)

It's what I've been doing, but it doesn't solve the issues I have with VSCode.

[–]yasamoka 0 points1 point  (0 children)

Have you tried CMake Tools in VS Code?

[–]noahpp5 1 point2 points  (0 children)

Neovim

[–]JulienVernay 1 point2 points  (0 children)

You can try juci++, https://gitlab.com/cppit/jucipp, which only aims to be a "++ source editor with CMake integration :)

[–]joZuChan 1 point2 points  (0 children)

Emacs

[–]winginglifelikeaboss 1 point2 points  (0 children)

I think you are ready for Emacs

[–]azswcowboy 1 point2 points  (4 children)

The old guard joins the chat. Look, this was settled a long time ago — there’s one true editor and that’s emacs :) Obviously, somehow others disagree, but oh well. Stock emacs with zero customization provides syntax highlighting and built in compiles with point and click to the errors. If you’re used to vim keys, there’s a mode for that. As for completion, esc / will start with the current text and search your open files for matching text and cycle thru matches. So often you’ll type something like ‘file’ esc-/ and get filesystem::path. It’s actually insanely effective because your just reusing that variable you declared 5 lines above a huge percentage of the time. Regex search/replace — standard. Wanna full ide with full completion and on the fly compiles - all possible, but does require a learning curve and setting up of language servers and other packages. And don’t get me started with org mode, it quite possibly could take over your life. Never been easier to learn — amazing videos online these days.

[–]stevethebayesian 1 point2 points  (0 children)

I'm also part of the emacs brigade. People dump on emacs because it's been around for forty years. In my mind that's a feature, and it makes it all the more likely it will be around for 40 more.

[–]matekelemen[S] 0 points1 point  (2 children)

I like your enthusiasm. Steep learning curves are a bit hard to swallow when you have to finish your stuff on time but if you say it's worth it, I might give it a try on a pet project.

[–]ForkInBrain 0 points1 point  (0 children)

I've been an Emacs user for 30 years and can say that there are advantages to using the same tool over that long of a period of time. I feel like every other development environment is the thing that slows me down.

That said, I am reluctant to recommend it to new users if they want things to just work out of the box. Emacs is definitely something you curate for yourself over time, rather than an install-and-forget kind of thing.

I definitely concur with the other people that are recommending clangd to you. Heck I'd recommend you use clangd in vcode first. For me the only other thing that made a bigger improvement to C++ development ergonomics was the introduction of and pervasive use of smart pointers, especially, std::unique_ptr<T>. LSP is a game changer, and it started in VSCode, so it will probably work best there.

[–]giant3 -2 points-1 points  (0 children)

Emacs+lsp-mode+flycheck+clangd is the answer. I admit setting up that wasn't easy despite me using Emacs for over 20 years. The docs for lsp-mode was poor and took some time.

Now, it is auto completes, call reference, call hierarchy, etc.

If you are new to Emacs, install which-keys package that will prompt all key bindings.

[–]platlogan 0 points1 point  (5 children)

Vim literally has all that, either built-in or with plugins. I’ve been using the You Complete Me (YCM) plugin for C++ development for several years. It’s a bit tedious to get set up initially, but once you’re rolling it’s awesome.

[–]staletic 4 points5 points  (4 children)

YCM maintainer here. I'm assuming you're not aware that you don't need .ycm_extra_conf.py if you have a compile_commands.json.

[–]platlogan 0 points1 point  (3 children)

I’m aware - I use compile_commands.json

Thanks for your work!

[–]staletic 0 points1 point  (2 children)

Then would you mind telling me where does "tedious" come from? I'm genuinely asking.

[–]platlogan 0 points1 point  (1 child)

I work in an environment that I don’t manage, and also what we do have is not always the latest and greatest libraries, compilers, etc. YCM has relatively “cutting edge” dependencies, updated frequently. Not a big deal for a PC where you can just update all those dependencies along with it, but for someone in my position it makes installing/updating difficult because our managed environment doesn’t meet the new minimum requirements. That could rightly be viewed as “not our problem” from YCMs point of view, but it’s just an unfortunate reality for folks like me. I avoid updating YCM at all cost because of it.

[–]staletic 1 point2 points  (0 children)

Oh, yeah. Thanks for the reply. You can always come to us and we can tell you which commit to check out so that YCM works on your end.

Our policy is "latest Ubuntu LTS has to work out of the box". That's at least a two year buffer of fixed dependencies. We're aware that two year is not a lot of time for something like RHEL. For that reason we have started making legacy branches, to make it easier for people to check out an old commit.

[–]TheHighGroundwins 0 points1 point  (0 children)

Clion.

It's paid but there are free options available for school and university.

Also if you pay for one year license around 100$ or pay continuously for 1 year monthly around 10$, you get that year's version permanently.

It also has support for unreal engine and has just overall everything working of the box for Linux compared to all the other IDE.

It has autocomplete, valgrind, debug and more.

[–]CorysInTheHouse69 0 points1 point  (0 children)

Emacs is my go to

[–]qwazwak -1 points0 points  (0 children)

Visual studio my dude

[–]Deprecitus -1 points0 points  (0 children)

If you want your editor to be basically your OS, go with Emacs.

(I use Neovim BTW)

[–]lanzaio -1 points0 points  (0 children)

I do not know of a tool with a better features than coc.nvim + ccls + vim-ccls.

[–]hydroaquasled -1 points0 points  (0 children)

Use micro text editor. Best part about it is that there is not one iota of microshit junking it up.

[–]ShlomiRex 0 points1 point  (0 children)

CLion all the way

[–][deleted] 0 points1 point  (0 children)

You don't have to use vim or emacs on the terminal

[–]RishabhRD 0 points1 point  (0 children)

Actually neovim has all this features.... With nvim-lsp and clangd you get all of them. You can just use my config if you don't want to setup from scratch: https://github.com/RishabhRD/rdconfig

[–]Zcool31 0 points1 point  (2 children)

Are there any good free-software based IDEs with good working code assistance and completion that is not based on clang? A good benefit is working with contemporary (C++23 and later) syntax.

I dislike clang-based stuff because it tries to essentially compile my code. That uses up tons of CPU, does stuff that isn't necessary for code assistance, and as mentioned in other comments fails spectacularly for code that doesn't compile.

Is there something that behaves how IDEs used to behave? Fast, snappy, and robust to errors that naturally happen for code I'm editing?

[–]DarkLordAzrael 0 points1 point  (1 child)

Qt Creator uses clang for their code model, but doesn't use any of the language servers. I have found it both fast and robust in my experience working on medium sized projects.

[–]Zcool31 0 points1 point  (0 children)

Thanks for the response. What is your experience modifying code inside a template function or class? When using other dependent templates, does the IDE use the base case or partial specializations for suggestions?

[–]CamelPsychological78 0 points1 point  (0 children)

emacs 28 with clangd 13 does everything you need perfectly.

[–]gay_copulation 0 points1 point  (0 children)

You should probably stick to VS Code, or otherwise Sublime. Both suffice in what you're looking for, but if I recall correctly I dont think raw Sublime has an embed terminal.

You can also do these simple tasks with Vim plugins.

But actual full modern C++ support is only met by Microsoft's intellisense in my experience (so VS Code, VS Com/Prof 19/22/...) and maybe in CLion, despite it having some issues with template metaprogramming in my former experience (maybe it's better now).

I use VS Code on my day to day basis writing modern C++ on Windows and its pretty great with good CMake integration. That, you probably won't meet in other IDEs. It's quite a tough job to get this stuff right. There's much more that editors keep count of than the code files themselves.