Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've just added the Git Gutter plugin for Vim which shows lines added/modified/deleted according to git diff. It uses the Sign Column to show characters next to each line.

At the moment the column appears on save, which is quite jarring. I'd prefer the column to always show, even if empty.

How can I make Sign Column always visible?

share|improve this question
add comment

2 Answers

up vote 17 down vote accepted

You have to define a dummy sign and place it into the current buffer:

:sign define dummy
:execute 'sign place 9999 line=1 name=dummy buffer=' . bufnr('')
share|improve this answer
    
Spot on, thank you :) –  jordelver Feb 28 '13 at 17:50
8  
To make it work in every new buffer you open, put both autocmd BufEnter * sign define dummy and autocmd BufEnter * execute 'sign place 9999 line=1 name=dummy buffer=' . bufnr('') in your vimrc. –  akent Mar 7 '13 at 1:40
add comment

For vim-gitgutter specifically, you can also set the following variable in your ~/.vimrc:

let g:gitgutter_sign_column_always = 1
share|improve this answer
    
Thanks, that option must of been added after this question was posted. Useful to know though. –  jordelver Mar 14 at 11:57
    
Indeed, it seems that the commit which added it was made on 14 March 2013 — exactly two weeks after your question! –  wjv Mar 14 at 19:05
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.