From 102d2477d56d5d746597de2904d5405c1d9098d9 Mon Sep 17 00:00:00 2001 From: bretello Date: Tue, 28 Apr 2020 18:18:21 +0200 Subject: [PATCH] add fvim function to feed fzf input to vim --- functions.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/functions.sh b/functions.sh index 1066442..b655aed 100755 --- a/functions.sh +++ b/functions.sh @@ -246,6 +246,13 @@ function git_prune_branches(){ git branch --merged master | grep -v '^[ * ]*master$' | xargs git branch -d } +fvim() { + if [[ -n "$@" ]]; then + vim `fzf -q $@` + else + vim `fzf` + fi +} # dotfiles user functions if [[ -f $HOME/.dotfiles_functions ]]; then