diff --git a/weboob/applications/webcontentedit/webcontentedit.py b/weboob/applications/webcontentedit/webcontentedit.py index f5839fba..083f5f5d 100644 --- a/weboob/applications/webcontentedit/webcontentedit.py +++ b/weboob/applications/webcontentedit/webcontentedit.py @@ -62,7 +62,11 @@ class WebContentEdit(ReplApplication): data = data.encode('utf-8') f.write(data) paths[path] = content - os.system("$EDITOR -p %s" % ' '.join(paths.iterkeys())) + + params = '' + if os.environ['EDITOR'] == 'vim': + params = '-p' + os.system("$EDITOR %s %s" % (params, ' '.join(paths.iterkeys()))) for path, content in paths.iteritems(): with open(path, 'r') as f: