mirror of
https://github.com/wfxr/forgit.git
synced 2026-09-10 07:16:23 -04:00
2.4 KiB
2.4 KiB
forgit
forgit is a utility tool for git taking advantage of fuzzy finder fzf.
Installation
Make sure you have fzf installed.
for zplug (Recommend)
zplug 'wfxr/forgit', defer:1
for zgen
zgen load wfxr/forgit
for antigen
antigen bundle wfxr/forgit
Manually
Clone this repo somewhere and source the forgit.plugin.zsh at ~/.zshrc.
Commands
ga
Interactive git add
| Keybind | Action |
|---|---|
<Tab> |
Mark/Unmark(and move down) |
<C-r> |
Reverse selection |
<Enter> |
Confirm and quit |
<C-j/n><C-k/p> |
Selection down/up |
<?> |
Toggle preview window |
<A-w> |
Toggle preview wrap |
<A-j><A-k> |
Preview down/up |
glo
Interactive git log
| Keybind | Action |
|---|---|
<Enter> |
Fullscreen preview |
<C-j/n><C-k/p> |
Selection down/up |
<?> |
Toggle preview window |
<A-w> |
Toggle preview wrap |
<A-j><A-k> |
Preview down/up |
gd
Interactive git diff
| Keybind | Action |
|---|---|
<Enter> |
Fullscreen preview |
<C-j/n><C-k/p> |
Selection down/up |
<?> |
Toggle preview window |
<A-w> |
Toggle preview wrap |
<A-j><A-k> |
Preview down/up |
gi
Interactive .gitignore generator
Custom aliases
You can redefine any of the default aliases by redefining any of the variables below before sourcing the plugin. The default values for the alias are shown.
forgit_log_alias=glo
forgit_diff_alias=gd
forgit_add_alias=ga
forgit_ignore_alias=gi
Tips
- Hit
qto Quit from full screen preview any time. - Install
diff-so-fancyto have betterdiffoutput. - Call
giwith arguments to get wanted.gitignorecontents directly(eg,gi c++).
License
The MIT License (MIT)
Copyright (c) 2018 Wenxuan Zhang


