" See https://vim.fandom.com/wiki/Mapping_fast_keycodes_in_terminal_Vim " See termcap-options for mapped key info " Some may not mapped correctly mapped for F1 to F4 (See vt100-function-keys ) " To set them, you can have a look at https://vim.fandom.com/wiki/Mapping_keys_in_Vim_-_Tutorial_(Part_2) " :set = " Those are the key for gnome-terminal with zsh on archlinux if &term =~ "xterm." set = set = set = set = endif "you could also direclty map them " map :some vimcmds " you can check the result with :map " MapFastKeycode: helper for fast keycode mappings " makes use of unused vim keycodes <[S-]F15> to <[S-]F37> function! MapFastKeycode(key, keycode) if s:fast_i == 46 echohl WarningMsg echomsg "Unable to map ".a:key.": out of spare keycodes" echohl None return endif let vkeycode = '<'.(s:fast_i/23==0 ? '' : 'S-').'F'.(15+s:fast_i%23).'>' exec 'set '.vkeycode.'='.a:keycode exec 'map '.vkeycode.' '.a:key let s:fast_i += 1 endfunction let s:fast_i = 0 call MapFastKeycode('', "") call MapFastKeycode('', "") call MapFastKeycode('', "") call MapFastKeycode('', "")