How to duplicate a whole line in Vim?

sumek picture sumek · Sep 16, 2008 · Viewed 742.9k times · Source

How do I duplicate a whole line in Vim in a similar way to Ctrl+D in IntelliJ IDEA/ Resharper or Ctrl+Alt+/ in Eclipse?

Answer

Mark Biek picture Mark Biek · Sep 16, 2008

yy or Y to copy the line (mnemonic: yank