When try to use "gvim" instead of "vim" in below line in this script:
vim_rc = subprocess.call(['gvim', '-R', '--cmd', 'au VimEnter * so ' + vim_file_name])
gvim is lunched, but with an error to say that tmp file can not found.....
After i made below change in this script, gvim works fine. Can you have look at it and consider to merge it into master later ?
.....
vim_rc = os.EX_OK
import re
pattern = re.compile("gvim")
if changed_file:
if pattern.search(script_name):
vim_rc = subprocess.call(['gvim', '-R', '--cmd', 'au VimEnter * so ' + vim_file_name])
else:
vim_rc = subprocess.call(['vim', '-R', '--cmd', 'au VimEnter * so ' + vim_file_name])
shutil.rmtree(temp_dir) ### in gvim case, we can NOT call this which will delete files which is still used by gvim.
sys.exit(vim_rc)