set a default editor (closes #557)
This commit is contained in:
parent
3ec82c9f4c
commit
fa8a4f8fe3
1 changed files with 5 additions and 4 deletions
|
|
@ -73,9 +73,10 @@ class WebContentEdit(ReplApplication):
|
||||||
paths[path] = content
|
paths[path] = content
|
||||||
|
|
||||||
params = ''
|
params = ''
|
||||||
if os.environ['EDITOR'] == 'vim':
|
editor = os.environ.get('EDITOR', 'vim')
|
||||||
|
if editor == 'vim':
|
||||||
params = '-p'
|
params = '-p'
|
||||||
os.system("$EDITOR %s %s" % (params, ' '.join(paths.iterkeys())))
|
os.system("%s %s %s" % (editor, params, ' '.join(paths.iterkeys())))
|
||||||
|
|
||||||
for path, content in paths.iteritems():
|
for path, content in paths.iteritems():
|
||||||
with open(path, 'r') as f:
|
with open(path, 'r') as f:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue