Using Sublime Text with JUCE

#1

I want to venture away from the Projucer for editing source code. Mainly, I just want to have better syntax highlighting, and I really want suggestions/auto-complete.

When I worked at a tech company, all the wizards there used Sublime Text, and it’s free and available for Linux, so I guess that’s what I’m gonna use now!

Syntax highlighting is great. But when typing something like Slider.setValue(); it was only able to suggest Slider.getValue(); as that was the only option previously existing in the rest of the source code file. That’s all it knows about.

I’m guessing it needs to become aware of the JUCE library, but how do I do that?

I’ve tried adding the JUCE folder to the project by using Add folder to project...?

But that doesn’t do it.

0 Likes

#2

You’ve been using the Projucer for editing source code?! No comment.

But seriously, have you considered using a proper IDE instead of a text editor? It really does make life easier. CLion is a nice IDE and available on Linux. And the Projucer will export CLion projects for you. CodeLite is another one that I got a lot of usage out of. You can configure that one to work with Linux makefiles. But all IDEs will provide syntax highlighting and code completion more or less out of the box. Sublime is a nice editor. So is Visual Studio code, and Atom, but I never use them for JUCE projects. Life is too short.

1 Like

#3

Well, sometimes you have no choice. I do a lot of programming for embedded platforms under Linux, so I edit all (final) code for it in the Projucer. Settings of all external dependencies, libraries, toolchains etc. in any IDE is a nightmare - at least for me. And from this point of view the Projucer is a good tool and I wish it has some, even limited to the JUCE modules, suggestion system (but I understand it’s not so important feature for most users).

0 Likes

#4

So I played around with Clion, and I’m sure it’s great, but it ran terribly slow on my system and it’s very not free, so there goes that. I’m gonna try and get comfortable in Code:Blocks (I actually installed a ‘sublime’ theme and that’s already much better) There is some kind of auto complete, but it doesn’t seem to recognise my own instances of JUCE classes but it does recognise the JUCE library otherwise. Not to worry, I’ll figure it out as I go. Thanks all.

0 Likes