解决方案如下:
原文链接:https://www.f2er.com/bash/383455.htmlfunction HighlightEvery(lineNumber,lineEnd) highlight myhighlightpattern ctermbg=darkred guibg=darkred let pattern="/" let i = 0 while i < a:lineEnd let i += a:lineNumber let pattern .= "\\%" . i . "l\\|" endwhile let pattern .= "\\%0l/" let commandToExecute = "match myhighlightpattern ".pattern execute commandToExecute endfunction command -nargs=* Highlightevery call HighlightEvery(<f-args>)
并打电话
:Highlightevery 10 1000
将突出显示行号1000中的每10行.