LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


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

Rep: Reputation: 0
The "vi" editor


Hello,

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, 05:50 PM   #2
Mega Man X
LQ Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 64
Hi!

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

Regards!
 
Old 06-05-2005, 06:01 PM   #3
phil.d.g
Senior Member
 
Registered: Oct 2004
Posts: 1,192

Rep: Reputation: 101Reputation: 101
Search on google for vi cheat sheets, heres one such result http://www.lagmonster.org/docs/vi.html

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, 06:16 PM   #4
Komakino
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 too...it's got some buttons and menus to help you.
 
Old 06-05-2005, 06:25 PM   #5
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, 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, 12:08 PM   #6
Fritz_Monroe
Member
 
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.

F_M
 
Old 06-07-2005, 10:27 PM   #7
nn_sheth
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.
 
  


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 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 04:36 AM
Trouble with Vi editor "Incomplete last line" Chtiman Linux - General 1 03-28-2005 03:22 PM
gtkradiant: "This editor binary doesn't match..." spuzzzzzzz Linux - Software 0 10-10-2004 04:17 AM
Linux Partition Table Editor - Need to change "Hidden Sectors" value Ouch_Taser Linux - Newbie 3 02-11-2004 11:03 AM
SuSE 9.0 - KDE Menu Editor Help "buggy" linuxgamer Linux - Newbie 0 12-02-2003 03:40 AM


All times are GMT -5. The time now is 06:05 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration