Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.2 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Text Editing&Processing > Vim Plugins

    Git Branch Info 0.0.7

    Download button

    No screenshots available
    Downloads: 602  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    Fair (2.8/5)
    17 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Eustaquio Rangel de Oliveira Jr. | More programs
    GPL / FREE
    June 23rd, 2008, 17:51 GMT
    ROOT / Text Editing&Processing / Vim Plugins

     Read user reviews (0)  Refer to a friend  Subscribe

    Git Branch Info description

    Git Branch Info is a Vim plugin for use on your status line to show info about Git branches.

    Git Branch Info is a Vim plugin for use on your status line to show info about Git branches.

    This plugin show branches information on the status line.

    To install, just put this file on ~/.vim/plugins and set your status line:

    :set statusline=%{GitBranchInfoString}

    Of course you can append this configuration to an existing one and make all the customization you want on the status line, like:

    :set statusline=%#ErrorMsg#%{GitBranchInfoString}%#StatusLine#

    The command above will show the Git branches info on the same color as the error messages. You can choose any color scheme you want to. Use

    :help highlight-groups

    to check for some other options.

    There are some customization on the result string based on existing variables like:

    let g:git_branch_status_head_current=1
    This will show just the current head branch name

    let g:git_branch_status_text="text"
    This will show 'text' before the branches. If not set ' Git ' (with a trailing
    left space) will be displayed.

    let g:git_branch_status_nogit=""
    The message when there is no Git repository on the current dir

    let g:git_branch_status_around=""
    Characters to put around the branch strings. Need to be a pair or characters, the first will be on the beginning of the branch string and the last on the end.

    let g:git_branch_status_ignore_remotes=1
    Ignore the remote branches. If you don't want information about them, this can
    make things works faster.

    If you want to make your own customizations, you can use the GitBranchInfoTokens() function. It returns an array with the current branch as the first element and another array with the other branches as the second element, like:

    :set statusline=%#ErrorMsg#% {GitBranchInfoTokens()[0]}%#StatusLine#

    or

    :set statusline=%#StatusLineNC# Git %#ErrorMsg# %{GitBranchInfoTokens()[0]} %#StatusLine#

    will give you a nice custom formatted string.

    This will show you the current branch only. No prefix text, no characters around it. You can also make another functions to use the returned array.

    Requirements:

    · Vim

    What's New in This Release:

    · Found a way of detecting if the file needs to be written.
    · If it's a normal
    · buffer, it is written, if not, the GitBranchInfoWriteCheck() skip it.
    · Useful with other scripts that use temporary buffers like VCSCommand.



    Product's homepage

      


    TAGS:

    Git info | Vim plugin | Git branch | Git | branch | information

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM