unable to save and exit from vi editor
i have done something while changing permission in vi editor. now when i open any file, i am not able to save and exit from it. when i type esc+shift:wq after opening a file. it says cant open file in write mode. please tell what to do? am a new user to fedora 9 and dont know much about it. please help
|
*any* file? The file is probably just not writable. Or, you don't own the file. Or, the disk is full.
|
Report here the results of two commands:
whoami ls -l the.file.you.try.to.edit In the command above -l is minus lowercase L. |
when i open *.pl files i get this error. i can open all files from my root account but from my local login account i am not able to open perl files. but i am able to open *.c, *.php etc files.
|
Have you checked the permissions as per the previous suggestions?
From a shell prompt, logged in with your standard user account type the following and post the results: Code:
whoami |
Looks like vi permissions are messed up. I am not that good with vi but I think you have messed with the virc or vi.rc. Hopefully you do not get these errors when logged in as root.
Some options I have are: 1. try a different editor for the timebeing nano or emacs should be there. 2. Create a new user and see if he is able to edit all files. 3. Reinstall vi - if you have the cd/dvd very simple logic can help you reinstall - else you would need to look the rpm or the source code up. Lesson: Make sure you back up system generated files - specially when you are root. |
All times are GMT -5. The time now is 03:13 AM. |