2

In GVIM I use vertical thin line as my cursor by adding following line to my .gvimrc

set guicursor=a:ver13-Cursor

This works perfectly as long as window remained focused. As soon as GVIM window lost it focus cursor change to bad ugly transparent block. How can I prevent that. (This happens in all modes like insert, visual, ...)

I'm on linux-arch-gnome3-gvim

Thanks

enter image description here

EDIT1

As suggested by cristian there may be a autocmd that create this effect enter image description here

  • do you have a CursorLost autocommand? Check :verbose :au CursorLost – Christian Brabandt Nov 12 '18 at 4:12
  • @ChristianBrabandt Thanks for you reply. nice comment. Actually looklike my vim (8.0) doesn't have CursorLost event (running your command return E216: No such group or event!) but I find a new event FocusLost. I edit my post and add it's response. I think creating an autocommand on Focus lost may help – user41209 Nov 12 '18 at 7:11
  • Yeah, I actually meant FocusLost, that was a typo. Could disable the mentioned plugin and check if the problem still occurs? – Christian Brabandt Nov 12 '18 at 7:23
  • I disable the plugin but unfortunately the result remained the same. I also installed a fresh vim on an other machine with no config but setting cursor yesterday and see same outcome there too. If it's not rude what is your gvim version. may be do an update fix it for me – user41209 Nov 12 '18 at 7:28
  • This behavior is not caused by vim, but your windows manager (e.g. openbox). You should see the same effect when a terminal window looses focus. – nst0022 Nov 12 '18 at 8:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.