Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Add content at beginning / end of the line in VIM?

Status
Not open for further replies.

davyzhu

Advanced Member level 1
Joined
May 23, 2004
Messages
494
Helped
5
Reputation
10
Reaction score
2
Trophy points
1,298
Location
oriental
Activity points
4,436
Hi all,

I want to add content at beginning or end of dedicated line by COMMAND. I used to use "Ctrl-v"->select a column->"Shift I"->enter. But found sometimes the method complex.

For example, I have a file like:
#---File begin---
123
4567
891ab
cdefgh
#---File end---

And add "//" to the beginning of line "1" to "3", the file will be:
#---File begin---
//123
//4567
//891ab
cdefgh
#---File end---

And add "##" to the end of line "2" to "4", the file will be:
#---File begin---
//123
//4567##
//891ab##
cdefgh##
#---File end---

Thanks!
Davy
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top