diff options
Diffstat (limited to 'tigrc')
| -rw-r--r-- | tigrc | 16 |
1 files changed, 9 insertions, 7 deletions
| @@ -5,16 +5,22 @@ | |||
| 5 | #==================== | 5 | #==================== |
| 6 | # geineric | 6 | # geineric |
| 7 | #==================== | 7 | #==================== |
| 8 | # vim-like g binding, 'gp' for git grep | ||
| 8 | bind generic g none | 9 | bind generic g none |
| 9 | bind generic gp view-grep | 10 | bind generic gp view-grep |
| 10 | bind generic gg move-first-line | 11 | bind generic gg move-first-line |
| 11 | bind generic G move-last-line | 12 | bind generic G move-last-line |
| 13 | |||
| 14 | # scroll right easily | ||
| 12 | bind generic <C-H> scroll-left | 15 | bind generic <C-H> scroll-left |
| 13 | bind generic <C-L> scroll-right | 16 | bind generic <C-L> scroll-right |
| 17 | |||
| 18 | # redraw, refresh, source tigrc | ||
| 19 | bind generic <C-R> refresh | ||
| 14 | bind generic <Esc>l screen-redraw | 20 | bind generic <Esc>l screen-redraw |
| 15 | bind generic R :source ~/.tigrc # apply tigrc settings | 21 | bind generic R :source ~/.tigrc |
| 16 | 22 | ||
| 17 | # toggle/copy commit id | 23 | # clipboard |
| 18 | bind generic xx +sh -c "echo -n %(commit) | head -c7 | xclip -sel c && echo Commit Clipped!" | 24 | bind generic xx +sh -c "echo -n %(commit) | head -c7 | xclip -sel c && echo Commit Clipped!" |
| 19 | bind generic xc +sh -c "echo -n %(commit) | xclip -sel c && echo Full Commit Clipped!" | 25 | bind generic xc +sh -c "echo -n %(commit) | xclip -sel c && echo Full Commit Clipped!" |
| 20 | bind generic xrb +sh -c "echo -n %(branch) | xclip -sel c && echo Branch Clipped!" | 26 | bind generic xrb +sh -c "echo -n %(branch) | xclip -sel c && echo Branch Clipped!" |
| @@ -27,9 +33,6 @@ bind generic xB +sh -c "echo -n %(blob) | xclip -sel c && echo Full Blob Clipped | |||
| 27 | # toggle case sensitive for search | 33 | # toggle case sensitive for search |
| 28 | bind generic w :toggle ignore-case | 34 | bind generic w :toggle ignore-case |
| 29 | 35 | ||
| 30 | # refresh like modern browser | ||
| 31 | bind generic <C-R> refresh | ||
| 32 | |||
| 33 | # see reflog, reset refernece | 36 | # see reflog, reset refernece |
| 34 | bind generic L >sh -c "git reflog --pretty=raw | tig --pretty=raw" | 37 | bind generic L >sh -c "git reflog --pretty=raw | tig --pretty=raw" |
| 35 | bind generic gl ?git reset --hard HEAD@{"%(prompt Enter HEAD@{} number: )"} | 38 | bind generic gl ?git reset --hard HEAD@{"%(prompt Enter HEAD@{} number: )"} |
| @@ -102,7 +105,7 @@ bind main gm ?@git merge %(remote)/%(branch) # merge with current remote | |||
| 102 | bind main gM ?@git merge %(remote)/%(branch) --no-ff # merge-no-ff with current remote | 105 | bind main gM ?@git merge %(remote)/%(branch) --no-ff # merge-no-ff with current remote |
| 103 | 106 | ||
| 104 | # push | 107 | # push |
| 105 | bind main p none # override default pager binding | 108 | bind main p none # override default pager binding |
| 106 | bind main pp ?git push | 109 | bind main pp ?git push |
| 107 | bind main pP ?git push -u %(remote) %(branch):%(branch) | 110 | bind main pP ?git push -u %(remote) %(branch):%(branch) |
| 108 | bind main pF ?git push -f | 111 | bind main pF ?git push -f |
| @@ -194,7 +197,6 @@ bind status gs !git stashstaged | |||
| 194 | bind status c @git commit -m "%(prompt Enter commit message: )" | 197 | bind status c @git commit -m "%(prompt Enter commit message: )" |
| 195 | bind status a !>git commit --amend | 198 | bind status a !>git commit --amend |
| 196 | bind status p ?>sh -c "git commit -m 'update' && git push" # quick push | 199 | bind status p ?>sh -c "git commit -m 'update' && git push" # quick push |
| 197 | |||
| 198 | bind status d ?>rm %(file) | 200 | bind status d ?>rm %(file) |
| 199 | 201 | ||
| 200 | # solve conflict | 202 | # solve conflict |