Distributed renewable energy systems are now widely installed in many buildings, transforming the buildings into electricity prosumers. Existing studies have developed some advanced building side controls that enable renewable energy sharing and that aim to optimise building-cluster-level performance via regulating the energy storage charging/ discharging. However, the flexible demand shifting ability of electric vehicles is not considered in these building side controls. For instance, the electric vehicle charging will usually start once they are plugged into charging stations. But, in such charging period the renewable generation may be insufficient to cover the EV charging load, leading to grid electricity imports. Consequently, the building-cluster-level performance is not optimised. Therefore, this study proposes a coordinated control of building prosumers for improving the cluster-level performance, by making use of energy sharing and storage capability of electricity batteries in both buildings and EVs. An EV charging/discharging model is first developed. Then, based on the predicted future 24h electricity demand and renewable generation data, the coordinated control first considers the whole building cluster as one integrated building and optimises its operation as well as the EV charging/discharging using genetic algorithm. Next, the operation of individual buildings in the future 24h is coordinated using nonlinear programming. For validation, the developed control has been tested on a real building cluster in Ludvika, Sweden. The study results show that the developed control can increase the cluster-level daily renewable self-consumption rate by 19% and meanwhile reduce the daily electricity bills by 36% compared with the conventional controls.