Using Vi In Debian
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! |
From what I understand, Vi is deprecated now. Vim has replaced it. You can access it just the same way you do Vi:
Code:
vim /filename/here |
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 |
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.
|
dont you rate replies someone tell me how to rate replies so i can give billy a 10 out of 10.
|
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.
Peace, JimBass |
All times are GMT -5. The time now is 11:28 PM. |