aboutsummaryrefslogtreecommitdiff
path: root/.functions
blob: fe4847078e4e0e1e796518f44440553e412fc723 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env bash

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>"

}