Those are terminal escape sequences. Modifying them isn't going to help
you at all, they should be set automatically based on the value of the
$TERM environment variable (in your case, "screen") and the contents of
your system's terminfo database.
You need to get Vim to actually emit those sequences if you want the
various effects. I know that you can set the values of 't_SI' and 't_EI'
as sequences to be emitted when entering and leaving insert mode,
respectively. I use those to turn my cursor green during insert mode,
using the following snippet in my .vimrc:
if &term =~ "xterm\\|rxvt" " Only apply this in xterm or rxvt-* terminals
silent !echo -ne "\033]12;white\007" " Initialize the cursor to white at startup
let &t_SI = "\033]12;green\007" " Turn the cursor green when entering insert mode
let &t_EI = "\033]12;white\007" " Turn the cursor white again when leaving insert mode
autocmd VimLeave * !echo -ne "\033]12;white\007" " Make sure the cursor is back to white when Vim exits
endif
As you see, you can just echo a literal escape sequence if you know the
one you want to use. You could probably use the "t_" variables in an
:execute command to get the same effect, but more portably across
terminals, e.g.:
silent execute '!echo -n "' . t_foo . '"'
That should echo the contents of the 't_foo' option to your terminal.
(It's completely untested though, so don't take my word for it.)
Perhaps someone else can fill in the gaps in my knowledge here, or maybe
that gives you enough to go on to figure it out yourself.
Minor correction: At the very least, that should have been "&t_foo"
instead of "t_foo" in the above.
These are my mappings to change cursor color (for vim in xterm):
map @1 :!echo -ne "\033]12;midnightblue\007"<CR><CR>
map @2 :!echo -ne "\033]12;grey100\007"<CR><CR>
map @3 :!echo -ne "\033]12;chartreuse1\007"<CR><CR>
map @4 :!echo -ne "\033]12;SlateBlue\007"<CR><CR>
You can check if that works for you.
Best,
Marcin
>
> --
> 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