Link to home
Start Free TrialLog in
Avatar of codenamecharlie
codenamecharlie

asked on

Vi Editor: how to insert?


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!
Avatar of anupnellip
anupnellip
Flag of Bahrain image

Avatar of paullamhkg
paullamhkg

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
4ji<li><Esc>j0.j0.

-- Glenn
ASKER CERTIFIED SOLUTION
Avatar of glassd
glassd

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial