DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
When using etch (debain ) I try to vi a file. then when i try to use the number pad on the right side of the key board it puts in weird characters and adds a new line. is their something i can set in the shell or something that will allow me to use the keypad while in vi insert mode.
Not sure it helps, but if you are using the old-school vi, try switching to vim (vi improved).
To do so install the package "vim" and add
alias vi='vim'
to your ~/.bashrc (or other shell configuration file if you are using another shell).
The "vi" in Debian is actually vim, just like virtually any other Linux distribution. The arrow keys work just fine for me, unless I'm su'd as root (which is rather often). I never bothered learning how to fix it, because I'm an grizzled old vi user who has "hjkl" ingrained in the skull.
Once you have "hjkl" mastered, reaching over to the arrow keys takes too much time. Reaching all the way over to the number pad? Not for me!
That's very good advice about Vim, but to answer the poster's original question:
The numeric keypad doesn't work in "vi" when the term is set to "vt100" or "xterm". However, if you set your term type to 'ansi', then it will work. The recommended solution if you want to use the numeric keypad on a regular basis is to create a shell script.
EXAMPLE:
Code:
#!/bin/sh
set TERM=ansi
export TERM
exec /usr/bin/vi $@
Yo billy you are the man. that worked and it was exactly what i was looking for. That is the everest of finds. I am work with brainy unix admins who didnt know the answer.
They used to have an affero system here, but they dropped it some time ago. I usually use the posts count to determine if the poster knows what they are talking about. Obviously Acid Kewpie with his 27,000+ posts can still make mistakes, and somebody who just finds this site might have only 1 post and have it be truly brilliant, but a fairly rough metric is the more posts, the better the chances are the info is good.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.