LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Editing with VI and SuSE (https://www.linuxquestions.org/questions/linux-software-2/editing-with-vi-and-suse-106776/)

kbeaver 10-21-2003 12:47 PM

Editing with VI and SuSE
 
Hello,
I just installed SuSE 8.2, and I need to use an editor. I like VI because I can use it at work on my machine at home, but whenever I use VI now, I cannot edit anything that was already in the file. Say I have a file that has text in it. If I use VI from home or work, I cannot delete or change anything that was already in the file, I can add new text, then edit the new text, as long as I don't close VI. Any ideas?

aaa 10-21-2003 12:50 PM

Are you asking how to save? I think the command is just 'w'.

kbeaver 10-21-2003 01:09 PM

No, I literally cannot change text within the file. Say I have "#include <iostream.h>" and I want to change the library to just "<iostream>" I cannot delete the .h portion. I can put my cursor there, but the backspace button will do nothing (I am in insert mode).

aaa 10-21-2003 01:28 PM

Sometimes I get that problem in an xterm window. Doesn't happen on a regular console.

vivekiyer 10-21-2003 02:07 PM

Hmm from the looks of it you are trying to modify a file you do not have permission to modify. I am sorry if I am wrong. Try to su to root and edit the file. Else go ahead and chmod the file and try to edit it

Blinker_Fluid 10-21-2003 02:16 PM

Try using x instead of the backspace key. (in control mode) Some Unix systems won't let you erase anything you didn't just type with the backspace key in insert mode...


All times are GMT -5. The time now is 12:36 PM.