Ability to minimize sections of code in IDE

Newcomer here. I've been working on my first project that has quite a bit of code. I come from coding in microsoft visual studio where you can minimize sections of code. I think this would be a great feature to have in the IDE as I would like to be able to minimize sections of code that have been debugged. It would make a much cleaner approach at coding - at least for me.

Sorry if this has already been brought up.

B0arder606:
Newcomer here. I've been working on my first project that has quite a bit of code. I come from coding in microsoft visual studio where you can minimize sections of code. I think this would be a great feature to have in the IDE as I would like to be able to minimize sections of code that have been debugged. It would make a much cleaner approach at coding - at least for me.

Sorry if this has already been brought up.

No such function presently in the IDE. However there are tapped sections where you can place separate functions that will be added with the main sketch prior to starting compilation.

Lefty

You can use Tabs to split up your code. Functions, like retrolefty suggests, or just find convenient places to split your code.
I had a 13K (compiled) program, I split it thusly:
program_name (where I had notes)
a_presetup (library calls, pin assignments, variable declarations)
b_setup (pinModes, Serial.begin, SPI.begin kind of stuff)
c_void_loop
d_more_void_loop
e_end_void_loop
f_pitches (was using Tone Library, this held the note frequencies)

Didn't have any functions, but had to pay attention where the closing } for void loop ended up.
Compiler seemed to be happy compiling by tab name, and program flow followed the tabs as well.

Set the Arduino IDE preferences to use an external editor, download Notepad++ and add the Arduino specific references as shown in this thread http://arduino.cc/forum/index.php/topic,112662.0.html You will be able to fold/unfold.

You're referring to "code folding", I doubt the IDE will ever do that. I also use Notepad++, once you've used it (or something similar) you'll never go back :slight_smile:


Rob

If you are used to Visual Studio then try the free Arduino plugin. It does everything the arduino ide does and a bit more.

Fully compatible with the arduino ide. Read more here http://www.visualmicro.com/