Using python to write a vim script but not run successfully