Yes, of course the battery will charge with just the engine running. Being in or out of gear has nothing to do with it.