Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-05-2005, 04:47 PM   #1
LQ Newbie
Registered: Jun 2005
Posts: 2

Rep: Reputation: 0
The "vi" editor


I tried this option: "vi file1". File1 opened as a new file and there is no data in the file. I typed in some text and tried to save the file and exit the "vi" editor. But i dont know how to do it. I am trying to use the vi editor similar to the windows textpad or notepad. Can I insert some text and save it and quit the vi editor to go back to the command line?

If yes can you please escort me with the command?

I tried :wq, Control q, and ZZ.

It didnt work, It simply typed in all of this commands in the vi editor.

Thank you so much.
Old 06-05-2005, 04:50 PM   #2
Mega Man X
LQ Guru
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 64

Did you do those commands on the command line?. I mean, vi(m) has two modes, insert and command. Press ESC first then ":" then "wq" to write and quit the file. Try running "vimtutor" to have a quick tutorial about using vim

Old 06-05-2005, 05:01 PM   #3
Senior Member
Registered: Oct 2004
Posts: 1,192

Rep: Reputation: 101Reputation: 101
Search on google for vi cheat sheets, heres one such result

When starting off it may be a good idea to print out the most comman commands and have it by your keyboard for quick reference
Old 06-05-2005, 05:16 PM   #4
Senior Member
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938

Rep: Reputation: 55
vim is easier to use than vi, but try gvim's got some buttons and menus to help you.
Old 06-05-2005, 05:25 PM   #5
LQ Guru
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 62
pico is quick and easy to use.
Old 06-06-2005, 11:08 AM   #6
Registered: Nov 2004
Location: Maryland, USA
Distribution: Mint 13
Posts: 276

Rep: Reputation: 31
Funny this should com up. I'm trying to learn linux and was getting ready to set up a home server. I started playing around with vi and had some problems. So I did some digging and came up with a couple good cheatsheets. Here is one that looks pretty good but doesn't cover everything. Then there's this PDF cheat sheet that seems to cover just about anything the newbie could want. Another option is this PDF intro that gets you to write your own cheatsheet.

I printed them all off and will use them in my studying.

Old 06-07-2005, 09:27 PM   #7
LQ Newbie
Registered: Jun 2005
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks you very much.

Hello people thank you very much for your replies. I really appreciate it. Actually the only thing i wasnt doing was not pressing ESC key. Now everything is working fine. I wasnt able to do net for a couple of days so it took time to reply. Anyways Thanks so much.


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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
"HOWTO Change Colour of Comments in VIM editor" manikantha Linux - General 8 07-16-2013 03:36 AM
Trouble with Vi editor "Incomplete last line" Chtiman Linux - General 1 03-28-2005 02:22 PM
gtkradiant: "This editor binary doesn't match..." spuzzzzzzz Linux - Software 0 10-10-2004 03:17 AM
Linux Partition Table Editor - Need to change "Hidden Sectors" value Ouch_Taser Linux - Newbie 3 02-11-2004 10:03 AM
SuSE 9.0 - KDE Menu Editor Help "buggy" linuxgamer Linux - Newbie 0 12-02-2003 02:40 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:43 AM.

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