From 5775dfaaf6e43f61ba6e761bdc418d56454b3262 Mon Sep 17 00:00:00 2001 From: DarkWiiPlayer Date: Mon, 13 Jan 2020 14:26:27 +0100 Subject: [PATCH] Add "view" command to ranger --- ranger.conf | 5 +++++ rifle.conf | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/ranger.conf b/ranger.conf index 5d236cd..9298f75 100644 --- a/ranger.conf +++ b/ranger.conf @@ -1,5 +1,10 @@ map er open_with rvim map ev open_with vim +map ee edit + +map E open_with view +alias view open_with view + map £ mark_tag %any map f console scout -p -g diff --git a/rifle.conf b/rifle.conf index 1076196..4242f04 100644 --- a/rifle.conf +++ b/rifle.conf @@ -220,3 +220,7 @@ mime application/x-executable = "$1" # Remote vim label rvim, mime ^text, = vim --servername "${RVIM:-VIM}" --remote-send ':tab split' --remote "$@" label rvim, ext xml|json|csv|tex|py|pl|rb|js|sh|php = vim --servername "${RVIM:-VIM}" --remote-send ':tab split' --remote "$@" + +# For the custom "view" ranger command +label view, ext md|tex = zread "$@" +label view, mime ^text = vim -RM -- "$@"