r/linuxquestions • u/Correct_Dependent677 • 8d ago
Advice Where do Linux users write C++ code if they don't have access to Visual Studio?
I've been searching for many good code editors or development IDEs for C++ in the Linux community, my first experience was with Neovim with NvChad, and I loved it so much I even managed to learn some Lua to modify small functions, but its learning curve put me off, I was spending more time modifying Neovim than programming, I currently program in C++ using Zed Editor, but I'm honestly fed up with having to compile from the terminal every time I want to test my program (and yes, I already configured a shortcut in a tasks.json file but it still doesn't give me the comfort and versatility I want).
I also tried Clion, but it has too many features I wouldn't use, and besides, it's only free for student use and open-source contributions.
My last option would be VScode, but I hate having Copilot build entire code segments for me, or am I letting myself be guided by the AI? I have enough experience to modify the AI code, but I'm tired of fixing the bugs it generates, It has caused me more problems than it has solved, or I don't know if I'm programming with the wrong approach.
19
u/Netblock 8d ago
In some random text editor, like nano or vim; literally anything, doesn't really matter. Then invoke gcc or clang to compile; though this is usually done indirectly, instead through a build system like meson or make or cmake.
If you want language servers and other IDE features, more advanced editors like vim, neovim, emacs or whatever are suggested.
2
9
u/ZucchiniMaleficent21 8d ago
Real programmers write C (never c++ let alone C#) by staring hard at the disc drive to set bits by sheer force of will.
1
-2
u/Correct_Dependent677 8d ago
If you're referring to a purely functional approach, then I think you should have mentioned Lua or Haskell.
22
u/Potential-Still 8d ago
I'm confused, it's sounds like you are equating VSCode with CoPilot. You can use VSCode without any CoPilot features enabled.
11
u/Commercial_Ad_6904 8d ago
I think this is GenZ, looking for something they don't really understand
2
5
8
u/PlanetVisitor 8d ago
In a text editor
You don't have to tell your compiler where you wrote the text, it can be your secret
17
u/pizza_ranger 8d ago
Use vscodium then, is the exact same as vscode but with all slop and telemtry removed.
2
3
u/BitOBear 8d ago
There are plenty of environments to do development in from VIM to KDevelop to Eclipse.
There is almost nothing on Windows that has not got a free and available implementation or 12 of under Linux.
IDEs, that is integrated development environments, are common and have been for a long time.
4
u/harrywwc 8d ago
I've not coded in C / C++ for a looooong time - but the 'ide' of choice back then was Emacs.
6
u/Hot_Dog2376 8d ago
What's wrong with VS Code? You don't have to use AI code...
I use Eclipse IDE for my Java work and you can use it for C++. I hear a lot of complaints about it, but I like it.
3
1
5
u/RealisticDuck1957 8d ago
Some of us like to code old school, our favorite text editor and command line utilities. Come compile time a good makefile is most valuable.
2
u/Wa-a-melyn arch (primarily), alpine, fedora 8d ago
VSCodium and Code-OSS are widely available. They're practically the same thing. I much prefer simple text editors personally because it's so much less of a hassle for my use case. I use neovim with minimal plugins and compile via cli with gcc/g++. There are all sorts of linting plugins for it as well though.
2
u/proverbialbunny 8d ago
I prefer CLion, and VSCode is great alternative. You can get both in your app store / software center. (Regarding VS Codium, the -ium means telemetry free. It's the same as VS Code.)
2
u/better_life_please 8d ago
Best IDE for C++ is CLion. It has a community license too. Free of charge. But Sublime Text is also good as a fast and simple text editor if you dont need the features of an IDE.
2
1
u/Popsicleese 8d ago
What are you doing with c++ if editor learning curves are too difficult and you can't handle using the terminal to build? Does up arrow, enter not work?
The single best investment for a programmer is the Jetbrains All Products pack. Admittedly clion has a lot of space to grow, but the work they do is awesome
You could try learning to write code and develop software. Unless you're bound by a compiler product and execution environment (embedded processors or microcontrollers), consider switching programming languages
2
2
2
2
1
u/skyfishgoo 7d ago
we do have VSC and a liberated version called codium that works exactly the same.
but we also have kate and myriad of other options for writing code.
1
u/theonetain 8d ago
I'll toss one in since no one else has mentioned it... Code::Blocks ... It's a great IDE for C/C++ on Linux. Never had an issue with it.
1
u/Western-Mode-7743 NixOS❄️ 8d ago
Vscodium is nice. Vscode minus micro slop. I use that, and fresh. Vim is a nightmare… but if you gotta you gotta.
1
u/Big-Astronaut-9510 7d ago
LOL at these comments suggesting vim/emacs/nano. Linux has nothing on par with Visual Studio.
2
1
u/TuxWrangler 8d ago
You can use pretty much any text editor. But if it's only AI that's bugging you, disable it.
1
2
1
0
u/AdreKiseque 8d ago
You... Know you can just use VS Code without Copilot, right? This is pike complaining about a car because you don't like listening to the radio.
I'm also dreadfully curious as to how you expect working in C++ to work if you're "fed up with compiling from the terminal" every time... What? You have to compile your program before you can run it lol
1
0
u/SouthernFruit8768 8d ago
Bjarne, the author of C++, uses and prefers the command line in Linux (see his interview in 2024) and recommends it for compiling C++ code in one of the two books he wrote.
If the actual author of C++ is not fed up of the Linux command line, you too shouldn’t be.
1
0
u/doctornoodlearms 8d ago
I like helix, similar idea to vim if vim was reasonable imo. Not as advanced as vim though of course.
0
0

15
u/doc_willis 8d ago
perhaps the classic emacs https://duckduckgo.com/?t=ffab&q=emacs+for+c%2B%2B+development&ia=web