Hi,
When using Vim I find it helpful to have the cursor change color
depending on mode. Mostly I'm running Vim in Screen in a Linux
framebuffer console, but sometimes in an Xterm. I'd like to get
this working in tmux running in a framebuffer console.
Here's what I have in my vimrc now:
" 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"
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
endif
The above works for a tmux session running in an xterm if I place this
in my tmux.conf file:
set -g default-terminal "xterm"
But I'm not finding a way to change cursor color while running tmux in
a framebuffer console.
Reading through the TERMINFO EXTENSIONS section of the tmux man page I
see Cc & Cr ... "If set, a sequence such as this may be used to change
the cursor colour from inside tmux: printf '\033]12;red\033\\' "
That printf command issued in a tmux session running in an xterm
will indeed turn the cursor red...but I can't seem to find the right
sequence to do the same in tmux running in a framebuffer console.
So I'm trying to figure out if there's something I should add to my
terminfo, or if there's an escape sequence that will do the job here.
Thanks for any help,
John
--
John Magolske
http://B79.net/contact
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
tmux-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tmux-users