How can I duplicate lines matching a pattern, and modify the second line, all in one command?
问题 I'm trying to add an attribute to a java class, using VIM as the editor. Therefore I thought I could use a command to ease my work with all the boilerplate code. Eg: All lines containing "atributeA", like this one this.attributeA=attributeA //basic constructor should turn into this.attributeA=attributeA //basic constructor this.attributeB=attributeB //basic constructor Is it possible? 回答1: Having the solution be a one-liner as a requirement seems a little odd, since you can assign any