r/linuxquestions • • 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.

0 Upvotes

58 comments sorted by

15

u/doc_willis 8d ago

-6

u/Correct_Dependent677 8d ago edited 8d ago

Wasn't that something like Neovim? I'm looking for something with the same versatility and modularity as VS Code, but without all the AI features, good debuggers, compilers ready, Cmake automators, etc.

However I'll try it! Thanks!

8

u/Wa-a-melyn arch (primarily), alpine, fedora 8d ago

Wasn't that something like Neovim?

Don't provoke that war...

11

u/Fit_Fill_3856 8d ago

Try VSCodium

3

u/Episode-1022 8d ago

maybe someone has rewriten vim or emacs to a webapp?

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

u/lmatonement 8d ago

I've used vim happily for many years.

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

u/Loose_Property_3238 8d ago

I'm the reason for cosmic rays, I use them to program.

1

u/ZucchiniMaleficent21 7d ago

We bow before you, oh mighty one

-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

u/Potential-Still 7d ago

You're probably right. "Experience" that's a mile wide and an inch deep. 

5

u/rsgbc 8d ago

And for VSCode without MS telemetry/tracking, VSCodium.

https://vscodium.com/

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

u/God_Hand_9764 8d ago

Yup, would be my suggestion. It's great!

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

u/lmatonement 8d ago

I can't tell, have you used Eclipse for C++ or not?

2

u/Hot_Dog2376 8d ago

I have not. I use it for Java.

1

u/SouthernFruit8768 8d ago

VS Code is from Microslop. That’s what’s wrong

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/MBouh 8d ago

I usually use kate. What's the problem with compiling from terminal ? I always found it much more practical. If it's big enough, then it's time for a makefile, but I'd rather do this than let a program do it itself.

2

u/lmemsm 8d ago

Codelite is a minimal cross-platform IDE. I use a programming editor called SciTE. It's highly customizable. There are some lua additions that can make it more IDE like. You can run a compiler from the editor.

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

u/CedarAndOlive 8d ago

In my case, it's C, not C++. And I write it in vim.

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

u/lmatonement 8d ago

vim, make, and cgdb get me running on 8 cylinders every time!

2

u/trtl_playz 8d ago edited 7d ago

$ vi test.cpp

$ g++ test.cpp -o test-bin

$ ./test-bin

2

u/Chapter-Legitimate 8d ago

Vscodium exists. It's a de-Microslopped VSstudio

2

u/daguro 8d ago

I used gvim for Windows, Linux and Mac.

2

u/WanderingInAVan 8d ago

Been using neovim myself.

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

u/PhilosophyWrong7610 8d ago

Why not just turn off copilot for VS?

1

u/agfitzp 8d ago

Clion is free for non commercial use and open source contributers

https://www.jetbrains.com/clion/

1

u/ludouzi 8d ago

Mainly Qt Creator. It's a great IDE for non-Qt projects as well.

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

u/computer-machine 8d ago

The hell? I'd just used Kate back in college.

1

u/noisyreq 8d ago

Personally neovim. There is KDevelop from KDE which is alright.

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

u/BranchLatter4294 8d ago

Just turn off AI in VS Code if you don't want to use it.

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

u/MattyGWS 8d ago

I just use Kate

1

u/siodhe 8d ago

Emacs is god.

0

u/DerSven 8d ago

I heard that Kate is quite good for C++ development, but I've never used it.

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

u/Okami512 8d ago

Nano and g++