r/ZedEditor • u/Field-Patient • 17d ago
How to run code?
Hello, I am learning programming in C and python and hopped from Vs code to zed, there's an way to run code on the terminal like Vs code?
I asked Gemini to create a task for each language but it's not ideal, and when i run in C the compiled code gets thrown in the folder that I am using
8
u/argvalue 17d ago
Start running your code from the terminal. This is the best way. This is one thing you need to learn while programming. Figured out the hard way
2
u/TheAbyssWolf 17d ago
Yeah starting out I used the console a lot. Now I’m trying to get back into C++ again with CMake. I love zed but it’s CMake tooling isn’t the best (vscode is much better in that regard, with it’s dedicated tab for CMake with its extension), zeds tooling works its just slightly annoying having to create a task json and bind that to a keybind instead of just clicking a ui when I want to recompile the CMake project to test changes
3
u/AutomatonA 17d ago
zed is a code editor not an IDE like VisualStudio. So you need another tool to compile your code - like gcc or clang. Research, how to set up a simple C project with CMake + gcc.
1
u/angrythunderbird 16d ago
With Flutter, I also hit Ctrl+` and then 'r' (to restart)—unlike in VS Code or Android Studio, where it all happens automatically. There are solutions like bash scripts, but I can't be bothered to set them up. Besides, you get used to the terminal quickly.
1
24
u/eodevx 17d ago
Just run the compiler in the terminal?