DEV Community

Discussion on: Combining awk and vim to get real power

Collapse
 
learnbyexample profile image
Sundeep

why not use awk itself to insert the snippet? since you are using gawk, you can also use -i inplace if you want inplace editing

I don't remember exactly, but I think you can use silent to avoid having to use Enter manually, check these:

Collapse
 
voyeg3r profile image
Sérgio Araújo

Thanks @Sundeep for your tips! I will update my post. But actually the real purpuse of it was reached, since many people will learn more about awk, vim, and of course, I will learn more with your great suggestions.

Collapse
 
voyeg3r profile image
Sérgio Araújo • Edited

Hi @Sundeep, I have made some changes on my article, now it shows a pure awk solution, a vim macro solution + awk. Both brings us more ideas for the future needs.