The historic town was praised for its strong community spirit, good schools and convenient location for commuters travelling to both Edinburgh and Glasgow.