LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   home, delete, end keys problem in vi (http://www.linuxquestions.org/questions/slackware-14/home-delete-end-keys-problem-in-vi-276226/)

bujecas 01-10-2005 04:51 PM

home, delete, end keys problem in vi
 
Hi,
When I'm using vi in X window, my home, end and delete keys doesn't work well. In the console it's ok, but in X it isn't. I'm using slack 10 and xterm, my TERM in the X is xterm, and in console is linux.

Thnks.

Cedrik 01-11-2005 08:50 AM

By default /usr/bin/vi is a symlink to /usr/bin/elvis, from man elvis, elvis has
a X interface which may be the source of your poblem.

May I suggest you to try vim instead ? Make sure to copy the default
preferences /usr/share/vim/vim63/vimrc_example.vim to ~/vimrc before use it

bujecas 01-11-2005 09:20 AM

Stills the same, but now with colors :P.

Cedrik 01-11-2005 09:59 AM

Could you elaborate a little more about your home, end and delete key
problem ? What happen exactly ?

bujecas 01-11-2005 10:11 AM

In COMMAND mode, the HOME and END keys doesn't work. In INPUT mode, those keys, also doesn't work, and by pressing them the mode returns to COMMAND. In INPUT mode the backspace doesn't work, i.e, can't do anything, just beeps. In INPUT mode the DELETE key, doesn't work perfectly, i.e, it deletes caracteres when pressed, but when a line is completely empty this keys doesn't pull the next line up.
I think that's about it.

GaMeS 01-11-2005 10:22 AM

i'm the same problem

but use REPLACE and to errase texte press SPACEBAR

i don't have another solution...

Cedrik 01-11-2005 01:06 PM

To delete a line, I use dd in command mode (with a number before if I want to delete some lines
at the same time) I use x to delete char in command mode (with a number before as the same way
for dd)

In input mode the delete key works with me (and the vimrc example config copied in ~/.vimrc)

To go to end of line I use $ in command mode
To go to end of document, I let the next key pushed (the one to right of the end key on my
keyboard) until it reach the end

Genesee 01-11-2005 01:21 PM

Quote:

Originally posted by Cedrik

To go to end of document, I let the next key pushed (the one to right of the end key on my
keyboard) until it reach the end

or you can use "G" as well

here's a good reference - or check the docs at vim.org:

http://tnerual.eriogerg.free.fr/vim.html

GaMeS 01-11-2005 01:48 PM

thanks for urs help

bujecas 01-12-2005 03:16 PM

OK, I may use the keystrokes of the COMMAND mode, but if I am on INPUT mode and I want to delete caracteres or pull a line up, it won't do that because of the misconfigured HOME, END, DELETE keys.

-X- 01-12-2005 03:32 PM

See if your ~/.vimrc looks something like this. All the key you mentioned should work with this.

syntax enable
colorscheme evening
set autoindent
set backspace=indent,eol,start
fixdel
set nowrap
set ruler
set showcmd
set showmode
set tabstop=4


All times are GMT -5. The time now is 06:13 AM.