From 3424ac05f2525bbe53dbfbe081313ed3c7d8f860 Mon Sep 17 00:00:00 2001 From: Michiel Scholten Date: Mon, 30 Apr 2018 14:59:55 +0200 Subject: [PATCH] Not entirely correctly working quick-opener --- .config/fish/config.fish | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.config/fish/config.fish b/.config/fish/config.fish index ab3d68e..586f154 100644 --- a/.config/fish/config.fish +++ b/.config/fish/config.fish @@ -99,3 +99,11 @@ alias youtube-dl 'youtube-dl -t -f bestvideo+bestaudio/best --merge-output-forma alias weather 'ansiweather' alias wttr 'curl -s wttr.in/Beverwijk | head -17' + +# https://www.reddit.com/r/vim/comments/7axmsb/i_cant_believe_how_good_fzf_is/?st=jgm7kba5&sh=590aa1e0 +function rgvim + set choice (rg -il $argv | fzf -0 -1 --ansi --preview "cat {} | rg $argv --context 3") + if [ $choice ] + vim "+/"(to_lower $argv) $choice + end +end