[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: git-cl and pop-up window with text editor - what is it for?
From: |
Frédéric Bron |
Subject: |
Re: git-cl and pop-up window with text editor - what is it for? |
Date: |
Tue, 27 Aug 2013 06:51:37 +0200 |
> I think there is some nominal difference between configuring the
> variables VISUAL or EDITOR for your default editor.
I found what's the issue looking at git-cl code:
def UserEditedLog(starting_text):
editor = os.getenv('EDITOR', 'vi')
(file_handle, filename) = tempfile.mkstemp()
file = os.fdopen(file_handle, 'w')
file.write(starting_text)
file.close()
ret = subprocess.call(editor + ' ' + filename, shell=True)
git-cl reads the EDITOR environment variable which is 'gvim' for me.
Then it opens a temp file with this editor but gvim by default runs in
background so git-cl continue immediately! I will replace gvim by vim
and that will do. I could also use gvim -f (foreground).
Thanks,
Frédéric