qvacua / vimr

VimR — Neovim GUI for macOS in Swift
https://twitter.com/VimRefined
MIT License
6.66k stars 217 forks source link

Out-of-focus visual cue, such as changing the cursor #377

Open adamalbrecht opened 7 years ago

adamalbrecht commented 7 years ago

It'd be nice if there was a visual way of showing that the window is out of focus. This is useful when I have the editor full screen on 1 of my 2 monitors and the window bars are not visible. I'm not sure about most people, but this is how I use VimR 90% of the time.

Often I won't realize that I'm out of focus and I'll start typing for a few moments before noticing it.

When I'm using Vim/NeoVim inside iTerm2, when focus leaves the iTerm window, the cursor changes from a solid rectangle to an outlined one. This simple visual cue makes me quickly realize I'm not in focus and I instinctively hit cmd-tab.

iterm_vim_in_focus iterm_vim_out_of_focus
cypheon commented 4 years ago

This feature is implemented in my branch feature/cursor-focus-aware.

It currently looks like this:

cursor-focus-demo

It builds on top of the changes in #790, so once that one is merged, it's only a small step towards an out-ouf-focus special cursor.