58

GitHub - itchyny/vim-gitbranch: Provides the branch name of the current git repo...

 5 years ago
source link: https://github.com/itchyny/vim-gitbranch
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

README.md

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 Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK