LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   cant edit text files properly in vi and fluxbox (https://www.linuxquestions.org/questions/linux-newbie-8/cant-edit-text-files-properly-in-vi-and-fluxbox-502557/)

soldan 11-17-2006 12:14 PM

cant edit text files properly in vi and fluxbox
 
hi, if i open a text file in vi (and xterm) while in fluxbox, i will be able to add text to the file, but not delete any text in the file. when i try to delete text, it kicks me back into vi's commandmode. by the way, i can edit text files in vi no problem (add and delete text) if i leave fluxbox and X, and return to the black console (not sure of the correct name of this screen).
i know that i was able to fully edit text files with 'the beaver' text editior from within FB on Vector linux, but i would prefer to use vi. is there anyway of correcting this problem so i can edit files with vi and fluxbox?

Tinkster 11-17-2006 01:29 PM

How are you trying to delete from within vi?

Cheers,
Tink

soldan 11-17-2006 04:25 PM

Tinkster, im using the 'delete' key (which is one of six in the cluster on the keyboard just to the right of the 'enter' key, along with 'home' 'pageup' 'pagedown' etc. this 'delete' key works in vi when in the black console (not in X or fluxbox).

Tinkster 11-17-2006 06:52 PM

In that case it's a key-mapping problem in xterm, I'd tend to say.
Why don't you use vi's key-bindings instead, which are independent
of the keyboard and/or terminal-emulation you're using?

x to delete a single letter, dw for a word, dd for a line...

Of course, you could read up on xterms man-page and adjust your
~/.Xresources


Cheers,
Tink

matthewg42 11-17-2006 06:55 PM

When you press backspace in the terminal, does it work, or do you get a ^H appear (or something similar, maybe ^?)?

soldan 11-18-2006 12:02 PM

thanks Tinkster :) makes sense to use vi's key bindings, seems easier that way too, instead of having to delete each charactor to delete a whole line.
matthewg42, when i press backspace in a termnal the cursor moves to the previous charactor, but doesnt delete it, this also happens in the black console (?the black screen with the logon/pass). i have seen '^?' in the past when ive tried to delete text, but i cant seem to reproduce it now.


All times are GMT -5. The time now is 10:22 AM.