Sublime Forum

Packages etc to make writing C & C++ a dream

#1

This maybe a terrible question, apologies if so (if I was on SO I would be immediately shot down for such “opinion based twoddle” and vagueness).

Could you please suggest some packages etc to make writing C & C++ a dream
(or at least quicker)

However from my point of view am fairly new to ST3, have just about got it under my control :wink: everybody on this forum probably has more coding experience and more ST3 experience than me, and just to cap it off, there’s surprisingly little on the internet on this subject.

It’s either in the form of a video I’ve got to sit through (just one person’s opinion), or the info, it’s very general.

The problem is I don’t know what I don’t know, rather than knowing what I don’t know.

A few suggestions (I know opinion based, but I’m happy to accept my betters opinions) and it would be a start. I don’t know whether there are millions of useful packages or 2 (for C++). And yes I did google this

list of packages and tricks for “C++” Sublime Text 3

(
for example there is actually surprisingly little content in this link


)

which is how i know there isn’t much immediate info pertaining to my question.
Any top tips would be very much appreciated, i think I am gonna install CodeFoo just to get the list going, hey and maybe the list might help some other noobs too !

All the best and cheers

Lozminda :unicorn: :spider: :microbe:

0 Likes

#2

It depends on what you want.

As a start, check out this stackoverflow answer. Open the default C++ package and you can view the files that provide C/C++ support in Sublime Text.

I’d especially recommend taking a look at the snippets, which you can add more of and customize as you wish.

I assume you have a C++ compiler installed, and know about build systems. If not, I’d suggest just reading through the official documentation.

The package control is pretty void of C++ packages, and the reason is that Sublime Text is a text editor, and not an IDE. It doesn’t have built-in support for refactoring symbols and other LSP features, because it’s not supposed to. If you want an editor that tries to be both, you’d be looking for VSCode.

That said, there is a C++ class wizard here.

0 Likes

#3

I just remembered, I once upon a time wrote a guide for setting up sublime text with the Clang compiler on Windows.

https://tagg.link/articles/setup-sublime-clang.html

0 Likes

#4

@Tagglink, you seem to have out of date information. There’s a perfectly functioning LSP plugin on Package Control. Install clangd, generate compile_commands.json, and you should be good to go.

1 Like

#5

Thank you @rwols and @Tagglink for your suggestions ! I’ll investigate over the next couple of days.

Anyone else please feel free.

Cheers

0 Likes