Hi Sean,

Thanks for the helpful explanations & examples, this gets me a lot
closer. I've a few more questions...

* Sean Estabrooks <seanl...@sympatico.ca> [120727 23:25]:
> ...
> Here is a setup that should work in Vim for you. ...
> 
> tmux.conf entry :
>  
> setw -ga terminal-overrides 
> ',*:Cc=\E[?120;%p1%s;240c:Cr=\E[?120;0;240c:civis=\E[?25l:cnorm=\E[?25h:cvvis=\E[?25h,'
> 
> The linux terminfo entry here overrides the cursor color settings
> for civis, cnorm, and cvvis and thus need to be redefined to allow
> things to work. The other thing to note is the ;0 in the Cr entry
> which will select white as the default cursor color.

Using your suggested terminal-overrides entry, I swapped out that ;0
with ;80 to get my desired color cursor:

setw -ga terminal-overrides 
',*:Cc=\E[?120;%p1%s;240c:Cr=\E[?120;80;240c:civis=\E[?25l:cnorm=\E[?25h:cvvis=\E[?25h,'

> let &t_SI="\<esc>]12;96\007"
> 
> let &t_EI="\<esc>]112\007"

Wanting Vim's insert-mode cursor to be the default color and the
normal-mode cursor color to be different, I set this in my ~/.vimrc:

  let &t_SI="\<esc>]112\007"
  let &t_EI="\<esc>]12;16\007"

> The ";96" above will select a red cursor for insert mode.

I found that ;96 sets the cursor to light blue, ;16 sets it to yellow
and ;80 sets it to light green. I've read though the console_codes(4)
manpage, the /usr/src/linux/Documentation/VGA-softcursor.txt file, and
this page which seems explain VGA-softcursor.txt a bit:

  Cursor Appearance in the Linux Console
  http://linuxgazette.net/137/anonymous.html

...but it's still all rather confusing.

> ... the codes you'll have to choose from for each of
> the 8 available colors:
> 
>    Black = 224
>    Blue = 192
>    Green = 160
>    Cyan = 128
>    Red = 96
>    Magenta = 64
>    Orange = 32
>    White = 0

I get different colors for these (hardware dependent behaviour?), but
trying the following values I can see all the 16 colors my framebuffer
console is capable of:

  0, 16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, 224, 240

I set the default cursor foreground color to green with ;80 and yellow
with ;16 ...so far so good. But now it's the cursor background color
I'm having trouble with. These values set the background color to
white and I'd like it to be black, as a yellow or green cursor over a
black character provides better contrast.

I *think* what I need to do is change the ;0 and ;240 values in the
terminal-overrides string you suggested in concert with that ;96 value
in my vimrc. These all seem interrelated, and I haven't been able to
sort out the right combination that'll provide the desired cursor
foreground colors along with a black background in all cases.

Any further clues much appreciated (ie, would I change both values in
the terminal-overrides entry currently shown as ;240 ?).

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