public
Last active

Highlighting lines in vim

  • Download Gist
gistfile1.vim
VimL
1 2 3 4 5 6 7 8 9 10
"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
endfunction
command! HL call g:HighlightLine()

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.