Solved

Vi Editor: how to insert?

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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
eclipse formatting 6 73
Online file editor, manager 6 62
Hacked File Timestamps 4 51
Error Message during CentOS 7 Minimal Install 3 34
Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

862 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

23 Experts available now in Live!

Get 1:1 Help Now