Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

AltStyle によって変換されたページ (->オリジナル) /