From b6eecdf5d8f83a668fa6706bfc81a95dc5ac5db7 Mon Sep 17 00:00:00 2001 From: ponymushama Date: Wed, 24 Jul 2024 11:48:17 +0800 Subject: [PATCH] change ranger editor --- user/app/ranger/rifle.conf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/user/app/ranger/rifle.conf b/user/app/ranger/rifle.conf index 4a18cad..afb02df 100644 --- a/user/app/ranger/rifle.conf +++ b/user/app/ranger/rifle.conf @@ -213,6 +213,9 @@ label wallpaper, number 14, mime ^image, has feh, X = feh --bg-fill "$1" label open, has xdg-open = xdg-open -- "$@" label open, has open = open -- "$@" +# default editor +mime ^text, label editor, = ${VISUAL:-$EDITOR} -- "$@" + # Define the editor for non-text files + pager as last action !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = ask label editor, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = ${VISUAL:-$EDITOR} -- "$@"