Vim does not recognize the console number pad.
A desktop and a notebook (HP dv 9225), each have multiple systems
installed. Vim does not recognize the console (tty, not X) number pad (with numlock on) in these installations in insert mode: Desktop: Laptop: Fedora 8 (i386 & nvidia) Vim 7.1 Fedora 8 (i386 & nvidia) Vim 7.1 Slackware 12.2 (i386 & nv) Vim 7.2 The number keys print pqrstuvwxy instead of 0123456789; numlock calls vim help; / toggles mode; * prints <F3>; - prints <F4>; + prints l; [enter] works. Some of both groups run the nv video driver, and some run nvidia; no common thread. Vim does recognize the console number pad in these installations: Desktop: Laptop: Debian 4.0 (i386 & nv) Vim 7.0 Slackware 12.2 (i386 & nv) Vim 7.2 Slackware 12.1 (i386 & nvidia) Vim 7.1 Scientific L5.2 (64 & nv) Vim 7.0 Slamd64 12.1 (86_64 & nv) Vim 7.1 Ubuntu 8.10 (i386 & nvidia) Vim 7.1 Scientific L 5.2 (86_64 & nv) Vim 7.0 There's no problem in an xterm, but I start in runlevel 3, and start X only when I need graphics. What could be changing the keymap only on the number pad, only while using vim, if it's vim, but why would vim be the problem on one computer, but not the other? Slackware 12.2 and vim 7.2 work properly on the laptop, but not on the desktop. Fedora doesn't work properly on either. The nvidia driver version in Fedora is 173.14.12. Slackware 12.2 is using the same driver and works properly in the laptop, but not in the desktop. The only hits I get in Google for "vim console number pad" involve a remote connection using putty. This is not the case, here. My ~/.vimrc: Remove ALL auto-commands. autocmd! set all& " Reset all options to compiled in defaults. set nocompatible " Use Vim defaults instead of 100% vi compatibility. set backspace=indent,eol,start " More powerful backspacing. set nobackup " Backups are for wimps :-) "set autoindent " Indent new lines as the previous. set noautoindent " Don't indent new lines as the previous. set background=dark " Brighten forground. set formatoptions-=cor " Turn off auto-comment. (:h fo-table) set viminfo='20,\"50 " Read/write a .viminfo; 50 lines max. set history=50 " Keep 50 lines of command line history. set showmode " Show the current mode. set ruler " Show the cursor position at all times. set textwidth=0 " No carriage return until entered. set laststatus=2 " Show status line. set ignorecase " Make searches insensitive to case, set smartcase " unless they contain upper-case letters. set nopaste " Set default for paste. "set nowrap " Don't wrap lines. " Paste - nopaste toggle (default, set above, is nopaste): nnoremap <F2> :set invpaste paste?<CR> imap <F2> <C-O><F2> set pastetoggle=<F2> " Don't use Ex mode, use Q for formatting: map Q gq " Modelines have historically been a source of security/resource " vulnerabilities -- disable by default, even when 'nocompatible' is set: set nomodeline " Enabled file type detection. Use the default filetype settings: if has("autocmd") filetype plugin on endif " has ("autocmd") " Set paper size from /etc/papersize if available (Debian-specific): if filereadable("/etc/papersize") try let s:shellbak = &shell let &shell="/bin/sh" let s:papersize = matchstr(system("cat /etc/papersize"), "\\p*") let &shell=s:shellbak if strlen(s:papersize) let &printoptions = "paper:" . s:papersize endif catch /^Vim\%((\a\+)\)\=:E145/ endtry endif if has('gui_running') " Make shift-insert work like in Xterm map <S-Insert> <MiddleMouse> map! <S-Insert> <MiddleMouse> endif " Switch syntax highlighting on when the terminal has colors, set " colorscheme, and highlighting of the last used search pattern: if &t_Co > 2 || has("gui_running") syntax on colorscheme ron set hlsearch endif What have I missed? Thanks, Bob Tried to edit. All my formating is lost. How do I do this? |
Does this happen only in vim (and only in insert mode)?
Is the numpad working in shell (or in vim's ex mode)? |
Only in vim. Only in insert mode. Only in a tty. Only in 3 of the 10 installed systems.
Thanks, Bob |
All times are GMT -5. The time now is 08:20 AM. |