Tuesday, January 10, 2023

Highlighting cursor lines

Hello,

Is there a way to highlight the cursor line in other windows in the current tab differently than the window that has the focus? I like to know which line is selected in each window, but also want to be able to tell at a glance which is the window where my editing and cursor movement will happen.

I currently have a series of autocommands to restrict the highlight to the current window, which helps me figure out the current window (such as if I go to another application and then come back to Vim), but I would also like to know where the cursor is in other windows:

augroup cursorLine
  au!

  au WinLeave          * set nocursorline
  au BufEnter,WinEnter * set cursorline
augroup END

Thank you very much.

--
 
Salman

I, too, shall something make and glory in the making.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CANuxnEfTQhqSW%3DDSfVXAsQSQonaj%3DwDYeS2LVRJHYhNKDw7_LA%40mail.gmail.com.

No comments: