start new sketch with setup and loop

Hi all, I wasnt sure where to put this. Is there some way to have new sketches open with:

void setup(){}
void loop(){}

already in the sketch to start with? I can type them every time, but I think it could be neat if I could have them there to begin with. Is that already a feature? How can i get this done?

You can make an example and open it every time. This has been discussed before; try searching for it.

conradin: Hi all, I wasnt sure where to put this. Is there some way to have new sketches open with:

void setup(){}
void loop(){}

already in the sketch to start with? I can type them every time, but I think it could be neat if I could have them there to begin with. Is that already a feature? How can i get this done?

I included the feature you ask, plus the cursor mouse automatically places inside the setup function (so you can start typing without even clicking) :D http://arduino.cc/forum/index.php/topic,118440.0.html

"plus the cursor mouse automatically places inside the setup function "
See, I’d find that in the wrong place - I start my sketches with some comments, then define pins, before even getting to void setup ( ) { …

25 characters - what’s that, like 10 seconds of typing?
Doesn’t the bare minimum example have that already too?

CrossRoads: "plus the cursor mouse automatically places inside the setup function " See, I'd find that in the wrong place - I start my sketches with some comments, then define pins, before even getting to void setup ( ) { ...

25 characters - what's that, like 10 seconds of typing? Doesn't the bare minimum example have that already too?

It does not matter, it finds the last line in the setup that is available to write code with a regex (line 585) it is not a hardcoded position.

my default sketch - and yes, I change it once a year -

//
//    FILE: .pde
//  AUTHOR: Rob Tillaart
//    DATE: 2012
//
// PUPROSE:
//

void setup()
{
  Serial.begin(9600);
  Serial.println("start...");
}

void loop()
{
}

Another nice way is to have a gaming keyboard e.g. - http://www.logitech.com/en-us/keyboards/keyboards/gaming-keyboard-g510 - and program the "game" buttons for code snippets. (rather expensive but :)

robtillaart: Another nice way is to have a gaming keyboard e.g. - http://www.logitech.com/en-us/keyboards/keyboards/gaming-keyboard-g510 - and program the "game" buttons for code snippets. (rather expensive but :)

I use some of the otherwise unused buttons (just pause and scroll lock now) to do random things --- pause used to change my desktop background, now it sleeps my computer; scroll lock inverts colors). On a normal desktop keyboard there's more (like the three buttons just right of the space bar). You could also remap some of the F_ keys.