Is is posible to hide undefined sections? in case of several possible controllers i use something like that:
#define CONTR2 #ifdef CONTR1 ... #else #ifndef CONTR3 ... #endif ...
#endif #if (defined(CONTR2) || defined(CONTR1)) ... #endif
How can I hide all undefined sections in µV4 editor?
Yes, but it may be simpler if you move out the differences into individual header files and just have #ifdef to select which file to load. One line instead of 100 lines with controller or hw differences.
But you may also use a different editor and use uvision just for compilation. Or use command-line compilation integrated into another ide.