From 4f736602310b5906e8e9ed3f664fdda05827b342 Mon Sep 17 00:00:00 2001 From: Matthias Vogelgesang Date: Tue, 24 Jun 2014 22:52:04 +0200 Subject: [PATCH] Try $VISUAL and $EDITOR for config['editor'] On UNIX derivates they expand to the default or preferred editor and avoid unnecessary first time edits of the config file. --- jrnl/install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jrnl/install.py b/jrnl/install.py index 03b3ede5..dcb83601 100644 --- a/jrnl/install.py +++ b/jrnl/install.py @@ -23,7 +23,7 @@ default_config = { 'journals': { "default": os.path.expanduser("~/journal.txt") }, - 'editor': "", + 'editor': os.getenv('VISUAL') or os.getenv('EDITOR') or "", 'encrypt': False, 'default_hour': 9, 'default_minute': 0,