use thread to avoid vim editor can't work while synchonizing file