Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

weird vi editor problem

Status
Not open for further replies.

meetramana

Programmer
Feb 2, 2005
57
US
Hi,
I have opened a vi editor to edit a file, I mean
vi <filename>

and then I edited what ever I need to.. after that I am not able to go to command mode.

it just ignores when I hit escape and what ever I type is appearing next to text that I just edited ( I mean when I try to do "ESC:wq"
it's showing :wq next to text that I just edited but not goiong to command mode. As a result I am not able to exit out of that file.

any ideas.. to exit out of the file without blatantly closing the window.

even if close the window by blatantly closing it, it's still there because I am using screens, that window is back when reattach the screen later.

This problem is in one of the windows of that screen and I don't want to kill the screen or I don't want to lose the screen.

all this is in ksh
any ideas...

Thanks

 
wanted to add one more thing,

vi editor in other windows of the same screen just work fine without any problems.
 
try ctrl-C to get out of insert mode?

HTH,

p5wizard
 
You can also kill your vi process from another session, then use vi -r <filename> to recover it, however the results aren't guaranteed, nor will this fix your problem permanently of course.

Are you sure your terminal settings are correct for all of your screens?

Annihilannic.
 
Perhaps your ESC-key isn't generating the ESC-ascii code in that session (anymore)? You could use Ctrl-[ instead.

Depending on your keyboard, you might need then Ctrl-AltGr-[ combination...


HTH,

p5wizard
 
I tried all the other ways I can think before I tried Annihilannic's method of killing it and recovering it.

This is what I saw when I actually tried to kill the vi process from another window.

Internal error: vclreol
this error was displayed in the vi window and then it went to command mode, so I could do :q! and got out.

anyways, just wanted to let you guys know if it means anything by the error "Internal error: vclreol"

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top