Sunday, April 3, 2011

Re: A Few Issues with the non-gui vim

On Apr 3, 12:12 pm, John Magolske <listm...@b79.net> wrote:
> * ale <33faceb...@gmail.com> [110402 17:47]:
>
> To remind myself what mode I'm in I have the text-cursor change color,
> using the following in my vimrc. Note that the ^[ and ^G here are not
> literal two-character combinations (ie, can't just cut & paste those
> parts), but Escape and Ctrl-G formed by pressing Ctrl-V then escape,
> and Ctrl-V then Ctrl-G respectively.
>
One problem i have is that the curosor is blinking so it still take
about a second to see the new color, how to stop it?

> " text-cursor color by mode in xterm, linux console and screen.linux console:
> " normal mode = golden, insert mode = green, return to green when leaving vim
> if &term =~ "xterm"
>     :silent !echo -ne "\033]12;GoldenRod\007"
>     set t_SI+=^[]12;green^G
>     set t_EI+=^[]12;GoldenRod^G
>     autocmd VimLeave * :!echo -ne "\033]12;green\007"
>     " show 'Vim, filename' in xterm title bar
>     set titlestring=\%(\%M%)%t\ (Vim)
>     " Set xterm to 16 colors (don't I want more?)
>     set t_Co=16
> endif
> if &term == "linux" && !has("gui_running")
>     set t_ve+=^[[?17;183;95c  " yellow
>     au InsertEnter * set t_ve+=^[[?17;207;111c  " green
>     au InsertLeave * set t_ve+=^[[?17;183;95c  " yellow
>     autocmd VimLeave * set t_ve+=^[[?17;207;111c  " green
> endif
> if &term == "screen.linux"
>   set t_ve+=^[[34l
>   au InsertEnter * set t_ve+=^[[34h^[[?25h    " cnorm
>   au InsertLeave * set t_ve+=^[[34l           " cvvis
>   autocmd VimLeave * set t_ve+=^[[34h^[[?25h
>   " show 'V:filename' as window name for screen (Tip 1126)
>   set titlestring=\%(\%M%)V:%t
>   set t_ts=^[k
>   set t_fs=^[\
> endif
>
why all this branching? are all terminals quering the same db
(terminfo?)?
thanks>
> --
> John Magolskehttp://B79.net/contact

--
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

No comments: