Auto format and autocomplete