aboutsummaryrefslogtreecommitdiff
path: root/.functions
diff options
context:
space:
mode:
Diffstat (limited to '.functions')
-rw-r--r--.functions18
1 files changed, 18 insertions, 0 deletions
diff --git a/.functions b/.functions
index 9390af8..879804c 100644
--- a/.functions
+++ b/.functions
@@ -9,3 +9,21 @@ open () {
echo "No usable program is found"
fi
}
+
+greview () {
+ usage='usage: greview <base_branch>'
+ if [ $# -lt 1 ]; then
+ echo $usage
+ return
+ fi
+
+ base_branch=$1
+ # vim -p $(git diff --merge-base --name-only $base_branch) \
+ # "+tabdo Gvdiff $base_branch" \
+ # "+nmap <C-j> :tabnext<CR>" \
+ # "+nmap <C-k> :tabpreivous<CR>"
+
+ vim $(git diff --merge-base --name-only $base_branch) \
+ "+nmap <leader>gd :Gvdiffsplit $base_branch<CR>"
+
+}