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} -- "$@"