Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Highlighting lines in vim
"with your cursor on a line or a block selected, type `:HL`
"to remove, on each line call :sign unplace
highlight HL ctermbg=darkgray
sign define hl linehl=HL
let s:highlightLineSignId = 74000
function! g:HighlightLine()
execute 'sign place' s:highlightLineSignId 'line='.line(".") 'name=hl' 'file='.expand("%")
let s:highlightLineSignId += 1
command! HL call g:HighlightLine()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment