I am fairly new to programming and for my cs class i need to run individual programs. they don't need to interact with anything else, so i am trying to just run the file I'm currently on but Kate just greys out the option. I really want to avoid using projects if i can because they're just extra effort for no reason when I only need to run a single file. I did try using one, but Kate doesn't have a new project button for some reason and i had some trouble with Cmake.
I'm aware that these are actually pretty basic things, but I can't find anything online that actually explains how to use Kate at all. I would try using something else, but every IDE seems to have this same issue where by default it can't run code and it has no documentation of any kind regarding actually running code, so i'll just stick with the one that came with my distro.
also as a bonus question, why does every IDE seem to require you to configure every single option before it can run code and why do they all seem to discourage doing anything less than making an entire app?
also as a bonus question, why does every IDE seem to require you to configure every single option before it can run code
What IDE's have you tried?
Kate (and vscode) aren't really IDE's, they're more like extremely extensible text editors. You can make them IDE's, but they dob't come like that out of the box.
On the other hands, actual IDE's often have the inbuilt capability to install and manage the programming language related software.
VSCode is absolutely an IDE. It is full of IDE features. The idea that it isn't an IDE is one of those weird memes that won't die, like people saying "an historic occasion".
Vscode is an IDE, but only after I spent 15 minutes finding and selecting the appropriate java extensions and ensuring that my Linux system had Java installed.
But what was a 15 minute process to me, could easily be a 2 hour struggle to someone who is setting up a development environment for the first time and "just wants autocomplete and debugging".
Vscode is a text editor, sorry…“code editor”. Like you so graciously called out in a later comment, MS even clarified that it’s not an IDE. If VSCode is an IDE then so is VIM or Sublime Text or Notepad++, which of course is nonsense. IDE doesn’t just mean integrated development environment, it means it was meant to be used that way. Just because I turned my lawnmower into something that looks like an F1 race car doesn’t mean it’s an F1 race car.
You’re clearly aware of all of the arguments why VS code isn’t an IDE so it’s pointless to have this argument, but you seem to think that just because something looks like an IDE means it is, which is just categorically false.
I struggled with stupid basic things like that ("how do I run a file??!") when I was beginning to learn programming. What you can do is just open a terminal and run a command, that's it, like python main.py. Sorry that it doesn't answer the question.
I had exactly the same problem when I moved from languages that were interpreted or combined the IDE and runtime environment into one, and starting to use languages which had their own external compiler. Unfortunately, open source project user documentation is often terrible for beginners (what I found above for Kate seems to be no exception), and IDEs often seem to be written by people who don't really expect anyone to actually use the included build options (to be fair, most folks seem to like using their own separate build utilities, so probably this is often the case)
If you can tell us which compiler or interpreter you're using (e.g. gcc, clang, Python), someone can probably tell you how to compile and/or run a single-file program from the terminal with a fairly simple command.
I believe both clang and gcc are present on my system right now. and yeah, the Kate documentation was a little lacking. they do have little pop-ups letting you know though
From my experience and understanding there are generally two ways to 'run' a file.
Firstly, the output is an executable itself. Assuming the permissions are valid you can just do ". /yourFile" and it'll just execute. If the file doesn't have the proper permissions, just do "chmod +x ./yourFile" to allow execution.
Secondly, some executables require you to run them through a specific program. Such as Java or Python.
If Java, it'd be something like "java ./yourFile.jar"
If Python, it'd be something like "python ./yourFile.py"
Sometimes it requires extra flags like "-jar" or similar. You just gotta look it up at that point. ¯_(ツ)_/¯
In Kate, you can toggle the terminal through a shortcut for easy access.
When learning a programming language I think it's better to find the commands you'd use to compile/run the program and run them in the terminal the first few times so you know what's actually happening behind the run button. Then start running things through the IDE if it's more convenient. If you tell us the language we can help with the commands (is it C?)
In that case I would recommend using an IDE that supports C well. On Windows Visual Studio will get you far and it is the easiest to set up with wizards to create projects etc.
Alternatively you could use VSCode but it's a bit harder to set up.
Install VSCode
Install the clangd extension from the marketplace. It's better than the official Microsoft C++ one.
Also install the CMake extension.
Create a CMake project by hand (you need CMakelists.txt and main.c). In the CMake make sure you add
set(CMAKE_EXPORT_COMPILE_COMMANDS TRUE)
That will give you perfect code intelligence (error squiggles etc).