?
Solved

Edit /Save/Quit in VI Editor

Posted on 2012-12-24
7
Medium Priority
?
378 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 400 total points
ID: 38719288
Shift-lock or Scroll-lock maybe?
0
 
LVL 44

Assisted Solution

by:Darr247
Darr247 earned 800 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
7 Extremely Useful Linux Commands for Beginners

Just getting started with Linux? Here's a quick start guide that has 7 commands that we believe will come in handy.

 
LVL 79

Assisted Solution

by:arnold
arnold earned 400 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 400 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 800 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

WordPress Tutorial 2: Terminology

An important part of learning any new piece of software is understanding the terminology it uses. Thankfully WordPress uses fairly simple names for everything that make it easy to start using the software.

Question has a verified solution.

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

rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses
Course of the Month10 days, 17 hours left to enroll

770 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