add $.formatError
refact. editor._sync
...