Re: [dev] [st] Why does F5 capitalize things?

From: Ryan Roden-Corrent <>
Date: Tue, 26 Apr 2016 07:43:44 -0400

On Sun 04/24/16 11:57PM, Ryan Wilson wrote:
> ---- On Sun, 24 Apr 2016 20:21:19 -0500 Ryan Roden-Corrent <> wrote ----
> > I've reported a bug on ctrlp, because F5 seems to work for most other things in
> > vim (I can create bindings with it just fine). Still, let me know if anyone has
> > suggestions on how to resolve this on my end (I guess I could just always use
> > `TERM=xterm vim` until that causes another problem...).
> Actually I found it, if you grep the ctrlp source for "xterm" you'll find this:
> if ( has('termresponse') && v:termresponse =~ "\<ESC>" )
> \ || &term =~? '\vxterm|<k?vt|gnome|screen|linux|ansi|tmux'
> It's checking that TERM=xterm or some other known terminal. Then it seems like
> it sets up keybindings based on that. Add st-256color to that line and it will work.
> Checking $TERM against a hardcoded list is a common practice even though it's
> not the right way to do things. That's why sometimes you have to set TERM=xterm
> to make a program work. I don't think it will actually break anything for vim, it's just
> in general not strictly correct.

Huh, to someone who doesn't know vimscript, it looks like that code is only
there to remap arrow keys. The comment even says so!

Adding st-256color to that check fixes it, though! Thanks!

What would be the right way to do something like this?

Received on Tue Apr 26 2016 - 13:43:44 CEST

This archive was generated by hypermail 2.3.0 : Tue Apr 26 2016 - 13:48:11 CEST