Skip to content

semanser/gina.vim

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gina

Gitter Travis CI AppVeyor Version 0.2.1 Support Vim 8.0.0027 or above Support Neovim 0.1.7 or above Support Git 1.8.5.6 or above MIT License Doc Powered by vital.vim

gina.vim (gina) is a plugin to asynchrnously control git repositories.

The plugin was developed based on the success of lambdalisue/vim-gita. So gina.vim has most of the outstanding features of vim-gita and drops some unwilling points.

gina.vim is in beta-phase, mean that the features were not completed yet and the features may be modified without backward compatibility

Supports

  • Git 1.8.5.6 or above
  • Vim 8.0.0027 or above or Neovim 0.1.7
  • All major platforms
    • Linux (Tested on TravisCI, author use Linux)
    • macOS (Tested on TravisCI, author use OS X Elcapitan)
    • Windows (Tested on AppVeyor, main contributor use Windows)

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

  1. Edit contents in a git repository
  2. Stage changes with :Gina-status
  3. Commit changes with :Gina-commit

See :h gina-usage for advance usage. Gina provides a lot more features.

Missings

The following features are planned but missing for now

  • Command completions

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
  • 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
  • Single command. Users do not need to remember tons of commands
    • :Gina {command} will execute a gina command or a git raw command asynchrnously
    • :Gina! {command} will execute a git raw command asynchrnously
    • :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 help
    • <Tab> to select an action to perform
    • . 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...)
  • 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.

About

Asynchronously control git repositories in Neovim/Vim 8

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Vim Script 98.4%
  • Other 1.6%