Let say I have a simple line


What is the fastest way to yank this line and paste to a result like this?



I am currently doing this:

yy # To yank this line
p # Paste on next line
O # To insert and add a line above the pasted line

But doing so I will end up in Insert Mode. How can I stay in normal mode for all this?

  • 3
    I think this might be a duplicate of How to insert a newline without leaving normal mode, or at least it is very related. This the mapping from this question you'd end up with Y<leader>op
    – statox
    Commented Apr 23, 2021 at 8:36
  • Good find. I wouldn't have expected it to be such a popular Q (and have so many As).
    – B Layer
    Commented Apr 23, 2021 at 8:46
  • 1
    Surprisingly, it doesn't look like my answer appears there. Closest I found is "you can yank yy an empty line and then pasted p for below cursor and P for above the cursor". I'm not sure whether that means Y2pD is kinda clever or sorta tacky. :D
    – B Layer
    Commented Apr 23, 2021 at 9:01
  • Map normal mode enter to insert a blank line
    – minseong
    Commented Apr 23, 2021 at 23:22
  • 1
    @raylight C-c is emphatically not equivalent to Escape; too many people think they are equivalent. Here's a simple demonstration of why not: launch vim -Nu NONE. Now see what the difference is between 5ii<esc> and 5ii<C-c>.
    – D. Ben Knoble
    Commented Apr 26, 2021 at 15:12

2 Answers 2


Vim golf? :)

How about


It's perhaps a little contrived to create two new hello lines only to delete one but trying to avoid Insert mode is also a bit contrived when you're actually, you know, inserting new text (the blank line). ;)

  • 2
    What magic is this! Commented Apr 23, 2021 at 9:05
  • 2
    This is terrific! (Although not actually any fewer keystrokes than YpO<Esc>)
    – Rich
    Commented Apr 23, 2021 at 14:48
  • @Rich YpO<Esc> is good too! Commented Apr 26, 2021 at 15:13

There is also the unimpaired plugin that give mappings in normal mode for putting in blank lines (among other [ and ] base mappings). I never would have thought I'd use them, but I do constantly - these in particular are burned into my fingers:

There are linewise mappings. [<Space> and ]<Space> add newlines before and after the cursor line. [e and ]e exchange the current line with the one above or below it.

So you could do:



The . command works with all operator mappings, and will work with the > linewise mappings as well if you install repeat.vim.

Not the answer you're looking for? Browse other questions tagged or ask your own question.