Function keys fail sporatically in VIM

John Wiersba
Tue Feb 22 05:44:00 GMT 2000

I've been having function key problems with vim 5.5 (also 5.3) on cygwin.  I
have F2 mapped to <Esc>:w<CR> for insert mode:
   !  <F2>         <Esc>:w<CR>
   !  <S-xF2>      <S-F2>
   !  <xF2>        <F2>

Frequently, when I press F2 in insert mode, I get the 4-character string
"<F2>" (without the quotes) inserted into my text.  If I hold down F2, then
I get several copies inserted in my text, but eventually, something kicks in
and F2 starts saving my file as expected, instead of inserting text.  At
other times, I don't get this problem at all and F2 just saves my file. 

I'm using TERM=linux.  I've tried all sorts of combinations of
timeout/ttimeout/timeoutlen/ttimeoutlen, but nothing seems to help.
Currently I have:

Can anybody help me fix this?  I also sent this to the VIM mailing list
yesterday, but haven't gotten any help yet -- I think this is must be
directly related to cygwin somehow.  I'm using Michael Hirmke's vim port
from the franken archives.

John Wiersba

VIM - Vi IMproved 5.5 (1999 Sep 19, compiled Nov 18 1999 00:18:55)
Compiled by mh@MIKE, with (+) or without (-):
+autocmd -browse +builtin_terms +byte_offset +cindent +cmdline_compl
+cmdline_info +comments +cryptv -cscope +dialog_con +digraphs -emacs_tags
+ex_extra +extra_search -farsi +file_in_path -osfiletype +find_in_path
-GUI -hangul_input +insert_expand -langmap +linebreak +lispindent +menu
+mksession +modify_fname +mouse -mouse_dec -mouse_gpm -mouse_netterm
+mouse_xterm -multi_byte -perl +quickfix -python -rightleft +scrollbind
+smartindent -sniff +statusline +syntax +tag_binary +tag_old_static
-tag_any_white -tcl -terminfo +textobjects +title +user_commands
+viminfo +wildignore +wildmenu +writebackup -X11 -xfontset -xim
-xterm_clipboard -xterm_save
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
      user exrc file: "$HOME/.exrc"
  fall-back for $VIM: "/usr/local/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H    -g -O2 -Wall
Linking: gcc  -o vim         -ltermcap

Want to unsubscribe from this list?
Send a message to

More information about the Cygwin mailing list