Skip to content

Provides the branch name of the current git repository

License

Notifications You must be signed in to change notification settings

itchyny/vim-gitbranch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vim-gitbranch

Usage

This plugin provides a function which returns the name of the git branch.

:echo gitbranch#name()

You can use this function to integrate with statusline plugins.

For example, in order to show git branch using lightline.vim, configure as follows.

let g:lightline = {
      \ 'active': {
      \   'left': [ [ 'mode', 'paste' ],
      \             [ 'gitbranch', 'readonly', 'filename', 'modified' ] ]
      \ },
      \ 'component_function': {
      \   'gitbranch': 'gitbranch#name'
      \ },
      \ }

See the README.md of lightline for further details.

Installation

Install with your favorite plugin manager.

Author

itchyny (https://github.com/itchyny)

License

This software is released under the MIT License, see LICENSE.

About

Provides the branch name of the current git repository

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published