From 51b5abc3c412a555bb759402aafe906f99cf490a Mon Sep 17 00:00:00 2001 From: RealStickman Date: Tue, 10 Nov 2020 16:09:44 +0100 Subject: [PATCH] Nope, this is the only way it works atm --- arch-config/.config/ranger/rifle.conf | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/arch-config/.config/ranger/rifle.conf b/arch-config/.config/ranger/rifle.conf index 86f53fd1..d9bc175a 100644 --- a/arch-config/.config/ranger/rifle.conf +++ b/arch-config/.config/ranger/rifle.conf @@ -85,9 +85,11 @@ ext x?html?, has w3m, terminal = w3m "$@" # Misc #------------------------------------------- # Define the "editor" for text files as first action -mime ^text, label editor = ${VISUAL:-$EDITOR} -- "$@" +#mime ^text, label editor = ${VISUAL:-$EDITOR} -- "$@" +mime ^text, label editor = /usr/bin/emacs --no-window-system -- "$@" mime ^text, label pager = "$PAGER" -- "$@" -!mime ^text, label editor, ext xml|json|csv|tex|py|pl|rb|js|sh|php = ${VISUAL:-$EDITOR} -- "$@" +#!mime ^text, label editor, ext xml|json|csv|tex|py|pl|rb|js|sh|php = ${VISUAL:-$EDITOR} -- "$@" +!mime ^text, label editor, ext xml|json|csv|tex|py|pl|rb|js|sh|php = /usr/bin/emacs --no-window-system -- "$@" !mime ^text, label pager, ext xml|json|csv|tex|py|pl|rb|js|sh|php = "$PAGER" -- "$@" ext 1 = man "$1" @@ -267,7 +269,8 @@ label open, has open = open -- "$@" # 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} -- "$@" +#label editor, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = ${VISUAL:-$EDITOR} -- "$@" +label editor, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = /usr/bin/emacs --no-window-system -- "$@" label pager, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = "$PAGER" -- "$@"