LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-27-2009, 01:11 PM   #1
Bob Barrett
LQ Newbie
 
Registered: Jan 2008
Posts: 7

Rep: Reputation: 0
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 sapersize = matchstr(system("cat /etc/papersize"), "\\p*")
let &shell=s:shellbak
if strlen(sapersize)
let &printoptions = "paper:" . sapersize
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?

Last edited by Bob Barrett; 01-27-2009 at 01:14 PM.
 
Old 01-27-2009, 09:18 PM   #2
ne pas
Member
 
Registered: Jul 2008
Posts: 55

Rep: Reputation: 23
Does this happen only in vim (and only in insert mode)?
Is the numpad working in shell (or in vim's ex mode)?
 
Old 01-28-2009, 08:43 AM   #3
Bob Barrett
LQ Newbie
 
Registered: Jan 2008
Posts: 7

Original Poster
Rep: Reputation: 0
Only in vim. Only in insert mode. Only in a tty. Only in 3 of the 10 installed systems.

Thanks,
Bob
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Man pages with vim keybindings, and touch pad scrolling j.todd Linux - Desktop 1 10-20-2008 06:41 AM
VIM Users: Do you use VIM via console or gui? JMJ_coder Linux - General 48 04-16-2008 03:12 AM
Ack!!! Lost My Number Pad!!!! brianthegreat Fedora 2 11-22-2005 12:02 PM
number pad not working Berhanie Linux - Laptop and Netbook 5 12-20-2003 11:12 PM
number pad x config? shanenin Slackware 3 11-18-2003 09:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration