Solved

Vi Editor: how to insert?

Posted on 2003-12-07
4
635 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

776 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