Duplicate Each Line in Vim

Introduction

This is a useful one if you do any sort of repetitive script creation as I do and also infinitely easier than figuring it out in notepad++. Need to duplicate every line in a text file?

Fix

:g/^/norm yyp
sorted.

Leave a comment

Your email address will not be published. Comments are moderated before appearing.