Quantcast

how to change cursor in insert mode?

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

how to change cursor in insert mode?

blekm
This post has NOT been accepted by the mailing list yet.
how to have the standard "vertical line" into VIM when I'm into insert mode? I've just tried a few solution, but without success...

thanks
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: how to change cursor in insert mode?

retiredff
This post has NOT been accepted by the mailing list yet.
I use this in my color file:


hi Cursor               guifg=White         guibg=DodgerBlue3      
hi iCursor              guifg=White         guibg=red

set guicursor=n-v-c:block-Cursor
set guicursor+=i-ci:ver25-iCursor


also:

:help guicursor
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: how to change cursor in insert mode?

blekm
This post has NOT been accepted by the mailing list yet.
where is the color file? What goes there and what into .vimrc.

I've put all you code into .vimrc

hi Cursor               guifg=White         guibg=DodgerBlue3      
hi iCursor              guifg=White         guibg=red

set guicursor=n-v-c:block-Cursor
set guicursor+=i-ci:ver25-iCursor

but nothing happen
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: how to change cursor in insert mode?

retiredff
This post has NOT been accepted by the mailing list yet.
your color file (default.vim, desert.vim and others) are located in ~/.vim/colors.

put all of the code in that file.

hi Cursor               guifg=White         guibg=DodgerBlue3  
is the cursor color in normal mode
     
hi iCursor              guifg=White         guibg=red
cursor color in insert mode


set guicursor=n-v-c:block-Cursor
cursor size/type in normal mode

set guicursor+=i-ci:ver25-iCursor
insert mode

go into insert mode from normal, the cursor should change from a blue block to a red vertical line. Be sure to reload your colorscheme file. Change to suit your needs

:h guicursor



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: how to change cursor in insert mode?

blekm
This post has NOT been accepted by the mailing list yet.
This post was updated on .
i've just add

hi Cursor guifg=White guibg=DodgerBlue3                      
hi iCursor guifg=White guibg=red
set guicursor=n-v-c:block-Cursor
set guicursor+=i-ci:ver25-iCursor

into my file .vim/colors/vombat.vim (vombat.vim it's my coloscheme specified into .vimrc)

and reopen vim, but nothing happen. Something specific to do for reload color scheme? Or it enough to open a new vim?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: how to change cursor in insert mode?

retiredff
This post has NOT been accepted by the mailing list yet.
if you saved vombat.vim before reloading .vimrc it should work.
Is there a setting in .qvimrc that is changing this?

Any errors?

Besides the code I posted, I'm at a loss. That code is in my color file and works as described.

BTW, I use MacVim.




Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: how to change cursor in insert mode?

blekm
This post has NOT been accepted by the mailing list yet.
This post was updated on .
I'm on ubuntu 10.04 + vim.

I've put code above at the end of vombat.vim, close the file, no changes into .vimrc.

Nothing happen
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: how to change cursor in insert mode?

retiredff
This post has NOT been accepted by the mailing list yet.
your cursor DOES NOT change when changing from "normal" to "insert" mode?

vim may not have that capability?

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: how to change cursor in insert mode?

blekm
This post has NOT been accepted by the mailing list yet.
maybe VIM doesnt support this, maybe only GVIM does?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: how to change cursor in insert mode?

retiredff
This post has NOT been accepted by the mailing list yet.
that could be the reason, as I don't use vim for console.

Maybe someone else will answer.


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: how to change cursor in insert mode?

blekm
This post has NOT been accepted by the mailing list yet.
thanks anyway for trying
Loading...