Vim needs to add new content at the beginning and end of each line: Find a batch of html files from the current directory and use an Html file to express their addresses with hyperlink,
This allows the browser to access other pages only through this page. 1. find. -iname "* valid *. * "> valid.txt and the file name will exist in the following format :. /ValidityState-002.html. /ValidityState-customError-expected.txt. /ValidityState-customError.html. /ValidityState-patternMismatch-expected.txt. /ValidityState-patternMismatch-unsupported-expected.txt. /ValidityState-patternMismatch-unsupported.html. /ValidityState-patternMismatch.html. /ValidityState-rangeOverflow-expected.txt. /ValidityState-rangeOve Rflow.html... Www.2cto.com 2. the Form I want is: <a href =. /ValidityState-002.html>. /ValidityState-002.html </a>... solution:. cat valid | while read line; do echo "$ line> $ line"> vv.html; doneb. vi vv.html
The file content is as follows: "href =. /ValidityState-002.html>. /ValidityState-002.html ", to add the <a> label at the beginning and end of each line, fortunately there is vi command c. add the "<a href =" vim command: % s/^/<a href = d. add the "</a>" vim command at the end of each line: % s/$/<\/a> by fengyv