Skip to content

Instantly share code, notes, and snippets.

@vheon
Created December 9, 2015 01:07
Show Gist options
  • Save vheon/0214290a359f42e2cd04 to your computer and use it in GitHub Desktop.
Save vheon/0214290a359f42e2cd04 to your computer and use it in GitHub Desktop.
Simple function for always display sign column in vim
sign define DummySign
function! s:place_dummy_sign(bufid)
if !getbufvar( a:bufid, 'dummy_sign' )
execute "sign place 1234 line=1 name=DummySign buffer=".a:bufid
call setbufvar( a:bufid, 'dummy_sign', 1 )
endif
endfunction
Autocmd BufEnter * call s:place_dummy_sign( bufnr( '%' ) )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment