In essence, these are just the following autocmds:
augroup CursorLine au! au VimEnter * setlocal cursorline au WinEnter * setlocal cursorline au BufWinEnter * setlocal cursorline au WinLeave * setlocal nocursorline augroup END
But sometimes you can define exceptions (that is, always on or off) for certain windows. This may be useful for my CursorLineCurrentWindow plugin .
source share