One thing I don't like about C is how so many IDEs put things between me and my code. They force me to make solutions when all I want is a simple .c file, and they have cluttered displays when all I want is a text editor with some basic context coloring.

Python's IDLE, while far from a perfect system, offers simplicity, letting me see exactly how my code works without any clutter.

I'm then looking for an equivalent program for C that has the following features:

  • Can run the code easily (like how IDLE runs code with F5)
  • Basic context coloring
  • Ability to collapse {} blocks

Notepad++ can do the context coloring and the collapsible blocks, but does not seem to have an easy way to run the .c file.

It must run on Windows 8 and it must be gratis.

  • Since you can run a Python script, but you cannot run a .c file, what do you need to do exactly? Do you need to compile it and/or run the resulting built executable? What C compiler are you using?
    – mguassa
    Jan 12, 2016 at 9:50

1 Answer 1


Sublime Text should be able to do all three of your tasks:

Basic context coloring

This generally happens automatically.

Ability to collapse {} blocks

You can do this by using the "gutter" (the area where the line numbers are displayed). To fold a {} block, click on the triangle in the gutter that's on the same row as the { character.

You can also fold any arbitrary code block by first selecting it and then either:

  • click the menu item Edit → Code Folding → Fold, or
  • open the Command Palette (Ctrl+Shift+p by default on Windows), type in "Code Folding: Fold", and pressing Enter.

Can run the code easily (like how IDLE runs code with F5)

Save your file and press F7 or Ctrl+b to "build" it. One of these might just compile your code and the other one might compile and run it; I'm not sure. (Sublime is very configurable so I'm not sure that the behavior I'm seeing on my machine will match your experience running a fresh copy of Sublime.)

You can also build through the Command Palette (Ctrl+Shift+p → "Build") or the build menu (Ctrl+Shift+b).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.