Solved

Edit /Save/Quit in VI Editor

Posted on 2012-12-24
7
376 Views
Last Modified: 2012-12-30
I have edited a file with VI editor
now when I type :wq
in Replace mode, I get error E:45
in Insert Mode, it just goes to the next line after I press Enter

Any help on this, or better show me how to install another user friendly editor.

Thanks
0
Comment
Question by:jskfan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 18

Assisted Solution

by:Andrej Pirman
Andrej Pirman earned 100 total points
ID: 38719288
Shift-lock or Scroll-lock maybe?
0
 
LVL 44

Assisted Solution

by:Darr247
Darr247 earned 200 total points
ID: 38719425
Did you try hitting the Esc key then using
:w!q
?

w! forces it to overwrite.
If that doesn't work, E:45 means the file is marked read-only... are you starting vi with sudo?

What distro of linux are you using?
0
 

Author Comment

by:jskfan
ID: 38719454
nano is easier than vi, I guess
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 78

Assisted Solution

by:arnold
arnold earned 100 total points
ID: 38719663
As darr247 pointed out, you were editing a read-only file.

Depending on which file you were editing, there might be a ..
I.e. to eit /etc/sudoers file, one should use visudo
vipw for /etc/passwd.
Etc.
0
 
LVL 1

Accepted Solution

by:
odintsov earned 100 total points
ID: 38720753
Hello,

I recommend nano, it is very simple (u can save file using CTRL+O and exit from it using CTRL+X).

U can install nano on Debian/Ubuntu using following command in terminal:
sudo apt-get install -y nano

On CentOS/Fedora:
sudo yum install -y nano
0
 
LVL 44

Assisted Solution

by:Darr247
Darr247 earned 200 total points
ID: 38721151
If your distro came with GNOME desktop, GEdit is installed by default. It works about like Notepad in windows.
0
 

Author Closing Comment

by:jskfan
ID: 38731939
thank you
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question