Why not simply select "use external editor"
To do that you need to understand all the occult tricks the IDE does.
No, you don't have to understand anything more than using the IDE with the built-in editor (except how to use the external editor, of course.)
Like making copies of files you include in a project and all the pre-compile voodoo. It's not a case of "simply select".
No, it's exactly the same. It's just that the built-in editor window is read only, not editable. You edit the file in your external editor, and the IDE simply reloads it before each compilation.
Then , why not use command line compiler ; then why not use avrdude command
... then remind me what is the IDE actually good for ?
Ah, well, now there's a loaded question!
The IDE does three basic things: It edits, it preprocesses, and it controls the g++ build/avrdude upload process.
You can bypass the editor using external editor, as I have described.
That leaves two things the IDE does -- sketch preprocessing and build/upload.
It's true you can use "make" for example, to manage the build/upload, but then you "lose" the preprocessing.
Which may be a good thing or a bad thing, depending on your point of view.
The preprocessing only does three things for the user:
a) Obviates the need to declare your functions using prototypes.
b) Obviates the need to declare a main() function.
c) Manages merging the library source code into your sketch code using your #includes as indicators.
d) Converts non-standard Arduino type "boolean" -> standard C++ type "bool".
so four things.
If you are willing to do a) and b) for yourself (oh yeah, and d)), then it's not too hard to get a Makefile that will do c) for you as well. (That's actually what I do -- see this thread for more details: http://arduino.cc/forum/index.php/topic,112425.0.html
.) And then you are free of the IDE! :-)
But, if you want to stay in sketch-land, and really find declaring those prototypes onerous, and really like writing "boolean" rather than "bool", then you need the IDE preprocessor.
Which, by the way, has some well-known and seriously screwy bugs that will result in mangling your perfectly sound sketch code into something that totally confuses the g++ compiler, and very likely you when you start trying to make sense of the resulting compiler error messages.
So _that's_ what the IDE is good for. Not much when you look at it, I suppose, but you asked!