LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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, 06:36 AM   #1
Gins
Senior Member
 
Registered: Jul 2004
Location: Germany
Distribution: open SUSE 11.0, Fedora 7 and Mandriva 2007
Posts: 1,638

Rep: Reputation: 46
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, 06: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 06:50 AM. Reason: one other method
 
Old 02-24-2008, 07:18 AM   #3
Gins
Senior Member
 
Registered: Jul 2004
Location: Germany
Distribution: open SUSE 11.0, Fedora 7 and Mandriva 2007
Posts: 1,638

Original Poster
Rep: Reputation: 46
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, 08: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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 4 09-12-2012 03:01 PM
VIM Command To Replace Entries? carlosinfl Linux - General 1 08-29-2007 07:05 PM
vi / vim command shahed Linux - Newbie 1 12-07-2006 12:10 AM
VIM Command Tab not working AMMullan Linux - Software 1 06-18-2006 06:17 AM
vi/vim command xviddivxoggmp3 Linux - Software 4 06-13-2004 11:07 PM


All times are GMT -5. The time now is 12:39 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration