vim-branchname

Top-level Files of tip
Login

Top-level Files of tip

Files in the top-level directory from the latest check-in


Get branchname in Vim

A Vim plugin to find a branchname, e.g. to show in the status line.

The BranchName() function returns the name of the branch, optionally adding a prefix, the version control system name and a suffix.

The implementation aims to be light weight in use by caching branchnames until the mtime of the identified repository changes.

Currently supported version control systems are Fossil, Git and Mercurial.

Please see :help branchname for more information.

Installation

Vim pluging managers using get can use the GitHub mirror with e.g.

    :Plug 'prebeng/vim-branchname'

Using fossil:

  1. Create directory ~/.vim/pack/simple/start/vim-branchname/, where simple can be any directory name (I use this for simple plugins).
  2. Clone the officieal repository in a location of your liking.
  3. In the directory in step 1, use fossil open to check out the reposository.
  4. Run :helptags ~/.vim/pack/simple/start/vim-branchname/doc.

Manual installation: