Solved

Vi Editor: how to insert?

Posted on 2003-12-07
4
633 Views
Last Modified: 2013-12-13

Ok, say, I am editing the following file with VIM (vi improved) and I want to insert <li> tag
in the beginning of line 5-7, how do I do this?  Be aware that I do not need <li> tag in
the beginning of lines 1-4 and 8-9

1 <html><head><title>Test</title></head>
2 <body>
3 Here is the points:
4 <ul>
5       Point 1;
6       Point 2;
7       Point 3;
8 </ul>
9 </body></html>


Thank You!
0
Comment
Question by:codenamecharlie
4 Comments
 
LVL 10

Expert Comment

by:anupnellip
ID: 9895032
0
 
LVL 12

Expert Comment

by:paullamhkg
ID: 9895131
after get into your vi editor use "i" for insert, "a" for append will do the job. and you can also try this vi reference http://www.rru.com/~meo/useful/vi/vi.rm.html
0
 
LVL 20

Expert Comment

by:Gns
ID: 9895460
4ji<li><Esc>j0.j0.

-- Glenn
0
 
LVL 7

Accepted Solution

by:
glassd earned 50 total points
ID: 9895515
:4,7s/^/<li>
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now