Go Down

Topic: Open multiple sketches for editing (Read 869 times) previous topic - next topic

eustace

A suggestion I would like to make for the IDE - it would be nice to open another sketch in another tab, to make the cutting and pasting of code from sketch to sketch easier.  Has this been considered?

eustace

...of course, moments after I make the post I find earlier requests for this feature.  Nevermind.

kuuk

let me second this. i'm slowly getting the concept of how tabs are supposed to be used for includes, but copy and paste really is not easy as it is.



mem

How would you guys suggest the IDE differentiate between a tabs containing a sketches source file(s) and tabs containing source files from a second (or third)  sketch (possibly with multiple tabs) opened for cut and paste.

My preference would be to have a mouse right click option in the file menu when displaying the list of sketches to open another sketch in a new instance of the IDE.  So you can cut and paste across sketches but each IDE instance has tabs that only comprise a single sketches source code.

You may have  a better suggestion, but I do hope that the desire to facilitate cut and paste across sketches does not create a risk that files so opened get accidentally saved as part of the original sketch.

mellis

The ability to have multiple sketches open at once will probably be implemented similarly to the way Processing has done it.  Each tab represents a file within a sketch, and separate sketches each get their own window.  It's still not clear whether or not each window / sketch should have its own serial port setting and serial monitor.

kuuk

Quote
 It's still not clear whether or not each window / sketch should have its own serial port setting and serial monitor.
hi david,
i now remember that you mentioned that you're working on it. please excuse my ignorance... concerning the serial port: as for copy and paste the port wouldn't matter, and i was originally assuming that one was working on a single project most of the time.
still, "multi-board projects" could become more popular with people starting to explore SPI, one-wire and stuff.
would it be hard to to save board and port settings in a sketch rather than in the application settings? i'm thinking of something like two pull-down menus at the top of each window.

best, kuk

eustace

Pardon my ignorance, but is it safe running two open windows of Arduino?  That would really relieve my problem;  I didn't realize that tabs were already implemented for multi-file sketches (not having written any).

mem

Quote
... is it safe running two open windows of Arduino?  That would really relieve my problem.
It certainly works for me when I need to cut and paste across sketches

eustace

Thanks.  I finally dug through the files Arduino creates when it saves/compiles a sketch, and found that I can open the .pde file with a text editor.  This is all I really need - to be able to look through old code while writing a new sketch.

Go Up