π£ gina.vim
WARNING
Development of gina.vim is stopped. Users should be patient with existing bugs or check gin.vim that is under active development. Any further improvements of features will be applied to gin.vim instead.
gina.vim (gina) is a plugin to asynchronously control git repositories.
Presentation
I've talked about what the gina.vim is in VimConf2017 (Slide). Check it out if you would like to feel what the gina.vim is.
Usage
The following is a schematic image of general working-flow with gina.
βββββββ¬βββββββββββ
β β β
#DIRTY# β βΌ
β² β :Gina status β << : stage
β β β β >> : unstage
β β β β -- : toggle
:write β #STAGED# β == : discard
β² β β β pp : patch
β ββββββββββββ€ β dd : diff
β β βΌ
#CLEAN# β :Gina commit β ! : switch --amend
β β β β :w : save cache
β βΌ β β :q : commit changes (confirm)
ββββββββββββββββββ β :wq : commit changes (immediate)
So basically user would
- Edit contents in a git repository
- Stage changes with
:Gina status
- Commit changes with
:Gina commit
See :h gina-usage
for advance usage. Gina provides a lot more features.
Pros.
- A git detection is fast and accurate
- It does not require
git
process so incredibly fast - Used in lambdalisue/vim-gita, for several years
- It does not require
- Commands are asynchronously performed
- Users don't have to wait
:Gina push
(git push
) - Asynchronous feature in Neovim is great.
:Gina log
(git log
) on Linux repository won't freeze Neovim
- Users don't have to wait
- Single command. Users do not need to remember tons of commands
:Gina {command}
will execute a gina command or a git raw command asynchronously:Gina! {command}
will execute a git raw command asynchronously:Gina!! {command}
will execute a git raw command in a shell (mainly for:Gina!! add -p
or:Gina!! rebase -i
)
- Action based. Users do not need to remember tons of mappings
?
to see the helpa
to select an action to perform (complete with<Tab>
).
to repeat previous action- All action can map to an actual keymap
- Author tried to follow Vim's flavor
- No mapping for
ee
or whatever which conflicts with Vim's native mappings (like vim-gita does...)
- No mapping for
- Customizable
- Users can define action aliases and mappings
- Users can define default options and aliases of command
- More
- Tested on all major platforms
- Powered by vim-jp/vital.vim, mean that the things are unit tested
- Gina add some behaviour test as well
Contribution
Any contribution including documentations are welcome.
Contributers should install thinca/vim-themis to run tests before sending a PR if they applied some modification to the code. PRs which does not pass tests won't be accepted.
License
The code in gina.vim follows MIT license texted in LICENSE. Contributors need to agree that any modifications sent in this repository follow the license.