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


Closed Thread
  Search this Thread
Old 11-16-2010, 02: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, 02:35 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387
Hi,

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

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

Rep: Reputation: 52
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 03:00 AM.
 
Old 11-16-2010, 02:52 AM   #4
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850
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, 03:48 AM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

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


Closed Thread


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


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