From 4d9266ac1fa9f163ce7a9738f07f380ba7e70e45 Mon Sep 17 00:00:00 2001 From: hut Date: Mon, 27 Sep 2010 02:38:20 +0200 Subject: defaults.apps: open empty files with unknown mimetype in vim --- ranger/defaults/apps.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ranger/defaults/apps.py b/ranger/defaults/apps.py index 8f7ddb5e..85abb2dc 100644 --- a/ranger/defaults/apps.py +++ b/ranger/defaults/apps.py @@ -87,7 +87,7 @@ class CustomApplications(Applications): if f.image: return self.either(c, 'feh', 'eog', 'mirage') - if f.document or f.filetype.startswith('text'): + if f.document or f.filetype.startswith('text') or f.size == 0: return self.either(c, 'editor') # You can put this at the top of the function and mimeopen will -- cgit 1.4.1-2-gfad0