Skip to content

git-flow-format is a plugin for vim-airline, which formats a Git Flow branch name in order to shorten the prefixes and take up less space in your status line.

License

Notifications You must be signed in to change notification settings

renyard/vim-git-flow-format

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Vim git-flow-format

git-flow-format is a plugin for vim-airline, which formats a Git Flow branch name in order to shorten the prefixes and take up less space in your status line.

This is best shown with a couple of examples:

feature/new_thing --> F:new_thing
release/v1.0.0 --> R:v1.0.0

Installation

git-flow-format can be installed with Vundle or Pathogen in the normal way.

Vundle

Add the following line to your .vimrc and run :PluginInstall.

Plugin 'renyard/vim-git-flow-format'

Pathogen

Git clone the repo into your bundle directory:

git clone https://github.com/renyard/vim-git-flow-format.git ~/.vim/bundle/vim-git-flow-format

You can then configure vim-airline to use this format by adding the following line to your .vimrc:

let g:airline#extensions#branch#format = 'Git_flow_branch_format'

Customization

If you don't like the shortened prefixes provided by git-flow-format, you can provide a dictionary of your own prefixes in the style of the default:

let g:git_flow_prefixes = {
    \ 'master': '',
    \ 'develop': '',
    \ 'feature': 'F:',
    \ 'release': 'R:',
    \ 'hotfix': 'H:',
    \ 'support': 'S:',
    \ 'versiontag': 'V:'
\ }

Assigning an empty string, as in master and develop, will result in no substitution being performed for matching branches.

About

git-flow-format is a plugin for vim-airline, which formats a Git Flow branch name in order to shorten the prefixes and take up less space in your status line.

Resources

License

Stars

Watchers

Forks

Packages

No packages published