On Sat, 24 Nov 2012, James McCoy wrote:

On Sat, Nov 24, 2012 at 01:17:13PM -0500, Benjamin R. Haskell wrote:
As far as I can tell, the t_SI and t_EI sequences¹ don't have non-Vim equivalents in either termcap or terminfo. Is that accurate? Were they just "made up" out of necessity?

Yes.  As noted at the top of the ":help t_SI" paragraph:

 Added by Vim (there are no standard codes for these):

Woops. Jumped directly to *t_SI* and assumed I was in the big list of termcap entries. Didn't help that *t_EI* pointed to *termcap-cursor-shape*, which made it seem like an actual termcap entry.


If it's not accurate, does someone have a link to a termcap or terminfo reference that includes those two?

http://invisible-island.net/xterm/ctlseqs/ctlseqs.html has information on the sequences necessary to control this behavior with xterm. For example,

 " Switch to underline on insert
 let &t_SI="\<Esc>[4 q"
 " Back to block when leaving
 let &t_EI="\<Esc>[2 q"

Thanks. That's actually what I was hoping to find by tracing back through t_SI/t_EI: anything close to a "standard" set-cursor-style sequence. (The Xterm Control Sequence reference calls it DECSCUSR, from the VT520. I'm adding it to simple-terminal from st.suckless.org)


E.g. in Konsole (needs to be in .vimrc, since updates don't seem to take effect):

Setting it interactively works for me when running in xterm. I'm not sure why it wouldn't work, since Vim sends this every time it enters/leaves insert mode.

Well, crap. Also PEBKAC. Looking at the source, term_cursor_shape short-circuits:

if (!full_screen || *T_CSI == NUL || *T_CEI == NUL)
  return;

When testing interactively, I was only setting t_SI.

Sorry for (all) the noise. But thanks for finding the actual sequence I was looking for.

--
Best,
Ben

--
You received this message from the "vim_dev" 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

Raspunde prin e-mail lui