Reputation: 127558
I've been switching some windows in VIM from vertical to horizontal splits and back using:
CTRL-W + K
CTRL-W + L
CTRL-W + J
CTRL-W + H
After doing this a few times the cursor disappeared. I can still type, and the status bar at the bottom still shows me my location, but there's no blinking cursor. Any ideas regarding:
I'm using vim 7.2 on Linux
Upvotes: 29
Views: 14816
Reputation: 3085
It's logged as a bug against Ubuntu (although it also occurs in Fedora) https://bugs.launchpad.net/ubuntu/+source/vim/+bug/616858
From the bug report, two other workarounds:
mousehide
option (:set nomousehide
) stops the bug from appearingHope this helps.
Upvotes: 4
Reputation: 1853
I had the same problem using vimx
from gnome-terminal
(not gvim
, as some other commentators do).
I noticed that the cursor disappeared only in command
and insert
mode and was present in visual
mode. I tried all advice above, but that didn't help. Here is a good wiki on configuring the cursor in vim, but that didn't help either.
I tried vimx
, vim
, vi
with the same file, and found that none of them showed the cursor. Then I had noticed that gnome-terminal
neither showed the cursor.
Here are some suggestions on how to make gnome-terminal show cursor. I simply used another tab and that worked.
Upvotes: 0
Reputation: 566
i've noticed that the best way to recover cursor when playing with windows(vim windows) is to reload the .vimrc file.
in order to do this easily, i've added a shortcut in order to source VIMRC. After sourcing vimrc my cursor reappear for insert mode.
so far i have not found out why the cursor is disappearing.
" - | reloading vimrc, sourcing it
nnoremap <leader>sv :source $MYVIMRC<CR>
my leader is ",,"
so when i type :
,,sv
my cursor reappear for insert mode.
Upvotes: 0
Reputation: 1500
Look into your ~/.gvimrc file, comment everything out and launch gvim again. Look it the problem is still there. Do some binary search to see exactly what's causing the problem.
In my case it was this line, which I removed:
set gcr=n:blinko
This should prevent cursor from blinking. I can live without it. Maybe I did an update and something changed in regards to this configuration.
Upvotes: 1
Reputation: 983
Try reloading the color scheme, worked for me...
I did the following
:syntax reset
:colorscheme mycolortheme
Upvotes: 0
Reputation: 356
I have the same problem and I have used couple of work-arounds that work for me:
!echo > /dev/null
- this seems to bring back the cursor as well.I am experimenting whether doing the following (remove the left side scroll bar completely) fixes this problem completely or not - this seems to work in limited experiments but the jury is still out on this :)
set guioptions-=L
set guioptions=-l
Osho
Upvotes: 34
Reputation: 11
I've noticed that when you open gvim without any files and then use :e and :vsplit you never lose the cursor.
Upvotes: 1
Reputation: 160581
I tried sourcing .vimrc and that didn't help.
I noticed that the blinking cursor is available if I launch (g)vim with a -O option and my files, rather than load a single file then do a split and load via :vspl filename.
Upvotes: -1
Reputation: 623
I've noticed this a few times in gvim on Ubuntu. Haven't got an idea of what causes it but sourcing vimrc again seems to solve it.
Upvotes: 2