LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-24-2008, 05:36 AM   #1
Gins
Senior Member
 
Registered: Jul 2004
Location: Germany
Distribution: open SUSE 11.0, Fedora 7 and Mandriva 2007
Posts: 1,662

Rep: Reputation: 47
The command ' wq ' in vi and vim


I am very familiar with the editor 'vi' on UNIX systems.

You can create a file by writing either 'vi' or 'vim'

At the end of the file, the command ' wq ' save the file exit the
editor.

I just installed open SuSE 10.3 on another computer.
It is working fine.


At the command line I created a file by writing 'vi rubbish1'.

I wrote what I wanted to do in it.

Afterwards, I wanted to exit by writing ' wq '.
Of course, first you have to press the 'Esc' button before writing
'wq'.

It does not respond. The file is there without closing.

I tried even ' vim rubbish2 '.

It created the file 'rubbish2'.
I wrote what I wanted.

At the end 'wq ' command does not respond.

What is the problem?
I badly need your help.
 
Old 02-24-2008, 05:47 AM   #2
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
That is with a ':', of course? Bizarre. You could try 'w' and 'q' separately or 'ZZ' or perhaps other ways. I'd look at the system-wide and personal config files, too - only thing I can think of is a weird mapping clobbering things.

-- :x was the other one I was trying to think of.

Incidentally, you don't say which specific implementation you're using and I don't know what Suse ships. Might be able to get more help from someone with that information.

Last edited by slakmagik; 02-24-2008 at 05:50 AM. Reason: one other method
 
Old 02-24-2008, 06:18 AM   #3
Gins
Senior Member
 
Registered: Jul 2004
Location: Germany
Distribution: open SUSE 11.0, Fedora 7 and Mandriva 2007
Posts: 1,662

Original Poster
Rep: Reputation: 47
Thanks digiot
Now I solve the problem. I am an idiot.

When I press to get this sign ' : ' , does not come. I have to do a few things to adjust on the shell.
Now it works.
 
Old 02-24-2008, 07:07 AM   #4
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
Oh, I see. Glad you got it working.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
no colors in vim on command line rajeev1982 AIX 5 02-05-2015 10:03 AM
VIM Command To Replace Entries? carlosinfl Linux - General 1 08-29-2007 06:05 PM
vi / vim command shahed Linux - Newbie 1 12-06-2006 11:10 PM
VIM Command Tab not working AMMullan Linux - Software 1 06-18-2006 05:17 AM
vi/vim command xviddivxoggmp3 Linux - Software 4 06-13-2004 10:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:29 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration