LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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


Closed Thread
  Search this Thread
Old 11-16-2010, 01:00 AM   #1
turbomen
LQ Newbie
 
Registered: Oct 2010
Posts: 21

Rep: Reputation: 0
Could you tell me how vi works?


Dear All,

Could you tell me how vi works?

Cheers,
 
Old 11-16-2010, 01:35 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

Another homework assignment question, which we do not do for you.

Have a look here: vi and vim
 
Old 11-16-2010, 01:42 AM   #3
hua
Member
 
Registered: Oct 2006
Location: Slovak Republic
Distribution: Slackware 14.2, current
Posts: 461

Rep: Reputation: 78
You open the file which you want to edit with:

vi file.txt

After this you can use vi in two modes.
1. Give commands to the vi by pressing the SHIFT : keys simultaneously and the command, which can be q,q!,w ... Save the changes (w), quit the vi without saving the changes (q!) quit the vi with (q) and so on ...
2. Use the input mode by pressing the SHIFT i keys simultaneously. This will switch into the insert mode and you can edit your file. You can leave input mode by pressing ESC (escape) two times.

I think this is the most basic thing I didn't understand when I first used vi.

By the way - I think I saw one user in linuxquestions.org who uses a very good profile signature for the example commands in vi. I cannot remember his(her) name.

Regards

Last edited by hua; 11-16-2010 at 02:00 AM.
 
Old 11-16-2010, 01:52 AM   #4
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: Disabled
Hello turbomen,

as an answer to your question I'd recommend to install vim and execute the command
Code:
:vimtutor
this tutorial is very helpful when learning vim/vi.

I looked at your other posts, almost all of them are simple questions and show that you don't have the slightest knowledge about Linux. As druuna stated we are not here to do your homework. Please use google and look for a beginners guide to Linux. A far better recommendation: install Linux and use it, so you will learn.

Mh, just another hint referring to your question: vim is available for Windows as well. You may install it and do the vimtutor on windows, better than nothing

Markus
 
Old 11-16-2010, 02:48 AM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
And with those answers we're closing this.
 
  


Closed Thread



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
Debian Lenny - Sound only works on XMMS, nothing else works! lawdawg Debian 3 03-06-2009 07:35 PM
Strangest FTP error on RHEL5. gFTP works. RHEL4 works too. GuitsBoy Linux - Software 1 04-10-2008 08:29 AM
Mounting works, playing music works, reading tags doesn't Celettu Linux - Newbie 7 08-23-2006 12:27 PM
DNS look up works, ping only works for some sites any ideas? Mantrout Linux - Wireless Networking 3 01-29-2006 11:59 AM
XAWTV works, videodog works, motion works but how to code my own? rylan76 Linux - Hardware 0 01-06-2006 06:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:31 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