LinuxQuestions.org
Review your favorite Linux distribution.
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


Reply
  Search this Thread
Old 05-14-2016, 09:45 PM   #1
babysteps123
LQ Newbie
 
Registered: May 2016
Posts: 10

Rep: Reputation: Disabled
vi command


I not only did the vi tutor.vi but I also read man vi and I am still a little confused by this scenario which tells me to list the command to:

change from Command mode to Insert (Entry) Mode, and start entering text before the cursor, vi command:

wouldn't the correct answer just be the vi command i? or does it have to go further and be i (enter text) and <esc> to go back to command mode?
 
Old 05-14-2016, 09:58 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,321
Blog Entries: 28

Rep: Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141
I normally use vim. I recommend it over vi; it really is "vi improved." I'm hardly expert, but I'm competent enough that vim is my now my preferred editor.

ESC-i will allow you to enter text one character before the current cursor position. (I have gotten into the habit of hitting ESC before I issue a command or enter text; some tutorials recommend that you hit ESC when you have completed your current operation. It is, methinks, whatever works for you, so long as you remember to ESC.)

This link should help: http://www.radford.edu/~mhtay/CPSC12...r_Commands.htm

Last edited by frankbell; 05-14-2016 at 09:59 PM.
 
1 members found this post helpful.
Old 05-14-2016, 10:00 PM   #3
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
To enter text just type the 'i' key one time once vi opens.
 
1 members found this post helpful.
  


Reply



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
[SOLVED] [SOLVED] bash script: can echo command, command works if I type, but command doesn't work in script ... why? hopeless_n00b Linux - Newbie 10 07-12-2018 05:57 AM
What 'gdb' command are used to find out where mount command fails ? [/dev/sdb] Glenn D. Linux - Software 6 02-09-2016 08:24 AM
Command/Script required to send an email alert in case command will not respond rajaniyer123 Linux - General 1 05-19-2012 01:12 PM
Executing shell command from JSP file with command line arg from URL orcusomega Programming 2 01-13-2012 03:38 PM
Bash Command Line Editor, while typing run another command before executing current? gumaheru Linux - General 5 04-13-2010 11:21 AM

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

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