Last active
January 6, 2024 07:25
-
-
Save mattboehm/7109927 to your computer and use it in GitHub Desktop.
Highlighting lines in vim
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"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() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment