vim:aucmd: Underline old cursor position
Underline old cursor position for better readability. Reusing `TermCursor` made me confuse the current window many times. My favorite solution would be an empty box around the position similar to how terminals do it when focus is lost. But I fear that this is not possible with a simple highlighting group.
This commit is contained in:
@@ -104,10 +104,10 @@ augroup highlight_current_word
|
||||
au CursorMovedI * call HighlightCurrentWord()
|
||||
augroup END
|
||||
|
||||
" When switching focus to another window, keep the cursor location highlighted.
|
||||
" When switching focus to another window, keep the cursor location underlined.
|
||||
function! HighlightOldCursorPos()
|
||||
let w:cursor_pos_match_id = matchaddpos(
|
||||
\ 'TermCursor',
|
||||
\ 'Underlined',
|
||||
\ [getcurpos()[1:2]])
|
||||
endfunction
|
||||
function! ClearOldCursorPos()
|
||||
|
||||
Reference in New Issue
Block a user