"does not name a type" error when I have multiple *.ino files and ALL of the code is moved into one

Create as many .ino's (tabs) as needed, remembering the main 1st tab must have the setup() and loop(). While this normally works, sometimes automatic function protyping has a hiccup.
When you move libraries (.h & .cpp files) remember to change the #includes:
#include <thislib.h>
becomes
#include "./thislib.h"

I have some projects with 10+ tabs. Nice side effect is you can Zip one folder and have a backup including working library code.