Hi Sean,

Thanks for following up on this -- I got everything working Ok.

* Sean Estabrooks <seanl...@sympatico.ca> [120728 18:36]:
> My best guess for you to get the final results you want is to add 15
> to each of the 2nd and 3rd parameters in order to get black text.
> This should actually result in dimmed text so it'll appear grey.
> To get dark black, change the first parameter to 16 (from 120). So
> based on the results you report, something like:
>
> setw -ga terminal-overrides 
> ',*:Cc=\E[?16;%p1%s;255c:Cr=\E[?16;95;255c:civis=\E[?25l:cnorm=\E[?25h:cvvis=\E[?25h,'
> 
> And then add 15 to each of the values you were passing to vim.. so:
> 
>   let &t_EI="\<esc>]12;31\007"

Your suggested values work perfectly!

Just for the sake of anyone coming across this looking to do
something similar, here's what I ended up placing in my vimrc
(with ^[ being a literal escape of course) :

if &term == "tmux.linux"
  set t_ve+=^[]12;31^[\                     " yellow cursor, normal mode
  au InsertEnter * set t_ve+=^[]112^[\      " green cursor, insert mode
  au InsertLeave * set t_ve+=^[]12;31^[\    " yellow cursor, normal mode
  autocmd VimLeave * set t_ve+=^[]112^[\    " green cursor (default)
endif

This will switch the cursor color upon entering Vim (in normal mode),
switch it back & forth when entering/leaving insert mode, and return
the cursor color to the default when quiting Vim.

To allow Vim to differentiate between a screen session and a tmux
session running in the framebuffer console, I copied a screen.linux
terminfo to ~/.terminfo/t/tmux.linux and set default-terminal to
"tmux.linux" in my ~/.tmux.conf file. At some point I may transition
completely to tmux and not need that...

> The main takeaway is that the 3rd parameter is logically OR'd with
> the attribute bits and then parameter 2 is XOR'd. so in the example
> above we're first forcing all attribute bits on (ie. with 255)
> and then turning some of those bits off with whatever we set in
> parameter 2. The 8 attribute bits are broken into 2, 4-bit nibbles,
> one for the foreground and the other for the background.

Thanks for writing up all these details, it'll come in handy for
future reference when wrangling with Linux console escape & control
sequences.

Regards,

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
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to