I quite often find I have a need to insert a blank line either below or above the current line when editing in vim.
O will do this, but they subsequently switch into insert mode, which is annoying. Is there any built-in command to do this which will remain in normal mode?
Basically, it boils down to this:
nnoremap <silent> ]<Space> :<C-u>put =repeat(nr2char(10),v:count)<Bar>execute "'[-1"<CR> nnoremap <silent> [<Space> :<C-u>put!=repeat(nr2char(10),v:count)<Bar>execute "']+1"<CR>
Yet another way to insert lines above or below:
nnoremap <Enter> :call append(line('.'), '')<CR> nnoremap <S-Enter> :call append(line('.')-1, '')<CR>
Note that the solution from romainl and Mr Shunz will move the cursor to the newly inserted line, whereas this and also the one from Ingo Karkat will keep the cursor at the same spot.