Tuesday, January 10, 2023

Re: Highlighting cursor lines

I had thought Vim dims inactive windows the same way TMux does; but this question made me realize I've been hallucinating that feature all these while.

One way is to play with your au! commands as you've done; finding the right visual cue which works for you. I've always worked around this with the iTerm cursor-focus feature — dunno if that's the real name. If you press Command + / in iTerm, there's an obvious highlight which shows you where your cursor is.

I'm on OS X, but I'm sure this would work in iTerm across OSes. There could also be equivalent in other shell apps; but I only use iTerm


- Igbanam

On Tue, Jan 10, 2023 at 7:14 PM Salman Halim <salmanhalim@gmail.com> wrote:
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.

--
--
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/CAOmRJrdmZnzhedDOGyQh8tS_d8Pvt%3D2YSTLHGKxZCDt2s4H91Q%40mail.gmail.com.

No comments: